From 7170f2252cc9a41f2d82bea6925d95e336a6534d Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 2 Oct 2023 05:48:35 +0200 Subject: [PATCH 001/806] rivet: remove deprecated versions and clean up recipe (#39861) Co-authored-by: jmcarcell Co-authored-by: Wouter Deconinck --- .../repos/builtin/packages/rivet/package.py | 271 +----------------- .../builtin/packages/rivet/rivet-1.8.2.patch | 44 --- .../builtin/packages/rivet/rivet-1.9.0.patch | 30 -- .../builtin/packages/rivet/rivet-2.2.0.patch | 11 - .../builtin/packages/rivet/rivet-2.2.1.patch | 11 - .../builtin/packages/rivet/rivet-2.4.0.patch | 12 - .../builtin/packages/rivet/rivet-2.4.2.patch | 39 --- .../builtin/packages/rivet/rivet-2.4.3.patch | 39 --- .../builtin/packages/rivet/rivet-2.5.1.patch | 39 --- .../builtin/packages/rivet/rivet-2.5.2.patch | 10 - .../builtin/packages/rivet/rivet-2.5.3.patch | 43 --- .../builtin/packages/rivet/rivet-2.5.4.patch | 42 --- .../builtin/packages/rivet/rivet-2.6.0.patch | 90 ------ .../builtin/packages/rivet/rivet-2.6.1.patch | 24 -- .../builtin/packages/rivet/rivet-2.6.2.patch | 97 ------- .../builtin/packages/rivet/rivet-2.7.0.patch | 97 ------- 16 files changed, 7 insertions(+), 892 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-1.8.2.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-1.9.0.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.2.0.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.2.1.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.4.0.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.4.2.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.4.3.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.5.1.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.5.2.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.5.3.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.5.4.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.6.0.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.6.1.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.6.2.patch delete mode 100644 var/spack/repos/builtin/packages/rivet/rivet-2.7.0.patch diff --git a/var/spack/repos/builtin/packages/rivet/package.py b/var/spack/repos/builtin/packages/rivet/package.py index fe23f40caccfda..dd20cd7273ee40 100644 --- a/var/spack/repos/builtin/packages/rivet/package.py +++ b/var/spack/repos/builtin/packages/rivet/package.py @@ -6,7 +6,6 @@ import os from spack.package import * -from spack.pkg.builtin.boost import Boost class Rivet(AutotoolsPackage): @@ -18,6 +17,7 @@ class Rivet(AutotoolsPackage): tags = ["hep"] + version("3.1.8", sha256="75b3f3d419ca6388d1fd2ec0eda7e1f90f324b996ccf0591f48a5d2e28dccc13") version("3.1.7", sha256="27c7dbbcb5fd7ee81caf136daf4e960bca0ec255d9fa1abe602f4d430861b27a") version("3.1.6", sha256="1cf6ebb6a79d181c441d1d0c7c6d623c423817c61093f36f21adaae23e679090") version("3.1.4", sha256="37edc80a2968ce1031589e43ba6b492877ca7901bea38f8bb7536a5c8cf8100d") @@ -28,206 +28,9 @@ class Rivet(AutotoolsPackage): version("3.0.2", sha256="9624d6cdcad77eafde40312cf6a1c97f4263f22faf9244b198c140b2c256d2f3") version("3.0.1", sha256="e7551168b86a05c9c029c319c313a0aa142a476195e7ff986c896c1b868f89dd") version("3.0.0", sha256="3944434d3791dccb54f7b2257589df6252cc7c065ce9deb57fbef466ff9e62b1") - version( - "2.7.2b", - sha256="e9f0a709f8226cde54f9406d36efab1e1b8ed0c6574fbcb1d72a186b09188106", - deprecated=True, - ) - version( - "2.7.2", - sha256="a6634537c005660e56514b70ab9efb9d466c50685d6fb45ed03e9e1988479f02", - deprecated=True, - ) - version( - "2.7.1", - sha256="b4145d8369b8a9fa0ada7ba2e5a2e9992d8e4a12ca4874d835246d2e708cbdef", - deprecated=True, - ) - version( - "2.7.0", - sha256="34ad6a0b47dc4736feac8580a275e8b3a46df8fbeefd91e813add0a1525aacaf", - deprecated=True, - ) - version( - "2.6.2", - sha256="9dde49d5c02038a295f03d2972f85be8746205bdb5ca1eab868b2c9129ade37a", - deprecated=True, - ) - version( - "2.6.1", - sha256="e490d1f35aafa3e175690ae92f862c07a5fe2c51f693c88c87789f0441c89022", - deprecated=True, - ) - version( - "2.6.0", - sha256="fb3229dccd31ea40b0af09974253073f6ad0a3a97e9a0cf44b53748ea8e2f900", - deprecated=True, - ) - version( - "2.5.4", - sha256="772252193698d994fd111f790e72a4024df7572d492e3d5a9e840a074c5527e2", - deprecated=True, - ) - version( - "2.5.3", - sha256="99e10330564ac479c6637d317c08882889a272db8ee204ad45a6ee1dcb291de4", - deprecated=True, - ) - version( - "2.5.2", - sha256="70aa27764a14159c94c0b753a0c3d3600ac669def398cb2d8a6c63ae17704f05", - deprecated=True, - ) - version( - "2.5.1", - sha256="14ee5828de217e96a30e666192515a2083afee030d81d36fc6bea948e9f7810a", - deprecated=True, - ) - version( - "2.5.0", - sha256="c59ff35715be0caf65d6ba808b3badad0f6f7e7758f2049fb6ba43ed579bd4af", - deprecated=True, - ) - version( - "2.4.3", - sha256="18aafecab6c3baeac871a9743946433c2dc01825d8fe291b157719a15c342682", - deprecated=True, - ) - version( - "2.4.2", - sha256="accb146f3082719781a51eec879427c31401577c44f60b27ec8450102fe68aff", - deprecated=True, - ) - version( - "2.4.1", - sha256="c14f0f58d1792d84d62c62b44ebb94db004776feba83fd8186bba898d55123cf", - deprecated=True, - ) - version( - "2.4.0", - sha256="5ee2f34a277ed058b8aef750d946b40d4cf781023b9adab03ca95e803a39fb06", - deprecated=True, - ) - version( - "2.3.0", - sha256="dd07702981d586e4b97b0fa56ae08cd08a631a952322a9b52e7622a46a7741ab", - deprecated=True, - ) - version( - "2.2.1", - sha256="9e64ba19d567bdf4d0cc42b435491c4363b5fec90170d034445a99a1e752b691", - deprecated=True, - ) - version( - "2.2.0", - sha256="3bdafe2007ff54c4734e0c8bc6ba9dc97028d4c41d538201b9582a869af8ae1a", - deprecated=True, - ) - version( - "2.1.2", - sha256="40a20c1ee186326e5bfd906e0bc88f16dc740551be9cc274e9a826873d9c1eed", - deprecated=True, - ) - version( - "2.1.1", - sha256="eefa936de6f6c34a6bab39899841f3189d7621c8ba227032f0f32e6e20dfcf85", - deprecated=True, - ) - version( - "2.1.0", - sha256="58a1ca7b5a47719933782c050e67d0eb3823a7384cfc3c434fece41724c307e6", - deprecated=True, - ) - version( - "2.0.0", - sha256="038f81f92fbba001ed23b56c1229a4f3b41e0c32e00bc92ea58d042909e3855a", - deprecated=True, - ) - version( - "1.9.0", - sha256="55ef552b351328c287194aa99fa2b797e6632dc3fa88dfccd58264602012e044", - deprecated=True, - ) - version( - "1.8.3", - sha256="aa82742fd4d7c68bfbef1367c4c605e06f9fed479a753db96aa6659407fcc4fd", - deprecated=True, - ) - version( - "1.8.2", - sha256="56be98d31693253543f3e657c8f8edc7979c89fdb0ede1bdddfb3a9f5d4cfc3a", - deprecated=True, - ) - version( - "1.8.1", - sha256="7e06d22350bec30220186e796caa93e9bfebd8d771a7efd35673897248437c61", - deprecated=True, - ) - version( - "1.8.0", - sha256="7b28f9163f74583b1542b87c48f28a3ad1338da6136d8e3ca0aeba21095f5fe0", - deprecated=True, - ) - version( - "1.7.0", - sha256="180741f590f210474b686d60241ad59e008221751ead21f0950c59aff93e54fd", - deprecated=True, - ) - version( - "1.6.0", - sha256="1affd9e779f48477402e4150f315b3179204cbbc920db2d0129cd9c38bd18b26", - deprecated=True, - ) - version( - "1.5.1", - sha256="9f24e9824286d5b0302c7e440f4803a8e3b8da50e1260e78c3b3c2eb587b317a", - deprecated=True, - ) - version( - "1.5.0", - sha256="b7fe63e8caacc5c038ab567fe505d275288eedaa1aed6c379057629eef126006", - deprecated=True, - ) - version( - "1.4.0", - sha256="067c94659bb7859904e20e72a676f94f103e6e012b7dba8071f51e8a6e624dbb", - deprecated=True, - ) - version( - "1.3.0", - sha256="5ce41c8492c2fcf809a7135bf8335a01a98ea85fb556b3d00bd4260151efd12f", - deprecated=True, - ) - version( - "1.2.1", - sha256="2d0380b819f778d8d9c2a462af90bd6a6188121e4edcc6202d936130b59bab17", - deprecated=True, - ) - version( - "1.2.0", - sha256="ff5869f6dc9465f429e54686e12c39becac57a83273542179a59bac7561b6404", - deprecated=True, - ) - version( - "1.1.3", - sha256="4be3cd9e6f808cdc5511991be2756f5fa838b6ecd01806fdbe7aec0aa382f946", - deprecated=True, - ) - version( - "1.1.2", - sha256="a15b5d3339481446dec1b719d7d531a87a2e9d11c9fe8044e270ea69611b07c8", - deprecated=True, - ) - version( - "1.1.1", - sha256="bd87fefee6bb8368216755342dc80ab3f8f3c813732dd03c6f94135d45f7036b", - deprecated=True, - ) variant("hepmc", default="2", values=("2", "3"), description="HepMC version to link against") - conflicts("hepmc=3", when="@:2", msg="HepMC support was added in 3.0") - # According to A. Buckley (main Rivet developer): # "typically a given Rivet version will work with # all YODA releases of that middle-digit version, @@ -235,25 +38,6 @@ class Rivet(AutotoolsPackage): # to be using the latest versions of both.". The versions below # are taken from LCG stack which, in most cases, is the definition # of "latest" at the moment of release. - depends_on("yoda@1.0.4", when="@2.0.0") - depends_on("yoda@1.0.5", when="@2.1.0") - depends_on("yoda@1.0.6", when="@2.1.1") - depends_on("yoda@1.1.0", when="@2.1.2") - depends_on("yoda@1.3.0", when="@2.2.0") - depends_on("yoda@1.3.1", when="@2.2.1") - depends_on("yoda@1.4.0", when="@2.3.0") - depends_on("yoda@1.5.5", when="@2.4.0") - depends_on("yoda@1.5.9", when="@2.4.2") - depends_on("yoda@1.6.1", when="@2.4.3") - depends_on("yoda@1.6.2", when="@2.5.0") - depends_on("yoda@1.6.3", when="@2.5.1") - depends_on("yoda@1.6.5", when="@2.5.2") - depends_on("yoda@1.6.6", when="@2.5.3") - depends_on("yoda@1.6.7", when="@2.5.4") - depends_on("yoda@1.7.1", when="@2.6.1") - depends_on("yoda@1.7.4", when="@2.6.2") - depends_on("yoda@1.7.5", when="@2.7.2") - depends_on("yoda@1.7.5", when="@2.7.2b") depends_on("yoda@1.7.7", when="@3.0.1") depends_on("yoda@1.8.0", when="@3.1.0") depends_on("yoda@1.8.2", when="@3.1.1") @@ -264,24 +48,16 @@ class Rivet(AutotoolsPackage): # The following versions were not a part of LCG stack # and thus the exact version of YODA is unknown - depends_on("yoda@1.7.0:1.7", when="@2.6.0,2.7.0,2.7.1,3.0.0,3.0.2") - depends_on("yoda@1.5.0:1.5", when="@2.4.1") + depends_on("yoda@1.7.0:1.7", when="@3.0.0,3.0.2") depends_on("hepmc", when="hepmc=2") depends_on("hepmc3", when="hepmc=3") - depends_on("boost", when="@:2.5.0") - # TODO: replace this with an explicit list of components of Boost, - # for instance depends_on('boost +filesystem') - # See https://github.com/spack/spack/pull/22303 for reference - depends_on(Boost.with_default_variants, when="@:2.5.0") depends_on("fastjet") depends_on("fastjet@3.4.0:", when="@3.1.7:") - depends_on("fjcontrib", when="@3.0.0:") - depends_on("gsl", when="@:2.6.0,2.6.2:2") + depends_on("fjcontrib") depends_on("python", type=("build", "run")) depends_on("py-cython@0.24.0:", type="build") depends_on("swig", type="build") - depends_on("yaml-cpp", when="@2.0.0:2.1.2") depends_on("autoconf", type="build") depends_on("autoconf@2.71:", when="@3.1.7", type="build") @@ -294,21 +70,6 @@ class Rivet(AutotoolsPackage): filter_compiler_wrappers("rivet-build", relative_root="bin") - patch("rivet-1.8.2.patch", when="@1.8.2", level=0) - patch("rivet-1.9.0.patch", when="@1.9.0", level=0) - patch("rivet-2.2.0.patch", when="@2.2.0", level=0) - patch("rivet-2.2.1.patch", when="@2.2.1", level=0) - patch("rivet-2.4.0.patch", when="@2.4.0", level=0) - patch("rivet-2.4.2.patch", when="@2.4.2", level=0) - patch("rivet-2.4.3.patch", when="@2.4.3", level=0) - patch("rivet-2.5.1.patch", when="@2.5.1", level=0) - patch("rivet-2.5.2.patch", when="@2.5.2", level=0) - patch("rivet-2.5.3.patch", when="@2.5.3", level=0) - patch("rivet-2.5.4.patch", when="@2.5.4", level=0) - patch("rivet-2.6.0.patch", when="@2.6.0", level=0) - patch("rivet-2.6.1.patch", when="@2.6.1", level=0) - patch("rivet-2.6.2.patch", when="@2.6.2", level=0) - patch("rivet-2.7.0.patch", when="@2.7.0", level=0) patch("rivet-3.0.0.patch", when="@3.0.0", level=0) patch("rivet-3.0.1.patch", when="@3.0.1", level=0) patch("rivet-3.1.0.patch", when="@3.1.0", level=0) @@ -316,12 +77,11 @@ class Rivet(AutotoolsPackage): @run_before("configure") def copy_gsl_m4(self): - if self.spec.satisfies("@2.6.2:"): - copy(join_path(os.path.dirname(__file__), "gsl.m4"), "m4/gsl.m4") + copy(join_path(os.path.dirname(__file__), "gsl.m4"), "m4/gsl.m4") @property def force_autoreconf(self): - return self.version >= Version("2.6.2") + return True def setup_build_environment(self, env): # this avoids an "import site" error in the build @@ -340,27 +100,10 @@ def configure_args(self): else: args += ["--with-hepmc3=" + self.spec["hepmc3"].prefix] - if self.spec.satisfies("@:1"): - args += ["--with-boost-incpath=" + self.spec["boost"].includes] - else: - if self.spec.satisfies("@:2.5.0"): - args += ["--with-boost=" + self.spec["boost"].prefix] - args += ["--with-fastjet=" + self.spec["fastjet"].prefix] - if self.spec.satisfies("@2:"): - args += ["--with-yoda=" + self.spec["yoda"].prefix] - - if self.spec.satisfies("@:2.6.0,2.6.2:2"): - args += ["--with-gsl=" + self.spec["gsl"].prefix] - - if self.spec.satisfies("@3.0.0:"): - args += ["--with-fjcontrib=" + self.spec["fjcontrib"].prefix] - - if self.spec.satisfies("@:2.5.1"): - args += ["--enable-unvalidated"] + args += ["--with-yoda=" + self.spec["yoda"].prefix] - if self.spec.satisfies("@2:2.4"): - args += ["--enable-stdcxx11"] + args += ["--with-fjcontrib=" + self.spec["fjcontrib"].prefix] args += ["--disable-pdfmanual"] diff --git a/var/spack/repos/builtin/packages/rivet/rivet-1.8.2.patch b/var/spack/repos/builtin/packages/rivet/rivet-1.8.2.patch deleted file mode 100644 index 95cbe774a0e5de..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-1.8.2.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- src/Tools/Makefile.in.orig 2013-05-15 14:02:25.000000000 +0200 -+++ src/Tools/Makefile.in 2013-05-15 14:03:14.000000000 +0200 -@@ -79,7 +79,7 @@ - libRivetTools_la-ParticleIdUtils.lo \ - libRivetTools_la-tinyxml.lo libRivetTools_la-tinyxmlerror.lo \ - libRivetTools_la-tinyxmlparser.lo \ -- libRivetTools_la-BinnedHistogram.lo \ -+# libRivetTools_la-BinnedHistogram.lo \ - libRivetTools_la-mt2_bisect.lo libRivetTools_la-RivetMT2.lo \ - libRivetTools_la-BinnedHistogram.lo - libRivetTools_la_OBJECTS = $(am_libRivetTools_la_OBJECTS) -@@ -371,7 +371,7 @@ - TinyXML/tinyxml.cpp \ - TinyXML/tinyxmlerror.cpp \ - TinyXML/tinyxmlparser.cpp \ -- BinnedHistogram.cc \ -+# BinnedHistogram.cc \ - mt2_bisect.cc \ - RivetMT2.cc \ - BinnedHistogram.cc ---- include/LWH/Axis.h.orig 2013-05-14 18:30:02.000000000 +0200 -+++ include/LWH/Axis.h 2013-05-14 18:31:35.000000000 +0200 - -@@ -115,7 +115,7 @@ - * - */ - int coordToIndex(double coord) const { -- assert( ! isnan(coord) ); -+ assert( ! std::isnan(coord) ); - if ( coord >= upper ) return OVERFLOW_BIN; - else if ( coord < lower ) return UNDERFLOW_BIN; - else return int((coord - lower)/binWidth(0)); - ---- src/Tools/Makefile.am.orig 2013-05-15 13:14:11.000000000 +0200 -+++ src/Tools/Makefile.am 2013-05-15 13:16:53.000000000 +0200 -@@ -14,7 +14,7 @@ - TinyXML/tinyxml.cpp \ - TinyXML/tinyxmlerror.cpp \ - TinyXML/tinyxmlparser.cpp \ -- BinnedHistogram.cc \ -+# BinnedHistogram.cc \ - mt2_bisect.cc \ - RivetMT2.cc \ - BinnedHistogram.cc diff --git a/var/spack/repos/builtin/packages/rivet/rivet-1.9.0.patch b/var/spack/repos/builtin/packages/rivet/rivet-1.9.0.patch deleted file mode 100644 index 9d274550b7eab0..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-1.9.0.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- bin/rivet-buildplugin.in.orig 2014-09-02 11:22:32.000000000 +0200 -+++ bin/rivet-buildplugin.in 2014-09-02 11:26:31.000000000 +0200 -@@ -62,6 +62,7 @@ - mycppflags="" - prefix="@prefix@" - irivet="@includedir@" -+exec_prefix=@exec_prefix@ - test -n "$irivet" && mycppflags="$mycppflags -I${irivet}" - ihepmc="@HEPMCINCPATH@" - test -n "$ihepmc" && mycppflags="$mycppflags -I${ihepmc}" -@@ -74,7 +75,7 @@ - - ## Get Rivet system linker flags (duplicating that in rivet-config.in) - myldflags="" --lrivet="@libdir@" -+lrivet="${exec_prefix}/lib" - test -n "$lrivet" && myldflags="$myldflags -L${lrivet}" - lhepmc="@HEPMCLIBPATH@" - test -n "$lhepmc" && myldflags="$myldflags -L${lhepmc}" ---- bin/rivet-findid 2015-06-23 09:15:28.000000001 +0200 -+++ bin/rivet-findid 2015-06-23 09:15:38.000000001 +0200 -@@ -170,7 +170,7 @@ - if k=='code': - entries[v] = c.text - if entries.get('9') == 'SPIRESTeX': -- result['bibtex'] = entries['z'] -+ result['bibtex'] = entries['a'] - - if i.get('tag') == '037': - entries = {} diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.2.0.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.2.0.patch deleted file mode 100644 index ac9268a25220ee..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.2.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bin/rivet-findid 2015-06-23 09:39:49.000000001 +0200 -+++ bin/rivet-findid 2015-06-23 09:40:09.000000001 +0200 -@@ -160,7 +160,7 @@ - if k=='code': - entries[v] = c.text - if entries.get('9') == 'SPIRESTeX': -- result['bibtex'] = entries['z'] -+ result['bibtex'] = entries['a'] - - if i.get('tag') == '037': - entries = {} diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.2.1.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.2.1.patch deleted file mode 100644 index a9fceb92c0fe3e..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.2.1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bin/rivet-findid 2015-06-23 09:40:38.000000001 +0200 -+++ bin/rivet-findid 2015-06-23 09:40:45.000000001 +0200 -@@ -160,7 +160,7 @@ - if k=='code': - entries[v] = c.text - if entries.get('9') == 'SPIRESTeX': -- result['bibtex'] = entries['z'] -+ result['bibtex'] = entries['a'] - - if i.get('tag') == '037': - entries = {} diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.4.0.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.4.0.patch deleted file mode 100644 index 7ce4f1dd55d208..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.4.0.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- configure 2015-10-07 12:35:57.000000000 +0300 -+++ configure 2015-10-09 16:18:02.432562522 +0300 -@@ -18728,7 +18728,7 @@ - ## Boost utility library - echo "$as_me: this is boost.m4 serial 24" >&5 - boost_save_IFS=$IFS --boost_version_req=1.55.0 -+boost_version_req=1.53.0 - IFS=. - set x $boost_version_req 0 0 0 - IFS=$boost_save_IFS - diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.4.2.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.4.2.patch deleted file mode 100644 index 98436c5acfb50e..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.4.2.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- configure.orig 2016-09-30 14:12:42.317369715 +0200 -+++ configure 2016-09-30 14:17:21.690229397 +0200 -@@ -19644,11 +19644,15 @@ - cat >conftest.py <<_ACEOF - - import sys, string -+# Python 2 and 3 compatible -+from future.builtins import map -+# Python 2 and 3: forward-compatible -+from future.builtins import range - # split strings by '.' and convert to numeric. Append some zeros - # because we need at least 4 digits for the hex conversion. --minver = map(int, string.split('2.5', '.')) + [0, 0, 0] -+minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] - minverhex = 0 --for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] -+for i in range(0, 4): minverhex = (minverhex << 8) + minver[i] - if sys.hexversion >= minverhex: - sys.exit( 0 ) - else: -@@ -19676,15 +19680,15 @@ - fi - - -- PYTHON_VERSION=`$PYTHON -c "import sys; print '.'.join(map(str, sys.version_info[:2]));"` -+ PYTHON_VERSION=`$PYTHON -c "from __future__ import print_function; import sys; print('.'.join(map(str, sys.version_info[:2])));"` - -- RIVET_PYTHONPATH=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(prefix='$prefix', plat_specific=True);"` -+ RIVET_PYTHONPATH=`$PYTHON -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(prefix='$prefix', plat_specific=True));"` - - ## Test for Python header - if test -x "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 - $as_echo_n "checking for Python include path... " >&6; } -- python_incpath=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();"` -+ python_incpath=`$PYTHON -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_incpath" >&5 - $as_echo "$python_incpath" >&6; } - python_header="$python_incpath/Python.h" diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.4.3.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.4.3.patch deleted file mode 100644 index 9d006df8c0cec8..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.4.3.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- configure.orig 2016-06-28 23:57:35.000000000 +0200 -+++ configure 2016-09-19 12:44:23.411192406 +0200 -@@ -19643,11 +19643,15 @@ - cat >conftest.py <<_ACEOF - - import sys, string -+# Python 2 and 3 compatible -+from future.builtins import map -+# Python 2 and 3: forward-compatible -+from future.builtins import range - # split strings by '.' and convert to numeric. Append some zeros - # because we need at least 4 digits for the hex conversion. --minver = map(int, string.split('2.5', '.')) + [0, 0, 0] -+minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] - minverhex = 0 --for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] -+for i in range(0, 4): minverhex = (minverhex << 8) + minver[i] - if sys.hexversion >= minverhex: - sys.exit( 0 ) - else: -@@ -19675,15 +19679,15 @@ - fi - - -- PYTHON_VERSION=`$PYTHON -c "import sys; print '.'.join(map(str, sys.version_info[:2]));"` -+ PYTHON_VERSION=`$PYTHON -c "from __future__ import print_function; import sys; print('.'.join(map(str, sys.version_info[:2])));"` - -- RIVET_PYTHONPATH=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(prefix='$prefix', plat_specific=True);"` -+ RIVET_PYTHONPATH=`$PYTHON -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(prefix='$prefix', plat_specific=True));"` - - ## Test for Python header - if test -x "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 - $as_echo_n "checking for Python include path... " >&6; } -- python_incpath=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();"` -+python_incpath=`$PYTHON -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_incpath" >&5 - $as_echo "$python_incpath" >&6; } - python_header="$python_incpath/Python.h" diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.5.1.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.5.1.patch deleted file mode 100644 index dc5f484203a30f..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.5.1.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- configure.orig 2016-09-30 09:25:10.000000000 +0200 -+++ configure 2016-09-30 09:27:01.000000000 +0200 -@@ -19681,11 +19681,15 @@ - cat >conftest.py <<_ACEOF - - import sys, string -+# Python 2 and 3 compatible -+from future.builtins import map -+# Python 2 and 3: forward-compatible -+from future.builtins import range - # split strings by '.' and convert to numeric. Append some zeros - # because we need at least 4 digits for the hex conversion. --minver = map(int, string.split('2.5', '.')) + [0, 0, 0] -+minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] - minverhex = 0 --for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i] -+for i in range(0, 4): minverhex = (minverhex << 8) + minver[i] - if sys.hexversion >= minverhex: - sys.exit( 0 ) - else: -@@ -19713,15 +19717,15 @@ - fi - - -- PYTHON_VERSION=`$PYTHON -c "import sys; print '.'.join(map(str, sys.version_info[:2]));"` -+ PYTHON_VERSION=`$PYTHON -c "from __future__ import print_function; import sys; print('.'.join(map(str, sys.version_info[:2])));"` - -- RIVET_PYTHONPATH=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(prefix='$prefix', plat_specific=True);"` -+ RIVET_PYTHONPATH=`$PYTHON -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(prefix='$prefix', plat_specific=True));"` - - ## Test for Python header - if test -x "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 - $as_echo_n "checking for Python include path... " >&6; } -- python_incpath=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();"` -+python_incpath=`$PYTHON -c "from __future__ import print_function; import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_incpath" >&5 - $as_echo "$python_incpath" >&6; } - python_header="$python_incpath/Python.h" diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.5.2.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.5.2.patch deleted file mode 100644 index 9f536d37511631..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.5.2.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ./include/Rivet/Tools/RivetSTL.hh.orig 2017-08-03 11:49:33.005431033 +0200 -+++ ./include/Rivet/Tools/RivetSTL.hh 2017-08-03 11:50:13.817841608 +0200 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - - - #ifndef foreach diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.5.3.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.5.3.patch deleted file mode 100644 index bebf5c73ab01fd..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.5.3.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- include/Rivet/Config/RivetCommon.hh.orig 2017-05-31 12:32:04.547062840 +0200 -+++ include/Rivet/Config/RivetCommon.hh 2017-05-31 12:32:12.379054886 +0200 -@@ -2,6 +2,7 @@ - #define RIVET_RivetCommon_HH - - // Convenience build-setup header for Rivet internal use -+#include - - // Automatic build info from autoconf - #include "Rivet/Config/RivetConfig.hh" ---- include/Rivet/Run.hh.orig 2017-05-31 12:36:00.225823486 +0200 -+++ include/Rivet/Run.hh 2017-05-31 12:36:18.653804770 +0200 -@@ -4,6 +4,7 @@ - - #include "Rivet/Tools/RivetSTL.hh" - #include "Rivet/Tools/RivetHepMC.hh" -+#include - - namespace Rivet { - ---- include/Rivet/Particle.hh.orig 2017-05-31 12:39:14.273626411 +0200 -+++ include/Rivet/Particle.hh 2017-05-31 14:00:02.387272379 +0200 -@@ -11,6 +11,8 @@ - // NOTE: Rivet/Tools/ParticleUtils.hh included at the end - #include "fastjet/PseudoJet.hh" - -+#include -+ - namespace Rivet { - - ---- include/Rivet/Tools/RivetSTL.hh.orig 2017-05-31 14:05:28.368975178 +0200 -+++ include/Rivet/Tools/RivetSTL.hh 2017-05-31 14:05:44.432960512 +0200 -@@ -1,6 +1,8 @@ - #ifndef RIVET_RivetSTL_HH - #define RIVET_RivetSTL_HH - -+#include -+ - #include - #include - #include - diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.5.4.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.5.4.patch deleted file mode 100644 index af338da6d5f421..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.5.4.patch +++ /dev/null @@ -1,42 +0,0 @@ -patch written by GENSER to avoid system libraries of GLS coming from fastjet-config ---- include/Rivet/Tools/JetUtils.hh -+++ include/Rivet/Tools/JetUtils.hh -@@ -47,4 +47,5 @@ - struct BoolJetFunctor { - virtual bool operator()(const Jet& p) const = 0; -+ virtual ~BoolJetFunctor() {} - }; - ---- include/Rivet/Tools/ParticleBaseUtils.hh -+++ include/Rivet/Tools/ParticleBaseUtils.hh -@@ -23,4 +23,5 @@ - struct BoolParticleBaseFunctor { - virtual bool operator()(const ParticleBase& p) const = 0; -+ virtual ~BoolParticleBaseFunctor() {} - }; - -@@ -397,4 +398,5 @@ - struct DoubleParticleBaseFunctor { - virtual double operator()(const ParticleBase& p) const = 0; -+ virtual ~DoubleParticleBaseFunctor() {} - }; - ---- include/Rivet/Tools/ParticleUtils.hh -+++ include/Rivet/Tools/ParticleUtils.hh -@@ -486,4 +486,5 @@ - struct BoolParticleFunctor { - virtual bool operator()(const Particle& p) const = 0; -+ virtual ~BoolParticleFunctor() {} - }; - ---- src/Makefile.in.orig 2018-01-30 13:52:58.641670247 +0100 -+++ src/Makefile.in 2018-01-30 13:53:19.377586118 +0100 -@@ -449,7 +449,7 @@ - libRivet_la_SOURCES = - libRivet_la_LDFLAGS = -export-dynamic -avoid-version -L$(YODALIBPATH) -L$(HEPMCLIBPATH) - libRivet_la_LIBADD = Core/libRivetCore.la Projections/libRivetProjections.la Tools/libRivetTools.la $(ANA_LIBADD) \ -- -lYODA -lHepMC -ldl -lm $(FASTJETCONFIGLIBADD) $(GSL_LDFLAGS) -+ -lYODA -lHepMC -ldl -lm $(GSL_LDFLAGS) $(FASTJETCONFIGLIBADD) - - all: all-recursive - diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.6.0.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.6.0.patch deleted file mode 100644 index 2cb7cab14b5e83..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.6.0.patch +++ /dev/null @@ -1,90 +0,0 @@ ---- include/Rivet/Tools/JetUtils.hh -+++ include/Rivet/Tools/JetUtils.hh -@@ -47,4 +47,5 @@ - struct BoolJetFunctor { - virtual bool operator()(const Jet& p) const = 0; -+ virtual ~BoolJetFunctor() {} - }; - ---- include/Rivet/Tools/ParticleBaseUtils.hh -+++ include/Rivet/Tools/ParticleBaseUtils.hh -@@ -23,4 +23,5 @@ - struct BoolParticleBaseFunctor { - virtual bool operator()(const ParticleBase& p) const = 0; -+ virtual ~BoolParticleBaseFunctor() {} - }; - -@@ -397,4 +398,5 @@ - struct DoubleParticleBaseFunctor { - virtual double operator()(const ParticleBase& p) const = 0; -+ virtual ~DoubleParticleBaseFunctor() {} - }; - ---- include/Rivet/Tools/ParticleUtils.hh -+++ include/Rivet/Tools/ParticleUtils.hh -@@ -486,4 +486,5 @@ - struct BoolParticleFunctor { - virtual bool operator()(const Particle& p) const = 0; -+ virtual ~BoolParticleFunctor() {} - }; - ---- analyses/Makefile.in.orig 2018-06-28 09:22:46.722022129 +0200 -+++ analyses/Makefile.in 2018-06-28 10:11:59.772373529 +0200 -@@ -523,21 +523,21 @@ - @ENABLE_ANALYSES_TRUE@%.so: - @ENABLE_ANALYSES_TRUE@ @+echo && RIVET_BUILDPLUGIN_BEFORE_INSTALL=1 bash $(top_builddir)/bin/rivet-buildplugin -j2 $@ $^ -I$(top_builddir)/include - --@ENABLE_ANALYSES_TRUE@RivetALICEAnalyses.so: $(shell ls $(srcdir)/pluginALICE/*.cc) --@ENABLE_ANALYSES_TRUE@RivetATLASAnalyses.so: $(shell ls $(srcdir)/pluginATLAS/*.cc) --@ENABLE_ANALYSES_TRUE@RivetCDFAnalyses.so : $(shell ls $(srcdir)/pluginCDF/*.cc) --@ENABLE_ANALYSES_TRUE@RivetCMSAnalyses.so : $(shell ls $(srcdir)/pluginCMS/*.cc) --@ENABLE_ANALYSES_TRUE@RivetD0Analyses.so : $(shell ls $(srcdir)/pluginD0/*.cc) --@ENABLE_ANALYSES_TRUE@RivetHERAAnalyses.so : $(shell ls $(srcdir)/pluginHERA/*.cc) --@ENABLE_ANALYSES_TRUE@RivetLEPAnalyses.so : $(shell ls $(srcdir)/pluginLEP/*.cc) --@ENABLE_ANALYSES_TRUE@RivetLHCbAnalyses.so : $(shell ls $(srcdir)/pluginLHCb/*.cc) --@ENABLE_ANALYSES_TRUE@RivetLHCfAnalyses.so : $(shell ls $(srcdir)/pluginLHCf/*.cc) --@ENABLE_ANALYSES_TRUE@RivetMCAnalyses.so : $(shell ls $(srcdir)/pluginMC/*.cc) --@ENABLE_ANALYSES_TRUE@RivetMiscAnalyses.so : $(shell ls $(srcdir)/pluginMisc/*.cc) --@ENABLE_ANALYSES_TRUE@RivetPetraAnalyses.so: $(shell ls $(srcdir)/pluginPetra/*.cc) --@ENABLE_ANALYSES_TRUE@RivetRHICAnalyses.so : $(shell ls $(srcdir)/pluginRHIC/*.cc) --@ENABLE_ANALYSES_TRUE@RivetSPSAnalyses.so : $(shell ls $(srcdir)/pluginSPS/*.cc) --@ENABLE_ANALYSES_TRUE@RivetTOTEMAnalyses.so: $(shell ls $(srcdir)/pluginTOTEM/*.cc) -+@ENABLE_ANALYSES_TRUE@RivetALICEAnalyses.so: $(shell find $(srcdir)/pluginALICE/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetATLASAnalyses.so: $(shell find $(srcdir)/pluginATLAS/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetCDFAnalyses.so : $(shell find $(srcdir)/pluginCDF/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetCMSAnalyses.so : $(shell find $(srcdir)/pluginCMS/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetD0Analyses.so : $(shell find $(srcdir)/pluginD0/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetHERAAnalyses.so : $(shell find $(srcdir)/pluginHERA/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetLEPAnalyses.so : $(shell find $(srcdir)/pluginLEP/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetLHCbAnalyses.so : $(shell find $(srcdir)/pluginLHCb/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetLHCfAnalyses.so : $(shell find $(srcdir)/pluginLHCf/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetMCAnalyses.so : $(shell find $(srcdir)/pluginMC/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetMiscAnalyses.so : $(shell find $(srcdir)/pluginMisc/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetPetraAnalyses.so: $(shell find $(srcdir)/pluginPetra/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetRHICAnalyses.so : $(shell find $(srcdir)/pluginRHIC/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetSPSAnalyses.so : $(shell find $(srcdir)/pluginSPS/ -name '*.cc' -not -name 'tmp*') -+@ENABLE_ANALYSES_TRUE@RivetTOTEMAnalyses.so: $(shell find $(srcdir)/pluginTOTEM/ -name '*.cc' -not -name 'tmp*') - - @ENABLE_ANALYSES_TRUE@all-local: $(PLUGIN_LIBS) $(PLUGIN_DATAFILES) - @ENABLE_ANALYSES_TRUE@ mkdir -p $(builddir)/data ---- analyses/pluginATLAS/ATLAS_2016_CONF_2016_037.cc.orig 2018-07-02 10:43:08.656094368 +0200 -+++ analyses/pluginATLAS/ATLAS_2016_CONF_2016_037.cc 2018-07-02 10:44:04.920361160 +0200 -@@ -2,6 +2,7 @@ - #include "Rivet/Analysis.hh" - #include "Rivet/Projections/FinalState.hh" - #include "Rivet/Projections/PromptFinalState.hh" -+#include "Rivet/Projections/ChargedFinalState.hh" - #include "Rivet/Projections/FastJets.hh" - #include "Rivet/Projections/Sphericity.hh" - #include "Rivet/Projections/SmearedParticles.hh" ---- include/Rivet/AnalysisHandler.hh.orig 2018-07-10 10:39:21.719532209 +0200 -+++ include/Rivet/AnalysisHandler.hh 2018-07-10 10:39:29.225608530 +0200 -@@ -17,7 +17,7 @@ - - // Needed to make smart pointers compare equivalent in the STL set - struct CmpAnaHandle { -- bool operator() (const AnaHandle& a, const AnaHandle& b) { -+ bool operator() (const AnaHandle& a, const AnaHandle& b) const { - return a.get() < b.get(); - } - }; diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.6.1.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.6.1.patch deleted file mode 100644 index 878e72d7393d1a..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.6.1.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- doc/Makefile.in.orig 2018-10-17 18:29:15.568630034 +0200 -+++ doc/Makefile.in 2018-10-17 18:31:45.829375147 +0200 -@@ -594,15 +594,15 @@ - .PRECIOUS: Makefile - - @ENABLE_PYEXT_TRUE@analyses.html: $(top_srcdir)/analyses $(srcdir)/mk-analysis-html --@ENABLE_PYEXT_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \ --@ENABLE_PYEXT_TRUE@ DYLD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(DYLD_LIBRARY_PATH) \ -+@ENABLE_PYEXT_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(FASTJETLIBPATH):$(YODALIBPATH):$(RIVETLIBPATH):$(LD_LIBRARY_PATH) \ -+@ENABLE_PYEXT_TRUE@ DYLD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(FASTJETLIBPATH):$(YODALIBPATH):$(RIVETLIBPATH):$(DYLD_LIBRARY_PATH) \ - @ENABLE_PYEXT_TRUE@ PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ --@ENABLE_PYEXT_TRUE@ $(srcdir)/mk-analysis-html -+@ENABLE_PYEXT_TRUE@ $(PYTHON) $(srcdir)/mk-analysis-html - @ENABLE_PYEXT_TRUE@analyses.json: $(top_srcdir)/analyses $(srcdir)/mk-analysis-json --@ENABLE_PYEXT_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \ --@ENABLE_PYEXT_TRUE@ DYLD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(DYLD_LIBRARY_PATH) \ -+@ENABLE_PYEXT_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(FASTJETLIBPATH):$(YODALIBPATH):$(RIVETLIBPATH):$(LD_LIBRARY_PATH) \ -+@ENABLE_PYEXT_TRUE@ DYLD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(HEPMCLIBPATH):$(FASTJETLIBPATH):$(YODALIBPATH):$(RIVETLIBPATH):$(DYLD_LIBRARY_PATH) \ - @ENABLE_PYEXT_TRUE@ PYTHONPATH=$(YODA_PYTHONPATH):$(RIVET_PYTHONPATH):$(PYTHONPATH) \ --@ENABLE_PYEXT_TRUE@ $(srcdir)/mk-analysis-json -+@ENABLE_PYEXT_TRUE@ $(PYTHON) $(srcdir)/mk-analysis-json - - @WITH_ASCIIDOC_TRUE@compare-histos.html: compare-histos.txt - @WITH_ASCIIDOC_TRUE@ asciidoc -a toc compare-histos.txt diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.6.2.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.6.2.patch deleted file mode 100644 index a327f481d49a61..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.6.2.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- configure.ac.orig 2019-01-23 11:02:06.206570992 +0100 -+++ configure.ac 2019-01-23 11:02:26.704761899 +0100 -@@ -151,12 +151,12 @@ - - - # ## GNU Scientific Library --# AC_SEARCH_GSL --# AC_CEDAR_HEADERS([gsl], , , [AC_MSG_ERROR([GSL (GNU Scientific Library) is required])]) --# oldCPPFLAGS=$CPPFLAGS --# CPPFLAGS="$CPPFLAGS -I$GSLINCPATH" --# AC_CHECK_HEADER([gsl/gsl_vector.h], [], [AC_MSG_ERROR([GSL vectors not found.])]) --# CPPFLAGS=$oldCPPFLAGS -+AC_SEARCH_GSL -+AC_CEDAR_HEADERS([gsl], , , [AC_MSG_ERROR([GSL (GNU Scientific Library) is required])]) -+oldCPPFLAGS=$CPPFLAGS -+CPPFLAGS="$CPPFLAGS -I$GSLINCPATH" -+AC_CHECK_HEADER([gsl/gsl_vector.h], [], [AC_MSG_ERROR([GSL vectors not found.])]) -+CPPFLAGS=$oldCPPFLAGS - - - ## Disable build/install of standard analyses -@@ -256,7 +256,7 @@ - ## Set default build flags - AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include" - #AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/include/eigen3" --#AM_CPPFLAGS="$AM_CPPFLAGS \$(GSL_CPPFLAGS)" -+AM_CPPFLAGS="$AM_CPPFLAGS \$(GSL_CPPFLAGS)" - dnl AM_CPPFLAGS="$AM_CPPFLAGS \$(BOOST_CPPFLAGS)" - AM_CPPFLAGS="$AM_CPPFLAGS -I\$(YODAINCPATH)" - AM_CPPFLAGS="$AM_CPPFLAGS -I\$(HEPMCINCPATH)" ---- bin/rivet-config.in.orig 2019-01-23 11:08:04.608907832 +0100 -+++ bin/rivet-config.in 2019-01-23 11:08:25.058098155 +0100 -@@ -82,8 +82,8 @@ - test -n "$iyoda" && OUT="$OUT -I${iyoda}" - ifastjet="@FASTJETINCPATH@" - test -n "$ifastjet" && OUT="$OUT -I${ifastjet}" -- # igsl="@GSLINCPATH@" -- # test -n "$igsl" && OUT="$OUT -I${igsl}" -+ igsl="@GSLINCPATH@" -+ test -n "$igsl" && OUT="$OUT -I${igsl}" - # iboost="@BOOST_CPPFLAGS@" - # test -n "$iboost" && OUT="$OUT ${iboost}" - fi -@@ -98,8 +98,8 @@ - test -n "$lyoda" && OUT="$OUT -L${lyoda} -lYODA" - lfastjet="@FASTJETCONFIGLIBADD@" - test -n "$lfastjet" && OUT="$OUT ${lfastjet}" -- # lgsl="@GSLLIBPATH@" -- # test -n "$lgsl" && OUT="$OUT -L${lgsl}" -+ lgsl="@GSLLIBPATH@" -+ test -n "$lgsl" && OUT="$OUT -L${lgsl}" - fi - - tmp=$( echo "$*" | egrep -- '--\|--\') ---- bin/rivet-buildplugin.in.orig 2019-01-23 11:10:07.804054317 +0100 -+++ bin/rivet-buildplugin.in 2019-01-23 11:10:34.370301517 +0100 -@@ -169,8 +169,8 @@ - test -n "$iyoda" && mycppflags="$mycppflags -I${iyoda}" - ifastjet="@FASTJETINCPATH@" - test -n "$ifastjet" && mycppflags="$mycppflags -I${ifastjet}" --# igsl="@GSLINCPATH@" --# test -n "$igsl" && mycppflags="$mycppflags -I${igsl}" -+igsl="@GSLINCPATH@" -+test -n "$igsl" && mycppflags="$mycppflags -I${igsl}" - # iboost="@BOOST_CPPFLAGS@" - # test -n "$iboost" && mycppflags="$mycppflags ${iboost}" - ---- pyext/setup.py.in.orig 2019-01-23 11:12:04.694141901 +0100 -+++ pyext/setup.py.in 2019-01-23 11:12:44.531512512 +0100 -@@ -29,11 +29,11 @@ - - - ## Be careful with extracting the GSL path from the flags string --# import re --# re_libdirflag = re.compile(r".*-L\s*(\S+).*") --# re_match = re_libdirflag.search("@GSL_LDFLAGS@") --# if re_match: -- # lookupdirs.append( re_match.group(1) ) -+import re -+re_libdirflag = re.compile(r".*-L\s*(\S+).*") -+re_match = re_libdirflag.search("@GSL_LDFLAGS@") -+if re_match: -+ lookupdirs.append( re_match.group(1) ) - - ## A helper function - def ext(name, depends=[], statics=[]): -@@ -47,8 +47,8 @@ - language="c++", - # depends=depends, - include_dirs=[incdir1, incdir2, incdir3, incdir4], -- # extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@ @GSLCPPFLAGS@".split(), -- extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@".split(), -+ extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@ @GSLCPPFLAGS@".split(), -+ # extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@".split(), - extra_link_args=BASE_LINK_ARGS, - library_dirs=lookupdirs, - runtime_library_dirs=lookupdirs[1:], diff --git a/var/spack/repos/builtin/packages/rivet/rivet-2.7.0.patch b/var/spack/repos/builtin/packages/rivet/rivet-2.7.0.patch deleted file mode 100644 index a327f481d49a61..00000000000000 --- a/var/spack/repos/builtin/packages/rivet/rivet-2.7.0.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- configure.ac.orig 2019-01-23 11:02:06.206570992 +0100 -+++ configure.ac 2019-01-23 11:02:26.704761899 +0100 -@@ -151,12 +151,12 @@ - - - # ## GNU Scientific Library --# AC_SEARCH_GSL --# AC_CEDAR_HEADERS([gsl], , , [AC_MSG_ERROR([GSL (GNU Scientific Library) is required])]) --# oldCPPFLAGS=$CPPFLAGS --# CPPFLAGS="$CPPFLAGS -I$GSLINCPATH" --# AC_CHECK_HEADER([gsl/gsl_vector.h], [], [AC_MSG_ERROR([GSL vectors not found.])]) --# CPPFLAGS=$oldCPPFLAGS -+AC_SEARCH_GSL -+AC_CEDAR_HEADERS([gsl], , , [AC_MSG_ERROR([GSL (GNU Scientific Library) is required])]) -+oldCPPFLAGS=$CPPFLAGS -+CPPFLAGS="$CPPFLAGS -I$GSLINCPATH" -+AC_CHECK_HEADER([gsl/gsl_vector.h], [], [AC_MSG_ERROR([GSL vectors not found.])]) -+CPPFLAGS=$oldCPPFLAGS - - - ## Disable build/install of standard analyses -@@ -256,7 +256,7 @@ - ## Set default build flags - AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include" - #AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/include/eigen3" --#AM_CPPFLAGS="$AM_CPPFLAGS \$(GSL_CPPFLAGS)" -+AM_CPPFLAGS="$AM_CPPFLAGS \$(GSL_CPPFLAGS)" - dnl AM_CPPFLAGS="$AM_CPPFLAGS \$(BOOST_CPPFLAGS)" - AM_CPPFLAGS="$AM_CPPFLAGS -I\$(YODAINCPATH)" - AM_CPPFLAGS="$AM_CPPFLAGS -I\$(HEPMCINCPATH)" ---- bin/rivet-config.in.orig 2019-01-23 11:08:04.608907832 +0100 -+++ bin/rivet-config.in 2019-01-23 11:08:25.058098155 +0100 -@@ -82,8 +82,8 @@ - test -n "$iyoda" && OUT="$OUT -I${iyoda}" - ifastjet="@FASTJETINCPATH@" - test -n "$ifastjet" && OUT="$OUT -I${ifastjet}" -- # igsl="@GSLINCPATH@" -- # test -n "$igsl" && OUT="$OUT -I${igsl}" -+ igsl="@GSLINCPATH@" -+ test -n "$igsl" && OUT="$OUT -I${igsl}" - # iboost="@BOOST_CPPFLAGS@" - # test -n "$iboost" && OUT="$OUT ${iboost}" - fi -@@ -98,8 +98,8 @@ - test -n "$lyoda" && OUT="$OUT -L${lyoda} -lYODA" - lfastjet="@FASTJETCONFIGLIBADD@" - test -n "$lfastjet" && OUT="$OUT ${lfastjet}" -- # lgsl="@GSLLIBPATH@" -- # test -n "$lgsl" && OUT="$OUT -L${lgsl}" -+ lgsl="@GSLLIBPATH@" -+ test -n "$lgsl" && OUT="$OUT -L${lgsl}" - fi - - tmp=$( echo "$*" | egrep -- '--\|--\') ---- bin/rivet-buildplugin.in.orig 2019-01-23 11:10:07.804054317 +0100 -+++ bin/rivet-buildplugin.in 2019-01-23 11:10:34.370301517 +0100 -@@ -169,8 +169,8 @@ - test -n "$iyoda" && mycppflags="$mycppflags -I${iyoda}" - ifastjet="@FASTJETINCPATH@" - test -n "$ifastjet" && mycppflags="$mycppflags -I${ifastjet}" --# igsl="@GSLINCPATH@" --# test -n "$igsl" && mycppflags="$mycppflags -I${igsl}" -+igsl="@GSLINCPATH@" -+test -n "$igsl" && mycppflags="$mycppflags -I${igsl}" - # iboost="@BOOST_CPPFLAGS@" - # test -n "$iboost" && mycppflags="$mycppflags ${iboost}" - ---- pyext/setup.py.in.orig 2019-01-23 11:12:04.694141901 +0100 -+++ pyext/setup.py.in 2019-01-23 11:12:44.531512512 +0100 -@@ -29,11 +29,11 @@ - - - ## Be careful with extracting the GSL path from the flags string --# import re --# re_libdirflag = re.compile(r".*-L\s*(\S+).*") --# re_match = re_libdirflag.search("@GSL_LDFLAGS@") --# if re_match: -- # lookupdirs.append( re_match.group(1) ) -+import re -+re_libdirflag = re.compile(r".*-L\s*(\S+).*") -+re_match = re_libdirflag.search("@GSL_LDFLAGS@") -+if re_match: -+ lookupdirs.append( re_match.group(1) ) - - ## A helper function - def ext(name, depends=[], statics=[]): -@@ -47,8 +47,8 @@ - language="c++", - # depends=depends, - include_dirs=[incdir1, incdir2, incdir3, incdir4], -- # extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@ @GSLCPPFLAGS@".split(), -- extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@".split(), -+ extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@ @GSLCPPFLAGS@".split(), -+ # extra_compile_args="-I@prefix@/include @PYEXT_CXXFLAGS@ @HEPMCCPPFLAGS@ @FASTJETCPPFLAGS@ @YODACPPFLAGS@".split(), - extra_link_args=BASE_LINK_ARGS, - library_dirs=lookupdirs, - runtime_library_dirs=lookupdirs[1:], From c9e1e7d90c9880b158e29bf6e721065416d21b90 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 1 Oct 2023 22:49:51 -0500 Subject: [PATCH 002/806] acts: impose cxxstd variant on geant4 dependency (#39767) --- var/spack/repos/builtin/packages/acts/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index e08f00ef19f3ac..b9f3168e4aee8c 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -320,8 +320,12 @@ class Acts(CMakePackage, CudaPackage): for _cxxstd in _cxxstd_values: if isinstance(_cxxstd, _ConditionalVariantValues): for _v in _cxxstd: + depends_on( + f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} ^geant4" + ) depends_on(f"root cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} ^root") else: + depends_on(f"geant4 cxxstd={_v.value}", when=f"cxxstd={_v.value} {_v.when} ^geant4") depends_on(f"root cxxstd={_cxxstd}", when=f"cxxstd={_cxxstd} ^root") # ACTS has been using C++17 for a while, which precludes use of old GCC From 2a0f4393c30fd2af12ef458b7cbd429d9ba63b31 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 1 Oct 2023 22:52:30 -0500 Subject: [PATCH 003/806] assimp: new version 5.3.1 (#40271) --- var/spack/repos/builtin/packages/assimp/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/assimp/package.py b/var/spack/repos/builtin/packages/assimp/package.py index 70aa7654890e29..96dda57b817d75 100644 --- a/var/spack/repos/builtin/packages/assimp/package.py +++ b/var/spack/repos/builtin/packages/assimp/package.py @@ -17,6 +17,7 @@ class Assimp(CMakePackage): maintainers("wdconinc") version("master", branch="master") + version("5.3.1", sha256="a07666be71afe1ad4bc008c2336b7c688aca391271188eb9108d0c6db1be53f1") version("5.2.5", sha256="b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a") version("5.2.4", sha256="6a4ff75dc727821f75ef529cea1c4fc0a7b5fc2e0a0b2ff2f6b7993fe6cb54ba") version("5.2.3", sha256="b20fc41af171f6d8f1f45d4621f18e6934ab7264e71c37cd72fd9832509af2a8") From 4e69f5121facb01b6ba8ace89650992157c900f6 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Sun, 1 Oct 2023 20:53:16 -0700 Subject: [PATCH 004/806] amrex: add v23.10 (#40270) --- var/spack/repos/builtin/packages/amrex/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index fd62f13e9d736d..37f953ba75d73c 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -24,6 +24,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage): maintainers("WeiqunZhang", "asalmgren", "etpalmer63") version("develop", branch="development") + version("23.10", sha256="3c85aa0ad5f96303e797960a6e0aa37c427f6483f39cdd61dbc2f7ca16357714") version("23.09", sha256="1a539c2628041b17ad910afd9270332060251c8e346b1482764fdb87a4f25053") version("23.08", sha256="a83b7249d65ad8b6ac1881377e5f814b6db8ed8410ea5562b8ae9d4ed1f37c29") version("23.07", sha256="4edb991da51bcaad040f852e42c82834d8605301aa7eeb01cd1512d389a58d90") From a596e16a37921b0a6563416bc3cb752f4af145a0 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 1 Oct 2023 22:54:55 -0500 Subject: [PATCH 005/806] libxkbcommon: new versions 1.4.1, 1.5.0 (#40273) --- var/spack/repos/builtin/packages/libxkbcommon/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/libxkbcommon/package.py b/var/spack/repos/builtin/packages/libxkbcommon/package.py index 2efa357a4607cc..a705e9660fc4ef 100644 --- a/var/spack/repos/builtin/packages/libxkbcommon/package.py +++ b/var/spack/repos/builtin/packages/libxkbcommon/package.py @@ -20,6 +20,8 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage): conditional("meson", when="@0.9:"), conditional("autotools", when="@:0.8"), default="meson" ) + version("1.5.0", sha256="560f11c4bbbca10f495f3ef7d3a6aa4ca62b4f8fb0b52e7d459d18a26e46e017") + version("1.4.1", sha256="943c07a1e2198026d8102b17270a1f406e4d3d6bbc4ae105b9e1b82d7d136b39") version("1.4.0", sha256="106cec5263f9100a7e79b5f7220f889bc78e7d7ffc55d2b6fdb1efefb8024031") version( "0.8.2", @@ -39,6 +41,9 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage): variant("wayland", default=False, description="Enable Wayland support") + depends_on("meson@0.41:", type="build", when="@0.9:") + depends_on("meson@0.49:", type="build", when="@1.0:") + depends_on("meson@0.51:", type="build", when="@1.5:") depends_on("pkgconfig@0.9.0:", type="build") depends_on("bison", type="build") depends_on("util-macros") From 37158cb91309d12c4117f066b822452a307f5b7f Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Sun, 1 Oct 2023 23:28:37 -0500 Subject: [PATCH 006/806] petsc,py-petsc4py,slepc,py-slepc4py: add version 3.20.0 (#40260) --- .../repos/builtin/packages/petsc/package.py | 13 ++++++------ .../builtin/packages/py-petsc4py/package.py | 17 +++++++-------- .../builtin/packages/py-slepc4py/package.py | 21 +++++-------------- .../repos/builtin/packages/slepc/package.py | 12 +++-------- 4 files changed, 23 insertions(+), 40 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 498a3723f99db5..4a8ac8657bb818 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -14,7 +14,7 @@ class Petsc(Package, CudaPackage, ROCmPackage): """ homepage = "https://petsc.org" - url = "https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.15.0.tar.gz" + url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.0.tar.gz" git = "https://gitlab.com/petsc/petsc.git" maintainers("balay", "barrysmith", "jedbrown") @@ -22,6 +22,9 @@ class Petsc(Package, CudaPackage, ROCmPackage): version("main", branch="main") + version("3.20.0", sha256="c152ccb12cb2353369d27a65470d4044a0c67e0b69814368249976f5bb232bd4") + version("3.19.6", sha256="6045e379464e91bb2ef776f22a08a1bc1ff5796ffd6825f15270159cbb2464ae") + version("3.19.5", sha256="511aa78cad36db2dfd298acf35e9f7afd2ecc1f089da5b0b5682507a31a5d6b2") version("3.19.4", sha256="7c941b71be52c3b764214e492df60109d12f97f7d854c97a44df0c4d958b3906") version("3.19.3", sha256="008239c016b869693ec8e81368a0b7638462e667d07f7d50ed5f9b75ccc58d17") version("3.19.2", sha256="114f363f779bb16839b25c0e70f8b0ae0d947d50e72f7c6cddcb11b001079b16") @@ -339,13 +342,11 @@ def check_fortran_compiler(self): # * petsc-3.15 and newer (without docs) def url_for_version(self, version): if self.spec.satisfies("@3.13.0:3.14.6"): - return ( - "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-{0}.tar.gz".format( - version - ) + return "http://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-lite-{0}.tar.gz".format( + version ) else: - return "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-{0}.tar.gz".format( + return "http://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-{0}.tar.gz".format( version ) diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py index 7118c60f9083f6..0181571f1b05fc 100644 --- a/var/spack/repos/builtin/packages/py-petsc4py/package.py +++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py @@ -10,12 +10,17 @@ class PyPetsc4py(PythonPackage): """This package provides Python bindings for the PETSc package.""" homepage = "https://gitlab.com/petsc/petsc4py" - url = "https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc4py-3.15.0.tar.gz" + url = ( + "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc4py-3.20.0.tar.gz" + ) git = "https://gitlab.com/petsc/petsc.git" maintainers("balay") version("main", branch="main") + version("3.20.0", sha256="c2461eef3977ae5c214ad252520adbb92ec3a31d00e79391dd92535077bbf03e") + version("3.19.6", sha256="bd7891b651eb83504c744e70706818cf63ecbabee3206c1fed7c3013873802b9") + version("3.19.5", sha256="e059fdb8b23936c3182c9226924029dbdc8f1f72a623be0fe8c2caf8646c7a45") version("3.19.4", sha256="5621ddee63d0c631d2e8fed2d5d9763b183ad164c227dde8d3abcdb6c35c5ffb") version("3.19.3", sha256="dcbadebf0c4fe78b4dc13b8cd910577b9cacf65636ea980523e61d95c6959e5b") version("3.19.2", sha256="5f207eb95f87ddafa32229681a95af61912871cd7fbd38780bc63019dad3e7b8") @@ -67,16 +72,10 @@ class PyPetsc4py(PythonPackage): depends_on("petsc+mpi", when="+mpi") depends_on("petsc~mpi", when="~mpi") depends_on("petsc@main", when="@main") - depends_on("petsc@3.19.0:3.19", when="@3.19.0:3.19") - depends_on("petsc@3.18.0:3.18", when="@3.18.0:3.18") - depends_on("petsc@3.17.0:3.17", when="@3.17.0:3.17") - depends_on("petsc@3.16.0:3.16", when="@3.16.0:3.16") - depends_on("petsc@3.15.0:3.15", when="@3.15.0:3.15") + for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.13", "3.12", "3.11"]: + depends_on(f"petsc@{ver}", when=f"@{ver}") depends_on("petsc@3.14.2:3.14", when="@3.14.1:3.14") depends_on("petsc@3.14.0:3.14.1", when="@3.14.0") - depends_on("petsc@3.13.0:3.13", when="@3.13.0:3.13") - depends_on("petsc@3.12.0:3.12", when="@3.12.0:3.12") - depends_on("petsc@3.11.0:3.11", when="@3.11.0:3.11") @property def build_directory(self): diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py index 05cdf4e23082b3..9bf3413fceba4e 100644 --- a/var/spack/repos/builtin/packages/py-slepc4py/package.py +++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py @@ -16,6 +16,7 @@ class PySlepc4py(PythonPackage): maintainers("joseeroman", "balay") version("main", branch="main") + version("3.20.0", sha256="56cbea1f56746136e5a934bf4a481e566f35e475cb950c0a5bce7d5c3cc7690a") version("3.19.2", sha256="da8b6a7aaaf5e4497b896b2e478c42dd9de4fb31da93eb294181bea3bb60c767") version("3.19.1", sha256="68303f4acef8efc0542ab288a19159d0e6cdf313726f573e0bea2edb3d2c9595") version("3.19.0", sha256="ae84d33cce259c1d6ff64308b2f819d1c0f7b018e048f9049ec6d5be15614ba5") @@ -46,25 +47,13 @@ class PySlepc4py(PythonPackage): depends_on("py-petsc4py", type=("build", "run")) depends_on("py-petsc4py@main", when="@main", type=("build", "run")) - depends_on("py-petsc4py@3.19.0:3.19", when="@3.19.0:3.19", type=("build", "run")) - depends_on("py-petsc4py@3.18.0:3.18", when="@3.18.0:3.18", type=("build", "run")) - depends_on("py-petsc4py@3.17.0:3.17", when="@3.17.0:3.17", type=("build", "run")) - depends_on("py-petsc4py@3.16.0:3.16", when="@3.16.0:3.16", type=("build", "run")) - depends_on("py-petsc4py@3.15.0:3.15", when="@3.15.0:3.15", type=("build", "run")) - depends_on("py-petsc4py@3.13.0:3.13", when="@3.13.0:3.13", type=("build", "run")) - depends_on("py-petsc4py@3.12.0:3.12", when="@3.12.0:3.12", type=("build", "run")) - depends_on("py-petsc4py@3.11.0:3.11", when="@3.11.0:3.11", type=("build", "run")) + for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.13", "3.12", "3.11"]: + depends_on(f"py-petsc4py@{ver}", when=f"@{ver}", type=("build", "run")) depends_on("slepc") depends_on("slepc@main", when="@main") - depends_on("slepc@3.19.0:3.19", when="@3.19.0:3.19") - depends_on("slepc@3.18.0:3.18", when="@3.18.0:3.18") - depends_on("slepc@3.17.0:3.17", when="@3.17.0:3.17") - depends_on("slepc@3.16.0:3.16", when="@3.16.0:3.16") - depends_on("slepc@3.15.0:3.15", when="@3.15.0:3.15") - depends_on("slepc@3.13.0:3.13", when="@3.13.0:3.13") - depends_on("slepc@3.12.0:3.12", when="@3.12.0:3.12") - depends_on("slepc@3.11.0:3.11", when="@3.11.0:3.11") + for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.13", "3.12", "3.11"]: + depends_on(f"slepc@{ver}", when=f"@{ver}") @property def build_directory(self): diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 6889fde0aff8ba..979a252dd8ae3a 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -22,6 +22,7 @@ class Slepc(Package, CudaPackage, ROCmPackage): test_requires_compiler = True version("main", branch="main") + version("3.20.0", sha256="780c50260a9bc9b72776cb920774800c73832370938f1d48c2ea5c66d31b7380") version("3.19.2", sha256="ca7ed906795971fbe35f08ee251a26b86a4442a18609b878cba00835c9d62034") version("3.19.1", sha256="280737e9ef762d7f0079ad3ad29913215c799ebf124651c723c1972f71fbc0db") version("3.19.0", sha256="724f6610a2e38b1be7586fd494fe350b58f5aee1ca734bd85e783aa9d3daa8de") @@ -63,15 +64,8 @@ class Slepc(Package, CudaPackage, ROCmPackage): # Cannot mix release and development versions of SLEPc and PETSc: depends_on("petsc@main", when="@main") - depends_on("petsc@3.19.0:3.19", when="@3.19.0:3.19") - depends_on("petsc@3.18.0:3.18", when="@3.18.0:3.18") - depends_on("petsc@3.17.0:3.17", when="@3.17.0:3.17") - depends_on("petsc@3.16.0:3.16", when="@3.16.0:3.16") - depends_on("petsc@3.15.0:3.15", when="@3.15.0:3.15") - depends_on("petsc@3.14.0:3.14", when="@3.14.0:3.14") - depends_on("petsc@3.13.0:3.13", when="@3.13.0:3.13") - depends_on("petsc@3.12.0:3.12", when="@3.12.0:3.12") - depends_on("petsc@3.11.0:3.11", when="@3.11.0:3.11") + for ver in ["3.20", "3.19", "3.18", "3.17", "3.16", "3.15", "3.14", "3.13", "3.12", "3.11"]: + depends_on(f"petsc@{ver}", when=f"@{ver}") depends_on("petsc+cuda", when="+cuda") depends_on("arpack-ng~mpi", when="+arpack^petsc~mpi~int64") depends_on("arpack-ng+mpi", when="+arpack^petsc+mpi~int64") From 5f3af3d5e44f646164eb8b7f5e3d14f0a75af774 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:45:11 -0500 Subject: [PATCH 007/806] perl-dbd-mysql update to 4.050 (#40245) * perl-devel-checklib: adding new package perl-devel-checklib * perl-dbd-mysql: adding new version 4.050 and a new build dep --- .../builtin/packages/perl-dbd-mysql/package.py | 6 ++++++ .../packages/perl-devel-checklib/package.py | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-devel-checklib/package.py diff --git a/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py b/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py index 12b4a799a8437b..03b2f67747630f 100644 --- a/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py +++ b/var/spack/repos/builtin/packages/perl-dbd-mysql/package.py @@ -12,8 +12,14 @@ class PerlDbdMysql(PerlPackage): homepage = "https://metacpan.org/pod/DBD::mysql" url = "https://search.cpan.org/CPAN/authors/id/M/MI/MICHIELB/DBD-mysql-4.043.tar.gz" + version( + "4.050", + sha256="4f48541ff15a0a7405f76adc10f81627c33996fbf56c95c26c094444c0928d78", + url="https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz", + ) version("4.043", sha256="629f865e8317f52602b2f2efd2b688002903d2e4bbcba5427cb6188b043d6f99") + depends_on("perl-devel-checklib", type="build", when="@4.050:") depends_on("perl-test-deep", type=("build", "run")) depends_on("perl-dbi", type=("build", "run")) depends_on("mysql-client") diff --git a/var/spack/repos/builtin/packages/perl-devel-checklib/package.py b/var/spack/repos/builtin/packages/perl-devel-checklib/package.py new file mode 100644 index 00000000000000..7bf5077554f05e --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-devel-checklib/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2023 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 PerlDevelChecklib(PerlPackage): + """Devel::CheckLib - check that a library is available""" + + homepage = "https://metacpan.org/pod/Devel::CheckLib" + url = "https://cpan.metacpan.org/authors/id/M/MA/MATTN/Devel-CheckLib-1.16.tar.gz" + maintainers("snehring") + + version("1.16", sha256="869d38c258e646dcef676609f0dd7ca90f085f56cf6fd7001b019a5d5b831fca") From 0a91d2411a9c6293daae23669d6e2483628ce38a Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:57:55 -0700 Subject: [PATCH 008/806] cabana: add v0.6 (#40168) --- .../repos/builtin/packages/cabana/package.py | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/cabana/package.py b/var/spack/repos/builtin/packages/cabana/package.py index afc94278dd8a3b..6b6289b981adeb 100644 --- a/var/spack/repos/builtin/packages/cabana/package.py +++ b/var/spack/repos/builtin/packages/cabana/package.py @@ -19,6 +19,7 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): tags = ["e4s", "ecp"] version("master", branch="master") + version("0.6.0", sha256="a88a3f80215998169cdbd37661c0c0af57e344af74306dcd2b61983d7c69e6e5") version("0.5.0", sha256="b7579d44e106d764d82b0539285385d28f7bbb911a572efd05c711b28b85d8b1") version("0.4.0", sha256="c347d23dc4a5204f9cc5906ccf3454f0b0b1612351bbe0d1c58b14cddde81e85") version("0.3.0", sha256="fb67ab9aaf254b103ae0eb5cc913ddae3bf3cd0cf6010e9686e577a2981ca84f") @@ -37,7 +38,9 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): variant("heffte", default=False, description="Build with heFFTe support") variant("hypre", default=False, description="Build with HYPRE support") variant("silo", default=False, description="Build with SILO support") - variant("cajita", default=False, description="Build Cajita subpackage") + variant("hdf5", default=False, description="Build with HDF5 support") + variant("cajita", default=False, description="Build Cajita subpackage (Grid in 0.6:)") + variant("grid", default=False, description="Build Grid subpackage") variant("testing", default=False, description="Build unit tests") variant("examples", default=False, description="Build tutorial examples") variant("performance_testing", default=False, description="Build performance tests") @@ -45,7 +48,7 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.9:", type="build", when="@:0.4.0") depends_on("cmake@3.16:", type="build", when="@0.5.0:") depends_on("googletest", type="test", when="+testing") - _versions = {":0.2": "-legacy", "0.3:": "@3.1:", "0.4:": "@3.2:", "master": "@3.4:"} + _versions = {":0.2": "-legacy", "0.3:": "@3.1:", "0.4:": "@3.2:", "0.6:": "@3.7:"} for _version in _versions: _kk_version = _versions[_version] for _backend in _kokkos_backends: @@ -74,14 +77,17 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): depends_on("arborx", when="@0.3.0:+arborx") depends_on("hypre-cmake@2.22.0:", when="@0.4.0:+hypre") depends_on("hypre-cmake@2.22.1:", when="@0.5.0:+hypre") - # Heffte pinned at 2.x.0 because its cmakefiles can't roll forward + # Previous heFFTe pinned at 2.x.0 because its cmakefiles can't roll forward # compatibilty to later minor versions. depends_on("heffte@2.0.0", when="@0.4.0+heffte") depends_on("heffte@2.1.0", when="@0.5.0:+heffte") + depends_on("heffte@2.3.0:", when="@0.6.0:+heffte") depends_on("silo", when="@0.5.0:+silo") + depends_on("hdf5", when="@0.6.0:+hdf5") depends_on("mpi", when="+mpi") conflicts("+cajita ~mpi") + conflicts("+grid ~mpi") conflicts("+rocm", when="@:0.2.0") conflicts("+sycl", when="@:0.3.0") @@ -90,7 +96,7 @@ def cmake_args(self): options = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")] enable = ["CAJITA", "TESTING", "EXAMPLES", "PERFORMANCE_TESTING"] - require = ["ARBORX", "HEFFTE", "HYPRE", "SILO"] + require = ["ARBORX", "HEFFTE", "HYPRE", "SILO", "HDF5"] # These variables were removed in 0.3.0 (where backends are # automatically used from Kokkos) @@ -102,9 +108,24 @@ def cmake_args(self): else: require += ["MPI"] + # Cajita was renamed Grid in 0.6 + if self.spec.satisfies("@0.6.0:"): + enable += ["GRID"] + for category, cname in zip([enable, require], ["ENABLE", "REQUIRE"]): for var in category: cbn_option = "Cabana_{0}_{1}".format(cname, var) options.append(self.define_from_variant(cbn_option, var.lower())) + # Only enable user-requested options. + for var in require: + enabled_var = "+{0}".format(var.lower()) + if enabled_var not in self.spec: + cbn_disable = "CMAKE_DISABLE_FIND_PACKAGE_{0}".format(var) + options.append(self.define(cbn_disable, "ON")) + + # Use hipcc for HIP. + if "+rocm" in self.spec: + options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)) + return options From 31ae5cba913444b52f91c4e3f1f471c62bea1010 Mon Sep 17 00:00:00 2001 From: Matthew Archer <36638242+ma595@users.noreply.github.com> Date: Mon, 2 Oct 2023 06:03:49 +0100 Subject: [PATCH 009/806] add maintainers to py-nanobind (#40235) --- var/spack/repos/builtin/packages/py-nanobind/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-nanobind/package.py b/var/spack/repos/builtin/packages/py-nanobind/package.py index 9f1f2fd8bb5d39..493d6394affa36 100644 --- a/var/spack/repos/builtin/packages/py-nanobind/package.py +++ b/var/spack/repos/builtin/packages/py-nanobind/package.py @@ -20,7 +20,7 @@ class PyNanobind(PythonPackage): url = "https://github.com/wjakob/nanobind/archive/refs/tags/v1.2.0.tar.gz" git = "https://github.com/wjakob/nanobind.git" - maintainers("ma595") + maintainers("chrisrichardson", "garth-wells", "ma595") version("master", branch="master", submodules=True) version( From aff64c02e8b04281efbc2e6d231460d60571cb54 Mon Sep 17 00:00:00 2001 From: Sinan Date: Sun, 1 Oct 2023 22:06:00 -0700 Subject: [PATCH 010/806] xv: new package (#40032) Co-authored-by: Sinan81 --- .../repos/builtin/packages/xv/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/xv/package.py diff --git a/var/spack/repos/builtin/packages/xv/package.py b/var/spack/repos/builtin/packages/xv/package.py new file mode 100644 index 00000000000000..2cdfb1e9bd2cbe --- /dev/null +++ b/var/spack/repos/builtin/packages/xv/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2023 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 Xv(CMakePackage): + """ + XV image viewer. + The XV software was originally written by John Bradley. John Bradley's web site for the XV software can be found at: + http://www.trilon.com/xv + """ + + homepage = "https://github.com/jasper-software/xv" + url = "https://github.com/jasper-software/xv/archive/refs/tags/v4.2.0.tar.gz" + + # Licencing + # "... XV IS SHAREWARE FOR PERSONAL USE ONLY ..." + # full licencing details can be found at: + # https://github.com/jasper-software/xv/blob/main/src/README + + version("4.2.0", sha256="2871338c517a7444fc9d6a3d146bc2c5c7bd98b50c83369b24d24ad49fa0ab87") + + depends_on("libjpeg") + depends_on("libpng") + depends_on("libtiff") + depends_on("libx11") From 726d6b9881156bb56a6332f433f7fbf7d87fcfd5 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Mon, 2 Oct 2023 01:11:36 -0400 Subject: [PATCH 011/806] zoltan: Fixes for #40198 (#40199) Fix issue in configure_args which resulted in duplicate "--with-ldflags" arguments (with different values) being passed to configure. And extended the fix to similar arguments. Also, repeated some flags to "--with-libs" to "--with-ldflags" as when the flags were only in "--with-libs", they did not seem to be picked up everywhere. I suspect this is a bug in the configure script, but adding to both locations seems to solve it and should not have any adverse effects. Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/zoltan/package.py | 43 +++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 36ceca3a9e7fe3..87f8b6bd7be9e4 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -92,6 +92,9 @@ def configure_args(self): config_cflags = ["-O0" if "+debug" in spec else "-O3", "-g" if "+debug" in spec else ""] config_ldflags = [] + config_libs = [] + config_incdirs = [] + # PGI runtime libraries if "%pgi" in spec: config_ldflags.append("-pgf90libs") @@ -102,9 +105,12 @@ def configure_args(self): config_args.extend(["RANLIB=echo", "--with-ar=$(CXX) -shared $(LDFLAGS) -o"]) config_cflags.append(self.compiler.cc_pic_flag) if spec.satisfies("%gcc"): - config_args.append("--with-libs=-lgfortran") + config_libs.append("-lgfortran") + # Although adding to config_libs _should_ suffice, it does not + # Add to ldflags as well + config_ldflags.append("-lgfortran") if spec.satisfies("%intel"): - config_args.append("--with-libs=-lifcore") + config_libs.append("-lifcore") if "+int64" in spec: config_args.append("--with-id-type=ulong") @@ -116,10 +122,16 @@ def configure_args(self): "--with-parmetis", "--with-parmetis-libdir={0}".format(parmetis_prefix.lib), "--with-parmetis-incdir={0}".format(parmetis_prefix.include), - "--with-incdirs=-I{0}".format(spec["metis"].prefix.include), - "--with-ldflags=-L{0}".format(spec["metis"].prefix.lib), ] ) + config_ldflags.append("-L{0}".format(spec["metis"].prefix.lib)) + config_incdirs.append("-I{0}".format(spec["metis"].prefix.include)) + config_libs.append("-lparmetis") + config_libs.append("-lmetis") + # Although appending to config_libs _should_ suffice, it does not + # Add them to ldflags as well + config_ldflags.append("-lparmetis") + config_ldflags.append("-lmetis") if "+int64" in spec["metis"]: config_args.append("--with-id-type=ulong") else: @@ -143,19 +155,26 @@ def configure_args(self): config_args.extend(["FC={0}".format(spec["mpi"].mpifc)]) config_fcflags = config_cflags[:] + config_cxxflags = config_cflags[:] + if spec.satisfies("%gcc@10:+fortran"): config_fcflags.append("-fallow-argument-mismatch") + # NOTE: Early versions of Zoltan come packaged with a few embedded # library packages (e.g. ParMETIS, Scotch), which messes with Spack's # ability to descend directly into the package's source directory. - config_args.extend( - [ - "--with-cflags={0}".format(" ".join(config_cflags)), - "--with-cxxflags={0}".format(" ".join(config_cflags)), - "--with-fcflags={0}".format(" ".join(config_fcflags)), - "--with-ldflags={0}".format(" ".join(config_ldflags)), - ] - ) + if config_cflags: + config_args.append("--with-cflags={0}".format(" ".join(config_cflags))) + if config_cxxflags: + config_args.append("--with-cxxflags={0}".format(" ".join(config_cxxflags))) + if config_fcflags: + config_args.append("--with-fcflags={0}".format(" ".join(config_fcflags))) + if config_ldflags: + config_args.append("--with-ldflags={0}".format(" ".join(config_ldflags))) + if config_libs: + config_args.append("--with-libs={0}".format(" ".join(config_libs))) + if config_incdirs: + config_args.append("--with-incdirs={0}".format(" ".join(config_incdirs))) return config_args # NOTE: Unfortunately, Zoltan doesn't provide any configuration From 71c5b948d08c3212c715c6fc60390889014e0edb Mon Sep 17 00:00:00 2001 From: Freifrau von Bleifrei Date: Mon, 2 Oct 2023 07:14:50 +0200 Subject: [PATCH 012/806] discotec package: add selalib variant (#40222) --- var/spack/repos/builtin/packages/discotec/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/discotec/package.py b/var/spack/repos/builtin/packages/discotec/package.py index 9961636d0fd2fe..7693f97c83c805 100644 --- a/var/spack/repos/builtin/packages/discotec/package.py +++ b/var/spack/repos/builtin/packages/discotec/package.py @@ -32,6 +32,7 @@ class Discotec(CMakePackage): depends_on("glpk") depends_on("highfive+mpi+boost+ipo", when="+hdf5") depends_on("mpi") + depends_on("selalib", when="+selalib") depends_on("vtk", when="+vtk") def cmake_args(self): @@ -46,5 +47,7 @@ def cmake_args(self): self.define_from_variant("DISCOTEC_USE_VTK", "vtk"), self.define_from_variant("DISCOTEC_WITH_SELALIB", "selalib"), ] + if "+selalib" in self.spec: + args.append(self.define("SELALIB_DIR", self.spec["selalib"].prefix.cmake)) return args From e60bbd1bfc8c655090edb9935033221fce79cc5d Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 2 Oct 2023 01:03:47 -0600 Subject: [PATCH 013/806] Cgns fix no fortran config (#40241) * SEACAS: Update package.py to handle new SEACAS project name The base project name for the SEACAS project has changed from "SEACASProj" to "SEACAS" as of @2022-10-14, so the package needed to be updated to use the new project name when needed. The refactor also changes several: "-DSome_CMAKE_Option:BOOL=ON" to define("Some_CMAKE_Option", True) * CGNS: If fortran not enabled, do not specify parallel fortran compiler * Update package formatting as suggested by black * Accept suggested change --- var/spack/repos/builtin/packages/cgns/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py index 795af5b5685a39..563dffd2875772 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -87,6 +87,7 @@ def cmake_args(self): self.define_from_variant("CGNS_ENABLE_LEGACY", "legacy"), self.define_from_variant("CGNS_ENABLE_MEM_DEBUG", "mem_debug"), self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), + self.define_from_variant("CGNS_ENABLE_64BIT", "int64"), ] ) @@ -95,11 +96,10 @@ def cmake_args(self): [ "-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc, "-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx, - "-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc, ] ) - - options.append(self.define_from_variant("CGNS_ENABLE_64BIT", "int64")) + if "+fortran" in spec: + options.append(self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)) if "+hdf5" in spec: options.extend( From 32f21f2a017c5c0e08a204302eb6061f6c6cc3be Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 2 Oct 2023 09:25:52 +0200 Subject: [PATCH 014/806] Spack python 3.12: PEP 695 unparse support (#40155) --- lib/spack/spack/util/unparse/unparser.py | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index 75f61e53f90aa6..27dba8f2873b59 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -380,6 +380,10 @@ def visit_ClassDef(self, node): self.fill("@") self.dispatch(deco) self.fill("class " + node.name) + if getattr(node, "type_params", False): + self.write("[") + interleave(lambda: self.write(", "), self.dispatch, node.type_params) + self.write("]") with self.delimit_if("(", ")", condition=node.bases or node.keywords): comma = False for e in node.bases: @@ -425,6 +429,10 @@ def __FunctionDef_helper(self, node, fill_suffix): self.dispatch(deco) def_str = fill_suffix + " " + node.name self.fill(def_str) + if getattr(node, "type_params", False): + self.write("[") + interleave(lambda: self.write(", "), self.dispatch, node.type_params) + self.write("]") with self.delimit("(", ")"): self.dispatch(node.args) if getattr(node, "returns", False): @@ -1138,3 +1146,23 @@ def visit_MatchOr(self, node): with self.require_parens(_Precedence.BOR, node): self.set_precedence(pnext(_Precedence.BOR), *node.patterns) interleave(lambda: self.write(" | "), self.dispatch, node.patterns) + + def visit_TypeAlias(self, node): + self.fill("type ") + self.dispatch(node.name) + self.write(" = ") + self.dispatch(node.value) + + def visit_TypeVar(self, node): + self.write(node.name) + if node.bound: + self.write(": ") + self.dispatch(node.bound) + + def visit_TypeVarTuple(self, node): + self.write("*") + self.write(node.name) + + def visit_ParamSpec(self, node): + self.write("**") + self.write(node.name) From a9dcba76ce96691aa44f63fa8caac953db5cdaa4 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 2 Oct 2023 10:09:36 +0200 Subject: [PATCH 015/806] py-importlib-metadata: add patch releases (#40249) importlib_metadata 4.11.4 fixes some nasty issues with `metadata.entry_points(...)`, so ensure we have those bugfixes. --- .../repos/builtin/packages/py-importlib-metadata/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-importlib-metadata/package.py b/var/spack/repos/builtin/packages/py-importlib-metadata/package.py index 319f35b6c7b633..910b287ac82e6b 100644 --- a/var/spack/repos/builtin/packages/py-importlib-metadata/package.py +++ b/var/spack/repos/builtin/packages/py-importlib-metadata/package.py @@ -16,9 +16,12 @@ class PyImportlibMetadata(PythonPackage): version("6.6.0", sha256="92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705") version("5.1.0", sha256="d5059f9f1e8e41f80e9c56c2ee58811450c31984dfa625329ffd7c0dad88a73b") version("4.12.0", sha256="637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670") + version("4.11.4", sha256="5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700") version("4.11.1", sha256="175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c") + version("4.8.3", sha256="766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668") version("4.8.2", sha256="75bdec14c397f528724c1bfd9709d660b33a4d2e77387a3358f20b848bb5e5fb") version("4.8.1", sha256="f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1") + version("4.6.4", sha256="7b30a78db2922d78a6f47fb30683156a14f3c6aa5cc23f77cc8967e9ab2d002f") version("4.6.1", sha256="079ada16b7fc30dfbb5d13399a5113110dab1aa7c2bc62f66af75f0b717c8cac") version("3.10.1", sha256="c9356b657de65c53744046fa8f7358afe0714a1af7d570c00c3835c2d724a7c1") version("3.10.0", sha256="c9db46394197244adf2f0b08ec5bc3cf16757e9590b02af1fca085c16c0d600a") From 6c4ce379ca0b43aecdc44e1ffd80058d70ddac93 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 2 Oct 2023 14:51:48 +0200 Subject: [PATCH 016/806] buildcache: ignore errors of newer buildcache version (#40279) Currently buildcaches are forward incompatible in an annoying way: spack errors out when trying to use them. With this change, you just get a warning. --- lib/spack/spack/binary_distribution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index fc6056e6be0e1e..90cd577fe8070e 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -216,11 +216,11 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url): with self._index_file_cache.read_transaction(cache_key): db._read_from_file(cache_path) except spack_db.InvalidDatabaseVersionError as e: - msg = ( + tty.warn( f"you need a newer Spack version to read the buildcache index for the " f"following mirror: '{mirror_url}'. {e.database_version_message}" ) - raise BuildcacheIndexError(msg) from e + return spec_list = db.query_local(installed=False, in_buildcache=True) From b3e3604f461824e90b222babc0fd8c343c316833 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Mon, 2 Oct 2023 15:02:33 +0200 Subject: [PATCH 017/806] libtirpc: Add latest version and allow for builds on macOS (#40189) --- .../packages/libtirpc/macos-1.3.3.patch | 105 ++++++++++++++++++ .../builtin/packages/libtirpc/package.py | 23 +++- 2 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/libtirpc/macos-1.3.3.patch diff --git a/var/spack/repos/builtin/packages/libtirpc/macos-1.3.3.patch b/var/spack/repos/builtin/packages/libtirpc/macos-1.3.3.patch new file mode 100644 index 00000000000000..8e6f1efe421f78 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtirpc/macos-1.3.3.patch @@ -0,0 +1,105 @@ +diff --git a/src/Makefile.in b/src/Makefile.in +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -90,7 +90,7 @@ + build_triplet = @build@ + host_triplet = @host@ + @AUTHDES_TRUE@am__append_1 = auth_des.c authdes_prot.c des_crypt.c des_impl.c des_soft.c svc_auth_des.c +-@SYMVERS_TRUE@am__append_2 = -Wl,--version-script=$(srcdir)/libtirpc.map ++@SYMVERS_TRUE@am__append_2 = -Wl + @GSS_TRUE@am__append_3 = auth_gss.c authgss_prot.c svc_auth_gss.c \ + @GSS_TRUE@ rpc_gss_utils.c + +diff --git a/src/getpeereid.c b/src/getpeereid.c +--- a/src/getpeereid.c ++++ b/src/getpeereid.c +@@ -24,7 +24,7 @@ + * SUCH DAMAGE. + */ + +- ++#ifndef __APPLE__ + #include + #include + #include +@@ -49,3 +49,4 @@ + *egid = uc.gid; + return (0); + } ++#endif +diff --git a/src/rpc_com.h b/src/rpc_com.h +--- a/src/rpc_com.h ++++ b/src/rpc_com.h +@@ -42,6 +42,11 @@ + + #include + ++#ifdef __APPLE__ ++ #define SOL_IPV6 IPPROTO_IPV6 ++ #define SOL_IP IPPROTO_IP ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +diff --git a/src/svc_dg.c b/src/svc_dg.c +--- a/src/svc_dg.c ++++ b/src/svc_dg.c +@@ -37,6 +37,7 @@ + * + * Does some caching in the hopes of achieving execute-at-most-once semantics. + */ ++#define __APPLE_USE_RFC_3542 + #include + #include + #include +diff --git a/src/svc_raw.c b/src/svc_raw.c +--- a/src/svc_raw.c ++++ b/src/svc_raw.c +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + + #ifndef UDPMSGSIZE + #define UDPMSGSIZE 8800 +diff --git a/src/xdr_float.c b/src/xdr_float.c +--- a/src/xdr_float.c ++++ b/src/xdr_float.c +@@ -83,7 +83,11 @@ + }; + #else + ++#ifndef __APPLE__ + #include ++#else ++#include ++#endif + #define IEEEFP + + #endif /* vax */ +diff --git a/tirpc/reentrant.h b/tirpc/reentrant.h +--- a/tirpc/reentrant.h ++++ b/tirpc/reentrant.h +@@ -36,7 +36,7 @@ + * These definitions are only guaranteed to be valid on Linux. + */ + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__APPLE__) + + #include + +diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h +--- a/tirpc/rpc/rpcent.h ++++ b/tirpc/rpc/rpcent.h +@@ -50,7 +50,7 @@ + + /* These are defined in /usr/include/rpc/netdb.h, unless we are using + the C library without RPC support. */ +-#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__) ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__) && !defined(__APPLE__) + struct rpcent { + char *r_name; /* name of server for this rpc program */ + char **r_aliases; /* alias list */ diff --git a/var/spack/repos/builtin/packages/libtirpc/package.py b/var/spack/repos/builtin/packages/libtirpc/package.py index a4135f48d6cfa6..04947073108ba7 100644 --- a/var/spack/repos/builtin/packages/libtirpc/package.py +++ b/var/spack/repos/builtin/packages/libtirpc/package.py @@ -12,6 +12,7 @@ class Libtirpc(AutotoolsPackage): homepage = "https://sourceforge.net/projects/libtirpc/" url = "https://sourceforge.net/projects/libtirpc/files/libtirpc/1.1.4/libtirpc-1.1.4.tar.bz2/download" + version("1.3.3", sha256="6474e98851d9f6f33871957ddee9714fdcd9d8a5ee9abb5a98d63ea2e60e12f3") version("1.2.6", sha256="4278e9a5181d5af9cd7885322fdecebc444f9a3da87c526e7d47f7a12a37d1cc") version("1.1.4", sha256="2ca529f02292e10c158562295a1ffd95d2ce8af97820e3534fe1b0e3aec7561d") @@ -21,10 +22,17 @@ class Libtirpc(AutotoolsPackage): # Remove -pipe flag to compiler in Makefiles when using nvhpc patch("libtirpc-remove-pipe-flag-for-nvhpc.patch", when="%nvhpc") - - # FIXME: build error on macOS - # auth_none.c:81:9: error: unknown type name 'mutex_t' - conflicts("platform=darwin", msg="Does not build on macOS") + # Allow to build on macOS + # - Remove versioning linker flags and include + # - Include missing / apple specific headers + # - Add apple pre-processor guards to guard / ignore some sections + # Taken from: + # https://github.com/unfs3/unfs3/pull/25#issuecomment-1631198490 + patch("macos-1.3.3.patch", when="@1.3.3 platform=darwin") + + # Only the latest version is known to build on macOS. Previous versions fail + # with auth_none.c:81:9: error: unknown type name 'mutex_t' + conflicts("platform=darwin", when="@:1.3.2", msg="Does not build on macOS") @property def headers(self): @@ -35,3 +43,10 @@ def headers(self): if hdrs: hdrs.directories = [self.prefix.include.tirpc, self.prefix.include] return hdrs or None + + def configure_args(self): + # See discussion in + # https://github.com/unfs3/unfs3/pull/25#issuecomment-1631198490 + if self.spec.satisfies("@1.3.3 platform=darwin"): + return ["--disable-gssapi"] + return [] From 1b75651af6e84cd8ad41bbd0257ab16e09389eec Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Mon, 2 Oct 2023 10:35:00 -0400 Subject: [PATCH 018/806] Implemented +sycl for slate (#39927) * Implemented +sycl for slate * style * style * add slate +sycl to ci * slate +sycl: explicitly specify +mpi * comment out slate+sycl+mpi in e4s oneapi stack * removing requirement of intel-oneapi-mpi * Added slate+sycl to e4s oneapi stack * Removing obsolete comment --------- Co-authored-by: eugeneswalker --- .../stacks/e4s-oneapi/spack.yaml | 1 + .../repos/builtin/packages/blaspp/package.py | 21 +++++++++++++++- .../builtin/packages/lapackpp/package.py | 24 +++++++++++++++++-- .../repos/builtin/packages/slate/package.py | 24 ++++++++++++++++++- 4 files changed, 66 insertions(+), 4 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 2c97d4e4bedf47..798ba974ce3b29 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -231,6 +231,7 @@ spack: - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples + - slate +sycl # -- # - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler. # - hpctoolkit +level_zero # intel-tbb: icpx: error: unknown argument: '-flifetime-dse=1' diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py index 6be99028b180a7..f6f52d2756dcb5 100644 --- a/var/spack/repos/builtin/packages/blaspp/package.py +++ b/var/spack/repos/builtin/packages/blaspp/package.py @@ -46,11 +46,14 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage): variant("openmp", default=True, description="Use OpenMP internally.") variant("shared", default=True, description="Build shared libraries") + variant("sycl", default=False, description="Build support for the SYCL backend") depends_on("cmake@3.15.0:", type="build") depends_on("blas") depends_on("llvm-openmp", when="%apple-clang +openmp") depends_on("rocblas", when="+rocm") + depends_on("intel-oneapi-mkl", when="+sycl") + depends_on("intel-oneapi-mkl threads=openmp", when="+sycl") # only supported with clingo solver: virtual dependency preferences # depends_on('openblas threads=openmp', when='+openmp ^openblas') @@ -63,7 +66,21 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage): conflicts( "+rocm", when="@:2020.10.02", msg="ROCm support requires BLAS++ 2021.04.00 or greater" ) - conflicts("+rocm", when="+cuda", msg="BLAS++ can only support one GPU backend at a time") + backend_msg = "BLAS++ supports only one GPU backend at a time" + conflicts("+rocm", when="+cuda", msg=backend_msg) + conflicts("+rocm", when="+sycl", msg=backend_msg) + conflicts("+cuda", when="+sycl", msg=backend_msg) + conflicts("+sycl", when="@:2023.06.00", msg="SYCL support requires BLAS++ version 2023.08.25") + + # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. + # For now, add conflicts for other compilers instead. + for __compiler in spack.compilers.supported_compilers(): + if __compiler != "oneapi": + conflicts( + "%{0}".format(__compiler), + when="+sycl", + msg="blaspp+sycl must be compiled with %oneapi", + ) def cmake_args(self): spec = self.spec @@ -74,6 +91,8 @@ def cmake_args(self): backend = "cuda" if "+rocm" in spec: backend = "hip" + if "+sycl" in spec: + backend = "sycl" backend_config = "-Dgpu_backend=%s" % backend args = [ diff --git a/var/spack/repos/builtin/packages/lapackpp/package.py b/var/spack/repos/builtin/packages/lapackpp/package.py index fc14e547ffd732..1532d87843048a 100644 --- a/var/spack/repos/builtin/packages/lapackpp/package.py +++ b/var/spack/repos/builtin/packages/lapackpp/package.py @@ -59,6 +59,7 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage): ) variant("shared", default=True, description="Build shared library") + variant("sycl", default=False, description="Build support for the SYCL backend") # Match each LAPACK++ version to a specific BLAS++ version for lpp_ver, bpp_ver in _versions: @@ -66,6 +67,8 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage): depends_on("blaspp ~cuda", when="~cuda") depends_on("blaspp +cuda", when="+cuda") + depends_on("blaspp ~sycl", when="~sycl") + depends_on("blaspp +sycl", when="+sycl") depends_on("blaspp ~rocm", when="~rocm") for val in ROCmPackage.amdgpu_targets: depends_on("blaspp +rocm amdgpu_target=%s" % val, when="amdgpu_target=%s" % val) @@ -74,8 +77,23 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage): depends_on("lapack") depends_on("rocblas", when="+rocm") depends_on("rocsolver", when="+rocm") - - conflicts("+rocm", when="+cuda", msg="LAPACK++ can only support one GPU backend at a time") + depends_on("intel-oneapi-mkl threads=openmp", when="+sycl") + + backend_msg = "LAPACK++ supports only one GPU backend at a time" + conflicts("+rocm", when="+cuda", msg=backend_msg) + conflicts("+rocm", when="+sycl", msg=backend_msg) + conflicts("+cuda", when="+sycl", msg=backend_msg) + conflicts("+sycl", when="@:2023.06.00", msg="+sycl requires LAPACK++ version 2023.08.25") + + # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. + # For now, add conflicts for other compilers instead. + for __compiler in spack.compilers.supported_compilers(): + if __compiler != "oneapi": + conflicts( + "%{0}".format(__compiler), + when="+sycl", + msg="lapackpp+sycl must be compiled with %oneapi", + ) def cmake_args(self): spec = self.spec @@ -86,6 +104,8 @@ def cmake_args(self): backend = "cuda" if "+rocm" in spec: backend = "hip" + if "+sycl" in spec: + backend = "sycl" args = [ "-DBUILD_SHARED_LIBS=%s" % ("+shared" in spec), diff --git a/var/spack/repos/builtin/packages/slate/package.py b/var/spack/repos/builtin/packages/slate/package.py index 7304155eb3d8eb..95b4e895801ffa 100644 --- a/var/spack/repos/builtin/packages/slate/package.py +++ b/var/spack/repos/builtin/packages/slate/package.py @@ -51,17 +51,23 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): ) variant("openmp", default=True, description="Build with OpenMP support.") variant("shared", default=True, description="Build shared library") + variant("sycl", default=False, description="Build with SYCL backend") # The runtime dependency on cmake is needed by the stand-alone tests (spack test). depends_on("cmake", type="run") depends_on("mpi", when="+mpi") + depends_on("intel-oneapi-mkl threads=openmp", when="+sycl") depends_on("blas") depends_on("blaspp ~cuda", when="~cuda") depends_on("blaspp +cuda", when="+cuda") + depends_on("blaspp ~sycl", when="~sycl") + depends_on("blaspp +sycl", when="+sycl") depends_on("blaspp ~rocm", when="~rocm") depends_on("lapackpp ~cuda", when="~cuda") depends_on("lapackpp +cuda", when="+cuda") + depends_on("lapackpp ~sycl", when="~sycl") + depends_on("lapackpp +sycl", when="+sycl") depends_on("lapackpp ~rocm", when="~rocm") for val in CudaPackage.cuda_arch_values: depends_on("blaspp +cuda cuda_arch=%s" % val, when="cuda_arch=%s" % val) @@ -78,6 +84,16 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): depends_on("scalapack", type="test") depends_on("hipify-clang", when="@:2021.05.02 +rocm ^hip@5:") + # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. + # For now, add conflicts for other compilers instead. + for __compiler in spack.compilers.supported_compilers(): + if __compiler != "oneapi": + conflicts( + "%{0}".format(__compiler), + when="+sycl", + msg="slate+sycl must be compiled with %oneapi", + ) + cpp_17_msg = "Requires C++17 compiler support" conflicts("%gcc@:5", msg=cpp_17_msg) conflicts("%xl", msg=cpp_17_msg) @@ -86,7 +102,11 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): conflicts( "+rocm", when="@:2020.10.00", msg="ROCm support requires SLATE 2021.05.01 or greater" ) - conflicts("+rocm", when="+cuda", msg="SLATE only supports one GPU backend at a time") + backend_msg = "SLATE supports only one GPU backend at a time" + conflicts("+rocm", when="+cuda", msg=backend_msg) + conflicts("+rocm", when="+sycl", msg=backend_msg) + conflicts("+cuda", when="+sycl", msg=backend_msg) + conflicts("+sycl", when="@:2022.07.00", msg="SYCL support requires SLATE version 2023.08.25") def cmake_args(self): spec = self.spec @@ -97,6 +117,8 @@ def cmake_args(self): backend = "cuda" if "+rocm" in spec: backend = "hip" + if "+sycl" in spec: + backend = "sycl" backend_config = "-Dgpu_backend=%s" % backend config = [ From 453625014da8a471a34cc10b0c18ddd0e141f130 Mon Sep 17 00:00:00 2001 From: Joseph Wang Date: Tue, 3 Oct 2023 02:33:54 +0800 Subject: [PATCH 019/806] fix lhapdf package (#37384) * fix lhapdf package * [@spackbot] updating style on behalf of joequant --------- Co-authored-by: joequant --- var/spack/repos/builtin/packages/lhapdf/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/lhapdf/package.py b/var/spack/repos/builtin/packages/lhapdf/package.py index a58107b8a200bf..41c3887f89fdba 100644 --- a/var/spack/repos/builtin/packages/lhapdf/package.py +++ b/var/spack/repos/builtin/packages/lhapdf/package.py @@ -41,6 +41,15 @@ class Lhapdf(AutotoolsPackage): depends_on("py-setuptools", type="build", when="+python") depends_on("gettext", type="build", when="+python") + def setup_build_environment(self, env): + # Add -lintl if provided by gettext, otherwise libintl is provided by the system's glibc: + if ( + self.spec.satisfies("+python") + and "gettext" in self.spec + and "intl" in self.spec["gettext"].libs.names + ): + env.append_flags("LDFLAGS", "-L" + self.spec["gettext"].prefix.lib) + def configure_args(self): args = ["FCFLAGS=-O3", "CFLAGS=-O3", "CXXFLAGS=-O3"] From 615312fceeae6402b6aa01cd42fde8511a5fb284 Mon Sep 17 00:00:00 2001 From: renjithravindrankannath <94420380+renjithravindrankannath@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:36:51 -0700 Subject: [PATCH 020/806] Rocm 5.6.0 & 5.6.1 release updates (#39673) * 5.6.0 updates * Rocm 5.6.0 updates * Style and audit corrections for 5.6 * Patching smi path for tests. * Style correction * 5.6.1 updates * Updated hip tests for ci build failure Updated hiprand with the release tag Taken care the review comment rocsolver * Adding rocm-smi path for 5.6 * Adding the patch file * Setting library directory uniform * gl depends on mesa but it should not be llvm variant * Fix for the issue 39520 by setting CMAKE_INSTALL_LIBDIR=lib * i1 muls can sometimes happen after SCEV. They resulted in ISel failures because we were missing the patterns for them. * 5.6.0 & 5.6.1 updates for migraphx, miopen-hip, mivisionx * Revert "5.6.0 & 5.6.1 updates for migraphx, miopen-hip, mivisionx" This reverts commit f54c9c6c67a4e5a54859f59d6550eb8e542d6c26. * Revert operator mixup fix * Splitting compiler-rt-linkage-for-host and operator mixup patch * Adding missing patch for reverting operator mixup * 5.6 update for composable-kernel,migraphx,miopen-hip and mivisionx * Updating rvs, rcd and rccl for 5.6.1. adding comment for llvm patch --- .../repos/builtin/packages/comgr/package.py | 6 +- .../packages/composable-kernel/package.py | 4 +- .../builtin/packages/hip-rocclr/package.py | 6 + ...e-compiler-rt-linkage-for-host.5.6.0.patch | 75 + ...verting-operator-mixup-fix-for-slate.patch | 107 + .../repos/builtin/packages/hip/package.py | 134 +- .../repos/builtin/packages/hipblas/package.py | 4 + .../repos/builtin/packages/hipcub/package.py | 5 +- .../repos/builtin/packages/hipfft/package.py | 5 +- .../repos/builtin/packages/hipfort/package.py | 5 +- ...lang-in-bin-dir-and-llvm-clangs-head.patch | 13 + .../builtin/packages/hipify-clang/package.py | 9 +- .../repos/builtin/packages/hiprand/package.py | 4 + .../builtin/packages/hipsolver/package.py | 5 +- .../builtin/packages/hipsparse/package.py | 4 + .../builtin/packages/hsa-rocr-dev/package.py | 8 +- .../builtin/packages/hsakmt-roct/package.py | 4 +- .../llvm-amdgpu/001-Add-i1-mul-patterns.patch | 2842 +++++++++++++++++ .../builtin/packages/llvm-amdgpu/package.py | 12 +- .../repos/builtin/packages/llvm/package.py | 2 + ...half-include-directory-path-migraphx.patch | 48 + .../builtin/packages/migraphx/package.py | 20 +- .../builtin/packages/miopen-hip/package.py | 17 +- .../builtin/packages/mivisionx/package.py | 11 +- .../repos/builtin/packages/rccl/package.py | 11 +- .../repos/builtin/packages/rdc/package.py | 8 +- .../builtin/packages/rocalution/package.py | 5 +- .../repos/builtin/packages/rocblas/package.py | 8 + .../repos/builtin/packages/rocfft/package.py | 4 + .../packages/rocm-bandwidth-test/package.py | 6 +- .../packages/rocm-clang-ocl/package.py | 6 +- .../builtin/packages/rocm-cmake/package.py | 6 +- .../builtin/packages/rocm-core/package.py | 2 + .../builtin/packages/rocm-dbgapi/package.py | 6 +- .../packages/rocm-debug-agent/package.py | 8 +- .../packages/rocm-device-libs/package.py | 6 +- .../builtin/packages/rocm-gdb/package.py | 6 +- .../builtin/packages/rocm-opencl/package.py | 8 +- .../packages/rocm-openmp-extras/package.py | 18 +- .../builtin/packages/rocm-smi-lib/package.py | 6 +- .../builtin/packages/rocm-tensile/package.py | 8 + ...oad-googletest-yaml-library-path_5.6.patch | 532 +++ .../packages/rocm-validation-suite/package.py | 10 +- .../builtin/packages/rocminfo/package.py | 6 +- .../repos/builtin/packages/rocprim/package.py | 4 + .../repos/builtin/packages/rocrand/package.py | 4 + .../builtin/packages/rocsolver/package.py | 8 +- .../builtin/packages/rocsparse/package.py | 5 + .../builtin/packages/rocthrust/package.py | 4 + .../packages/roctracer-dev-api/package.py | 2 + .../builtin/packages/roctracer-dev/package.py | 6 +- ...rocm-smi-lib-path-for-building-tests.patch | 31 + .../repos/builtin/packages/rocwmma/package.py | 24 +- 53 files changed, 4047 insertions(+), 61 deletions(-) create mode 100644 var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.5.6.0.patch create mode 100644 var/spack/repos/builtin/packages/hip/0015-reverting-operator-mixup-fix-for-slate.patch create mode 100644 var/spack/repos/builtin/packages/hipify-clang/0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch create mode 100644 var/spack/repos/builtin/packages/llvm-amdgpu/001-Add-i1-mul-patterns.patch create mode 100644 var/spack/repos/builtin/packages/migraphx/0005-Adding-half-include-directory-path-migraphx.patch create mode 100644 var/spack/repos/builtin/packages/rocm-validation-suite/007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.6.patch create mode 100644 var/spack/repos/builtin/packages/rocwmma/0001-add-rocm-smi-lib-path-for-building-tests.patch diff --git a/var/spack/repos/builtin/packages/comgr/package.py b/var/spack/repos/builtin/packages/comgr/package.py index 93a5fcf7405593..a17bcc7e9426a6 100644 --- a/var/spack/repos/builtin/packages/comgr/package.py +++ b/var/spack/repos/builtin/packages/comgr/package.py @@ -21,6 +21,8 @@ class Comgr(CMakePackage): libraries = ["libamd_comgr"] version("master", branch="amd-stg-open") + version("5.6.1", sha256="0a85d84619f98be26ca7a32c71f94ed3c4e9866133789eabb451be64ce739300") + version("5.6.0", sha256="9396a7238b547ee68146c669b10b9d5de8f1d76527c649133c75d8076a185a72") version("5.5.1", sha256="0fbb15fe5a95c2e141ccd360bc413e1feda283334781540a6e5095ab27fd8019") version("5.5.0", sha256="97dfff03226ce0902b9d5d1c8c7bebb7a15978a81b6e9c750bf2d2473890bd42") version("5.4.3", sha256="8af18035550977fe0aa9cca8dfacbe65fe292e971de5a0e160710bafda05a81f") @@ -142,6 +144,8 @@ class Comgr(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: # llvm libs are linked statically, so this *could* be a build dep @@ -153,7 +157,7 @@ class Comgr(CMakePackage): "rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver) ) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) root_cmakelists_dir = join_path("lib", "comgr") diff --git a/var/spack/repos/builtin/packages/composable-kernel/package.py b/var/spack/repos/builtin/packages/composable-kernel/package.py index 57bfc6a17c1c57..efa05197f9338c 100644 --- a/var/spack/repos/builtin/packages/composable-kernel/package.py +++ b/var/spack/repos/builtin/packages/composable-kernel/package.py @@ -17,6 +17,8 @@ class ComposableKernel(CMakePackage): maintainers("srekolam", "afzpatel") version("master", branch="develop") + version("5.6.1", commit="f5ec04f091fa5c48c67d7bacec36a414d0be06a5") + version("5.6.0", commit="f0fd02634c2f8f8c70f5a0ab2a8c84db5e36eeca") version("5.5.1", commit="ac9e01e2cc3721be24619807adc444e1f59a9d25") version("5.5.0", commit="8b76b832420a3d69708401de6607a033163edcce") version("5.4.3", commit="bb3d9546f186e39cefedc3e7f01d88924ba20168") @@ -40,7 +42,7 @@ class ComposableKernel(CMakePackage): depends_on("pkgconfig", type="build") depends_on("cmake@3.16:", type="build") - for ver in ["master", "5.5.1", "5.5.0", "5.4.3", "5.4.0"]: + for ver in ["master", "5.6.1", "5.6.0", "5.5.1", "5.5.0", "5.4.3", "5.4.0"]: depends_on("hip@" + ver, when="@" + ver) depends_on("llvm-amdgpu@" + ver, when="@" + ver) depends_on("rocm-cmake@" + ver, when="@" + ver, type="build") diff --git a/var/spack/repos/builtin/packages/hip-rocclr/package.py b/var/spack/repos/builtin/packages/hip-rocclr/package.py index 3c2239d1797603..e6a4b3bbdfe1ae 100644 --- a/var/spack/repos/builtin/packages/hip-rocclr/package.py +++ b/var/spack/repos/builtin/packages/hip-rocclr/package.py @@ -27,6 +27,8 @@ def url_for_version(self, version): return url.format(version) version("master", branch="main") + version("5.6.1", sha256="cc9a99c7e4de3d9360c0a471b27d626e84a39c9e60e0aff1e8e1500d82391819") + version("5.6.0", sha256="864f87323e793e60b16905284fba381a7182b960dd4a37fb67420c174442c03c") version("5.5.1", sha256="1375fc7723cfaa0ae22a78682186d4804188b0a54990bfd9c0b8eb421b85e37e") version("5.5.0", sha256="efbae9a1ef2ab3de5ca44091e9bb78522e76759c43524c1349114f9596cc61d1") version("5.4.3", sha256="71d9668619ab57ec8a4564d11860438c5aad5bd161a3e58fbc49555fbd59182d") @@ -140,6 +142,8 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("hsakmt-roct@" + ver, when="@" + ver) @@ -162,6 +166,8 @@ def url_for_version(self, version): # Add opencl sources thru the below for d_version, d_shasum in [ + ("5.6.1", "ec26049f7d93c95050c27ba65472736665ec7a40f25920a868616b2970f6b845"), + ("5.6.0", "52ab260d00d279c2a86c353901ffd88ee61b934ad89e9eb480f210656705f04e"), ("5.5.1", "a8a62a7c6fc5398406d2203b8cb75621a24944688e545d917033d87de2724498"), ("5.5.0", "0df9fa0b8aa0c8e6711d34eec0fdf1ed356adcd9625bc8f1ce9b3e72090f3e4f"), ("5.4.3", "b0f8339c844a2e62773bd85cd1e7c5ecddfe71d7c8e8d604e1a1d60900c30873"), diff --git a/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.5.6.0.patch b/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.5.6.0.patch new file mode 100644 index 00000000000000..dfca3691f1731c --- /dev/null +++ b/var/spack/repos/builtin/packages/hip/0014-remove-compiler-rt-linkage-for-host.5.6.0.patch @@ -0,0 +1,75 @@ +From cd4283eab943a3018237035afea61f1b5e0042cd Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Wed, 27 Sep 2023 06:38:18 +0000 +Subject: [PATCH] Remove-compiler-rt-linkage-for-host + +--- + clr/hipamd/CMakeLists.txt | 6 ++++-- + clr/hipamd/hip-config.cmake.in | 1 - + hipcc/bin/hipcc.pl | 11 ++++++++--- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/clr/hipamd/CMakeLists.txt b/clr/hipamd/CMakeLists.txt +index c14a9ad..ca49f7f 100755 +--- a/clr/hipamd/CMakeLists.txt ++++ b/clr/hipamd/CMakeLists.txt +@@ -400,8 +400,10 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "") + install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin) ++ if(WIN32) ++ install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) ++ install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin) ++ endif() + endif() + + ############################# +diff --git a/clr/hipamd/hip-config.cmake.in b/clr/hipamd/hip-config.cmake.in +index 537a599..7d10273 100755 +--- a/clr/hipamd/hip-config.cmake.in ++++ b/clr/hipamd/hip-config.cmake.in +@@ -245,7 +245,6 @@ if(HIP_COMPILER STREQUAL "clang") + # Add support for __fp16 and _Float16, explicitly link with compiler-rt + if( "${CLANGRT_BUILTINS_FETCH_EXIT_CODE}" STREQUAL "0" ) + # CLANG_RT Builtins found Successfully Set interface link libraries property +- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}") + set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}") + else() + message(STATUS "clangrt builtins lib not found: ${CLANGRT_BUILTINS_FETCH_EXIT_CODE}") +diff --git a/hipcc/bin/hipcc.pl b/hipcc/bin/hipcc.pl +index 56dcda2..c7ae60b 100755 +--- a/hipcc/bin/hipcc.pl ++++ b/hipcc/bin/hipcc.pl +@@ -155,11 +155,15 @@ if ($HIP_PLATFORM eq "amd") { + if($isWindows) { + $execExtension = ".exe"; + } +- $HIPCC="$HIP_CLANG_PATH/clang++" . $execExtension; ++ # llvm_path is set inside the hip recipe ++ $LLVM_PATH= $ENV{'LLVM_PATH'}; ++ $HIPCC="${LLVM_PATH}/bin/clang++" . $execExtension; ++ + + # If $HIPCC clang++ is not compiled, use clang instead + if ( ! -e $HIPCC ) { +- $HIPCC="$HIP_CLANG_PATH/clang" . $execExtension; ++ $LLVM_PATH= $ENV{'LLVM_PATH'}; ++ $HIPCC="${LLVM_PATH}/bin/clang" . $execExtension; + $HIPLDFLAGS = "--driver-mode=g++"; + } + # to avoid using dk linker or MSVC linker +@@ -483,7 +487,8 @@ if($HIP_PLATFORM eq "amd"){ + $targetsStr = $ENV{HCC_AMDGPU_TARGET}; + } elsif (not $isWindows) { + # Else try using rocm_agent_enumerator +- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; ++ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCMINFO_PATH; ++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator"; + $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; + $targetsStr =~ s/\n/,/g; + } +-- +2.31.1 + diff --git a/var/spack/repos/builtin/packages/hip/0015-reverting-operator-mixup-fix-for-slate.patch b/var/spack/repos/builtin/packages/hip/0015-reverting-operator-mixup-fix-for-slate.patch new file mode 100644 index 00000000000000..36bfadfe94da6b --- /dev/null +++ b/var/spack/repos/builtin/packages/hip/0015-reverting-operator-mixup-fix-for-slate.patch @@ -0,0 +1,107 @@ +From 1d7f7eb9a52af2b83d3cb06bb4fe0f31eb47ce7f Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Wed, 27 Sep 2023 07:07:01 +0000 +Subject: [PATCH] Reverting operator mixup fix for slate + +--- + .../include/hip/amd_detail/amd_hip_complex.h | 17 ++++------ + .../hip/amd_detail/amd_hip_vector_types.h | 31 +++++++++++-------- + 2 files changed, 24 insertions(+), 24 deletions(-) + +diff --git a/clr/hipamd/include/hip/amd_detail/amd_hip_complex.h b/clr/hipamd/include/hip/amd_detail/amd_hip_complex.h +index 9d9dfd5..eba6eb5 100644 +--- a/clr/hipamd/include/hip/amd_detail/amd_hip_complex.h ++++ b/clr/hipamd/include/hip/amd_detail/amd_hip_complex.h +@@ -106,20 +106,15 @@ THE SOFTWARE. + return lhs; \ + } + +-#define COMPLEX_MUL_PREOP_OVERLOAD(type) \ +- __HOST_DEVICE__ static inline type& operator*=(type& lhs, const type& rhs) { \ +- type temp{lhs}; \ +- lhs.x = rhs.x * temp.x - rhs.y * temp.y; \ +- lhs.y = rhs.y * temp.x + rhs.x * temp.y; \ +- return lhs; \ ++#define COMPLEX_MUL_PREOP_OVERLOAD(type) \ ++ __HOST_DEVICE__ static inline type& operator*=(type& lhs, const type& rhs) { \ ++ lhs = lhs * rhs; \ ++ return lhs; \ + } + + #define COMPLEX_DIV_PREOP_OVERLOAD(type) \ +- __HOST_DEVICE__ static inline type& operator/=(type& lhs, const type& rhs) { \ +- type temp; \ +- temp.x = (lhs.x*rhs.x + lhs.y * rhs.y) / (rhs.x*rhs.x + rhs.y*rhs.y); \ +- temp.y = (lhs.y * rhs.x - lhs.x * rhs.y) / (rhs.x*rhs.x + rhs.y*rhs.y); \ +- lhs = temp; \ ++ __HOST_DEVICE__ static inline type& operator/=(type& lhs, const type& rhs) { \ ++ lhs = lhs / rhs; \ + return lhs; \ + } + +diff --git a/clr/hipamd/include/hip/amd_detail/amd_hip_vector_types.h b/clr/hipamd/include/hip/amd_detail/amd_hip_vector_types.h +index 8215fb0..dfd3b39 100644 +--- a/clr/hipamd/include/hip/amd_detail/amd_hip_vector_types.h ++++ b/clr/hipamd/include/hip/amd_detail/amd_hip_vector_types.h +@@ -544,13 +544,6 @@ template struct is_scalar : public integral_constant struct is_scalar : public integral_constant struct is_scalar : public integral_constant{x} -= y; + } + ++ template ++ __HOST_DEVICE__ ++ inline ++ constexpr ++ HIP_vector_type operator*( ++ const HIP_vector_type& x, const HIP_vector_type& y) noexcept ++ { ++ return HIP_vector_type{x} *= y; ++ } + template + __HOST_DEVICE__ + inline +@@ -741,6 +737,15 @@ template struct is_scalar : public integral_constant{x} *= y; + } + ++ template ++ __HOST_DEVICE__ ++ inline ++ constexpr ++ HIP_vector_type operator/( ++ const HIP_vector_type& x, const HIP_vector_type& y) noexcept ++ { ++ return HIP_vector_type{x} /= y; ++ } + template + __HOST_DEVICE__ + inline +-- +2.31.1 + diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 2bf04a19834ed9..5e1d6744cb65f4 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -25,6 +25,8 @@ class Hip(CMakePackage): libraries = ["libamdhip64"] version("master", branch="master") + version("5.6.1", sha256="4b3c4dfcf8595da0e1b8c3e8067b1ccebeaac337762ff098db14375fa8dd4487") + version("5.6.0", sha256="a8237768c1ae70029d972376f8d279f4de18a1e6106fff6215d1e16847bc375e") version("5.5.1", sha256="1f5f6bb72d8d64335ccc8242ef2e2ea8efeb380cce2997f475b1ee77528d9fb4") version("5.5.0", sha256="5b0d0253e62f85cc21d043513f7c11c64e4a4ec416159668f0b160d732d09a3c") version("5.4.3", sha256="23e51d3af517cd63019f8d199e46b84d5a18251d148e727f3985e8d99ccb0e58") @@ -162,6 +164,8 @@ class Hip(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hsakmt-roct@" + ver, when="@" + ver) depends_on("hsa-rocr-dev@" + ver, when="@" + ver) @@ -170,10 +174,10 @@ class Hip(CMakePackage): depends_on("rocminfo@" + ver, when="@" + ver) depends_on("roctracer-dev-api@" + ver, when="@" + ver) - for ver in ["5.4.0", "5.4.3", "5.5.0", "5.5.1"]: + for ver in ["5.4.0", "5.4.3", "5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("hipify-clang", when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) # hipcc likes to add `-lnuma` by default :( # ref https://github.com/ROCm-Developer-Tools/HIP/pull/2202 @@ -269,6 +273,55 @@ class Hip(CMakePackage): placement="rocclr", when="@{0}".format(d_version), ) + # Add hip-clr sources thru the below + for d_version, d_shasum in [ + ("5.6.1", "0b88af1e99643899d11b1c8cf8a3c46601051b328a5e0ffbd44ee88b7eb0db33"), + ("5.6.0", "8dcd99110737a294f67a805639cf372890c8ca16c7603caaa793e71e84478fe4"), + ]: + resource( + name="clr", + url="https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-{0}.tar.gz".format( + d_version + ), + sha256=d_shasum, + expand=True, + destination="", + placement="clr", + when="@{0}".format(d_version), + ) + + # Add hipcc sources thru the below + for d_version, d_shasum in [ + ("5.6.1", "5800fac92b841ef6f52acda78d9bf86f83970bec0fb848a6265d239bdb7eb51a"), + ("5.6.0", "fdb7fdc9e4648376120330f034ee8353038d34c8a015f9eb0c208c56eeddd097"), + ]: + resource( + name="hipcc", + url="https://github.com/ROCm-Developer-Tools/HIPCC/archive/refs/tags/rocm-{0}.tar.gz".format( + d_version + ), + sha256=d_shasum, + expand=True, + destination="", + placement="hipcc", + when="@{0}".format(d_version), + ) + # Add hiptests sources thru the below + for d_version, d_shasum in [ + ("5.6.1", "5b3002ddfafda162329e4d9e6ac1200eeb48ff08e666b342aa8aeca30750f48b"), + ("5.6.0", "8cf4509bf9c0747dab8ed8fec1365a9156792034b517207a0b2d63270429fd2e"), + ]: + resource( + name="hip-tests", + url="https://github.com/ROCm-Developer-Tools/hip-tests/archive/refs/tags/rocm-{0}.tar.gz".format( + d_version + ), + sha256=d_shasum, + expand=True, + destination="", + placement="hip-tests", + when="@{0}".format(d_version), + ) # Note: the ROCm ecosystem expects `lib/` and `bin/` folders with symlinks # in the parent directory of the package, which is incompatible with spack. # In hipcc the ROCM_PATH variable is used to point to the parent directory @@ -331,10 +384,11 @@ class Hip(CMakePackage): patch("0005-Disable-tests-4.1.0.patch", when="@4.1.0:4.3.2") patch("Add_missing_open_cl_header_file_for_4.3.0.patch", when="@4.3.0:4.3.2") - patch("0014-hip-test-file-reorg-5.4.0.patch", when="@5.4.0:") - patch("0016-hip-sample-fix-hipMalloc-call.patch", when="@5.4.3:") + patch("0014-hip-test-file-reorg-5.4.0.patch", when="@5.4.0:5.5") + patch("0016-hip-sample-fix-hipMalloc-call.patch", when="@5.4.3:5.5") patch("0014-remove-compiler-rt-linkage-for-host.5.5.0.patch", when="@5.5") - + patch("0014-remove-compiler-rt-linkage-for-host.5.6.0.patch", when="@5.6:") + patch("0015-reverting-operator-mixup-fix-for-slate.patch", when="@5.6:") # See https://github.com/ROCm-Developer-Tools/HIP/pull/3206 patch( "https://github.com/ROCm-Developer-Tools/HIP/commit/50ee82f6bc4aad10908ce09198c9f7ebfb2a3561.patch?full_index=1", @@ -346,8 +400,10 @@ class Hip(CMakePackage): def root_cmakelists_dir(self): if self.spec.satisfies("@:4.3.2"): return self.stage.source_path - else: + elif self.spec.satisfies("@4.5:5.5"): return "hipamd" + else: + return "clr" def get_paths(self): if self.spec.external: @@ -393,6 +449,7 @@ def get_paths(self): "llvm-amdgpu": rocm_prefix.llvm, "hsa-rocr-dev": rocm_prefix.hsa, "rocminfo": rocm_prefix, + "comgr": rocm_prefix, "rocm-device-libs": rocm_prefix, } @@ -405,6 +462,7 @@ def get_paths(self): "llvm-amdgpu": self.spec["llvm-amdgpu"].prefix, "hsa-rocr-dev": self.spec["hsa-rocr-dev"].prefix, "rocminfo": self.spec["rocminfo"].prefix, + "comgr": self.spec["comgr"].prefix, "rocm-device-libs": self.spec["llvm-amdgpu"].prefix, } @@ -476,6 +534,7 @@ def set_variables(self, env): # hiprtcCreateProgram: # https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/rocm-4.0.0/lib/comgr/src/comgr-env.cpp env.set("LLVM_PATH", paths["llvm-amdgpu"]) + env.set("COMGR_PATH", paths["comgr"]) # Finally we have to set --rocm-path= ourselves, which is not # the same as --hip-device-lib-path (set by hipcc). It's used to set @@ -525,13 +584,20 @@ def patch(self): "hip-config.cmake.in", string=True, ) - if self.spec.satisfies("@5.2: +rocm"): + if self.spec.satisfies("@5.2:5.4 +rocm"): filter_file( '"${ROCM_PATH}/llvm"', self.spec["llvm-amdgpu"].prefix, "hipamd/hip-config.cmake.in", string=True, ) + if self.spec.satisfies("@5.6: +rocm"): + filter_file( + '"${ROCM_PATH}/llvm"', + self.spec["llvm-amdgpu"].prefix, + "clr/hipamd/hip-config.cmake.in", + string=True, + ) perl = self.spec["perl"].command kwargs = {"ignore_absent": False, "backup": False, "string": False} @@ -552,13 +618,13 @@ def patch(self): "roc-obj-ls", "hipvars.pm", ] - elif self.spec.satisfies("@4.5.0:"): + elif self.spec.satisfies("@4.5.0:5.5"): files = [] - filter_file(match, substitute, *files, **kwargs) - # This guy is used during the cmake phase, so we have to fix the - # shebang already here in case it is too long. - filter_shebang("hipconfig") - if self.spec.satisfies("@4.5.0:"): + filter_file(match, substitute, *files, **kwargs) + # This guy is used during the cmake phase, so we have to fix the + # shebang already here in case it is too long. + filter_shebang("hipconfig") + if self.spec.satisfies("@4.5.0:5.5"): perl = self.spec["perl"].command kwargs = {"ignore_absent": False, "backup": False, "string": False} with working_dir("hipamd/bin"): @@ -566,6 +632,18 @@ def patch(self): substitute = "#!{perl}".format(perl=perl) files = ["roc-obj-extract", "roc-obj-ls"] filter_file(match, substitute, *files, **kwargs) + if self.spec.satisfies("@5.6.0:"): + perl = self.spec["perl"].command + kwargs = {"ignore_absent": False, "backup": False, "string": False} + match = "^#!/usr/bin/perl" + substitute = "#!{perl}".format(perl=perl) + with working_dir("clr/hipamd/bin"): + files = ["roc-obj-extract", "roc-obj-ls"] + filter_file(match, substitute, *files, **kwargs) + with working_dir("hipcc/bin"): + files = [] + filter_file(match, substitute, *files, **kwargs) + filter_shebang("hipconfig") if "@3.7.0: +rocm" in self.spec: numactl = self.spec["numactl"].prefix.lib kwargs = {"ignore_absent": False, "backup": False, "string": False} @@ -573,7 +651,16 @@ def patch(self): with working_dir("bin"): match = " -lnuma" substitute = " -L{numactl} -lnuma".format(numactl=numactl) - filter_file(match, substitute, "hipcc", **kwargs) + if self.spec.satisfies("@4.5.0:5.5"): + filter_file(match, substitute, "hipcc", **kwargs) + if "@5.6.0: +rocm" in self.spec: + numactl = self.spec["numactl"].prefix.lib + kwargs = {"ignore_absent": False, "backup": False, "string": False} + + with working_dir("hipcc/src"): + match = " -lnuma" + substitute = " -L{numactl} -lnuma".format(numactl=numactl) + filter_file(match, substitute, "hipBin_amd.h", **kwargs) def flag_handler(self, name, flags): if name == "cxxflags" and self.spec.satisfies("@3.7.0:4.3.2"): @@ -609,21 +696,30 @@ def cmake_args(self): if "@4.5.0:" in self.spec: args.append(self.define("HIP_COMMON_DIR", self.stage.source_path)) args.append(self.define("HIP_CATCH_TEST", "OFF")) - args.append(self.define("ROCCLR_PATH", self.stage.source_path + "/rocclr")) - args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path + "/opencl")) + if "@4.5.0:5.5" in self.spec: + args.append(self.define("ROCCLR_PATH", self.stage.source_path + "rocclr")) + args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path + "opencl")) if "@5.3.0:" in self.spec: args.append("-DCMAKE_INSTALL_LIBDIR=lib") - + if "@5.6.0:" in self.spec: + args.append(self.define("ROCCLR_PATH", self.stage.source_path + "/clr/rocclr")) + args.append(self.define("AMD_OPENCL_PATH", self.stage.source_path + "/clr/opencl")) + args.append(self.define("HIPCC_BIN_DIR", self.stage.source_path + "/hipcc/bin")), + args.append(self.define("CLR_BUILD_HIP", True)), + args.append(self.define("CLR_BUILD_OCL", False)), return args - test_src_dir = "samples" - @run_after("install") def cache_test_sources(self): """Copy the tests source files after the package is installed to an install test subdirectory for use during `spack test run`.""" if self.spec.satisfies("@:5.1.0"): return + else: + if "@:5.5" in self.spec: + self.test_src_dir = "samples" + else: + self.test_src_dir = "hip-tests/samples" self.cache_extra_test_sources([self.test_src_dir]) def test_samples(self): diff --git a/var/spack/repos/builtin/packages/hipblas/package.py b/var/spack/repos/builtin/packages/hipblas/package.py index 08998400ee47d5..b0261bd5db545c 100644 --- a/var/spack/repos/builtin/packages/hipblas/package.py +++ b/var/spack/repos/builtin/packages/hipblas/package.py @@ -22,6 +22,8 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + version("5.6.1", sha256="f9da82fbefc68b84081ea0ed0139b91d2a540357fcf505c7f1d57eab01eb327c") + version("5.6.0", sha256="9453a31324e10ba528f8f4755d2c270d0ed9baa33e980d8f8383204d8e28a563") version("5.5.1", sha256="5920c9a9c83cf7e2b42d1f99f5d5091cac7f6c0a040a737e869e57b92d7045a9") version("5.5.0", sha256="b080c25cb61531228d26badcdca856c46c640035c058bfc1c9f63de65f418cd5") version("5.4.3", sha256="5acac147aafc15c249c2f24c19459135ed68b506403aa92e602b67cfc10c38b7") @@ -167,6 +169,8 @@ def check(self): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", "develop", ]: diff --git a/var/spack/repos/builtin/packages/hipcub/package.py b/var/spack/repos/builtin/packages/hipcub/package.py index 94e6055705b48e..cb878d18233df7 100644 --- a/var/spack/repos/builtin/packages/hipcub/package.py +++ b/var/spack/repos/builtin/packages/hipcub/package.py @@ -15,7 +15,8 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") - + version("5.6.1", sha256="4b9479daa40424c9ddbc14ce967aa170680f8ca1ed01a514e6e30ccfa22552ce") + version("5.6.0", sha256="5e74ddbf833f39836bf9ec6c6750348c7386a85ca67aaf9bb54d16c9e1959031") version("5.5.1", sha256="ad83f3f1ed85ead9e3012906957c125a896168be913f6fb6af298228fc571480") version("5.5.0", sha256="3eec838119326a67eb4cc006c706e328f3a51a01e98bbfb518df8fe4a4707e13") version("5.4.3", sha256="cf528d9acb4f9b9c3aad439ae76bfc3d02be6e7a74d96099544e5d54e1a23675") @@ -148,6 +149,8 @@ class Hipcub(CMakePackage, CudaPackage, ROCmPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocprim@" + ver, when="+rocm @" + ver) depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) diff --git a/var/spack/repos/builtin/packages/hipfft/package.py b/var/spack/repos/builtin/packages/hipfft/package.py index 92e3db29cd4cca..046d908e3e3c84 100644 --- a/var/spack/repos/builtin/packages/hipfft/package.py +++ b/var/spack/repos/builtin/packages/hipfft/package.py @@ -22,7 +22,8 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): maintainers("renjithravindrankannath", "srekolam") version("master", branch="master") - + version("5.6.1", sha256="d2ae36b8eacd39b865e8a7972b8eb86bcea2de4ac90711bba7e29b39b01eaa74") + version("5.6.0", sha256="c7f425b693caf9371b42226d86392335d993a117d23219b6ba1fd13523cb8261") version("5.5.1", sha256="3addd15a459752ad657e84c2a7b6b6289600d1d0a5f90d6e0946ba11e8148fc0") version("5.5.0", sha256="47ec6f7da7346c312b80daaa8f763e86c7bdc33ac8617cfa3344068e5b20dd9e") version("5.4.3", sha256="ae37f40b6019a11f10646ef193716836f366d269eab3c5cc2ed09af85355b945") @@ -116,6 +117,8 @@ class Hipfft(CMakePackage, CudaPackage, ROCmPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("rocfft@" + ver, when="+rocm @" + ver) diff --git a/var/spack/repos/builtin/packages/hipfort/package.py b/var/spack/repos/builtin/packages/hipfort/package.py index ec1e64ce138815..da688d9c1fb868 100644 --- a/var/spack/repos/builtin/packages/hipfort/package.py +++ b/var/spack/repos/builtin/packages/hipfort/package.py @@ -15,7 +15,8 @@ class Hipfort(CMakePackage): tags = ["rocm"] maintainers("cgmb", "srekolam", "renjithravindrankannath") - + version("5.6.1", sha256="a55345cc9ccaf0cd69d306b8eb9ec2a02c220a57e9c396443cc7273aa3377adc") + version("5.6.0", sha256="03176a099bc81e212ad1bf9d86f35561f8f2d21a2f126732d7620e1ea59888d5") version("5.5.1", sha256="abc59f7b81cbefbe3555cbf1bf0d80e8aa65901c70799748c40870fe6f3fea60") version("5.5.0", sha256="cae75ffeac129639cabebfe2f95f254c83d6c0a6cffd98142ea3537a132e42bb") version("5.4.3", sha256="1954a1cba351d566872ced5549b2ced7ab6332221e2b98dba3c07180dce8f173") @@ -118,6 +119,8 @@ class Hipfort(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, type="build", when="@" + ver) diff --git a/var/spack/repos/builtin/packages/hipify-clang/0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch b/var/spack/repos/builtin/packages/hipify-clang/0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch new file mode 100644 index 00000000000000..c2fad6d3f25780 --- /dev/null +++ b/var/spack/repos/builtin/packages/hipify-clang/0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80c8a3f..d2b88c0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,7 +137,7 @@ install( + # install all folders under clang/version/ in CMAKE_INSTALL_PREFIX path + install( + DIRECTORY ${LLVM_DIR}/../../clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}/ +- DESTINATION . ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include + COMPONENT clang-resource-headers + FILES_MATCHING + PATTERN "*.h" diff --git a/var/spack/repos/builtin/packages/hipify-clang/package.py b/var/spack/repos/builtin/packages/hipify-clang/package.py index 65dd8df60faae0..dd6b99ee716059 100644 --- a/var/spack/repos/builtin/packages/hipify-clang/package.py +++ b/var/spack/repos/builtin/packages/hipify-clang/package.py @@ -18,6 +18,8 @@ class HipifyClang(CMakePackage): maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("5.6.1", sha256="ec3a4f276556f9fd924ea3c89be11b6c6ddf999cdd4387f669e38e41ee0042e8") + version("5.6.0", sha256="a2572037a7d3bd0813bd6819a5e6c0e911678db5fd3ab15a65370601df91891b") version("5.5.1", sha256="35b9c07a7afaf9cf6f3bbe9dd147fa81b1b297af3e5e26e60c55629e83feaa48") version("5.5.0", sha256="1b75c702799ac93027337f8fb61d7c27ba960e8ece60d907fc8c5ab3f15c3fe9") version("5.4.3", sha256="79e27bd6c0a28e6a62b02dccc0b5d88a81f69fe58487e83f3b7ab47d6b64341b") @@ -103,7 +105,8 @@ class HipifyClang(CMakePackage): # the patch was added to install the targets in the correct directory structure # this will fix the issue https://github.com/spack/spack/issues/30711 - patch("0001-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@5.1.0:") + patch("0001-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@5.1.0:5.5") + patch("0002-install-hipify-clang-in-bin-dir-and-llvm-clangs-head.patch", when="@5.6:") depends_on("cmake@3.5:", type="build") for ver in [ @@ -132,11 +135,13 @@ class HipifyClang(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("llvm-amdgpu@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/hiprand/package.py b/var/spack/repos/builtin/packages/hiprand/package.py index f55092df19bd85..5f85c46cb91698 100644 --- a/var/spack/repos/builtin/packages/hiprand/package.py +++ b/var/spack/repos/builtin/packages/hiprand/package.py @@ -22,6 +22,8 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + version("5.6.1", sha256="a73d5578bc7f8dff0b8960e4bff97bc4fc28f508a19ed6acd1cfd4d3e76b47ee") + version("5.6.0", sha256="8c214e2f90337a5317a69950026bf337b1e567d43bb9ae64f2a802af2228c313") version("5.5.1", sha256="5df9d78eae0991be5ec9f60e8d3530fabc23793d9f9cf274b075d689675db04e") version("5.5.0", sha256="7c7dde7b989d5da9c0b0251233245f955b477c090462c7d34e3e0284c5fca761") version("5.4.3", sha256="7d3d04476880ec90c088dff81f69aac8699eaef972476000e5c4726584ffa98f") @@ -78,6 +80,8 @@ class Hiprand(CMakePackage, CudaPackage, ROCmPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", "develop", ]: diff --git a/var/spack/repos/builtin/packages/hipsolver/package.py b/var/spack/repos/builtin/packages/hipsolver/package.py index c1ca0db6166644..1ef38160a65979 100644 --- a/var/spack/repos/builtin/packages/hipsolver/package.py +++ b/var/spack/repos/builtin/packages/hipsolver/package.py @@ -26,7 +26,8 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") - + version("5.6.1", sha256="2e546bc7771f7bf0aa7892b69cded725941573e8b70614759c3d03c21eb78dde") + version("5.6.0", sha256="11fa51d210853d93d24d55b20367738e49711793412f58e8d7689710b92ae16c") version("5.5.1", sha256="826bd64a4887176595bb7319d9a3612e7327602efe1f42aa3f2ad0e783d1a180") version("5.5.0", sha256="0f45be0f90907381ae3e82424599e2ca2112d6411b4a64c72558d63f00409b83") version("5.4.3", sha256="02a1bffecc494393f49f97174db7d2c101db557d32404923a44520876e682e3a") @@ -106,6 +107,8 @@ class Hipsolver(CMakePackage, CudaPackage, ROCmPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", "develop", ]: diff --git a/var/spack/repos/builtin/packages/hipsparse/package.py b/var/spack/repos/builtin/packages/hipsparse/package.py index f698d783bc506d..696094cb5af0de 100644 --- a/var/spack/repos/builtin/packages/hipsparse/package.py +++ b/var/spack/repos/builtin/packages/hipsparse/package.py @@ -19,6 +19,8 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") libraries = ["libhipsparse"] + version("5.6.1", sha256="d636d0c5d1e38cc0c09b1e95380199ec82bd465b94bd6661f0c8d9374d9b565d") + version("5.6.0", sha256="3a6931b744ebaa4469a4c50d059a008403e4dc2a4f04dd69c3c6d20916b4a491") version("5.5.1", sha256="3d291e4fe2c611d555e54de66149b204fe7ac59f5dd00a9ad93bc6dca0528880") version("5.5.0", sha256="8122c8f17d899385de83efb7ac0d8a4fabfcd2aa21bbed63e63ea7adf0d22df6") version("5.4.3", sha256="b373eccd03679a13fab4e740fc780da25cbd598abca3a1e5e3613ae14954f9db") @@ -149,6 +151,8 @@ class Hipsparse(CMakePackage, CudaPackage, ROCmPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("rocsparse@" + ver, when="+rocm @" + ver) diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index 40ec2435f51b9c..8a240502260ae7 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -24,6 +24,8 @@ class HsaRocrDev(CMakePackage): libraries = ["libhsa-runtime64"] version("master", branch="master") + version("5.6.1", sha256="4de9a57c2092edf9398d671c8a2c60626eb7daf358caf710da70d9c105490221") + version("5.6.0", sha256="30875d440df9d8481ffb24d87755eae20a0efc1114849a72619ea954f1e9206c") version("5.5.1", sha256="53d84ad5ba5086ed4ad67ad892c52c0e4eba8ddfa85c2dd341bf825f4d5fe4ee") version("5.5.0", sha256="8dbc776b56f93ddaa2ca38bf3b88299b8091de7c1b3f2e481064896cf6808e6c") version("5.4.3", sha256="a600eed848d47a7578c60da7e64eb92f29bbce2ec67932b251eafd4c2974cb67") @@ -145,6 +147,8 @@ class HsaRocrDev(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("hsakmt-roct@" + ver, when="@" + ver) @@ -153,7 +157,7 @@ class HsaRocrDev(CMakePackage): depends_on( "rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver) ) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) # Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways @@ -198,4 +202,6 @@ def cmake_args(self): args.append(self.define("BITCODE_DIR", bitcode_dir)) + if self.spec.satisfies("@5.6:"): + args.append("-DCMAKE_INSTALL_LIBDIR=lib") return args diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py index 1a2ce25a0419c0..0bebaae6bf3df5 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -22,6 +22,8 @@ class HsakmtRoct(CMakePackage): maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("5.6.1", sha256="d60b355bfd21a08e0e36270fd56f98d052c3c6edca47da887fa32bf32759c29b") + version("5.6.0", sha256="cd009c5c09f664f046c428ba9843582ab468f7b88d560747eb949d8d7f8c5567") version("5.5.1", sha256="4ffde3fc1f91f24cdbf09263fd8e012a3995ad10854f4c1d866beab7b9f36bf4") version("5.5.0", sha256="2b11fd8937c2b06cd4ddea2c3699fbf3d1651892c4c5957d38553b993dd9af18") version("5.4.3", sha256="3799abbe7177fbff3b304e2a363e2b39e8864f8650ae569b2b88b9291f9a710c") @@ -114,7 +116,7 @@ class HsakmtRoct(CMakePackage): for ver in ["5.3.0", "5.4.0", "5.4.3"]: depends_on("llvm-amdgpu@" + ver, type="test", when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) depends_on("llvm-amdgpu@" + ver, type="test", when="@" + ver) diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/001-Add-i1-mul-patterns.patch b/var/spack/repos/builtin/packages/llvm-amdgpu/001-Add-i1-mul-patterns.patch new file mode 100644 index 00000000000000..f93fcb99dbf458 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/001-Add-i1-mul-patterns.patch @@ -0,0 +1,2842 @@ +From a0f3d7f45075a3e9545c0c9fa25a9f8fc840cdd7 Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Mon, 25 Sep 2023 18:38:17 +0000 +Subject: [PATCH] i1 muls can sometimes happen after SCEV. They resulted in + ISel failures because we were missing the patterns for them. + +--- + llvm/lib/Target/AMDGPU/SIInstructions.td | 10 + + llvm/test/CodeGen/AMDGPU/mul.ll | 2676 ++++++++++++++++++++-- + 2 files changed, 2544 insertions(+), 142 deletions(-) + +diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td +index 03b2160a1..3bf4e42de 100644 +--- a/llvm/lib/Target/AMDGPU/SIInstructions.td ++++ b/llvm/lib/Target/AMDGPU/SIInstructions.td +@@ -2372,6 +2372,11 @@ def : GCNPat < + (S_AND_B64 $src0, $src1) + >; + ++def : GCNPat < ++ (i1 (mul i1:$src0, i1:$src1)), ++ (S_AND_B64 $src0, $src1) ++>; ++ + def : GCNPat < + (i1 (or i1:$src0, i1:$src1)), + (S_OR_B64 $src0, $src1) +@@ -2411,6 +2416,11 @@ def : GCNPat < + (S_AND_B32 $src0, $src1) + >; + ++def : GCNPat < ++ (i1 (mul i1:$src0, i1:$src1)), ++ (S_AND_B32 $src0, $src1) ++>; ++ + def : GCNPat < + (i1 (or i1:$src0, i1:$src1)), + (S_OR_B32 $src0, $src1) +diff --git a/llvm/test/CodeGen/AMDGPU/mul.ll b/llvm/test/CodeGen/AMDGPU/mul.ll +index 85dd59a0c..a8973d845 100644 +--- a/llvm/test/CodeGen/AMDGPU/mul.ll ++++ b/llvm/test/CodeGen/AMDGPU/mul.ll +@@ -1,20 +1,129 @@ +-; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefixes=GCN,SI,FUNC %s +-; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefixes=GCN,VI,FUNC %s +-; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx900 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefixes=FUNC,GFX9PLUS %s +-; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx1010 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefixes=FUNC,GFX9PLUS %s +-; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx1100 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -allow-deprecated-dag-overlap -check-prefixes=FUNC,GFX9PLUS %s +-; RUN: llc -amdgpu-scalarize-global-loads=false -march=r600 -mcpu=redwood < %s | FileCheck -allow-deprecated-dag-overlap -check-prefixes=EG,FUNC %s ++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ++; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefixes=SI %s ++; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=VI %s ++; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx900 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX9 %s ++; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx1010 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX10 %s ++; RUN: llc -amdgpu-scalarize-global-loads=false -march=amdgcn -mcpu=gfx1100 -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX11 %s ++; RUN: llc -amdgpu-scalarize-global-loads=false -march=r600 -mcpu=redwood < %s | FileCheck -check-prefixes=EG %s + + ; mul24 and mad24 are affected + +-; FUNC-LABEL: {{^}}test_mul_v2i32: +-; EG: MULLO_INT {{\*? *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} +-; EG: MULLO_INT {{\*? *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} +- +-; GCN: v_mul_lo_u32 v{{[0-9]+, v[0-9]+, v[0-9]+}} +-; GCN: v_mul_lo_u32 v{{[0-9]+, v[0-9]+, v[0-9]+}} +- + define amdgpu_kernel void @test_mul_v2i32(ptr addrspace(1) %out, ptr addrspace(1) %in) { ++; SI-LABEL: test_mul_v2i32: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s10, s6 ++; SI-NEXT: s_mov_b32 s11, s7 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s8, s2 ++; SI-NEXT: s_mov_b32 s9, s3 ++; SI-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; SI-NEXT: s_mov_b32 s4, s0 ++; SI-NEXT: s_mov_b32 s5, s1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_lo_u32 v1, v1, v3 ++; SI-NEXT: v_mul_lo_u32 v0, v0, v2 ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: test_mul_v2i32: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s10, s6 ++; VI-NEXT: s_mov_b32 s11, s7 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s8, s2 ++; VI-NEXT: s_mov_b32 s9, s3 ++; VI-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; VI-NEXT: s_mov_b32 s4, s0 ++; VI-NEXT: s_mov_b32 s5, s1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mul_lo_u32 v1, v1, v3 ++; VI-NEXT: v_mul_lo_u32 v0, v0, v2 ++; VI-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: test_mul_v2i32: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s10, s6 ++; GFX9-NEXT: s_mov_b32 s11, s7 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s8, s2 ++; GFX9-NEXT: s_mov_b32 s9, s3 ++; GFX9-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; GFX9-NEXT: s_mov_b32 s4, s0 ++; GFX9-NEXT: s_mov_b32 s5, s1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_lo_u32 v1, v1, v3 ++; GFX9-NEXT: v_mul_lo_u32 v0, v0, v2 ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: test_mul_v2i32: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s6 ++; GFX10-NEXT: s_mov_b32 s11, s7 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s8, s2 ++; GFX10-NEXT: s_mov_b32 s9, s3 ++; GFX10-NEXT: s_mov_b32 s4, s0 ++; GFX10-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; GFX10-NEXT: s_mov_b32 s5, s1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_lo_u32 v1, v1, v3 ++; GFX10-NEXT: v_mul_lo_u32 v0, v0, v2 ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: test_mul_v2i32: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s10, s6 ++; GFX11-NEXT: s_mov_b32 s11, s7 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s8, s2 ++; GFX11-NEXT: s_mov_b32 s9, s3 ++; GFX11-NEXT: s_mov_b32 s4, s0 ++; GFX11-NEXT: buffer_load_b128 v[0:3], off, s[8:11], 0 ++; GFX11-NEXT: s_mov_b32 s5, s1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_lo_u32 v1, v1, v3 ++; GFX11-NEXT: v_mul_lo_u32 v0, v0, v2 ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[4:7], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: test_mul_v2i32: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @8, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 0 @6 ++; EG-NEXT: ALU 3, @9, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_128 T0.XYZW, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 8: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 9: ++; EG-NEXT: MULLO_INT * T0.Y, T0.Y, T0.W, ++; EG-NEXT: LSHR T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, T0.Z, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: + %b_ptr = getelementptr <2 x i32>, ptr addrspace(1) %in, i32 1 + %a = load <2 x i32>, ptr addrspace(1) %in + %b = load <2 x i32>, ptr addrspace(1) %b_ptr +@@ -23,18 +132,142 @@ define amdgpu_kernel void @test_mul_v2i32(ptr addrspace(1) %out, ptr addrspace(1 + ret void + } + +-; FUNC-LABEL: {{^}}v_mul_v4i32: +-; EG: MULLO_INT {{\*? *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} +-; EG: MULLO_INT {{\*? *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} +-; EG: MULLO_INT {{\*? *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} +-; EG: MULLO_INT {{\*? *}}T{{[0-9]+\.[XYZW], T[0-9]+\.[XYZW], T[0-9]+\.[XYZW]}} +- +-; GCN: v_mul_lo_u32 v{{[0-9]+, v[0-9]+, v[0-9]+}} +-; GCN: v_mul_lo_u32 v{{[0-9]+, v[0-9]+, v[0-9]+}} +-; GCN: v_mul_lo_u32 v{{[0-9]+, v[0-9]+, v[0-9]+}} +-; GCN: v_mul_lo_u32 v{{[0-9]+, v[0-9]+, v[0-9]+}} +- + define amdgpu_kernel void @v_mul_v4i32(ptr addrspace(1) %out, ptr addrspace(1) %in) { ++; SI-LABEL: v_mul_v4i32: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s10, s6 ++; SI-NEXT: s_mov_b32 s11, s7 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s8, s2 ++; SI-NEXT: s_mov_b32 s9, s3 ++; SI-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; SI-NEXT: buffer_load_dwordx4 v[4:7], off, s[8:11], 0 offset:16 ++; SI-NEXT: s_mov_b32 s4, s0 ++; SI-NEXT: s_mov_b32 s5, s1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_lo_u32 v3, v3, v7 ++; SI-NEXT: v_mul_lo_u32 v2, v2, v6 ++; SI-NEXT: v_mul_lo_u32 v1, v1, v5 ++; SI-NEXT: v_mul_lo_u32 v0, v0, v4 ++; SI-NEXT: buffer_store_dwordx4 v[0:3], off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul_v4i32: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s10, s6 ++; VI-NEXT: s_mov_b32 s11, s7 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s8, s2 ++; VI-NEXT: s_mov_b32 s9, s3 ++; VI-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; VI-NEXT: buffer_load_dwordx4 v[4:7], off, s[8:11], 0 offset:16 ++; VI-NEXT: s_mov_b32 s4, s0 ++; VI-NEXT: s_mov_b32 s5, s1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mul_lo_u32 v3, v3, v7 ++; VI-NEXT: v_mul_lo_u32 v2, v2, v6 ++; VI-NEXT: v_mul_lo_u32 v1, v1, v5 ++; VI-NEXT: v_mul_lo_u32 v0, v0, v4 ++; VI-NEXT: buffer_store_dwordx4 v[0:3], off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul_v4i32: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s10, s6 ++; GFX9-NEXT: s_mov_b32 s11, s7 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s8, s2 ++; GFX9-NEXT: s_mov_b32 s9, s3 ++; GFX9-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; GFX9-NEXT: buffer_load_dwordx4 v[4:7], off, s[8:11], 0 offset:16 ++; GFX9-NEXT: s_mov_b32 s4, s0 ++; GFX9-NEXT: s_mov_b32 s5, s1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_lo_u32 v3, v3, v7 ++; GFX9-NEXT: v_mul_lo_u32 v2, v2, v6 ++; GFX9-NEXT: v_mul_lo_u32 v1, v1, v5 ++; GFX9-NEXT: v_mul_lo_u32 v0, v0, v4 ++; GFX9-NEXT: buffer_store_dwordx4 v[0:3], off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul_v4i32: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s6 ++; GFX10-NEXT: s_mov_b32 s11, s7 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s8, s2 ++; GFX10-NEXT: s_mov_b32 s9, s3 ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: buffer_load_dwordx4 v[0:3], off, s[8:11], 0 ++; GFX10-NEXT: buffer_load_dwordx4 v[4:7], off, s[8:11], 0 offset:16 ++; GFX10-NEXT: s_mov_b32 s4, s0 ++; GFX10-NEXT: s_mov_b32 s5, s1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_lo_u32 v3, v3, v7 ++; GFX10-NEXT: v_mul_lo_u32 v2, v2, v6 ++; GFX10-NEXT: v_mul_lo_u32 v1, v1, v5 ++; GFX10-NEXT: v_mul_lo_u32 v0, v0, v4 ++; GFX10-NEXT: buffer_store_dwordx4 v[0:3], off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul_v4i32: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s10, s6 ++; GFX11-NEXT: s_mov_b32 s11, s7 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s8, s2 ++; GFX11-NEXT: s_mov_b32 s9, s3 ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: buffer_load_b128 v[0:3], off, s[8:11], 0 ++; GFX11-NEXT: buffer_load_b128 v[4:7], off, s[8:11], 0 offset:16 ++; GFX11-NEXT: s_mov_b32 s4, s0 ++; GFX11-NEXT: s_mov_b32 s5, s1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_lo_u32 v3, v3, v7 ++; GFX11-NEXT: v_mul_lo_u32 v2, v2, v6 ++; GFX11-NEXT: v_mul_lo_u32 v1, v1, v5 ++; GFX11-NEXT: v_mul_lo_u32 v0, v0, v4 ++; GFX11-NEXT: buffer_store_b128 v[0:3], off, s[4:7], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul_v4i32: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @10, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 1 @6 ++; EG-NEXT: ALU 5, @11, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XYZW, T2.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_128 T1.XYZW, T0.X, 16, #1 ++; EG-NEXT: VTX_READ_128 T0.XYZW, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 10: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 11: ++; EG-NEXT: MULLO_INT * T0.W, T0.W, T1.W, ++; EG-NEXT: MULLO_INT * T0.Z, T0.Z, T1.Z, ++; EG-NEXT: MULLO_INT * T0.Y, T0.Y, T1.Y, ++; EG-NEXT: LSHR T2.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, T1.X, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: + %b_ptr = getelementptr <4 x i32>, ptr addrspace(1) %in, i32 1 + %a = load <4 x i32>, ptr addrspace(1) %in + %b = load <4 x i32>, ptr addrspace(1) %b_ptr +@@ -43,24 +276,232 @@ define amdgpu_kernel void @v_mul_v4i32(ptr addrspace(1) %out, ptr addrspace(1) % + ret void + } + +-; FUNC-LABEL: {{^}}s_trunc_i64_mul_to_i32: +-; GCN: s_load_dword +-; GCN: s_load_dword +-; GCN: s_mul_i32 +-; GCN: buffer_store_dword + define amdgpu_kernel void @s_trunc_i64_mul_to_i32(ptr addrspace(1) %out, i64 %a, i64 %b) { ++; SI-LABEL: s_trunc_i64_mul_to_i32: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x9 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_load_dword s7, s[0:1], 0xd ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_mov_b32 s0, s4 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mul_i32 s4, s7, s6 ++; SI-NEXT: s_mov_b32 s1, s5 ++; SI-NEXT: v_mov_b32_e32 v0, s4 ++; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: s_trunc_i64_mul_to_i32: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_load_dword s7, s[0:1], 0x34 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_mov_b32 s0, s4 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mul_i32 s4, s7, s6 ++; VI-NEXT: s_mov_b32 s1, s5 ++; VI-NEXT: v_mov_b32_e32 v0, s4 ++; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: s_trunc_i64_mul_to_i32: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_load_dword s7, s[0:1], 0x34 ++; GFX9-NEXT: ; kill: killed $sgpr0_sgpr1 ++; GFX9-NEXT: s_mov_b32 s3, 0xf000 ++; GFX9-NEXT: s_mov_b32 s2, -1 ++; GFX9-NEXT: s_mov_b32 s0, s4 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mul_i32 s4, s7, s6 ++; GFX9-NEXT: s_mov_b32 s1, s5 ++; GFX9-NEXT: v_mov_b32_e32 v0, s4 ++; GFX9-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: s_trunc_i64_mul_to_i32: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX10-NEXT: s_load_dword s2, s[0:1], 0x34 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mul_i32 s0, s2, s6 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: v_mov_b32_e32 v0, s0 ++; GFX10-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: s_trunc_i64_mul_to_i32: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: s_load_b128 s[4:7], s[0:1], 0x24 ++; GFX11-NEXT: s_load_b32 s0, s[0:1], 0x34 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mul_i32 s0, s0, s6 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: v_mov_b32_e32 v0, s0 ++; GFX11-NEXT: buffer_store_b32 v0, off, s[4:7], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: s_trunc_i64_mul_to_i32: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 2, @4, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T1.X, T0.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: ALU clause starting at 4: ++; EG-NEXT: LSHR * T0.X, KC0[2].Y, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++; EG-NEXT: MULLO_INT * T1.X, KC0[3].Y, KC0[2].W, ++entry: + %mul = mul i64 %b, %a + %trunc = trunc i64 %mul to i32 + store i32 %trunc, ptr addrspace(1) %out, align 8 + ret void + } + +-; FUNC-LABEL: {{^}}v_trunc_i64_mul_to_i32: +-; GCN: s_load_dword +-; GCN: s_load_dword +-; GCN: v_mul_lo_u32 +-; GCN: buffer_store_dword + define amdgpu_kernel void @v_trunc_i64_mul_to_i32(ptr addrspace(1) %out, ptr addrspace(1) %aptr, ptr addrspace(1) %bptr) nounwind { ++; SI-LABEL: v_trunc_i64_mul_to_i32: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x9 ++; SI-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0xd ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_mov_b32 s14, s2 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s12, s6 ++; SI-NEXT: s_mov_b32 s13, s7 ++; SI-NEXT: s_mov_b32 s15, s3 ++; SI-NEXT: s_mov_b32 s10, s2 ++; SI-NEXT: s_mov_b32 s11, s3 ++; SI-NEXT: buffer_load_dword v0, off, s[12:15], 0 ++; SI-NEXT: buffer_load_dword v1, off, s[8:11], 0 ++; SI-NEXT: s_mov_b32 s0, s4 ++; SI-NEXT: s_mov_b32 s1, s5 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_lo_u32 v0, v1, v0 ++; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_trunc_i64_mul_to_i32: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; VI-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_mov_b32 s14, s2 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s12, s6 ++; VI-NEXT: s_mov_b32 s13, s7 ++; VI-NEXT: s_mov_b32 s15, s3 ++; VI-NEXT: s_mov_b32 s10, s2 ++; VI-NEXT: s_mov_b32 s11, s3 ++; VI-NEXT: buffer_load_dword v0, off, s[12:15], 0 ++; VI-NEXT: buffer_load_dword v1, off, s[8:11], 0 ++; VI-NEXT: s_mov_b32 s0, s4 ++; VI-NEXT: s_mov_b32 s1, s5 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mul_lo_u32 v0, v1, v0 ++; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_trunc_i64_mul_to_i32: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX9-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; GFX9-NEXT: s_mov_b32 s3, 0xf000 ++; GFX9-NEXT: s_mov_b32 s2, -1 ++; GFX9-NEXT: s_mov_b32 s14, s2 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s12, s6 ++; GFX9-NEXT: s_mov_b32 s13, s7 ++; GFX9-NEXT: s_mov_b32 s15, s3 ++; GFX9-NEXT: s_mov_b32 s10, s2 ++; GFX9-NEXT: s_mov_b32 s11, s3 ++; GFX9-NEXT: buffer_load_dword v0, off, s[12:15], 0 ++; GFX9-NEXT: buffer_load_dword v1, off, s[8:11], 0 ++; GFX9-NEXT: s_mov_b32 s0, s4 ++; GFX9-NEXT: s_mov_b32 s1, s5 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_lo_u32 v0, v1, v0 ++; GFX9-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_trunc_i64_mul_to_i32: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX10-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s14, s2 ++; GFX10-NEXT: s_mov_b32 s15, s3 ++; GFX10-NEXT: s_mov_b32 s10, s2 ++; GFX10-NEXT: s_mov_b32 s11, s3 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s12, s6 ++; GFX10-NEXT: s_mov_b32 s13, s7 ++; GFX10-NEXT: buffer_load_dword v0, off, s[12:15], 0 ++; GFX10-NEXT: buffer_load_dword v1, off, s[8:11], 0 ++; GFX10-NEXT: s_mov_b32 s0, s4 ++; GFX10-NEXT: s_mov_b32 s1, s5 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_lo_u32 v0, v1, v0 ++; GFX10-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_trunc_i64_mul_to_i32: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: s_load_b128 s[4:7], s[0:1], 0x24 ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x34 ++; GFX11-NEXT: s_mov_b32 s10, -1 ++; GFX11-NEXT: s_mov_b32 s11, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s14, s10 ++; GFX11-NEXT: s_mov_b32 s15, s11 ++; GFX11-NEXT: s_mov_b32 s2, s10 ++; GFX11-NEXT: s_mov_b32 s3, s11 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s12, s6 ++; GFX11-NEXT: s_mov_b32 s13, s7 ++; GFX11-NEXT: buffer_load_b32 v0, off, s[12:15], 0 ++; GFX11-NEXT: buffer_load_b32 v1, off, s[0:3], 0 ++; GFX11-NEXT: s_mov_b32 s8, s4 ++; GFX11-NEXT: s_mov_b32 s9, s5 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_lo_u32 v0, v1, v0 ++; GFX11-NEXT: buffer_store_b32 v0, off, s[8:11], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_trunc_i64_mul_to_i32: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 1, @10, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 1 @6 ++; EG-NEXT: ALU 2, @12, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.X, T2.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_32 T1.X, T1.X, 0, #1 ++; EG-NEXT: VTX_READ_32 T0.X, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 10: ++; EG-NEXT: MOV T0.X, KC0[2].Z, ++; EG-NEXT: MOV * T1.X, KC0[2].W, ++; EG-NEXT: ALU clause starting at 12: ++; EG-NEXT: LSHR T2.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T1.X, T0.X, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: + %a = load i64, ptr addrspace(1) %aptr, align 8 + %b = load i64, ptr addrspace(1) %bptr, align 8 + %mul = mul i64 %b, %a +@@ -71,13 +512,93 @@ define amdgpu_kernel void @v_trunc_i64_mul_to_i32(ptr addrspace(1) %out, ptr add + + ; This 64-bit multiply should just use MUL_HI and MUL_LO, since the top + ; 32-bits of both arguments are sign bits. +-; FUNC-LABEL: {{^}}mul64_sext_c: +-; EG-DAG: MULLO_INT +-; EG-DAG: MULHI_INT +-; SI-DAG: s_mulk_i32 +-; SI-DAG: v_mul_hi_i32 +-; VI: v_mad_i64_i32 ++ + define amdgpu_kernel void @mul64_sext_c(ptr addrspace(1) %out, i32 %in) { ++; SI-LABEL: mul64_sext_c: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dword s4, s[0:1], 0xb ++; SI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9 ++; SI-NEXT: v_mov_b32_e32 v0, 0x50 ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: v_mul_hi_i32 v1, s4, v0 ++; SI-NEXT: s_mulk_i32 s4, 0x50 ++; SI-NEXT: v_mov_b32_e32 v0, s4 ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: mul64_sext_c: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dword s2, s[0:1], 0x2c ++; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24 ++; VI-NEXT: v_mov_b32_e32 v0, 0x50 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: v_mad_i64_i32 v[0:1], s[2:3], s2, v0, 0 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_nop 2 ++; VI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: mul64_sext_c: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dword s2, s[0:1], 0x2c ++; GFX9-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mul_hi_i32 s0, s2, 0x50 ++; GFX9-NEXT: s_mulk_i32 s2, 0x50 ++; GFX9-NEXT: v_mov_b32_e32 v0, s2 ++; GFX9-NEXT: v_mov_b32_e32 v1, s0 ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: mul64_sext_c: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: s_load_dword s2, s[0:1], 0x2c ++; GFX10-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mul_i32 s0, s2, 0x50 ++; GFX10-NEXT: s_mul_hi_i32 s1, s2, 0x50 ++; GFX10-NEXT: v_mov_b32_e32 v0, s0 ++; GFX10-NEXT: v_mov_b32_e32 v1, s1 ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: mul64_sext_c: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: s_load_b32 s2, s[0:1], 0x2c ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mul_i32 s3, s2, 0x50 ++; GFX11-NEXT: s_mul_hi_i32 s2, s2, 0x50 ++; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) ++; GFX11-NEXT: v_dual_mov_b32 v0, s3 :: v_dual_mov_b32 v1, s2 ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: mul64_sext_c: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 4, @4, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: ALU clause starting at 4: ++; EG-NEXT: MULHI_INT * T0.Y, KC0[2].Z, literal.x, ++; EG-NEXT: 80(1.121039e-43), 0(0.000000e+00) ++; EG-NEXT: LSHR T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, KC0[2].Z, literal.y, ++; EG-NEXT: 2(2.802597e-45), 80(1.121039e-43) + entry: + %0 = sext i32 %in to i64 + %1 = mul i64 %0, 80 +@@ -85,14 +606,125 @@ entry: + ret void + } + +-; FUNC-LABEL: {{^}}v_mul64_sext_c: +-; EG-DAG: MULLO_INT +-; EG-DAG: MULHI_INT +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_hi_i32 +-; VI: v_mad_i64_i32 +-; GCN: s_endpgm + define amdgpu_kernel void @v_mul64_sext_c(ptr addrspace(1) %out, ptr addrspace(1) %in) { ++; SI-LABEL: v_mul64_sext_c: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s10, s6 ++; SI-NEXT: s_mov_b32 s11, s7 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s8, s2 ++; SI-NEXT: s_mov_b32 s9, s3 ++; SI-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; SI-NEXT: s_movk_i32 s2, 0x50 ++; SI-NEXT: s_mov_b32 s4, s0 ++; SI-NEXT: s_mov_b32 s5, s1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_hi_i32 v1, v0, s2 ++; SI-NEXT: v_mul_lo_u32 v0, v0, s2 ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul64_sext_c: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s10, s6 ++; VI-NEXT: s_mov_b32 s11, s7 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s8, s2 ++; VI-NEXT: s_mov_b32 s9, s3 ++; VI-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; VI-NEXT: s_movk_i32 s2, 0x50 ++; VI-NEXT: s_mov_b32 s4, s0 ++; VI-NEXT: s_mov_b32 s5, s1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mad_i64_i32 v[0:1], s[2:3], v0, s2, 0 ++; VI-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul64_sext_c: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s10, s6 ++; GFX9-NEXT: s_mov_b32 s11, s7 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s8, s2 ++; GFX9-NEXT: s_mov_b32 s9, s3 ++; GFX9-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; GFX9-NEXT: s_movk_i32 s2, 0x50 ++; GFX9-NEXT: s_mov_b32 s4, s0 ++; GFX9-NEXT: s_mov_b32 s5, s1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_hi_i32 v1, v0, s2 ++; GFX9-NEXT: v_mul_lo_u32 v0, v0, s2 ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul64_sext_c: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s6 ++; GFX10-NEXT: s_mov_b32 s11, s7 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s8, s2 ++; GFX10-NEXT: s_mov_b32 s9, s3 ++; GFX10-NEXT: s_mov_b32 s4, s0 ++; GFX10-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; GFX10-NEXT: s_mov_b32 s5, s1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_hi_i32 v1, 0x50, v0 ++; GFX10-NEXT: v_mul_lo_u32 v0, 0x50, v0 ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul64_sext_c: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s10, s6 ++; GFX11-NEXT: s_mov_b32 s11, s7 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s8, s2 ++; GFX11-NEXT: s_mov_b32 s9, s3 ++; GFX11-NEXT: s_mov_b32 s4, s0 ++; GFX11-NEXT: buffer_load_b32 v0, off, s[8:11], 0 ++; GFX11-NEXT: s_mov_b32 s5, s1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_hi_i32 v1, 0x50, v0 ++; GFX11-NEXT: v_mul_lo_u32 v0, 0x50, v0 ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[4:7], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul64_sext_c: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @8, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 0 @6 ++; EG-NEXT: ALU 4, @9, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_32 T0.X, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 8: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 9: ++; EG-NEXT: MULHI_INT * T0.Y, T0.X, literal.x, ++; EG-NEXT: 80(1.121039e-43), 0(0.000000e+00) ++; EG-NEXT: LSHR T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, literal.y, ++; EG-NEXT: 2(2.802597e-45), 80(1.121039e-43) ++entry: + %val = load i32, ptr addrspace(1) %in, align 4 + %ext = sext i32 %val to i64 + %mul = mul i64 %ext, 80 +@@ -100,12 +732,122 @@ define amdgpu_kernel void @v_mul64_sext_c(ptr addrspace(1) %out, ptr addrspace(1 + ret void + } + +-; FUNC-LABEL: {{^}}v_mul64_sext_inline_imm: +-; SI-DAG: v_mul_lo_u32 v{{[0-9]+}}, v{{[0-9]+}}, 9 +-; SI-DAG: v_mul_hi_i32 v{{[0-9]+}}, v{{[0-9]+}}, 9 +-; VI: v_mad_i64_i32 v[{{[0-9]+}}:{{[0-9]+}}], s[{{[0-9]+}}:{{[0-9]+}}], v{{[0-9]+}}, 9, 0 +-; GCN: s_endpgm + define amdgpu_kernel void @v_mul64_sext_inline_imm(ptr addrspace(1) %out, ptr addrspace(1) %in) { ++; SI-LABEL: v_mul64_sext_inline_imm: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s10, s6 ++; SI-NEXT: s_mov_b32 s11, s7 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s8, s2 ++; SI-NEXT: s_mov_b32 s9, s3 ++; SI-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; SI-NEXT: s_mov_b32 s4, s0 ++; SI-NEXT: s_mov_b32 s5, s1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_hi_i32 v1, v0, 9 ++; SI-NEXT: v_mul_lo_u32 v0, v0, 9 ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul64_sext_inline_imm: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s10, s6 ++; VI-NEXT: s_mov_b32 s11, s7 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s8, s2 ++; VI-NEXT: s_mov_b32 s9, s3 ++; VI-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; VI-NEXT: s_mov_b32 s4, s0 ++; VI-NEXT: s_mov_b32 s5, s1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mad_i64_i32 v[0:1], s[2:3], v0, 9, 0 ++; VI-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul64_sext_inline_imm: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s10, s6 ++; GFX9-NEXT: s_mov_b32 s11, s7 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s8, s2 ++; GFX9-NEXT: s_mov_b32 s9, s3 ++; GFX9-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; GFX9-NEXT: s_mov_b32 s4, s0 ++; GFX9-NEXT: s_mov_b32 s5, s1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_hi_i32 v1, v0, 9 ++; GFX9-NEXT: v_mul_lo_u32 v0, v0, 9 ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul64_sext_inline_imm: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s6 ++; GFX10-NEXT: s_mov_b32 s11, s7 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s8, s2 ++; GFX10-NEXT: s_mov_b32 s9, s3 ++; GFX10-NEXT: s_mov_b32 s4, s0 ++; GFX10-NEXT: buffer_load_dword v0, off, s[8:11], 0 ++; GFX10-NEXT: s_mov_b32 s5, s1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_hi_i32 v1, v0, 9 ++; GFX10-NEXT: v_mul_lo_u32 v0, v0, 9 ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul64_sext_inline_imm: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s10, s6 ++; GFX11-NEXT: s_mov_b32 s11, s7 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s8, s2 ++; GFX11-NEXT: s_mov_b32 s9, s3 ++; GFX11-NEXT: s_mov_b32 s4, s0 ++; GFX11-NEXT: buffer_load_b32 v0, off, s[8:11], 0 ++; GFX11-NEXT: s_mov_b32 s5, s1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_hi_i32 v1, v0, 9 ++; GFX11-NEXT: v_mul_lo_u32 v0, v0, 9 ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[4:7], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul64_sext_inline_imm: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @8, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 0 @6 ++; EG-NEXT: ALU 4, @9, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_32 T0.X, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 8: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 9: ++; EG-NEXT: MULHI_INT * T0.Y, T0.X, literal.x, ++; EG-NEXT: 9(1.261169e-44), 0(0.000000e+00) ++; EG-NEXT: LSHR T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, literal.y, ++; EG-NEXT: 2(2.802597e-45), 9(1.261169e-44) ++entry: + %val = load i32, ptr addrspace(1) %in, align 4 + %ext = sext i32 %val to i64 + %mul = mul i64 %ext, 9 +@@ -113,22 +855,202 @@ define amdgpu_kernel void @v_mul64_sext_inline_imm(ptr addrspace(1) %out, ptr ad + ret void + } + +-; FUNC-LABEL: {{^}}s_mul_i32: +-; GCN: s_load_dword [[SRC0:s[0-9]+]], +-; GCN: s_load_dword [[SRC1:s[0-9]+]], +-; GCN: s_mul_i32 [[SRESULT:s[0-9]+]], [[SRC0]], [[SRC1]] +-; GCN: v_mov_b32_e32 [[VRESULT:v[0-9]+]], [[SRESULT]] +-; GCN: buffer_store_dword [[VRESULT]], +-; GCN: s_endpgm + define amdgpu_kernel void @s_mul_i32(ptr addrspace(1) %out, [8 x i32], i32 %a, [8 x i32], i32 %b) nounwind { ++; SI-LABEL: s_mul_i32: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dword s4, s[0:1], 0x13 ++; SI-NEXT: s_load_dword s5, s[0:1], 0x1c ++; SI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mul_i32 s4, s4, s5 ++; SI-NEXT: v_mov_b32_e32 v0, s4 ++; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: s_mul_i32: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dword s4, s[0:1], 0x4c ++; VI-NEXT: s_load_dword s5, s[0:1], 0x70 ++; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mul_i32 s4, s4, s5 ++; VI-NEXT: v_mov_b32_e32 v0, s4 ++; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: s_mul_i32: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dword s2, s[0:1], 0x4c ++; GFX9-NEXT: s_load_dword s3, s[0:1], 0x70 ++; GFX9-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mul_i32 s0, s2, s3 ++; GFX9-NEXT: v_mov_b32_e32 v0, s0 ++; GFX9-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: s_mul_i32: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x2 ++; GFX10-NEXT: s_load_dword s2, s[0:1], 0x4c ++; GFX10-NEXT: s_load_dword s3, s[0:1], 0x70 ++; GFX10-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mul_i32 s0, s2, s3 ++; GFX10-NEXT: v_mov_b32_e32 v0, s0 ++; GFX10-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: s_mul_i32: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x2 ++; GFX11-NEXT: s_load_b32 s2, s[0:1], 0x4c ++; GFX11-NEXT: s_load_b32 s3, s[0:1], 0x70 ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mul_i32 s2, s2, s3 ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: v_mov_b32_e32 v0, s2 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: buffer_store_b32 v0, off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: s_mul_i32: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 2, @4, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T1.X, T0.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: ALU clause starting at 4: ++; EG-NEXT: LSHR * T0.X, KC0[2].Y, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++; EG-NEXT: MULLO_INT * T1.X, KC0[4].Z, KC0[6].W, ++entry: + %mul = mul i32 %a, %b + store i32 %mul, ptr addrspace(1) %out, align 4 + ret void + } + +-; FUNC-LABEL: {{^}}v_mul_i32: +-; GCN: v_mul_lo_u32 v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}} + define amdgpu_kernel void @v_mul_i32(ptr addrspace(1) %out, ptr addrspace(1) %in) { ++; SI-LABEL: v_mul_i32: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s10, s6 ++; SI-NEXT: s_mov_b32 s11, s7 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s8, s2 ++; SI-NEXT: s_mov_b32 s9, s3 ++; SI-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; SI-NEXT: s_mov_b32 s4, s0 ++; SI-NEXT: s_mov_b32 s5, s1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_lo_u32 v0, v0, v1 ++; SI-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul_i32: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s10, s6 ++; VI-NEXT: s_mov_b32 s11, s7 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s8, s2 ++; VI-NEXT: s_mov_b32 s9, s3 ++; VI-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; VI-NEXT: s_mov_b32 s4, s0 ++; VI-NEXT: s_mov_b32 s5, s1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mul_lo_u32 v0, v0, v1 ++; VI-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul_i32: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s10, s6 ++; GFX9-NEXT: s_mov_b32 s11, s7 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s8, s2 ++; GFX9-NEXT: s_mov_b32 s9, s3 ++; GFX9-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; GFX9-NEXT: s_mov_b32 s4, s0 ++; GFX9-NEXT: s_mov_b32 s5, s1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_lo_u32 v0, v0, v1 ++; GFX9-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul_i32: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s6 ++; GFX10-NEXT: s_mov_b32 s11, s7 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s8, s2 ++; GFX10-NEXT: s_mov_b32 s9, s3 ++; GFX10-NEXT: s_mov_b32 s4, s0 ++; GFX10-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; GFX10-NEXT: s_mov_b32 s5, s1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_lo_u32 v0, v0, v1 ++; GFX10-NEXT: buffer_store_dword v0, off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul_i32: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s10, s6 ++; GFX11-NEXT: s_mov_b32 s11, s7 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s8, s2 ++; GFX11-NEXT: s_mov_b32 s9, s3 ++; GFX11-NEXT: s_mov_b32 s4, s0 ++; GFX11-NEXT: buffer_load_b64 v[0:1], off, s[8:11], 0 ++; GFX11-NEXT: s_mov_b32 s5, s1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_lo_u32 v0, v0, v1 ++; GFX11-NEXT: buffer_store_b32 v0, off, s[4:7], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul_i32: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @8, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 0 @6 ++; EG-NEXT: ALU 2, @9, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.X, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_64 T0.XY, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 8: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 9: ++; EG-NEXT: LSHR T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, T0.Y, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: + %b_ptr = getelementptr i32, ptr addrspace(1) %in, i32 1 + %a = load i32, ptr addrspace(1) %in + %b = load i32, ptr addrspace(1) %b_ptr +@@ -137,6 +1059,298 @@ define amdgpu_kernel void @v_mul_i32(ptr addrspace(1) %out, ptr addrspace(1) %in + ret void + } + ++define amdgpu_kernel void @s_mul_i1(ptr addrspace(1) %out, [8 x i32], i1 %a, [8 x i32], i1 %b) nounwind { ++; SI-LABEL: s_mul_i1: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dword s2, s[0:1], 0x13 ++; SI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x9 ++; SI-NEXT: s_load_dword s3, s[0:1], 0x1c ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_bitcmp1_b32 s2, 0 ++; SI-NEXT: s_cselect_b64 s[0:1], -1, 0 ++; SI-NEXT: s_bitcmp1_b32 s3, 0 ++; SI-NEXT: s_cselect_b64 s[2:3], -1, 0 ++; SI-NEXT: s_and_b64 s[0:1], s[0:1], s[2:3] ++; SI-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ++; SI-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: s_mul_i1: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dword s2, s[0:1], 0x4c ++; VI-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; VI-NEXT: s_load_dword s3, s[0:1], 0x70 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_bitcmp1_b32 s2, 0 ++; VI-NEXT: s_cselect_b64 s[0:1], -1, 0 ++; VI-NEXT: s_bitcmp1_b32 s3, 0 ++; VI-NEXT: s_cselect_b64 s[2:3], -1, 0 ++; VI-NEXT: s_and_b64 s[0:1], s[0:1], s[2:3] ++; VI-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ++; VI-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: s_mul_i1: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dword s2, s[0:1], 0x4c ++; GFX9-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX9-NEXT: s_load_dword s3, s[0:1], 0x70 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_bitcmp1_b32 s2, 0 ++; GFX9-NEXT: s_cselect_b64 s[0:1], -1, 0 ++; GFX9-NEXT: s_bitcmp1_b32 s3, 0 ++; GFX9-NEXT: s_cselect_b64 s[2:3], -1, 0 ++; GFX9-NEXT: s_and_b64 s[0:1], s[0:1], s[2:3] ++; GFX9-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ++; GFX9-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: s_mul_i1: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x2 ++; GFX10-NEXT: s_load_dword s2, s[0:1], 0x4c ++; GFX10-NEXT: s_load_dword s3, s[0:1], 0x70 ++; GFX10-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_bitcmp1_b32 s2, 0 ++; GFX10-NEXT: s_cselect_b32 s0, -1, 0 ++; GFX10-NEXT: s_bitcmp1_b32 s3, 0 ++; GFX10-NEXT: s_cselect_b32 s1, -1, 0 ++; GFX10-NEXT: s_and_b32 s0, s0, s1 ++; GFX10-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0 ++; GFX10-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: s_mul_i1: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x2 ++; GFX11-NEXT: s_load_b32 s2, s[0:1], 0x4c ++; GFX11-NEXT: s_load_b32 s3, s[0:1], 0x70 ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_bitcmp1_b32 s2, 0 ++; GFX11-NEXT: s_cselect_b32 s2, -1, 0 ++; GFX11-NEXT: s_bitcmp1_b32 s3, 0 ++; GFX11-NEXT: s_cselect_b32 s3, -1, 0 ++; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) ++; GFX11-NEXT: s_and_b32 s2, s2, s3 ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: v_cndmask_b32_e64 v0, 0, 1, s2 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: buffer_store_b8 v0, off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: s_mul_i1: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @10, KC0[], KC1[] ++; EG-NEXT: TEX 1 @6 ++; EG-NEXT: ALU 12, @11, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT MSKOR T0.XW, T1.X ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_8 T1.X, T0.X, 72, #3 ++; EG-NEXT: VTX_READ_8 T0.X, T0.X, 108, #3 ++; EG-NEXT: ALU clause starting at 10: ++; EG-NEXT: MOV * T0.X, 0.0, ++; EG-NEXT: ALU clause starting at 11: ++; EG-NEXT: AND_INT T0.W, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T1.X, T0.X, ++; EG-NEXT: 3(4.203895e-45), 0(0.000000e+00) ++; EG-NEXT: AND_INT T1.W, PS, 1, ++; EG-NEXT: LSHL * T0.W, PV.W, literal.x, ++; EG-NEXT: 3(4.203895e-45), 0(0.000000e+00) ++; EG-NEXT: LSHL T0.X, PV.W, PS, ++; EG-NEXT: LSHL * T0.W, literal.x, PS, ++; EG-NEXT: 255(3.573311e-43), 0(0.000000e+00) ++; EG-NEXT: MOV T0.Y, 0.0, ++; EG-NEXT: MOV * T0.Z, 0.0, ++; EG-NEXT: LSHR * T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: ++ %mul = mul i1 %a, %b ++ store i1 %mul, ptr addrspace(1) %out, align 4 ++ ret void ++} ++ ++define amdgpu_kernel void @v_mul_i1(ptr addrspace(1) %out, ptr addrspace(1) %in) { ++; SI-LABEL: v_mul_i1: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s10, s6 ++; SI-NEXT: s_mov_b32 s11, s7 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s8, s2 ++; SI-NEXT: s_mov_b32 s9, s3 ++; SI-NEXT: buffer_load_ubyte v0, off, s[8:11], 0 ++; SI-NEXT: buffer_load_ubyte v1, off, s[8:11], 0 offset:4 ++; SI-NEXT: s_mov_b32 s4, s0 ++; SI-NEXT: s_mov_b32 s5, s1 ++; SI-NEXT: s_waitcnt vmcnt(1) ++; SI-NEXT: v_and_b32_e32 v0, 1, v0 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_and_b32_e32 v1, 1, v1 ++; SI-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0 ++; SI-NEXT: v_cmp_eq_u32_e64 s[0:1], 1, v1 ++; SI-NEXT: s_and_b64 s[0:1], vcc, s[0:1] ++; SI-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ++; SI-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul_i1: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s10, s6 ++; VI-NEXT: s_mov_b32 s11, s7 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s8, s2 ++; VI-NEXT: s_mov_b32 s9, s3 ++; VI-NEXT: buffer_load_ubyte v0, off, s[8:11], 0 ++; VI-NEXT: buffer_load_ubyte v1, off, s[8:11], 0 offset:4 ++; VI-NEXT: s_mov_b32 s4, s0 ++; VI-NEXT: s_mov_b32 s5, s1 ++; VI-NEXT: s_waitcnt vmcnt(1) ++; VI-NEXT: v_and_b32_e32 v0, 1, v0 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_and_b32_e32 v1, 1, v1 ++; VI-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0 ++; VI-NEXT: v_cmp_eq_u32_e64 s[0:1], 1, v1 ++; VI-NEXT: s_and_b64 s[0:1], vcc, s[0:1] ++; VI-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ++; VI-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul_i1: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s10, s6 ++; GFX9-NEXT: s_mov_b32 s11, s7 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s8, s2 ++; GFX9-NEXT: s_mov_b32 s9, s3 ++; GFX9-NEXT: buffer_load_ubyte v0, off, s[8:11], 0 ++; GFX9-NEXT: buffer_load_ubyte v1, off, s[8:11], 0 offset:4 ++; GFX9-NEXT: s_mov_b32 s4, s0 ++; GFX9-NEXT: s_mov_b32 s5, s1 ++; GFX9-NEXT: s_waitcnt vmcnt(1) ++; GFX9-NEXT: v_and_b32_e32 v0, 1, v0 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_and_b32_e32 v1, 1, v1 ++; GFX9-NEXT: v_cmp_eq_u32_e32 vcc, 1, v0 ++; GFX9-NEXT: v_cmp_eq_u32_e64 s[0:1], 1, v1 ++; GFX9-NEXT: s_and_b64 s[0:1], vcc, s[0:1] ++; GFX9-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1] ++; GFX9-NEXT: buffer_store_byte v0, off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul_i1: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s2 ++; GFX10-NEXT: s_mov_b32 s11, s3 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s8, s6 ++; GFX10-NEXT: s_mov_b32 s9, s7 ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: buffer_load_ubyte v0, off, s[8:11], 0 ++; GFX10-NEXT: buffer_load_ubyte v1, off, s[8:11], 0 offset:4 ++; GFX10-NEXT: s_mov_b32 s1, s5 ++; GFX10-NEXT: s_waitcnt vmcnt(1) ++; GFX10-NEXT: v_and_b32_e32 v0, 1, v0 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_and_b32_e32 v1, 1, v1 ++; GFX10-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0 ++; GFX10-NEXT: v_cmp_eq_u32_e64 s0, 1, v1 ++; GFX10-NEXT: s_and_b32 s0, vcc_lo, s0 ++; GFX10-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0 ++; GFX10-NEXT: s_mov_b32 s0, s4 ++; GFX10-NEXT: buffer_store_byte v0, off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul_i1: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[4:7], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s10, s2 ++; GFX11-NEXT: s_mov_b32 s11, s3 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s8, s6 ++; GFX11-NEXT: s_mov_b32 s9, s7 ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: buffer_load_u8 v0, off, s[8:11], 0 ++; GFX11-NEXT: buffer_load_u8 v1, off, s[8:11], 0 offset:4 ++; GFX11-NEXT: s_mov_b32 s1, s5 ++; GFX11-NEXT: s_waitcnt vmcnt(1) ++; GFX11-NEXT: v_and_b32_e32 v0, 1, v0 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_and_b32_e32 v1, 1, v1 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2) ++; GFX11-NEXT: v_cmp_eq_u32_e32 vcc_lo, 1, v0 ++; GFX11-NEXT: v_cmp_eq_u32_e64 s0, 1, v1 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1) ++; GFX11-NEXT: s_and_b32 s0, vcc_lo, s0 ++; GFX11-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0 ++; GFX11-NEXT: s_mov_b32 s0, s4 ++; GFX11-NEXT: buffer_store_b8 v0, off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul_i1: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 0, @10, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 1 @6 ++; EG-NEXT: ALU 12, @11, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT MSKOR T0.XW, T1.X ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_8 T1.X, T0.X, 4, #1 ++; EG-NEXT: VTX_READ_8 T0.X, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 10: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 11: ++; EG-NEXT: AND_INT T0.W, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, T1.X, ++; EG-NEXT: 3(4.203895e-45), 0(0.000000e+00) ++; EG-NEXT: AND_INT T1.W, PS, 1, ++; EG-NEXT: LSHL * T0.W, PV.W, literal.x, ++; EG-NEXT: 3(4.203895e-45), 0(0.000000e+00) ++; EG-NEXT: LSHL T0.X, PV.W, PS, ++; EG-NEXT: LSHL * T0.W, literal.x, PS, ++; EG-NEXT: 255(3.573311e-43), 0(0.000000e+00) ++; EG-NEXT: MOV T0.Y, 0.0, ++; EG-NEXT: MOV * T0.Z, 0.0, ++; EG-NEXT: LSHR * T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: ++ %b_ptr = getelementptr i32, ptr addrspace(1) %in, i32 1 ++ %a = load i1, ptr addrspace(1) %in ++ %b = load i1, ptr addrspace(1) %b_ptr ++ %result = mul i1 %a, %b ++ store i1 %result, ptr addrspace(1) %out ++ ret void ++} ++ + ; A standard 64-bit multiply. The expansion should be around 6 instructions. + ; It would be difficult to match the expansion correctly without writing + ; a really complicated list of FileCheck expressions. I don't want +@@ -144,21 +1358,294 @@ define amdgpu_kernel void @v_mul_i32(ptr addrspace(1) %out, ptr addrspace(1) %in + ; so this test just uses FUNC-LABEL to make sure the compiler does not + ; crash with a 'failed to select' error. + +-; FUNC-LABEL: {{^}}s_mul_i64: +-; GFX9PLUS-DAG: s_mul_i32 +-; GFX9PLUS-DAG: s_mul_hi_u32 +-; GFX9PLUS-DAG: s_mul_i32 +-; GFX9PLUS-DAG: s_mul_i32 +-; GFX9PLUS: s_endpgm + define amdgpu_kernel void @s_mul_i64(ptr addrspace(1) %out, i64 %a, i64 %b) nounwind { ++; SI-LABEL: s_mul_i64: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x9 ++; SI-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0xd ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s0, s4 ++; SI-NEXT: v_mov_b32_e32 v0, s8 ++; SI-NEXT: v_mul_hi_u32 v0, s6, v0 ++; SI-NEXT: s_mul_i32 s4, s6, s9 ++; SI-NEXT: s_mov_b32 s1, s5 ++; SI-NEXT: v_add_i32_e32 v0, vcc, s4, v0 ++; SI-NEXT: s_mul_i32 s4, s7, s8 ++; SI-NEXT: v_add_i32_e32 v1, vcc, s4, v0 ++; SI-NEXT: s_mul_i32 s4, s6, s8 ++; SI-NEXT: v_mov_b32_e32 v0, s4 ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: s_mul_i64: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; VI-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s0, s4 ++; VI-NEXT: v_mov_b32_e32 v0, s8 ++; VI-NEXT: v_mad_u64_u32 v[0:1], s[10:11], s6, v0, 0 ++; VI-NEXT: s_mul_i32 s4, s6, s9 ++; VI-NEXT: s_mov_b32 s1, s5 ++; VI-NEXT: v_add_u32_e32 v1, vcc, s4, v1 ++; VI-NEXT: s_mul_i32 s4, s7, s8 ++; VI-NEXT: v_add_u32_e32 v1, vcc, s4, v1 ++; VI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: s_mul_i64: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX9-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; GFX9-NEXT: s_mov_b32 s3, 0xf000 ++; GFX9-NEXT: s_mov_b32 s2, -1 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s0, s4 ++; GFX9-NEXT: s_mov_b32 s1, s5 ++; GFX9-NEXT: s_mul_i32 s4, s6, s9 ++; GFX9-NEXT: s_mul_hi_u32 s5, s6, s8 ++; GFX9-NEXT: s_add_i32 s4, s5, s4 ++; GFX9-NEXT: s_mul_i32 s5, s7, s8 ++; GFX9-NEXT: s_add_i32 s4, s4, s5 ++; GFX9-NEXT: s_mul_i32 s5, s6, s8 ++; GFX9-NEXT: v_mov_b32_e32 v0, s5 ++; GFX9-NEXT: v_mov_b32_e32 v1, s4 ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: s_mul_i64: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x34 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mul_i32 s0, s6, s3 ++; GFX10-NEXT: s_mul_hi_u32 s1, s6, s2 ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_add_i32 s0, s1, s0 ++; GFX10-NEXT: s_mul_i32 s1, s7, s2 ++; GFX10-NEXT: s_mul_i32 s2, s6, s2 ++; GFX10-NEXT: s_add_i32 s0, s0, s1 ++; GFX10-NEXT: v_mov_b32_e32 v0, s2 ++; GFX10-NEXT: v_mov_b32_e32 v1, s0 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: s_mov_b32 s0, s4 ++; GFX10-NEXT: s_mov_b32 s1, s5 ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: s_mul_i64: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: s_load_b128 s[4:7], s[0:1], 0x24 ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x34 ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mul_i32 s1, s6, s1 ++; GFX11-NEXT: s_mul_hi_u32 s2, s6, s0 ++; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(SALU_CYCLE_1) ++; GFX11-NEXT: s_add_i32 s1, s2, s1 ++; GFX11-NEXT: s_mul_i32 s2, s7, s0 ++; GFX11-NEXT: s_mul_i32 s0, s6, s0 ++; GFX11-NEXT: s_add_i32 s1, s1, s2 ++; GFX11-NEXT: v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: s_mov_b32 s0, s4 ++; GFX11-NEXT: s_mov_b32 s1, s5 ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: s_mul_i64: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 7, @4, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: ALU clause starting at 4: ++; EG-NEXT: MULHI * T0.X, KC0[2].W, KC0[3].Y, ++; EG-NEXT: MULLO_INT * T0.Y, KC0[2].W, KC0[3].Z, ++; EG-NEXT: ADD_INT T0.W, T0.X, PS, ++; EG-NEXT: MULLO_INT * T0.X, KC0[3].X, KC0[3].Y, ++; EG-NEXT: ADD_INT * T0.Y, PV.W, PS, ++; EG-NEXT: LSHR * T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++; EG-NEXT: MULLO_INT * T0.X, KC0[2].W, KC0[3].Y, ++entry: + %mul = mul i64 %a, %b + store i64 %mul, ptr addrspace(1) %out, align 8 + ret void + } + +-; FUNC-LABEL: {{^}}v_mul_i64: +-; GCN: v_mul_lo_u32 + define amdgpu_kernel void @v_mul_i64(ptr addrspace(1) %out, ptr addrspace(1) %aptr, ptr addrspace(1) %bptr) { ++; SI-LABEL: v_mul_i64: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x9 ++; SI-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0xd ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_mov_b32 s10, s2 ++; SI-NEXT: s_mov_b32 s11, s3 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b32 s12, s6 ++; SI-NEXT: s_mov_b32 s13, s7 ++; SI-NEXT: s_mov_b32 s14, s2 ++; SI-NEXT: s_mov_b32 s15, s3 ++; SI-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; SI-NEXT: buffer_load_dwordx2 v[2:3], off, s[12:15], 0 ++; SI-NEXT: s_mov_b32 s0, s4 ++; SI-NEXT: s_mov_b32 s1, s5 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_lo_u32 v1, v2, v1 ++; SI-NEXT: v_mul_hi_u32 v4, v2, v0 ++; SI-NEXT: v_mul_lo_u32 v3, v3, v0 ++; SI-NEXT: v_mul_lo_u32 v0, v2, v0 ++; SI-NEXT: v_add_i32_e32 v1, vcc, v1, v4 ++; SI-NEXT: v_add_i32_e32 v1, vcc, v1, v3 ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul_i64: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; VI-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_mov_b32 s10, s2 ++; VI-NEXT: s_mov_b32 s11, s3 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s12, s6 ++; VI-NEXT: s_mov_b32 s13, s7 ++; VI-NEXT: s_mov_b32 s14, s2 ++; VI-NEXT: s_mov_b32 s15, s3 ++; VI-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; VI-NEXT: buffer_load_dwordx2 v[2:3], off, s[12:15], 0 ++; VI-NEXT: s_mov_b32 s0, s4 ++; VI-NEXT: s_mov_b32 s1, s5 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mul_lo_u32 v4, v2, v1 ++; VI-NEXT: v_mad_u64_u32 v[1:2], s[6:7], v2, v0, 0 ++; VI-NEXT: v_mul_lo_u32 v0, v3, v0 ++; VI-NEXT: v_add_u32_e32 v2, vcc, v4, v2 ++; VI-NEXT: v_add_u32_e32 v2, vcc, v2, v0 ++; VI-NEXT: buffer_store_dwordx2 v[1:2], off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul_i64: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX9-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; GFX9-NEXT: s_mov_b32 s3, 0xf000 ++; GFX9-NEXT: s_mov_b32 s2, -1 ++; GFX9-NEXT: s_mov_b32 s10, s2 ++; GFX9-NEXT: s_mov_b32 s11, s3 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s12, s6 ++; GFX9-NEXT: s_mov_b32 s13, s7 ++; GFX9-NEXT: s_mov_b32 s14, s2 ++; GFX9-NEXT: s_mov_b32 s15, s3 ++; GFX9-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; GFX9-NEXT: buffer_load_dwordx2 v[2:3], off, s[12:15], 0 ++; GFX9-NEXT: s_mov_b32 s0, s4 ++; GFX9-NEXT: s_mov_b32 s1, s5 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mul_lo_u32 v1, v2, v1 ++; GFX9-NEXT: v_mul_hi_u32 v4, v2, v0 ++; GFX9-NEXT: v_mul_lo_u32 v3, v3, v0 ++; GFX9-NEXT: v_mul_lo_u32 v0, v2, v0 ++; GFX9-NEXT: v_add_u32_e32 v1, v4, v1 ++; GFX9-NEXT: v_add_u32_e32 v1, v1, v3 ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul_i64: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x24 ++; GFX10-NEXT: s_load_dwordx2 s[8:9], s[0:1], 0x34 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s10, s2 ++; GFX10-NEXT: s_mov_b32 s11, s3 ++; GFX10-NEXT: s_mov_b32 s14, s2 ++; GFX10-NEXT: s_mov_b32 s15, s3 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s12, s6 ++; GFX10-NEXT: s_mov_b32 s13, s7 ++; GFX10-NEXT: buffer_load_dwordx2 v[0:1], off, s[8:11], 0 ++; GFX10-NEXT: buffer_load_dwordx2 v[2:3], off, s[12:15], 0 ++; GFX10-NEXT: s_mov_b32 s0, s4 ++; GFX10-NEXT: s_mov_b32 s1, s5 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mul_lo_u32 v1, v2, v1 ++; GFX10-NEXT: v_mul_hi_u32 v4, v2, v0 ++; GFX10-NEXT: v_mul_lo_u32 v3, v3, v0 ++; GFX10-NEXT: v_mul_lo_u32 v0, v2, v0 ++; GFX10-NEXT: v_add_nc_u32_e32 v1, v4, v1 ++; GFX10-NEXT: v_add_nc_u32_e32 v1, v1, v3 ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul_i64: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: s_load_b128 s[4:7], s[0:1], 0x24 ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x34 ++; GFX11-NEXT: s_mov_b32 s10, -1 ++; GFX11-NEXT: s_mov_b32 s11, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s2, s10 ++; GFX11-NEXT: s_mov_b32 s3, s11 ++; GFX11-NEXT: s_mov_b32 s14, s10 ++; GFX11-NEXT: s_mov_b32 s15, s11 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s12, s6 ++; GFX11-NEXT: s_mov_b32 s13, s7 ++; GFX11-NEXT: buffer_load_b64 v[0:1], off, s[0:3], 0 ++; GFX11-NEXT: buffer_load_b64 v[2:3], off, s[12:15], 0 ++; GFX11-NEXT: s_mov_b32 s8, s4 ++; GFX11-NEXT: s_mov_b32 s9, s5 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mul_lo_u32 v1, v2, v1 ++; GFX11-NEXT: v_mul_hi_u32 v4, v2, v0 ++; GFX11-NEXT: v_mul_lo_u32 v3, v3, v0 ++; GFX11-NEXT: v_mul_lo_u32 v0, v2, v0 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1) ++; GFX11-NEXT: v_add_nc_u32_e32 v1, v4, v1 ++; GFX11-NEXT: v_add_nc_u32_e32 v1, v1, v3 ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[8:11], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul_i64: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 1, @10, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 1 @6 ++; EG-NEXT: ALU 7, @12, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T2.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_64 T1.XY, T1.X, 0, #1 ++; EG-NEXT: VTX_READ_64 T0.XY, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 10: ++; EG-NEXT: MOV T0.X, KC0[2].Z, ++; EG-NEXT: MOV * T1.X, KC0[2].W, ++; EG-NEXT: ALU clause starting at 12: ++; EG-NEXT: MULHI * T0.Z, T0.X, T1.X, ++; EG-NEXT: MULLO_INT * T0.W, T0.X, T1.Y, ++; EG-NEXT: ADD_INT T0.W, T0.Z, PS, ++; EG-NEXT: MULLO_INT * T0.Y, T0.Y, T1.X, ++; EG-NEXT: ADD_INT * T0.Y, PV.W, PS, ++; EG-NEXT: LSHR T2.X, KC0[2].Y, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, T1.X, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: + %a = load i64, ptr addrspace(1) %aptr, align 8 + %b = load i64, ptr addrspace(1) %bptr, align 8 + %mul = mul i64 %a, %b +@@ -166,9 +1653,220 @@ define amdgpu_kernel void @v_mul_i64(ptr addrspace(1) %out, ptr addrspace(1) %ap + ret void + } + +-; FUNC-LABEL: {{^}}mul32_in_branch: +-; GCN: s_mul_i32 + define amdgpu_kernel void @mul32_in_branch(ptr addrspace(1) %out, ptr addrspace(1) %in, i32 %a, i32 %b, i32 %c) { ++; SI-LABEL: mul32_in_branch: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0xd ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_cmp_lg_u32 s2, 0 ++; SI-NEXT: s_cbranch_scc0 .LBB13_2 ++; SI-NEXT: ; %bb.1: ; %else ++; SI-NEXT: s_mul_i32 s6, s2, s3 ++; SI-NEXT: s_mov_b64 s[4:5], 0 ++; SI-NEXT: s_branch .LBB13_3 ++; SI-NEXT: .LBB13_2: ++; SI-NEXT: s_mov_b64 s[4:5], -1 ++; SI-NEXT: ; implicit-def: $sgpr6 ++; SI-NEXT: .LBB13_3: ; %Flow ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x9 ++; SI-NEXT: s_andn2_b64 vcc, exec, s[4:5] ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b64 vcc, vcc ++; SI-NEXT: s_cbranch_vccnz .LBB13_5 ++; SI-NEXT: ; %bb.4: ; %if ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s4, s2 ++; SI-NEXT: s_mov_b32 s5, s3 ++; SI-NEXT: buffer_load_dword v0, off, s[4:7], 0 ++; SI-NEXT: s_branch .LBB13_6 ++; SI-NEXT: .LBB13_5: ++; SI-NEXT: v_mov_b32_e32 v0, s6 ++; SI-NEXT: .LBB13_6: ; %endif ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: mul32_in_branch: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x34 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_cmp_lg_u32 s2, 0 ++; VI-NEXT: s_cbranch_scc0 .LBB13_2 ++; VI-NEXT: ; %bb.1: ; %else ++; VI-NEXT: s_mul_i32 s6, s2, s3 ++; VI-NEXT: s_mov_b64 s[4:5], 0 ++; VI-NEXT: s_branch .LBB13_3 ++; VI-NEXT: .LBB13_2: ++; VI-NEXT: s_mov_b64 s[4:5], -1 ++; VI-NEXT: ; implicit-def: $sgpr6 ++; VI-NEXT: .LBB13_3: ; %Flow ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; VI-NEXT: s_andn2_b64 vcc, exec, s[4:5] ++; VI-NEXT: s_cbranch_vccnz .LBB13_5 ++; VI-NEXT: ; %bb.4: ; %if ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s4, s2 ++; VI-NEXT: s_mov_b32 s5, s3 ++; VI-NEXT: buffer_load_dword v0, off, s[4:7], 0 ++; VI-NEXT: s_branch .LBB13_6 ++; VI-NEXT: .LBB13_5: ++; VI-NEXT: v_mov_b32_e32 v0, s6 ++; VI-NEXT: .LBB13_6: ; %endif ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: mul32_in_branch: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x34 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_cmp_lg_u32 s2, 0 ++; GFX9-NEXT: s_cbranch_scc0 .LBB13_2 ++; GFX9-NEXT: ; %bb.1: ; %else ++; GFX9-NEXT: s_mul_i32 s6, s2, s3 ++; GFX9-NEXT: s_mov_b64 s[4:5], 0 ++; GFX9-NEXT: s_branch .LBB13_3 ++; GFX9-NEXT: .LBB13_2: ++; GFX9-NEXT: s_mov_b64 s[4:5], -1 ++; GFX9-NEXT: ; implicit-def: $sgpr6 ++; GFX9-NEXT: .LBB13_3: ; %Flow ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX9-NEXT: s_andn2_b64 vcc, exec, s[4:5] ++; GFX9-NEXT: s_cbranch_vccnz .LBB13_5 ++; GFX9-NEXT: ; %bb.4: ; %if ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s4, s2 ++; GFX9-NEXT: s_mov_b32 s5, s3 ++; GFX9-NEXT: buffer_load_dword v0, off, s[4:7], 0 ++; GFX9-NEXT: s_branch .LBB13_6 ++; GFX9-NEXT: .LBB13_5: ++; GFX9-NEXT: v_mov_b32_e32 v0, s6 ++; GFX9-NEXT: .LBB13_6: ; %endif ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mov_b32 s3, 0xf000 ++; GFX9-NEXT: s_mov_b32 s2, -1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: mul32_in_branch: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx2 s[2:3], s[0:1], 0x34 ++; GFX10-NEXT: s_mov_b32 s4, 0 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_cmp_lg_u32 s2, 0 ++; GFX10-NEXT: s_cbranch_scc0 .LBB13_2 ++; GFX10-NEXT: ; %bb.1: ; %else ++; GFX10-NEXT: s_mul_i32 s5, s2, s3 ++; GFX10-NEXT: s_branch .LBB13_3 ++; GFX10-NEXT: .LBB13_2: ++; GFX10-NEXT: s_mov_b32 s4, -1 ++; GFX10-NEXT: ; implicit-def: $sgpr5 ++; GFX10-NEXT: .LBB13_3: ; %Flow ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x24 ++; GFX10-NEXT: s_andn2_b32 vcc_lo, exec_lo, s4 ++; GFX10-NEXT: s_cbranch_vccnz .LBB13_5 ++; GFX10-NEXT: ; %bb.4: ; %if ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s4, s2 ++; GFX10-NEXT: s_mov_b32 s5, s3 ++; GFX10-NEXT: buffer_load_dword v0, off, s[4:7], 0 ++; GFX10-NEXT: s_branch .LBB13_6 ++; GFX10-NEXT: .LBB13_5: ++; GFX10-NEXT: v_mov_b32_e32 v0, s5 ++; GFX10-NEXT: .LBB13_6: ; %endif ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: buffer_store_dword v0, off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: mul32_in_branch: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b64 s[2:3], s[0:1], 0x34 ++; GFX11-NEXT: s_mov_b32 s4, 0 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_cmp_lg_u32 s2, 0 ++; GFX11-NEXT: s_cbranch_scc0 .LBB13_2 ++; GFX11-NEXT: ; %bb.1: ; %else ++; GFX11-NEXT: s_mul_i32 s5, s2, s3 ++; GFX11-NEXT: s_branch .LBB13_3 ++; GFX11-NEXT: .LBB13_2: ++; GFX11-NEXT: s_mov_b32 s4, -1 ++; GFX11-NEXT: ; implicit-def: $sgpr5 ++; GFX11-NEXT: .LBB13_3: ; %Flow ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x24 ++; GFX11-NEXT: s_and_not1_b32 vcc_lo, exec_lo, s4 ++; GFX11-NEXT: s_cbranch_vccnz .LBB13_5 ++; GFX11-NEXT: ; %bb.4: ; %if ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s4, s2 ++; GFX11-NEXT: s_mov_b32 s5, s3 ++; GFX11-NEXT: buffer_load_b32 v0, off, s[4:7], 0 ++; GFX11-NEXT: s_branch .LBB13_6 ++; GFX11-NEXT: .LBB13_5: ++; GFX11-NEXT: v_mov_b32_e32 v0, s5 ++; GFX11-NEXT: .LBB13_6: ; %endif ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: buffer_store_b32 v0, off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: mul32_in_branch: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU_PUSH_BEFORE 3, @14, KC0[CB0:0-32], KC1[] ++; EG-NEXT: JUMP @3 POP:1 ++; EG-NEXT: ALU_POP_AFTER 4, @18, KC0[CB0:0-32], KC1[] ++; EG-NEXT: ALU_PUSH_BEFORE 2, @23, KC0[CB0:0-32], KC1[] ++; EG-NEXT: JUMP @8 POP:1 ++; EG-NEXT: ALU 0, @26, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 0 @12 ++; EG-NEXT: POP @8 POP:1 ++; EG-NEXT: ALU 1, @27, KC0[], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.X, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 12: ++; EG-NEXT: VTX_READ_32 T0.X, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 14: ++; EG-NEXT: MOV T0.W, literal.x, ++; EG-NEXT: SETNE_INT * T1.W, KC0[2].W, 0.0, ++; EG-NEXT: 1(1.401298e-45), 0(0.000000e+00) ++; EG-NEXT: PRED_SETNE_INT * ExecMask,PredicateBit (MASKED), PS, 0.0, ++; EG-NEXT: ALU clause starting at 18: ++; EG-NEXT: MOV T1.W, KC0[2].W, ++; EG-NEXT: MOV * T2.W, KC0[3].X, ++; EG-NEXT: MOV T0.W, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, PV.W, PS, ++; EG-NEXT: 0(0.000000e+00), 0(0.000000e+00) ++; EG-NEXT: ALU clause starting at 23: ++; EG-NEXT: MOV T1.W, KC0[2].Y, ++; EG-NEXT: SETE_INT * T0.W, T0.W, 0.0, ++; EG-NEXT: PRED_SETE_INT * ExecMask,PredicateBit (MASKED), PS, 0.0, ++; EG-NEXT: ALU clause starting at 26: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 27: ++; EG-NEXT: LSHR * T1.X, T1.W, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) + entry: + %0 = icmp eq i32 %a, 0 + br i1 %0, label %if, label %else +@@ -187,12 +1885,227 @@ endif: + ret void + } + +-; FUNC-LABEL: {{^}}mul64_in_branch: +-; SI-DAG: s_mul_i32 +-; SI-DAG: v_mul_hi_u32 +-; VI: v_mad_u64_u32 +-; GCN: s_endpgm + define amdgpu_kernel void @mul64_in_branch(ptr addrspace(1) %out, ptr addrspace(1) %in, i64 %a, i64 %b, i64 %c) { ++; SI-LABEL: mul64_in_branch: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx8 s[0:7], s[0:1], 0x9 ++; SI-NEXT: s_mov_b64 s[8:9], 0 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: v_cmp_ne_u64_e64 s[10:11], s[4:5], 0 ++; SI-NEXT: s_and_b64 vcc, exec, s[10:11] ++; SI-NEXT: s_cbranch_vccz .LBB14_4 ++; SI-NEXT: ; %bb.1: ; %else ++; SI-NEXT: v_mov_b32_e32 v0, s6 ++; SI-NEXT: v_mul_hi_u32 v0, s4, v0 ++; SI-NEXT: s_mul_i32 s7, s4, s7 ++; SI-NEXT: s_mul_i32 s5, s5, s6 ++; SI-NEXT: s_mul_i32 s4, s4, s6 ++; SI-NEXT: v_add_i32_e32 v0, vcc, s7, v0 ++; SI-NEXT: v_add_i32_e32 v1, vcc, s5, v0 ++; SI-NEXT: v_mov_b32_e32 v0, s4 ++; SI-NEXT: s_andn2_b64 vcc, exec, s[8:9] ++; SI-NEXT: s_cbranch_vccnz .LBB14_3 ++; SI-NEXT: .LBB14_2: ; %if ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, -1 ++; SI-NEXT: s_mov_b32 s4, s2 ++; SI-NEXT: s_mov_b32 s5, s3 ++; SI-NEXT: buffer_load_dwordx2 v[0:1], off, s[4:7], 0 ++; SI-NEXT: .LBB14_3: ; %endif ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; SI-NEXT: .LBB14_4: ++; SI-NEXT: ; implicit-def: $vgpr0_vgpr1 ++; SI-NEXT: s_branch .LBB14_2 ++; ++; VI-LABEL: mul64_in_branch: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx8 s[0:7], s[0:1], 0x24 ++; VI-NEXT: s_mov_b64 s[8:9], 0 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: s_cmp_lg_u64 s[4:5], 0 ++; VI-NEXT: s_cbranch_scc0 .LBB14_4 ++; VI-NEXT: ; %bb.1: ; %else ++; VI-NEXT: v_mov_b32_e32 v0, s6 ++; VI-NEXT: v_mad_u64_u32 v[0:1], s[10:11], s4, v0, 0 ++; VI-NEXT: s_mul_i32 s4, s4, s7 ++; VI-NEXT: v_add_u32_e32 v1, vcc, s4, v1 ++; VI-NEXT: s_mul_i32 s4, s5, s6 ++; VI-NEXT: v_add_u32_e32 v1, vcc, s4, v1 ++; VI-NEXT: s_andn2_b64 vcc, exec, s[8:9] ++; VI-NEXT: s_cbranch_vccnz .LBB14_3 ++; VI-NEXT: .LBB14_2: ; %if ++; VI-NEXT: s_mov_b32 s7, 0xf000 ++; VI-NEXT: s_mov_b32 s6, -1 ++; VI-NEXT: s_mov_b32 s4, s2 ++; VI-NEXT: s_mov_b32 s5, s3 ++; VI-NEXT: buffer_load_dwordx2 v[0:1], off, s[4:7], 0 ++; VI-NEXT: .LBB14_3: ; %endif ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; VI-NEXT: .LBB14_4: ++; VI-NEXT: ; implicit-def: $vgpr0_vgpr1 ++; VI-NEXT: s_branch .LBB14_2 ++; ++; GFX9-LABEL: mul64_in_branch: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx8 s[0:7], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b64 s[8:9], 0 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_cmp_lg_u64 s[4:5], 0 ++; GFX9-NEXT: s_cbranch_scc0 .LBB14_3 ++; GFX9-NEXT: ; %bb.1: ; %else ++; GFX9-NEXT: s_mul_i32 s7, s4, s7 ++; GFX9-NEXT: s_mul_hi_u32 s10, s4, s6 ++; GFX9-NEXT: s_add_i32 s7, s10, s7 ++; GFX9-NEXT: s_mul_i32 s5, s5, s6 ++; GFX9-NEXT: s_add_i32 s5, s7, s5 ++; GFX9-NEXT: s_mul_i32 s4, s4, s6 ++; GFX9-NEXT: s_andn2_b64 vcc, exec, s[8:9] ++; GFX9-NEXT: s_cbranch_vccnz .LBB14_4 ++; GFX9-NEXT: .LBB14_2: ; %if ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_mov_b32 s4, s2 ++; GFX9-NEXT: s_mov_b32 s5, s3 ++; GFX9-NEXT: buffer_load_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX9-NEXT: s_branch .LBB14_5 ++; GFX9-NEXT: .LBB14_3: ++; GFX9-NEXT: ; implicit-def: $sgpr4_sgpr5 ++; GFX9-NEXT: s_branch .LBB14_2 ++; GFX9-NEXT: .LBB14_4: ++; GFX9-NEXT: v_mov_b32_e32 v0, s4 ++; GFX9-NEXT: v_mov_b32_e32 v1, s5 ++; GFX9-NEXT: .LBB14_5: ; %endif ++; GFX9-NEXT: s_mov_b32 s3, 0xf000 ++; GFX9-NEXT: s_mov_b32 s2, -1 ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: mul64_in_branch: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx8 s[0:7], s[0:1], 0x24 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_cmp_lg_u64 s[4:5], 0 ++; GFX10-NEXT: s_cbranch_scc0 .LBB14_3 ++; GFX10-NEXT: ; %bb.1: ; %else ++; GFX10-NEXT: s_mul_i32 s7, s4, s7 ++; GFX10-NEXT: s_mul_hi_u32 s8, s4, s6 ++; GFX10-NEXT: s_mul_i32 s5, s5, s6 ++; GFX10-NEXT: s_add_i32 s7, s8, s7 ++; GFX10-NEXT: s_mul_i32 s4, s4, s6 ++; GFX10-NEXT: s_add_i32 s5, s7, s5 ++; GFX10-NEXT: s_mov_b32 s6, 0 ++; GFX10-NEXT: s_cbranch_execnz .LBB14_4 ++; GFX10-NEXT: .LBB14_2: ; %if ++; GFX10-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: s_mov_b32 s4, s2 ++; GFX10-NEXT: s_mov_b32 s5, s3 ++; GFX10-NEXT: buffer_load_dwordx2 v[0:1], off, s[4:7], 0 ++; GFX10-NEXT: s_branch .LBB14_5 ++; GFX10-NEXT: .LBB14_3: ++; GFX10-NEXT: s_mov_b32 s6, -1 ++; GFX10-NEXT: ; implicit-def: $sgpr4_sgpr5 ++; GFX10-NEXT: s_branch .LBB14_2 ++; GFX10-NEXT: .LBB14_4: ++; GFX10-NEXT: v_mov_b32_e32 v0, s4 ++; GFX10-NEXT: v_mov_b32_e32 v1, s5 ++; GFX10-NEXT: .LBB14_5: ; %endif ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: buffer_store_dwordx2 v[0:1], off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: mul64_in_branch: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b256 s[0:7], s[0:1], 0x24 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_cmp_lg_u64 s[4:5], 0 ++; GFX11-NEXT: s_cbranch_scc0 .LBB14_3 ++; GFX11-NEXT: ; %bb.1: ; %else ++; GFX11-NEXT: s_mul_i32 s7, s4, s7 ++; GFX11-NEXT: s_mul_hi_u32 s8, s4, s6 ++; GFX11-NEXT: s_mul_i32 s5, s5, s6 ++; GFX11-NEXT: s_add_i32 s7, s8, s7 ++; GFX11-NEXT: s_mul_i32 s4, s4, s6 ++; GFX11-NEXT: s_add_i32 s5, s7, s5 ++; GFX11-NEXT: s_mov_b32 s6, 0 ++; GFX11-NEXT: s_cbranch_execnz .LBB14_4 ++; GFX11-NEXT: .LBB14_2: ; %if ++; GFX11-NEXT: s_mov_b32 s7, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: s_mov_b32 s4, s2 ++; GFX11-NEXT: s_mov_b32 s5, s3 ++; GFX11-NEXT: buffer_load_b64 v[0:1], off, s[4:7], 0 ++; GFX11-NEXT: s_branch .LBB14_5 ++; GFX11-NEXT: .LBB14_3: ++; GFX11-NEXT: s_mov_b32 s6, -1 ++; GFX11-NEXT: ; implicit-def: $sgpr4_sgpr5 ++; GFX11-NEXT: s_branch .LBB14_2 ++; GFX11-NEXT: .LBB14_4: ++; GFX11-NEXT: v_dual_mov_b32 v0, s4 :: v_dual_mov_b32 v1, s5 ++; GFX11-NEXT: .LBB14_5: ; %endif ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: buffer_store_b64 v[0:1], off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: mul64_in_branch: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU_PUSH_BEFORE 4, @14, KC0[CB0:0-32], KC1[] ++; EG-NEXT: JUMP @3 POP:1 ++; EG-NEXT: ALU_POP_AFTER 11, @19, KC0[CB0:0-32], KC1[] ++; EG-NEXT: ALU_PUSH_BEFORE 2, @31, KC0[CB0:0-32], KC1[] ++; EG-NEXT: JUMP @8 POP:1 ++; EG-NEXT: ALU 0, @34, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 0 @12 ++; EG-NEXT: POP @8 POP:1 ++; EG-NEXT: ALU 1, @35, KC0[], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XY, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 12: ++; EG-NEXT: VTX_READ_64 T0.XY, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 14: ++; EG-NEXT: OR_INT T0.W, KC0[2].W, KC0[3].X, ++; EG-NEXT: MOV * T1.W, literal.x, ++; EG-NEXT: 1(1.401298e-45), 0(0.000000e+00) ++; EG-NEXT: SETNE_INT * T0.W, PV.W, 0.0, ++; EG-NEXT: PRED_SETNE_INT * ExecMask,PredicateBit (MASKED), PV.W, 0.0, ++; EG-NEXT: ALU clause starting at 19: ++; EG-NEXT: MOV T0.W, KC0[2].W, ++; EG-NEXT: MOV * T1.W, KC0[3].Z, ++; EG-NEXT: MOV T2.W, KC0[3].Y, ++; EG-NEXT: MULLO_INT * T0.X, PV.W, PS, ++; EG-NEXT: MOV T1.W, KC0[3].X, ++; EG-NEXT: MULHI * T0.Y, T0.W, PV.W, ++; EG-NEXT: ADD_INT T3.W, PS, T0.X, ++; EG-NEXT: MULLO_INT * T0.X, PV.W, T2.W, ++; EG-NEXT: ADD_INT T0.Y, PV.W, PS, ++; EG-NEXT: MOV T1.W, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.W, T2.W, ++; EG-NEXT: 0(0.000000e+00), 0(0.000000e+00) ++; EG-NEXT: ALU clause starting at 31: ++; EG-NEXT: MOV T0.W, KC0[2].Y, ++; EG-NEXT: SETE_INT * T1.W, T1.W, 0.0, ++; EG-NEXT: PRED_SETE_INT * ExecMask,PredicateBit (MASKED), PS, 0.0, ++; EG-NEXT: ALU clause starting at 34: ++; EG-NEXT: MOV * T0.X, KC0[2].Z, ++; EG-NEXT: ALU clause starting at 35: ++; EG-NEXT: LSHR * T1.X, T0.W, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) + entry: + %0 = icmp eq i64 %a, 0 + br i1 %0, label %if, label %else +@@ -211,79 +2124,558 @@ endif: + ret void + } + +-; FIXME: Load dwordx4 +-; FUNC-LABEL: {{^}}s_mul_i128: +-; GCN: s_load_dwordx4 +-; GCN: s_load_dwordx4 +- +-; SI: v_mul_hi_u32 +-; SI: v_mul_hi_u32 +-; SI: s_mul_i32 +-; SI: v_mul_hi_u32 +-; SI: s_mul_i32 +-; SI: s_mul_i32 +- +-; SI-DAG: s_mul_i32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: s_mul_i32 +-; SI-DAG: s_mul_i32 +-; SI-DAG: v_mul_hi_u32 +- +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: s_mul_i32 +-; VI-DAG: s_mul_i32 +-; VI-DAG: s_mul_i32 +-; VI-DAG: s_mul_i32 +- +- +-; GCN: buffer_store_dwordx4 + define amdgpu_kernel void @s_mul_i128(ptr addrspace(1) %out, [8 x i32], i128 %a, [8 x i32], i128 %b) nounwind #0 { ++; SI-LABEL: s_mul_i128: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x13 ++; SI-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x1f ++; SI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x9 ++; SI-NEXT: s_mov_b32 s3, 0xf000 ++; SI-NEXT: s_mov_b32 s2, -1 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: v_mov_b32_e32 v0, s6 ++; SI-NEXT: v_mul_hi_u32 v0, s8, v0 ++; SI-NEXT: v_mov_b32_e32 v1, s4 ++; SI-NEXT: v_mul_hi_u32 v1, s10, v1 ++; SI-NEXT: s_mul_i32 s7, s8, s7 ++; SI-NEXT: v_add_i32_e32 v0, vcc, s7, v0 ++; SI-NEXT: s_mul_i32 s7, s10, s5 ++; SI-NEXT: s_mul_i32 s12, s9, s6 ++; SI-NEXT: s_mul_i32 s6, s8, s6 ++; SI-NEXT: v_add_i32_e32 v1, vcc, s7, v1 ++; SI-NEXT: s_mul_i32 s7, s11, s4 ++; SI-NEXT: v_add_i32_e32 v0, vcc, s12, v0 ++; SI-NEXT: v_add_i32_e32 v1, vcc, s7, v1 ++; SI-NEXT: s_mul_i32 s7, s10, s4 ++; SI-NEXT: v_mov_b32_e32 v2, s6 ++; SI-NEXT: v_add_i32_e32 v2, vcc, s7, v2 ++; SI-NEXT: v_addc_u32_e32 v0, vcc, v1, v0, vcc ++; SI-NEXT: v_mov_b32_e32 v1, s8 ++; SI-NEXT: v_mul_hi_u32 v5, s4, v1 ++; SI-NEXT: v_mul_hi_u32 v1, s5, v1 ++; SI-NEXT: v_mov_b32_e32 v3, s9 ++; SI-NEXT: v_mul_hi_u32 v4, s4, v3 ++; SI-NEXT: s_mul_i32 s7, s5, s8 ++; SI-NEXT: v_add_i32_e32 v5, vcc, s7, v5 ++; SI-NEXT: s_mul_i32 s6, s4, s9 ++; SI-NEXT: v_addc_u32_e32 v6, vcc, 0, v1, vcc ++; SI-NEXT: v_add_i32_e32 v1, vcc, s6, v5 ++; SI-NEXT: v_mul_hi_u32 v3, s5, v3 ++; SI-NEXT: v_addc_u32_e32 v4, vcc, 0, v4, vcc ++; SI-NEXT: v_add_i32_e32 v4, vcc, v6, v4 ++; SI-NEXT: s_mul_i32 s5, s5, s9 ++; SI-NEXT: v_addc_u32_e64 v5, s[6:7], 0, 0, vcc ++; SI-NEXT: v_add_i32_e32 v4, vcc, s5, v4 ++; SI-NEXT: v_addc_u32_e32 v3, vcc, v3, v5, vcc ++; SI-NEXT: v_add_i32_e32 v2, vcc, v4, v2 ++; SI-NEXT: s_mul_i32 s4, s4, s8 ++; SI-NEXT: v_addc_u32_e32 v3, vcc, v3, v0, vcc ++; SI-NEXT: v_mov_b32_e32 v0, s4 ++; SI-NEXT: buffer_store_dwordx4 v[0:3], off, s[0:3], 0 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: s_mul_i128: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x4c ++; VI-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x7c ++; VI-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24 ++; VI-NEXT: v_mov_b32_e32 v5, 0 ++; VI-NEXT: s_mov_b32 s3, 0xf000 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: v_mov_b32_e32 v0, s6 ++; VI-NEXT: v_mad_u64_u32 v[2:3], s[12:13], s8, v0, 0 ++; VI-NEXT: s_mul_i32 s7, s8, s7 ++; VI-NEXT: v_mov_b32_e32 v6, s8 ++; VI-NEXT: v_add_u32_e32 v3, vcc, s7, v3 ++; VI-NEXT: s_mul_i32 s12, s9, s6 ++; VI-NEXT: v_mad_u64_u32 v[0:1], s[6:7], s4, v6, 0 ++; VI-NEXT: v_add_u32_e32 v3, vcc, s12, v3 ++; VI-NEXT: v_mov_b32_e32 v4, v1 ++; VI-NEXT: v_mad_u64_u32 v[6:7], s[6:7], s5, v6, v[4:5] ++; VI-NEXT: v_mov_b32_e32 v8, s4 ++; VI-NEXT: v_mad_u64_u32 v[1:2], s[6:7], s10, v8, v[2:3] ++; VI-NEXT: v_mov_b32_e32 v3, v7 ++; VI-NEXT: v_mov_b32_e32 v7, v5 ++; VI-NEXT: v_mov_b32_e32 v8, s9 ++; VI-NEXT: v_mad_u64_u32 v[4:5], s[6:7], s4, v8, v[6:7] ++; VI-NEXT: s_mul_i32 s8, s11, s4 ++; VI-NEXT: v_add_u32_e32 v6, vcc, s8, v2 ++; VI-NEXT: v_mov_b32_e32 v2, v5 ++; VI-NEXT: v_add_u32_e32 v2, vcc, v3, v2 ++; VI-NEXT: v_addc_u32_e64 v3, s[6:7], 0, 0, vcc ++; VI-NEXT: s_mul_i32 s8, s10, s5 ++; VI-NEXT: v_mad_u64_u32 v[2:3], s[4:5], s5, v8, v[2:3] ++; VI-NEXT: v_add_u32_e32 v5, vcc, s8, v6 ++; VI-NEXT: v_add_u32_e32 v2, vcc, v2, v1 ++; VI-NEXT: s_mov_b32 s2, -1 ++; VI-NEXT: v_addc_u32_e32 v3, vcc, v3, v5, vcc ++; VI-NEXT: v_mov_b32_e32 v1, v4 ++; VI-NEXT: buffer_store_dwordx4 v[0:3], off, s[0:3], 0 ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: s_mul_i128: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x4c ++; GFX9-NEXT: s_load_dwordx4 s[12:15], s[0:1], 0x7c ++; GFX9-NEXT: s_load_dwordx2 s[4:5], s[0:1], 0x24 ++; GFX9-NEXT: s_mov_b32 s7, 0xf000 ++; GFX9-NEXT: s_mov_b32 s6, -1 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: s_mul_i32 s0, s12, s11 ++; GFX9-NEXT: s_mul_hi_u32 s1, s12, s10 ++; GFX9-NEXT: s_mul_i32 s2, s14, s9 ++; GFX9-NEXT: s_mul_hi_u32 s3, s14, s8 ++; GFX9-NEXT: s_add_i32 s0, s1, s0 ++; GFX9-NEXT: s_mul_i32 s1, s13, s10 ++; GFX9-NEXT: s_add_i32 s2, s3, s2 ++; GFX9-NEXT: s_mul_i32 s3, s15, s8 ++; GFX9-NEXT: s_add_i32 s0, s0, s1 ++; GFX9-NEXT: s_mul_i32 s1, s12, s10 ++; GFX9-NEXT: s_add_i32 s2, s2, s3 ++; GFX9-NEXT: s_mul_i32 s3, s14, s8 ++; GFX9-NEXT: s_add_u32 s3, s3, s1 ++; GFX9-NEXT: s_addc_u32 s2, s2, s0 ++; GFX9-NEXT: s_mul_i32 s14, s9, s12 ++; GFX9-NEXT: s_mul_hi_u32 s15, s8, s12 ++; GFX9-NEXT: s_mul_hi_u32 s11, s9, s12 ++; GFX9-NEXT: s_add_u32 s14, s14, s15 ++; GFX9-NEXT: s_mul_i32 s1, s8, s13 ++; GFX9-NEXT: s_addc_u32 s11, s11, 0 ++; GFX9-NEXT: s_mul_hi_u32 s10, s8, s13 ++; GFX9-NEXT: s_add_u32 s1, s1, s14 ++; GFX9-NEXT: s_addc_u32 s10, s10, 0 ++; GFX9-NEXT: s_add_u32 s10, s11, s10 ++; GFX9-NEXT: s_addc_u32 s11, 0, 0 ++; GFX9-NEXT: s_mul_hi_u32 s14, s9, s13 ++; GFX9-NEXT: s_mul_i32 s9, s9, s13 ++; GFX9-NEXT: s_add_u32 s9, s9, s10 ++; GFX9-NEXT: s_addc_u32 s10, s14, s11 ++; GFX9-NEXT: s_mov_b32 s0, 0 ++; GFX9-NEXT: s_add_u32 s9, s9, s3 ++; GFX9-NEXT: s_addc_u32 s10, s10, s2 ++; GFX9-NEXT: s_mul_i32 s2, s8, s12 ++; GFX9-NEXT: s_mov_b32 s3, s0 ++; GFX9-NEXT: s_or_b64 s[0:1], s[2:3], s[0:1] ++; GFX9-NEXT: v_mov_b32_e32 v0, s0 ++; GFX9-NEXT: v_mov_b32_e32 v1, s1 ++; GFX9-NEXT: v_mov_b32_e32 v2, s9 ++; GFX9-NEXT: v_mov_b32_e32 v3, s10 ++; GFX9-NEXT: buffer_store_dwordx4 v[0:3], off, s[4:7], 0 ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: s_mul_i128: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: s_load_dwordx4 s[4:7], s[0:1], 0x4c ++; GFX10-NEXT: s_load_dwordx4 s[8:11], s[0:1], 0x7c ++; GFX10-NEXT: s_mov_b32 s2, 0 ++; GFX10-NEXT: s_load_dwordx2 s[0:1], s[0:1], 0x24 ++; GFX10-NEXT: s_mov_b32 s13, s2 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_mul_i32 s3, s8, s7 ++; GFX10-NEXT: s_mul_hi_u32 s7, s8, s6 ++; GFX10-NEXT: s_mul_i32 s14, s10, s5 ++; GFX10-NEXT: s_mul_hi_u32 s15, s10, s4 ++; GFX10-NEXT: s_mul_i32 s12, s9, s6 ++; GFX10-NEXT: s_mul_i32 s11, s11, s4 ++; GFX10-NEXT: s_add_i32 s3, s7, s3 ++; GFX10-NEXT: s_add_i32 s7, s15, s14 ++; GFX10-NEXT: s_mul_i32 s6, s8, s6 ++; GFX10-NEXT: s_mul_i32 s10, s10, s4 ++; GFX10-NEXT: s_add_i32 s3, s3, s12 ++; GFX10-NEXT: s_add_i32 s7, s7, s11 ++; GFX10-NEXT: s_mul_i32 s19, s5, s8 ++; GFX10-NEXT: s_mul_hi_u32 s20, s4, s8 ++; GFX10-NEXT: s_add_u32 s6, s10, s6 ++; GFX10-NEXT: s_mul_hi_u32 s18, s5, s8 ++; GFX10-NEXT: s_addc_u32 s7, s7, s3 ++; GFX10-NEXT: s_mul_i32 s17, s4, s9 ++; GFX10-NEXT: s_add_u32 s3, s19, s20 ++; GFX10-NEXT: s_mul_hi_u32 s16, s4, s9 ++; GFX10-NEXT: s_mul_hi_u32 s21, s5, s9 ++; GFX10-NEXT: s_mul_i32 s5, s5, s9 ++; GFX10-NEXT: s_addc_u32 s9, s18, 0 ++; GFX10-NEXT: s_add_u32 s3, s17, s3 ++; GFX10-NEXT: s_addc_u32 s10, s16, 0 ++; GFX10-NEXT: s_mul_i32 s12, s4, s8 ++; GFX10-NEXT: s_add_u32 s4, s9, s10 ++; GFX10-NEXT: s_addc_u32 s8, 0, 0 ++; GFX10-NEXT: s_add_u32 s4, s5, s4 ++; GFX10-NEXT: s_addc_u32 s5, s21, s8 ++; GFX10-NEXT: s_add_u32 s4, s4, s6 ++; GFX10-NEXT: s_addc_u32 s5, s5, s7 ++; GFX10-NEXT: s_or_b64 s[2:3], s[12:13], s[2:3] ++; GFX10-NEXT: v_mov_b32_e32 v2, s4 ++; GFX10-NEXT: v_mov_b32_e32 v0, s2 ++; GFX10-NEXT: v_mov_b32_e32 v1, s3 ++; GFX10-NEXT: v_mov_b32_e32 v3, s5 ++; GFX10-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX10-NEXT: s_mov_b32 s2, -1 ++; GFX10-NEXT: buffer_store_dwordx4 v[0:3], off, s[0:3], 0 ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: s_mul_i128: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_clause 0x2 ++; GFX11-NEXT: s_load_b128 s[4:7], s[0:1], 0x4c ++; GFX11-NEXT: s_load_b128 s[8:11], s[0:1], 0x7c ++; GFX11-NEXT: s_load_b64 s[0:1], s[0:1], 0x24 ++; GFX11-NEXT: s_mov_b32 s2, 0 ++; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) ++; GFX11-NEXT: s_mov_b32 s13, s2 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_mul_i32 s3, s8, s7 ++; GFX11-NEXT: s_mul_hi_u32 s7, s8, s6 ++; GFX11-NEXT: s_mul_i32 s14, s10, s5 ++; GFX11-NEXT: s_mul_hi_u32 s15, s10, s4 ++; GFX11-NEXT: s_mul_i32 s12, s9, s6 ++; GFX11-NEXT: s_mul_i32 s11, s11, s4 ++; GFX11-NEXT: s_add_i32 s3, s7, s3 ++; GFX11-NEXT: s_add_i32 s7, s15, s14 ++; GFX11-NEXT: s_mul_i32 s6, s8, s6 ++; GFX11-NEXT: s_mul_i32 s10, s10, s4 ++; GFX11-NEXT: s_add_i32 s3, s3, s12 ++; GFX11-NEXT: s_add_i32 s7, s7, s11 ++; GFX11-NEXT: s_mul_i32 s19, s5, s8 ++; GFX11-NEXT: s_mul_hi_u32 s20, s4, s8 ++; GFX11-NEXT: s_add_u32 s6, s10, s6 ++; GFX11-NEXT: s_mul_hi_u32 s18, s5, s8 ++; GFX11-NEXT: s_addc_u32 s7, s7, s3 ++; GFX11-NEXT: s_mul_i32 s17, s4, s9 ++; GFX11-NEXT: s_add_u32 s3, s19, s20 ++; GFX11-NEXT: s_mul_hi_u32 s16, s4, s9 ++; GFX11-NEXT: s_mul_hi_u32 s21, s5, s9 ++; GFX11-NEXT: s_mul_i32 s5, s5, s9 ++; GFX11-NEXT: s_addc_u32 s9, s18, 0 ++; GFX11-NEXT: s_add_u32 s3, s17, s3 ++; GFX11-NEXT: s_addc_u32 s10, s16, 0 ++; GFX11-NEXT: s_mul_i32 s12, s4, s8 ++; GFX11-NEXT: s_add_u32 s4, s9, s10 ++; GFX11-NEXT: s_addc_u32 s8, 0, 0 ++; GFX11-NEXT: s_add_u32 s4, s5, s4 ++; GFX11-NEXT: s_addc_u32 s5, s21, s8 ++; GFX11-NEXT: s_add_u32 s4, s4, s6 ++; GFX11-NEXT: s_addc_u32 s5, s5, s7 ++; GFX11-NEXT: s_or_b64 s[2:3], s[12:13], s[2:3] ++; GFX11-NEXT: s_delay_alu instid0(SALU_CYCLE_1) ++; GFX11-NEXT: v_dual_mov_b32 v2, s4 :: v_dual_mov_b32 v1, s3 ++; GFX11-NEXT: v_dual_mov_b32 v0, s2 :: v_dual_mov_b32 v3, s5 ++; GFX11-NEXT: s_mov_b32 s3, 0x31016000 ++; GFX11-NEXT: s_mov_b32 s2, -1 ++; GFX11-NEXT: buffer_store_b128 v[0:3], off, s[0:3], 0 ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: s_mul_i128: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 41, @4, KC0[CB0:0-32], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XYZW, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: ALU clause starting at 4: ++; EG-NEXT: MULLO_INT * T0.X, KC0[5].X, KC0[8].X, ++; EG-NEXT: MULHI * T0.Y, KC0[5].X, KC0[8].X, ++; EG-NEXT: MULLO_INT * T0.Z, KC0[8].Y, KC0[4].W, ++; EG-NEXT: MULLO_INT * T0.W, KC0[8].X, KC0[5].Y, ++; EG-NEXT: MULHI * T1.X, KC0[5].X, KC0[7].W, ++; EG-NEXT: MULHI * T1.Y, KC0[4].W, KC0[8].X, ++; EG-NEXT: MULHI * T1.Z, KC0[8].Y, KC0[4].W, ++; EG-NEXT: MULLO_INT * T1.W, KC0[8].Y, KC0[5].X, ++; EG-NEXT: MULHI * T2.X, KC0[7].W, KC0[5].Y, ++; EG-NEXT: MULLO_INT * T2.Y, KC0[5].X, KC0[7].W, ++; EG-NEXT: MULHI * T2.Z, KC0[4].W, KC0[7].W, ++; EG-NEXT: ADD_INT T2.W, T2.Y, PS, ++; EG-NEXT: MULLO_INT * T3.X, KC0[4].W, KC0[8].X, ++; EG-NEXT: ADDC_UINT T2.Z, T2.Y, T2.Z, ++; EG-NEXT: ADDC_UINT T3.W, PS, PV.W, ++; EG-NEXT: MULLO_INT * T2.Y, KC0[7].W, KC0[5].Z, ++; EG-NEXT: ADD_INT T2.X, T2.X, PS, ++; EG-NEXT: ADD_INT T2.Y, T1.Z, T1.W, ++; EG-NEXT: ADD_INT T1.Z, T1.Y, PV.W, ++; EG-NEXT: ADD_INT T1.W, T1.X, PV.Z, BS:VEC_120/SCL_212 ++; EG-NEXT: MULLO_INT * T1.X, KC0[8].Z, KC0[4].W, ++; EG-NEXT: ADD_INT T4.X, PV.W, PV.Z, ++; EG-NEXT: ADDC_UINT T1.Y, PV.W, PV.Z, ++; EG-NEXT: ADD_INT T1.Z, PV.Y, PS, ++; EG-NEXT: ADD_INT T0.W, PV.X, T0.W, ++; EG-NEXT: MULLO_INT * T1.X, KC0[7].W, KC0[5].Y, ++; EG-NEXT: ADD_INT T2.Y, PV.Z, PV.W, ++; EG-NEXT: ADDC_UINT T1.Z, T0.Z, PS, ++; EG-NEXT: ADD_INT T0.W, T0.Y, PV.Y, ++; EG-NEXT: ADDC_UINT * T1.W, T0.X, PV.X, ++; EG-NEXT: ADD_INT T0.Y, T0.X, T4.X, ++; EG-NEXT: ADD_INT T0.Z, T0.Z, T1.X, BS:VEC_021/SCL_122 ++; EG-NEXT: ADD_INT T0.W, PV.W, PS, ++; EG-NEXT: ADD_INT * T1.W, PV.Y, PV.Z, ++; EG-NEXT: ADD_INT T0.W, PV.W, PS, ++; EG-NEXT: ADDC_UINT * T1.W, PV.Y, PV.Z, ++; EG-NEXT: ADD_INT * T0.W, PV.W, PS, ++; EG-NEXT: ADD_INT * T0.Z, T0.Y, T0.Z, ++; EG-NEXT: ADD_INT * T0.Y, T3.X, T2.W, ++; EG-NEXT: LSHR * T1.X, KC0[2].Y, literal.x, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++; EG-NEXT: MULLO_INT * T0.X, KC0[4].W, KC0[7].W, ++entry: + %mul = mul i128 %a, %b + store i128 %mul, ptr addrspace(1) %out + ret void + } + +-; FUNC-LABEL: {{^}}v_mul_i128: +-; GCN: {{buffer|flat}}_load_dwordx4 +-; GCN: {{buffer|flat}}_load_dwordx4 +- +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_add_i32_e32 +- +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_hi_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_lo_u32 +-; SI-DAG: v_mul_lo_u32 +- +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mad_u64_u32 +-; VI-DAG: v_mul_lo_u32 +-; VI-DAG: v_mul_lo_u32 +-; VI-DAG: v_mul_lo_u32 +- +-; GCN: {{buffer|flat}}_store_dwordx4 + define amdgpu_kernel void @v_mul_i128(ptr addrspace(1) %out, ptr addrspace(1) %aptr, ptr addrspace(1) %bptr) #0 { ++; SI-LABEL: v_mul_i128: ++; SI: ; %bb.0: ; %entry ++; SI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0xb ++; SI-NEXT: s_mov_b32 s7, 0xf000 ++; SI-NEXT: s_mov_b32 s6, 0 ++; SI-NEXT: v_lshlrev_b32_e32 v8, 4, v0 ++; SI-NEXT: v_mov_b32_e32 v9, 0 ++; SI-NEXT: s_waitcnt lgkmcnt(0) ++; SI-NEXT: s_mov_b64 s[4:5], s[0:1] ++; SI-NEXT: s_mov_b64 s[0:1], s[2:3] ++; SI-NEXT: s_mov_b64 s[2:3], s[6:7] ++; SI-NEXT: buffer_load_dwordx4 v[0:3], v[8:9], s[4:7], 0 addr64 ++; SI-NEXT: buffer_load_dwordx4 v[4:7], v[8:9], s[0:3], 0 addr64 ++; SI-NEXT: s_waitcnt vmcnt(0) ++; SI-NEXT: v_mul_lo_u32 v3, v4, v3 ++; SI-NEXT: v_mul_hi_u32 v10, v4, v2 ++; SI-NEXT: v_mul_lo_u32 v12, v6, v1 ++; SI-NEXT: v_mul_hi_u32 v13, v6, v0 ++; SI-NEXT: v_mul_lo_u32 v17, v1, v4 ++; SI-NEXT: v_mul_hi_u32 v18, v0, v4 ++; SI-NEXT: v_mul_lo_u32 v11, v5, v2 ++; SI-NEXT: v_mul_lo_u32 v7, v7, v0 ++; SI-NEXT: v_mul_hi_u32 v16, v1, v4 ++; SI-NEXT: v_mul_lo_u32 v15, v0, v5 ++; SI-NEXT: v_mul_hi_u32 v14, v0, v5 ++; SI-NEXT: v_mul_hi_u32 v19, v1, v5 ++; SI-NEXT: v_mul_lo_u32 v5, v1, v5 ++; SI-NEXT: v_add_i32_e32 v1, vcc, v10, v3 ++; SI-NEXT: v_add_i32_e32 v3, vcc, v13, v12 ++; SI-NEXT: v_mul_lo_u32 v2, v4, v2 ++; SI-NEXT: v_mul_lo_u32 v6, v6, v0 ++; SI-NEXT: v_mul_lo_u32 v0, v0, v4 ++; SI-NEXT: v_add_i32_e32 v4, vcc, v17, v18 ++; SI-NEXT: v_addc_u32_e32 v10, vcc, 0, v16, vcc ++; SI-NEXT: v_add_i32_e32 v11, vcc, v1, v11 ++; SI-NEXT: v_add_i32_e32 v3, vcc, v3, v7 ++; SI-NEXT: v_add_i32_e32 v1, vcc, v15, v4 ++; SI-NEXT: v_addc_u32_e32 v4, vcc, 0, v14, vcc ++; SI-NEXT: v_add_i32_e32 v2, vcc, v6, v2 ++; SI-NEXT: v_addc_u32_e32 v3, vcc, v3, v11, vcc ++; SI-NEXT: v_add_i32_e32 v4, vcc, v10, v4 ++; SI-NEXT: v_addc_u32_e64 v6, s[4:5], 0, 0, vcc ++; SI-NEXT: v_add_i32_e32 v4, vcc, v5, v4 ++; SI-NEXT: v_addc_u32_e32 v5, vcc, v19, v6, vcc ++; SI-NEXT: v_add_i32_e32 v2, vcc, v4, v2 ++; SI-NEXT: v_addc_u32_e32 v3, vcc, v5, v3, vcc ++; SI-NEXT: buffer_store_dwordx4 v[0:3], v[8:9], s[0:3], 0 addr64 ++; SI-NEXT: s_endpgm ++; ++; VI-LABEL: v_mul_i128: ++; VI: ; %bb.0: ; %entry ++; VI-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x2c ++; VI-NEXT: v_lshlrev_b32_e32 v2, 4, v0 ++; VI-NEXT: v_mov_b32_e32 v11, 0 ++; VI-NEXT: s_waitcnt lgkmcnt(0) ++; VI-NEXT: v_mov_b32_e32 v1, s1 ++; VI-NEXT: v_add_u32_e32 v0, vcc, s0, v2 ++; VI-NEXT: v_addc_u32_e32 v1, vcc, 0, v1, vcc ++; VI-NEXT: v_mov_b32_e32 v3, s3 ++; VI-NEXT: v_add_u32_e32 v8, vcc, s2, v2 ++; VI-NEXT: v_addc_u32_e32 v9, vcc, 0, v3, vcc ++; VI-NEXT: flat_load_dwordx4 v[0:3], v[0:1] ++; VI-NEXT: flat_load_dwordx4 v[4:7], v[8:9] ++; VI-NEXT: s_waitcnt vmcnt(0) ++; VI-NEXT: v_mul_lo_u32 v10, v4, v3 ++; VI-NEXT: v_mad_u64_u32 v[12:13], s[0:1], v4, v2, 0 ++; VI-NEXT: v_mul_lo_u32 v14, v5, v2 ++; VI-NEXT: v_mad_u64_u32 v[2:3], s[0:1], v0, v4, 0 ++; VI-NEXT: v_mul_lo_u32 v15, v7, v0 ++; VI-NEXT: v_add_u32_e32 v7, vcc, v13, v10 ++; VI-NEXT: v_mov_b32_e32 v10, v3 ++; VI-NEXT: v_mad_u64_u32 v[3:4], s[0:1], v1, v4, v[10:11] ++; VI-NEXT: v_add_u32_e32 v13, vcc, v7, v14 ++; VI-NEXT: v_mov_b32_e32 v7, v4 ++; VI-NEXT: v_mov_b32_e32 v4, v11 ++; VI-NEXT: v_mad_u64_u32 v[12:13], s[0:1], v6, v0, v[12:13] ++; VI-NEXT: v_mad_u64_u32 v[3:4], s[0:1], v0, v5, v[3:4] ++; VI-NEXT: v_add_u32_e32 v11, vcc, v15, v13 ++; VI-NEXT: v_mov_b32_e32 v0, v4 ++; VI-NEXT: v_mul_lo_u32 v10, v6, v1 ++; VI-NEXT: v_add_u32_e32 v6, vcc, v7, v0 ++; VI-NEXT: v_addc_u32_e64 v7, s[0:1], 0, 0, vcc ++; VI-NEXT: v_mad_u64_u32 v[0:1], s[0:1], v1, v5, v[6:7] ++; VI-NEXT: v_add_u32_e32 v5, vcc, v10, v11 ++; VI-NEXT: v_add_u32_e32 v4, vcc, v0, v12 ++; VI-NEXT: v_addc_u32_e32 v5, vcc, v1, v5, vcc ++; VI-NEXT: flat_store_dwordx4 v[8:9], v[2:5] ++; VI-NEXT: s_endpgm ++; ++; GFX9-LABEL: v_mul_i128: ++; GFX9: ; %bb.0: ; %entry ++; GFX9-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x2c ++; GFX9-NEXT: v_lshlrev_b32_e32 v13, 4, v0 ++; GFX9-NEXT: v_mov_b32_e32 v10, 0 ++; GFX9-NEXT: s_waitcnt lgkmcnt(0) ++; GFX9-NEXT: global_load_dwordx4 v[0:3], v13, s[0:1] ++; GFX9-NEXT: global_load_dwordx4 v[4:7], v13, s[2:3] ++; GFX9-NEXT: s_waitcnt vmcnt(0) ++; GFX9-NEXT: v_mad_u64_u32 v[8:9], s[0:1], v0, v4, 0 ++; GFX9-NEXT: v_mul_lo_u32 v14, v5, v2 ++; GFX9-NEXT: v_mul_lo_u32 v15, v4, v3 ++; GFX9-NEXT: v_mad_u64_u32 v[11:12], s[0:1], v1, v4, v[9:10] ++; GFX9-NEXT: v_mad_u64_u32 v[2:3], s[0:1], v4, v2, 0 ++; GFX9-NEXT: v_mov_b32_e32 v4, v12 ++; GFX9-NEXT: v_mov_b32_e32 v12, v10 ++; GFX9-NEXT: v_mad_u64_u32 v[9:10], s[0:1], v0, v5, v[11:12] ++; GFX9-NEXT: v_add3_u32 v3, v3, v15, v14 ++; GFX9-NEXT: v_mul_lo_u32 v17, v7, v0 ++; GFX9-NEXT: v_mad_u64_u32 v[2:3], s[0:1], v6, v0, v[2:3] ++; GFX9-NEXT: v_mov_b32_e32 v0, v10 ++; GFX9-NEXT: v_mul_lo_u32 v16, v6, v1 ++; GFX9-NEXT: v_add_co_u32_e32 v6, vcc, v4, v0 ++; GFX9-NEXT: v_addc_co_u32_e64 v7, s[0:1], 0, 0, vcc ++; GFX9-NEXT: v_mad_u64_u32 v[0:1], s[0:1], v1, v5, v[6:7] ++; GFX9-NEXT: v_add3_u32 v3, v17, v3, v16 ++; GFX9-NEXT: v_add_co_u32_e32 v10, vcc, v0, v2 ++; GFX9-NEXT: v_addc_co_u32_e32 v11, vcc, v1, v3, vcc ++; GFX9-NEXT: global_store_dwordx4 v13, v[8:11], s[2:3] ++; GFX9-NEXT: s_endpgm ++; ++; GFX10-LABEL: v_mul_i128: ++; GFX10: ; %bb.0: ; %entry ++; GFX10-NEXT: s_load_dwordx4 s[0:3], s[0:1], 0x2c ++; GFX10-NEXT: v_lshlrev_b32_e32 v14, 4, v0 ++; GFX10-NEXT: v_mov_b32_e32 v10, 0 ++; GFX10-NEXT: s_waitcnt lgkmcnt(0) ++; GFX10-NEXT: s_clause 0x1 ++; GFX10-NEXT: global_load_dwordx4 v[0:3], v14, s[0:1] ++; GFX10-NEXT: global_load_dwordx4 v[4:7], v14, s[2:3] ++; GFX10-NEXT: s_waitcnt vmcnt(0) ++; GFX10-NEXT: v_mad_u64_u32 v[8:9], s0, v0, v4, 0 ++; GFX10-NEXT: v_mul_lo_u32 v7, v7, v0 ++; GFX10-NEXT: v_mad_u64_u32 v[11:12], s0, v1, v4, v[9:10] ++; GFX10-NEXT: v_mov_b32_e32 v9, v12 ++; GFX10-NEXT: v_mov_b32_e32 v12, v10 ++; GFX10-NEXT: v_mul_lo_u32 v10, v5, v2 ++; GFX10-NEXT: v_mad_u64_u32 v[12:13], s0, v0, v5, v[11:12] ++; GFX10-NEXT: v_mul_lo_u32 v11, v4, v3 ++; GFX10-NEXT: v_mad_u64_u32 v[2:3], s0, v4, v2, 0 ++; GFX10-NEXT: v_mov_b32_e32 v4, v13 ++; GFX10-NEXT: v_mul_lo_u32 v13, v6, v1 ++; GFX10-NEXT: v_add3_u32 v3, v3, v11, v10 ++; GFX10-NEXT: v_add_co_u32 v9, s0, v9, v4 ++; GFX10-NEXT: v_add_co_ci_u32_e64 v10, s0, 0, 0, s0 ++; GFX10-NEXT: v_mad_u64_u32 v[2:3], s0, v6, v0, v[2:3] ++; GFX10-NEXT: v_mad_u64_u32 v[0:1], s0, v1, v5, v[9:10] ++; GFX10-NEXT: v_mov_b32_e32 v9, v12 ++; GFX10-NEXT: v_add3_u32 v3, v7, v3, v13 ++; GFX10-NEXT: v_add_co_u32 v10, vcc_lo, v0, v2 ++; GFX10-NEXT: v_add_co_ci_u32_e32 v11, vcc_lo, v1, v3, vcc_lo ++; GFX10-NEXT: global_store_dwordx4 v14, v[8:11], s[2:3] ++; GFX10-NEXT: s_endpgm ++; ++; GFX11-LABEL: v_mul_i128: ++; GFX11: ; %bb.0: ; %entry ++; GFX11-NEXT: s_load_b128 s[0:3], s[0:1], 0x2c ++; GFX11-NEXT: v_lshlrev_b32_e32 v16, 4, v0 ++; GFX11-NEXT: v_mov_b32_e32 v10, 0 ++; GFX11-NEXT: s_waitcnt lgkmcnt(0) ++; GFX11-NEXT: s_clause 0x1 ++; GFX11-NEXT: global_load_b128 v[0:3], v16, s[0:1] ++; GFX11-NEXT: global_load_b128 v[4:7], v16, s[2:3] ++; GFX11-NEXT: s_waitcnt vmcnt(0) ++; GFX11-NEXT: v_mad_u64_u32 v[8:9], null, v0, v4, 0 ++; GFX11-NEXT: v_mul_lo_u32 v15, v5, v2 ++; GFX11-NEXT: v_mul_lo_u32 v3, v4, v3 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1) ++; GFX11-NEXT: v_mad_u64_u32 v[11:12], null, v1, v4, v[9:10] ++; GFX11-NEXT: v_dual_mov_b32 v9, v12 :: v_dual_mov_b32 v12, v10 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_4) ++; GFX11-NEXT: v_mad_u64_u32 v[13:14], null, v0, v5, v[11:12] ++; GFX11-NEXT: v_mad_u64_u32 v[10:11], null, v4, v2, 0 ++; GFX11-NEXT: v_mul_lo_u32 v4, v6, v1 ++; GFX11-NEXT: v_mul_lo_u32 v12, v7, v0 ++; GFX11-NEXT: v_mov_b32_e32 v2, v14 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2) ++; GFX11-NEXT: v_add3_u32 v11, v11, v3, v15 ++; GFX11-NEXT: v_add_co_u32 v2, s0, v9, v2 ++; GFX11-NEXT: v_mov_b32_e32 v9, v13 ++; GFX11-NEXT: v_add_co_ci_u32_e64 v3, null, 0, 0, s0 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_2) ++; GFX11-NEXT: v_mad_u64_u32 v[14:15], null, v6, v0, v[10:11] ++; GFX11-NEXT: v_mad_u64_u32 v[6:7], null, v1, v5, v[2:3] ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2) ++; GFX11-NEXT: v_add3_u32 v0, v12, v15, v4 ++; GFX11-NEXT: v_add_co_u32 v10, vcc_lo, v6, v14 ++; GFX11-NEXT: s_delay_alu instid0(VALU_DEP_2) ++; GFX11-NEXT: v_add_co_ci_u32_e32 v11, vcc_lo, v7, v0, vcc_lo ++; GFX11-NEXT: global_store_b128 v16, v[8:11], s[2:3] ++; GFX11-NEXT: s_nop 0 ++; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) ++; GFX11-NEXT: s_endpgm ++; ++; EG-LABEL: v_mul_i128: ++; EG: ; %bb.0: ; %entry ++; EG-NEXT: ALU 3, @10, KC0[CB0:0-32], KC1[] ++; EG-NEXT: TEX 1 @6 ++; EG-NEXT: ALU 41, @14, KC0[], KC1[] ++; EG-NEXT: MEM_RAT_CACHELESS STORE_RAW T0.XYZW, T1.X, 1 ++; EG-NEXT: CF_END ++; EG-NEXT: PAD ++; EG-NEXT: Fetch clause starting at 6: ++; EG-NEXT: VTX_READ_128 T2.XYZW, T1.X, 0, #1 ++; EG-NEXT: VTX_READ_128 T0.XYZW, T0.X, 0, #1 ++; EG-NEXT: ALU clause starting at 10: ++; EG-NEXT: LSHL * T0.W, T0.X, literal.x, ++; EG-NEXT: 4(5.605194e-45), 0(0.000000e+00) ++; EG-NEXT: ADD_INT T0.X, KC0[2].Z, PV.W, ++; EG-NEXT: ADD_INT * T1.X, KC0[2].W, PV.W, ++; EG-NEXT: ALU clause starting at 14: ++; EG-NEXT: MULLO_INT * T1.Y, T0.Y, T2.Y, ++; EG-NEXT: MULHI * T1.Z, T0.Y, T2.Y, ++; EG-NEXT: MULLO_INT * T1.W, T2.Z, T0.X, ++; EG-NEXT: MULLO_INT * T3.X, T2.Y, T0.Z, ++; EG-NEXT: MULHI * T3.Y, T0.Y, T2.X, ++; EG-NEXT: MULHI * T3.Z, T0.X, T2.Y, ++; EG-NEXT: MULHI * T3.W, T2.Z, T0.X, ++; EG-NEXT: MULLO_INT * T2.Z, T2.Z, T0.Y, ++; EG-NEXT: MULHI * T4.X, T2.X, T0.Z, ++; EG-NEXT: MULLO_INT * T0.Y, T0.Y, T2.X, ++; EG-NEXT: MULHI * T4.Y, T0.X, T2.X, ++; EG-NEXT: ADD_INT T4.W, T0.Y, PS, ++; EG-NEXT: MULLO_INT * T2.Y, T0.X, T2.Y, ++; EG-NEXT: ADDC_UINT T4.Z, T0.Y, T4.Y, ++; EG-NEXT: ADDC_UINT T5.W, PS, PV.W, ++; EG-NEXT: MULLO_INT * T0.Y, T2.X, T0.W, ++; EG-NEXT: ADD_INT T4.X, T4.X, PS, ++; EG-NEXT: ADD_INT T0.Y, T3.W, T2.Z, ++; EG-NEXT: ADD_INT T2.Z, T3.Z, PV.W, ++; EG-NEXT: ADD_INT T0.W, T3.Y, PV.Z, ++; EG-NEXT: MULLO_INT * T2.W, T2.W, T0.X, ++; EG-NEXT: ADD_INT T5.X, PV.W, PV.Z, ++; EG-NEXT: ADDC_UINT T3.Y, PV.W, PV.Z, ++; EG-NEXT: ADD_INT T2.Z, PV.Y, PS, ++; EG-NEXT: ADD_INT T0.W, PV.X, T3.X, ++; EG-NEXT: MULLO_INT * T0.Y, T2.X, T0.Z, ++; EG-NEXT: ADD_INT T4.Y, PV.Z, PV.W, ++; EG-NEXT: ADDC_UINT T0.Z, T1.W, PS, ++; EG-NEXT: ADD_INT T0.W, T1.Z, PV.Y, ++; EG-NEXT: ADDC_UINT * T2.W, T1.Y, PV.X, ++; EG-NEXT: ADD_INT T1.Y, T1.Y, T5.X, ++; EG-NEXT: ADD_INT T1.Z, T1.W, T0.Y, ++; EG-NEXT: ADD_INT T0.W, PV.W, PS, ++; EG-NEXT: ADD_INT * T1.W, PV.Y, PV.Z, ++; EG-NEXT: ADD_INT T0.W, PV.W, PS, ++; EG-NEXT: ADDC_UINT * T1.W, PV.Y, PV.Z, ++; EG-NEXT: ADD_INT * T0.W, PV.W, PS, ++; EG-NEXT: ADD_INT * T0.Z, T1.Y, T1.Z, ++; EG-NEXT: ADD_INT * T0.Y, T2.Y, T4.W, ++; EG-NEXT: LSHR T1.X, T1.X, literal.x, ++; EG-NEXT: MULLO_INT * T0.X, T0.X, T2.X, ++; EG-NEXT: 2(2.802597e-45), 0(0.000000e+00) ++entry: + %tid = call i32 @llvm.amdgcn.workitem.id.x() + %gep.a = getelementptr inbounds i128, ptr addrspace(1) %aptr, i32 %tid + %gep.b = getelementptr inbounds i128, ptr addrspace(1) %bptr, i32 %tid +-- +2.31.1 + diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 977db83012d9b0..d69575d9338105 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -24,6 +24,8 @@ class LlvmAmdgpu(CMakePackage): maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="amd-stg-open") + version("5.6.1", sha256="045e43c0c4a3f4f2f1db9fb603a4f1ea3d56e128147e19ba17909eb57d7f08e5") + version("5.6.0", sha256="e922bd492b54d99e56ed88c81e2009ed6472059a180b10cc56ce1f9bd2d7b6ed") version("5.5.1", sha256="7d7181f20f89cb0715191aa32914186c67a34258c13457055570d47e15296553") version("5.5.0", sha256="5dc6c99f612b69ff73145bee17524e3712990100e16445b71634106acf7927cf") version("5.4.3", sha256="a844d3cc01613f6284a75d44db67c495ac1e9b600eacbb1eb13d2649f5d5404d") @@ -160,7 +162,13 @@ class LlvmAmdgpu(CMakePackage): # as per 5.2.0 llvm code. It used to be llvm/bin/../lib/libdevice. # Below patch is to look in the old path. patch("adjust-openmp-bitcode-directory-for-llvm-link.patch", when="@5.2.0:") - patch("patch-llvm-5.5.0.patch", when="@5.5") + patch("patch-llvm-5.5.0.patch", when="@5.5:") + + # i1 muls can sometimes happen after SCEV. + # They resulted in ISel failures because we were missing the patterns for them. + # This fix is targeting 6.1 rocm release. + # Need patch until https://github.com/llvm/llvm-project/pull/67291 is merged. + patch("001-Add-i1-mul-patterns.patch", when="@5.6:") conflicts("^cmake@3.19.0") @@ -169,6 +177,8 @@ class LlvmAmdgpu(CMakePackage): # Add device libs sources so they can be an external LLVM project for d_version, d_shasum in [ + ("5.6.1", "f0dfab272ff936225bfa1e9dabeb3c5d12ce08b812bf53ffbddd2ddfac49761c"), + ("5.6.0", "efb5dcdca9b3a9fbe408d494fb4a23e0b78417eb5fa8eebd4a5d226088f28921"), ("5.5.1", "3b5f6dd85f0e3371f6078da7b59bf77d5b210e30f1cc66ef1e2de6bbcb775833"), ("5.5.0", "5ab95aeb9c8bed0514f96f7847e21e165ed901ed826cdc9382c14d199cbadbd3"), ("5.4.3", "f4f7281f2cea6d268fcc3662b37410957d4f0bc23e0df9f60b12eb0fcdf9e26e"), diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index dc5a8ed5fe7c08..df0e762fc54329 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -243,6 +243,8 @@ class Llvm(CMakePackage, CudaPackage): description="Enable zstd support for static analyzer / lld", ) + provides("libllvm@16", when="@16.0.0:16") + provides("libllvm@15", when="@15.0.0:15") provides("libllvm@14", when="@14.0.0:14") provides("libllvm@13", when="@13.0.0:13") provides("libllvm@12", when="@12.0.0:12") diff --git a/var/spack/repos/builtin/packages/migraphx/0005-Adding-half-include-directory-path-migraphx.patch b/var/spack/repos/builtin/packages/migraphx/0005-Adding-half-include-directory-path-migraphx.patch new file mode 100644 index 00000000000000..b11445bdca57d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/migraphx/0005-Adding-half-include-directory-path-migraphx.patch @@ -0,0 +1,48 @@ +From 612664789657444daa88f8f28a183928e01595d0 Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Mon, 25 Sep 2023 19:30:19 +0000 +Subject: [PATCH] Adding-half-include-directory-path + +--- + CMakeLists.txt | 4 +++- + cmake/PythonModules.cmake | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4601cdd..9cd48ad 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,7 +51,7 @@ set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/lib") + project(migraphx) + find_package(ROCM REQUIRED) + +-find_path(HALF_INCLUDE_DIR half.hpp PATH_SUFFIXES half) ++find_path(HALF_INCLUDE_DIR half.hpp) + if (NOT HALF_INCLUDE_DIR) + message(FATAL_ERROR "Could not find half.hpp - Please check that the install path of half.hpp has been added to CMAKE_PREFIX_PATH") + else() +@@ -272,6 +272,8 @@ add_subdirectory(docs) + add_subdirectory(test) + add_subdirectory(tools) + ++target_include_directories(migraphx PUBLIC "${NLOHMANN_JSON_INCLUDE} ${HALF_INCLUDE_DIR}") ++ + set(DEST_DIR ${CMAKE_BINARY_DIR}) + file(GLOB backend_files ${CMAKE_SOURCE_DIR}/src/py/backend/*.py) + file(MAKE_DIRECTORY ${DEST_DIR}/lib/onnx_migraphx) +diff --git a/cmake/PythonModules.cmake b/cmake/PythonModules.cmake +index b5818ce..b4bfbb3 100755 +--- a/cmake/PythonModules.cmake ++++ b/cmake/PythonModules.cmake +@@ -76,7 +76,7 @@ function(py_add_module NAME) + ) + + endfunction() +-set(PYTHON_SEARCH_VERSIONS 2.7 3.5 3.6 3.7 3.8 3.9 3.10) ++set(PYTHON_SEARCH_VERSIONS 3.5 3.6 3.7 3.8 3.9 3.10) + set(PYTHON_DISABLE_VERSIONS "" CACHE STRING "") + foreach(PYTHON_DISABLE_VERSION ${PYTHON_DISABLE_VERSIONS}) + list(REMOVE_ITEM PYTHON_SEARCH_VERSIONS ${PYTHON_DISABLE_VERSION}) +-- +2.31.1 + diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index a0179de5ad7aa0..81bf1bff2b3818 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -19,6 +19,8 @@ class Migraphx(CMakePackage): maintainers("srekolam", "renjithravindrankannath") libraries = ["libmigraphx"] + version("5.6.1", sha256="b108c33f07572ffd880b20f6de06f1934ab2a1b41ae69095612322ac412fa91c") + version("5.6.0", sha256="eaec90535d62002fd5bb264677ad4a7e30c55f18d2a287680d0495c7e60432b2") version("5.5.1", sha256="e71c4744f8ef6a1a99c179bbad94b8fe9bd7686eaa9397f376b70988c3341f0c") version("5.5.0", sha256="6084eb596b170f5e38f22b5fa37e66aa43a8cbc626712c9f03cde48c8fecfc8f") version("5.4.3", sha256="f83e7bbe5d6d0951fb2cf0abf7e8b3530e9a5e45f7cec6d760da055d6905d568") @@ -110,19 +112,21 @@ def url_for_version(self, version): return url - patch("0001-Adding-nlohmann-json-include-directory.patch", when="@3.9.0:") + patch("0001-Adding-nlohmann-json-include-directory.patch", when="@3.9.0:5.5") # Restrict Python 2.7 usage to fix the issue below # https://github.com/spack/spack/issues/24429 patch("0002-restrict-python-2.7-usage.patch", when="@3.9.0:5.1.3") patch("0003-restrict-python-2.7-usage.patch", when="@5.2.0:5.4") - patch("0004-restrict-python2.7-usage-for-5.5.0.patch", when="@5.5.0:") + patch("0004-restrict-python2.7-usage-for-5.5.0.patch", when="@5.5.0") + patch("0005-Adding-half-include-directory-path-migraphx.patch", when="@5.6.0:") depends_on("cmake@3.5:", type="build") depends_on("protobuf", type="link") depends_on("blaze", type="build") depends_on("nlohmann-json", type="link") depends_on("msgpack-c", type="link") - depends_on("half@1.12.0", type="link") + depends_on("half@1.12.0", type="link", when="@:5.5") + depends_on("half@2:", when="@5.6:") depends_on("python@3.5:", type="build") depends_on("py-pybind11", type="build", when="@:4.0.0") depends_on("py-pybind11@2.6:", type="build", when="@4.1.0:") @@ -154,6 +158,8 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("hip@" + ver, when="@" + ver) @@ -193,3 +199,11 @@ def cmake_args(self): if "@5.5.0:" in self.spec: args.append(self.define("CMAKE_CXX_FLAGS", "-I{0}".format(abspath))) return args + + def test(self): + if self.spec.satisfies("@:5.5.0"): + print("Skipping: stand-alone tests") + return + test_dir = join_path(self.spec["migraphx"].prefix, "bin") + with working_dir(test_dir, create=True): + self.run_test("UnitTests") diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 79ed4c27d385b5..4843ae1173440a 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -19,7 +19,8 @@ class MiopenHip(CMakePackage): maintainers("srekolam", "renjithravindrankannath") libraries = ["libMIOpen"] - + version("5.6.1", sha256="ff627d68ed9e52433a3c808b5d3ff179a398b77ce81b00cfea7b2c4da5162c6c") + version("5.6.0", sha256="d620ddab5b488bdf81242654fefa337c6b71dc410c2ff26d30a4ee86a8d22d11") version("5.5.1", sha256="2cd75071b8ee876c69a94f028b6c8a9346d6d2fde7d4b64e6d635f3b6c994262") version("5.5.0", sha256="791087242551669e546225e36123c21663f0dad14dbcfd6d0ce0e7bad0ab0de1") version("5.4.3", sha256="37ffe2ed3d7942da8ea2f6bdb85c7a2f58e3ccd31767db158a322769d3604efd") @@ -144,6 +145,8 @@ class MiopenHip(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("hip@" + ver, when="@" + ver) @@ -153,12 +156,11 @@ class MiopenHip(CMakePackage): for ver in ["5.1.0", "5.1.3", "5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3"]: depends_on("mlirmiopen@" + ver, when="@" + ver) - for ver in ["5.4.0", "5.4.3", "5.5.0", "5.5.1"]: + for ver in ["5.5.1", "5.6.0", "5.6.1"]: depends_on("nlohmann-json", type="link") + depends_on("composable-kernel@" + ver, when="@" + ver) for ver in ["5.4.0", "5.4.3", "5.5.0"]: depends_on("rocmlir@" + ver, when="@" + ver) - for ver in ["5.5.1"]: - depends_on("composable-kernel@" + ver, when="@" + ver) def setup_build_environment(self, env): if "@3.9.0:" in self.spec: @@ -209,7 +211,12 @@ def cmake_args(self): ) if self.spec.satisfies("@5.4.0:5.5.0"): args.append(self.define("MIOPEN_USE_COMPOSABLEKERNEL", "OFF")) + args.append(self.define("MIOPEN_USE_MLIR", "ON")) + args.append(self.define("MIOPEN_ENABLE_AI_KERNEL_TUNING", "OFF")) if self.spec.satisfies("@5.5.1:"): args.append(self.define("MIOPEN_USE_COMPOSABLEKERNEL", "ON")) - args.append(self.define("MIOPEN_USE_MLIR", "OFF")) + args.append(self.define("MIOPEN_ENABLE_AI_KERNEL_TUNING", "OFF")) + args.append( + "-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include) + ) return args diff --git a/var/spack/repos/builtin/packages/mivisionx/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py index 9d3a16959b55ad..bd1a40a8726aeb 100644 --- a/var/spack/repos/builtin/packages/mivisionx/package.py +++ b/var/spack/repos/builtin/packages/mivisionx/package.py @@ -25,6 +25,8 @@ def url_for_version(self, version): url = "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/archive/rocm-{0}.tar.gz" return url.format(version) + version("5.6.1", sha256="b2ff95c1488e244f379482631dae4f9ab92d94a513d180e03607aa1e184b5b0a") + version("5.6.0", sha256="34c184e202b1a6da2398b66e33c384d5bafd8f8291089c18539715c5cb73eb1f") version("5.5.1", sha256="e8209f87a57c4222003a936240e7152bbfa496862113358f29d4c3e80d4cdf56") version("5.5.0", sha256="af266550ecccad80f08954f23e47e8264eb338b0928a5314bd6efca349fc5a14") version("5.4.3", sha256="4da82974962a70c326ce2427c664517b1efdff436efe222e6bc28817c222a082") @@ -115,6 +117,8 @@ def url_for_version(self, version): variant("opencl", default=False, description="Use OPENCL as the backend") variant("hip", default=True, description="Use HIP as backend") + conflicts("+opencl", when="@5.6.0:") + def patch(self): if self.spec.satisfies("@4.2.0"): filter_file( @@ -255,13 +259,16 @@ def patch(self): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("miopen-hip@" + ver, when="@" + ver) - for ver in ["5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]: + for ver in ["5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("migraphx@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) + depends_on("python@3.5:", type="build") def flag_handler(self, name, flags): spec = self.spec diff --git a/var/spack/repos/builtin/packages/rccl/package.py b/var/spack/repos/builtin/packages/rccl/package.py index 6545452cf32150..677b077b4bdce7 100644 --- a/var/spack/repos/builtin/packages/rccl/package.py +++ b/var/spack/repos/builtin/packages/rccl/package.py @@ -21,6 +21,8 @@ class Rccl(CMakePackage): maintainers("srekolam", "renjithravindrankannath") libraries = ["librccl"] + version("5.6.1", sha256="27ec6b86a1a329684d808f728c1fce134517ac8e6e7047689f95dbf8386c077e") + version("5.6.0", sha256="cce13c8a9e233e7ddf91a67b1626b7aaeaf818fefe61af8de6b6b6ff47cb358c") version("5.5.1", sha256="f6b9dc6dafeb49d95c085825876b09317d8252771c746ccf5aa19a9204a404b2") version("5.5.0", sha256="be2964b408741d046bcd606d339a233d1d1deac7b841647ec53d6d62d71452ba") version("5.4.3", sha256="a2524f602bd7b3b6afeb8ba9aff660216ee807fa836e46442d068b5ed5f51a4d") @@ -143,6 +145,8 @@ class Rccl(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("hip@" + ver, when="@" + ver) @@ -174,6 +178,8 @@ class Rccl(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("numactl@2:", when="@" + ver) for ver in [ @@ -190,12 +196,15 @@ class Rccl(CMakePackage): "5.3.3", "5.4.0", "5.4.3", + "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-smi-lib@" + ver, when="@" + ver) depends_on("chrpath", when="@5.3.0:") - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) depends_on("googletest@1.11.0:", when="@5.3:") diff --git a/var/spack/repos/builtin/packages/rdc/package.py b/var/spack/repos/builtin/packages/rdc/package.py index bb6314b420e9ac..8f88417ebf127c 100644 --- a/var/spack/repos/builtin/packages/rdc/package.py +++ b/var/spack/repos/builtin/packages/rdc/package.py @@ -26,6 +26,8 @@ def url_for_version(self, version): url = "https://github.com/RadeonOpenCompute/rdc/archive/rocm-{0}.tar.gz" return url.format(version) + version("5.6.1", sha256="9e9f57cebbc5ae386a405957ed2c17344cdb42db5e1a71285f2c9bc09eea6519") + version("5.6.0", sha256="5213cd89215463862f6a1e9480ebe017944a6bb6b0db1722628afaa34af57991") version("5.5.1", sha256="a58a319ee702cf61cf71a4eba647c231392f68449b35419d941079c6de944844") version("5.5.0", sha256="56e85e77581963fbcfcc43e091a91773de470152347808ae730bcaf92c9f5ee8") version("5.4.3", sha256="c44f0b070b5650bc78e2eb968aae57a8ac1e1fd160e897055b79f3026c4fbad3") @@ -130,6 +132,8 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-smi-lib@" + ver, type=("build", "link"), when="@" + ver) @@ -147,10 +151,12 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hsa-rocr-dev@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) def patch(self): diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py index c8afbc226af58e..b0ba2021ba6804 100644 --- a/var/spack/repos/builtin/packages/rocalution/package.py +++ b/var/spack/repos/builtin/packages/rocalution/package.py @@ -24,7 +24,8 @@ class Rocalution(CMakePackage): maintainers("cgmb", "srekolam", "renjithravindrankannath") libraries = ["librocalution_hip"] - + version("5.6.1", sha256="7197b3617a0c91e90adaa32003c04d247a5f585d216e77493d20984ba215addb") + version("5.6.0", sha256="7397a2039e9615c0cf6776c33c4083c00b185b5d5c4149c89fea25a8976a3097") version("5.5.1", sha256="4612e30a0290b1732c8862eea655122abc2d22ce4345b8498fe4127697e880b4") version("5.5.0", sha256="626e966b67b83a1ef79f9bf27aba998c49cf65c4208092516aa1e32a6cbd8c36") version("5.4.3", sha256="39d00951a9b3cbdc4205a7e3ce75c026d9428c71c784815288c445f84a7f8a0e") @@ -155,6 +156,8 @@ class Rocalution(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocprim@" + ver, when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocblas/package.py b/var/spack/repos/builtin/packages/rocblas/package.py index 9727be5ab3c704..0b59eadd7e559b 100644 --- a/var/spack/repos/builtin/packages/rocblas/package.py +++ b/var/spack/repos/builtin/packages/rocblas/package.py @@ -21,6 +21,8 @@ class Rocblas(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("5.6.1", sha256="73896ebd445162a69af97f9fd462684609b4e0cf617eab450cd4558b4a23941e") + version("5.6.0", sha256="6a70b27eede02c45f46095a6ce8421af9a774a565e39f5e1074783ecf00c1ea7") version("5.5.1", sha256="7916a8d238d51cc239949d799f0b61c9d5cd63c6ccaed0e16749489b89ca8ff3") version("5.5.0", sha256="b5260517f199e806ae18f2c4495f163884e0d7a0a7c67af0770f7428ea50f898") version("5.4.3", sha256="d82cd334b7a9b40d16ec4f4bb1fb5662382dcbfc86ee5e262413ed63d9e6a701") @@ -174,6 +176,8 @@ def check(self): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver) @@ -191,6 +195,8 @@ def check(self): depends_on("py-wheel", type="build") depends_on("py-msgpack", type="build") depends_on("py-pip", type="build") + depends_on("py-joblib", type="build", when="@5.6:") + depends_on("procps", type="build", when="@5.6:") for t_version, t_commit in [ ("@3.5.0", "f842a1a4427624eff6cbddb2405c36dec9a210cd"), @@ -218,6 +224,8 @@ def check(self): ("@5.4.3", "5aec08937473b27865fa969bb38a83bcf9463c2b"), ("@5.5.0", "38d444a9f2b6cddfeaeedcb39a5688150fa27093"), ("@5.5.1", "38d444a9f2b6cddfeaeedcb39a5688150fa27093"), + ("@5.6.0", "7d0a9d040c3bbae893df7ecef6a19d9cd1c304aa"), + ("@5.6.1", "7d0a9d040c3bbae893df7ecef6a19d9cd1c304aa"), ]: resource( name="Tensile", diff --git a/var/spack/repos/builtin/packages/rocfft/package.py b/var/spack/repos/builtin/packages/rocfft/package.py index bc5251a6c07e58..63c0548ce3a6b3 100644 --- a/var/spack/repos/builtin/packages/rocfft/package.py +++ b/var/spack/repos/builtin/packages/rocfft/package.py @@ -18,6 +18,8 @@ class Rocfft(CMakePackage): maintainers("cgmb", "srekolam", "renjithravindrankannath", "haampie") libraries = ["librocfft"] + version("5.6.1", sha256="a65861e453587c3e6393da75b0b1976508c61f968aecda77fbec920fea48489e") + version("5.6.0", sha256="e3d4a6c1bdac78f9a22033f57011af783d560308103f73542f9e0e4dd133d38a") version("5.5.1", sha256="57423a64f5cdb1c37ff0891b6c17b59f73198d46be42db4ae23781ef2c0cd49d") version("5.5.0", sha256="9288152e66504b06082e4eed8cdb791b4f9ae2836b3defbeb4d2b54901b96485") version("5.4.3", sha256="ed9664adc9825c237327497bc4b23f020d50be7645647f14a45f4d943dd506e7") @@ -155,6 +157,8 @@ def check(self): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py index 3c1f1d9e825dda..af829cf7ade83a 100644 --- a/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py +++ b/var/spack/repos/builtin/packages/rocm-bandwidth-test/package.py @@ -18,6 +18,8 @@ class RocmBandwidthTest(CMakePackage): maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("5.6.1", sha256="849af715d08dfd89e7aa5e4453b624151db1cafaa567ab5fa36a77948b90bf0d") + version("5.6.0", sha256="ae2f7263a21a3a650068f43e3112b2b765eea80a5af2297572f850c77f83c85e") version("5.5.1", sha256="768b3da49fe7d4bb4e6536a8ee15be9f5e865d961e813ed4a407f32402685e1f") version("5.5.0", sha256="1070ce14d45f34c2c6b2fb003184f3ae735ccfd640e9df1c228988b2a5a82949") version("5.4.3", sha256="a2f5a75bf47db1e39a4626a9f5cd2d120bcafe56b1baf2455d794f7a4734993e") @@ -128,12 +130,14 @@ class RocmBandwidthTest(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("hsa-rocr-dev@" + ver, when="@" + ver) depends_on("hsakmt-roct@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) build_targets = ["package"] diff --git a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py index 702c627d3433e1..941b1900f07802 100644 --- a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py +++ b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py @@ -16,6 +16,8 @@ class RocmClangOcl(CMakePackage): maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("5.6.1", sha256="c41deb1b564d939fc897b2bbdb13570b2234fa4c052a39783f5ad2dd1052f901") + version("5.6.0", sha256="1afc47dee02d73c10de422f254067f4ef3ff921c4a1204d54ecc40e61fc63497") version("5.5.1", sha256="bfa62ad14830e2bd5afbc346685216c69f8cbef0eb449954f793178e10b19a38") version("5.5.0", sha256="43a5459165693301ba2ebcc41b2b0705df9a3a47571d43bdc2cc49cfdd0833a7") version("5.4.3", sha256="689e0354ea685bd488116de8eb902b902492e9ace184c3109b97b9a43f8b2d59") @@ -126,6 +128,8 @@ class RocmClangOcl(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) @@ -135,7 +139,7 @@ class RocmClangOcl(CMakePackage): depends_on( "rocm-device-libs@" + ver, when="@{0} ^llvm-amdgpu ~rocm-device-libs".format(ver) ) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) test_src_dir = "test" diff --git a/var/spack/repos/builtin/packages/rocm-cmake/package.py b/var/spack/repos/builtin/packages/rocm-cmake/package.py index 30cbfc397fd10f..c833db675557c3 100644 --- a/var/spack/repos/builtin/packages/rocm-cmake/package.py +++ b/var/spack/repos/builtin/packages/rocm-cmake/package.py @@ -13,12 +13,14 @@ class RocmCmake(CMakePackage): homepage = "https://github.com/RadeonOpenCompute/rocm-cmake" git = "https://github.com/RadeonOpenCompute/rocm-cmake.git" - url = "https://github.com/RadeonOpenCompute/rocm-cmake/archive/rocm-5.5.0.tar.gz" + url = "https://github.com/RadeonOpenCompute/rocm-cmake/archive/rocm-5.6.0.tar.gz" tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") version("master", branch="master") + version("5.6.1", sha256="98bf5fe2e6e12f55d122807d0060f1bb19c80d63d2c2f6fee579c40bfd244fa6") + version("5.6.0", sha256="a118ca937856a4d0039955a8aef2466ef1fd1f08f7f7221cda53e1b5d02e476a") version("5.5.1", sha256="60113412b35d94e20e8100ed3db688c35801991b4b8fa282fdc6fd6fd413fb6e") version("5.5.0", sha256="b7884c346737eba70ae11044e41598b2482a92e21f3e0719b1ca11619f02a20b") version("5.4.3", sha256="c185b3a10d191d73b76770ca0f9d6bdc355ee91fe0c9016a3779c9cfe042ba0f") @@ -104,7 +106,7 @@ class RocmCmake(CMakePackage): depends_on("cmake@3:", type="build") depends_on("cmake@3.6:", type="build", when="@4.1.0:") - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) test_src_dir = "test" diff --git a/var/spack/repos/builtin/packages/rocm-core/package.py b/var/spack/repos/builtin/packages/rocm-core/package.py index fe2f3bfbeb3c32..45d947ce0e7f2a 100644 --- a/var/spack/repos/builtin/packages/rocm-core/package.py +++ b/var/spack/repos/builtin/packages/rocm-core/package.py @@ -19,6 +19,8 @@ class RocmCore(CMakePackage): maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm-core"] + version("5.6.1", sha256="eeef75e16e05380ccbc8df17a02dc141a66dddaadb444a97f7278f78067c498c") + version("5.6.0", sha256="3c3d47c8b774968d768d42810a3fed42d058b7d6da248d5295df2a7ffb262568") version("5.5.1", sha256="bc73060432ffdc2e210394835d383890b9652476074ef4708d447473f273ce76") version("5.5.0", sha256="684d3312bb14f05dc280cf136f5eddff38ba340cd85c383d6a217d8e27d3d57d") diff --git a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py index 046ca8913c5716..6b28adb40c121d 100644 --- a/var/spack/repos/builtin/packages/rocm-dbgapi/package.py +++ b/var/spack/repos/builtin/packages/rocm-dbgapi/package.py @@ -23,6 +23,8 @@ class RocmDbgapi(CMakePackage): libraries = ["librocm-dbgapi"] version("master", branch="amd-master") + version("5.6.1", sha256="c7241bf94bdb97a4cf1befbf25b8c35720797710da6f6b5b9d6a4094c1bc9c8b") + version("5.6.0", sha256="9b66e47f4eccb3c8bbc324aade92aac6139539dda449427b7823d0c45341afc8") version("5.5.1", sha256="c41dfc62591bcf42003fe744d8bd03a51311d54e4b012f946ca0ede0c14dd977") version("5.5.0", sha256="ce572340a3fe99e4f1538eb614933153456003f8dfe9306a5735cdd25b451e25") version("5.4.3", sha256="d647c9121a50f2c54367c567d8f39a145cb135e1ceed931581659f57f49f61e5") @@ -134,12 +136,14 @@ class RocmDbgapi(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("hsa-rocr-dev@" + ver, type="build", when="@" + ver) depends_on("comgr@" + ver, type=("build", "link"), when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) @classmethod diff --git a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py index 13f631e9e6b6f1..4b5850f0d0b8fe 100644 --- a/var/spack/repos/builtin/packages/rocm-debug-agent/package.py +++ b/var/spack/repos/builtin/packages/rocm-debug-agent/package.py @@ -18,6 +18,8 @@ class RocmDebugAgent(CMakePackage): maintainers("srekolam", "renjithravindrankannath") libraries = ["librocm-debug-agent"] + version("5.6.1", sha256="d3b1d5d757489ed3cc66d351cec56b7b850aaa7ecf6a55b0350b89c3dee3153a") + version("5.6.0", sha256="0bed788f07906afeb9092d0bec184a7963233ac9d8ccd20b4afeb624a1d20698") version("5.5.1", sha256="1bb66734f11bb57df6efa507f0217651446653bf28b3ca36acfcf94511a7c2bc") version("5.5.0", sha256="4f2431a395a77a06dc417ed1e9188731b031a0c680e62c6eee19d60965317f5a") version("5.4.3", sha256="b2c9ac198ea3cbf35e7e80f57c5d81c461de78b821d07b637ea4037a65cdf49f") @@ -138,6 +140,8 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hsa-rocr-dev@" + ver, when="@" + ver) depends_on("hsakmt-roct@" + ver, when="@" + ver) @@ -167,11 +171,13 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-dbgapi@" + ver, when="@" + ver) depends_on("hip@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) # https://github.com/ROCm-Developer-Tools/rocr_debug_agent/pull/4 diff --git a/var/spack/repos/builtin/packages/rocm-device-libs/package.py b/var/spack/repos/builtin/packages/rocm-device-libs/package.py index 24d9c1e826ec1d..cb784a050f195c 100644 --- a/var/spack/repos/builtin/packages/rocm-device-libs/package.py +++ b/var/spack/repos/builtin/packages/rocm-device-libs/package.py @@ -18,6 +18,8 @@ class RocmDeviceLibs(CMakePackage): maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="amd-stg-open") + version("5.6.1", sha256="f0dfab272ff936225bfa1e9dabeb3c5d12ce08b812bf53ffbddd2ddfac49761c") + version("5.6.0", sha256="efb5dcdca9b3a9fbe408d494fb4a23e0b78417eb5fa8eebd4a5d226088f28921") version("5.5.1", sha256="3b5f6dd85f0e3371f6078da7b59bf77d5b210e30f1cc66ef1e2de6bbcb775833") version("5.5.0", sha256="5ab95aeb9c8bed0514f96f7847e21e165ed901ed826cdc9382c14d199cbadbd3") version("5.4.3", sha256="f4f7281f2cea6d268fcc3662b37410957d4f0bc23e0df9f60b12eb0fcdf9e26e") @@ -138,11 +140,13 @@ class RocmDeviceLibs(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("llvm-amdgpu@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/rocm-gdb/package.py b/var/spack/repos/builtin/packages/rocm-gdb/package.py index b7c58074af36b9..a752f0c4d79056 100644 --- a/var/spack/repos/builtin/packages/rocm-gdb/package.py +++ b/var/spack/repos/builtin/packages/rocm-gdb/package.py @@ -16,6 +16,8 @@ class RocmGdb(AutotoolsPackage): tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") + version("5.6.1", sha256="d2b40d4c5aa41a6ce2a84307627b30d16a458672e03e13f9d27c12f2dc3f21d6") + version("5.6.0", sha256="997ef1883aac2769552bc7082c70b837f4e98b57d24c133cea52b9c92fb0dee1") version("5.5.1", sha256="359258548bc7e6abff16bb13c301339fb96560b2b961433c9e0712e4aaf2d9e1") version("5.5.0", sha256="d3b100e332facd9635e328f5efd9f0565250edbe05be986baa2e0470a19bcd79") version("5.4.3", sha256="28c1ce39fb1fabe61f86f6e3c6940c10f9a8b8de77f7bb4fdd73b04e172f85f6") @@ -135,11 +137,13 @@ class RocmGdb(AutotoolsPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-dbgapi@" + ver, type="link", when="@" + ver) depends_on("comgr@" + ver, type="link", when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) build_directory = "spack-build" diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index ddea6c7a8cd73a..f79496e91dc2c2 100644 --- a/var/spack/repos/builtin/packages/rocm-opencl/package.py +++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py @@ -29,6 +29,8 @@ def url_for_version(self, version): return url.format(version) version("master", branch="main") + version("5.6.1", sha256="ec26049f7d93c95050c27ba65472736665ec7a40f25920a868616b2970f6b845") + version("5.6.0", sha256="52ab260d00d279c2a86c353901ffd88ee61b934ad89e9eb480f210656705f04e") version("5.5.1", sha256="a8a62a7c6fc5398406d2203b8cb75621a24944688e545d917033d87de2724498") version("5.5.0", sha256="0df9fa0b8aa0c8e6711d34eec0fdf1ed356adcd9625bc8f1ce9b3e72090f3e4f") version("5.4.3", sha256="b0f8339c844a2e62773bd85cd1e7c5ecddfe71d7c8e8d604e1a1d60900c30873") @@ -116,6 +118,8 @@ def url_for_version(self, version): depends_on("numactl", type="link", when="@3.7.0:") for d_version, d_shasum in [ + ("5.6.1", "cc9a99c7e4de3d9360c0a471b27d626e84a39c9e60e0aff1e8e1500d82391819"), + ("5.6.0", "864f87323e793e60b16905284fba381a7182b960dd4a37fb67420c174442c03c"), ("5.5.1", "1375fc7723cfaa0ae22a78682186d4804188b0a54990bfd9c0b8eb421b85e37e"), ("5.5.0", "efbae9a1ef2ab3de5ca44091e9bb78522e76759c43524c1349114f9596cc61d1"), ("5.4.3", "71d9668619ab57ec8a4564d11860438c5aad5bd161a3e58fbc49555fbd59182d"), @@ -186,12 +190,14 @@ def url_for_version(self, version): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("comgr@" + ver, type="build", when="@" + ver) depends_on("hsa-rocr-dev@" + ver, type="link", when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) @classmethod diff --git a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py index d918f3d5f086bc..dedba382c56714 100644 --- a/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py +++ b/var/spack/repos/builtin/packages/rocm-openmp-extras/package.py @@ -37,6 +37,8 @@ "7f90634fb621169b21bcbd920c2e299acc88ba0eeb1a33fd40ae26e13201b652", "23cc7d1c82e35c74f48285a0a1c27e7b3cae1767568bb7b9367ea21f53dd6598", "9ec03a69cc462ada43e1fd4ca905a765b08c10e0911fb7a202c893cc577855e6", + "0673820a81986c9e2f28f15bbb45ad18934bca56a9d08aae6c49ec3895b38487", + "6c051bf7625f682ba3d2ea80b46a38ca2cbcd20f5d89ae3433602d3e7ef0403a", ] devlib = [ @@ -62,6 +64,8 @@ "f4f7281f2cea6d268fcc3662b37410957d4f0bc23e0df9f60b12eb0fcdf9e26e", "5ab95aeb9c8bed0514f96f7847e21e165ed901ed826cdc9382c14d199cbadbd3", "3b5f6dd85f0e3371f6078da7b59bf77d5b210e30f1cc66ef1e2de6bbcb775833", + "efb5dcdca9b3a9fbe408d494fb4a23e0b78417eb5fa8eebd4a5d226088f28921", + "f0dfab272ff936225bfa1e9dabeb3c5d12ce08b812bf53ffbddd2ddfac49761c", ] llvm = [ @@ -87,6 +91,8 @@ "a844d3cc01613f6284a75d44db67c495ac1e9b600eacbb1eb13d2649f5d5404d", "5dc6c99f612b69ff73145bee17524e3712990100e16445b71634106acf7927cf", "7d7181f20f89cb0715191aa32914186c67a34258c13457055570d47e15296553", + "e922bd492b54d99e56ed88c81e2009ed6472059a180b10cc56ce1f9bd2d7b6ed", + "045e43c0c4a3f4f2f1db9fb603a4f1ea3d56e128147e19ba17909eb57d7f08e5", ] flang = [ @@ -112,6 +118,8 @@ "b283d76244d19ab16c9d087ee7de0d340036e9c842007aa9d288aa4e6bf3749f", "a18522588686672150c7862f2b23048a429baa4a66010c4196e969cc77bd152c", "7c3b4eb3e95b9e2f91234f202a76034628d230a92e57b7c5ee9dcca1097bec46", + "fcefebddca0b373da81ff84f0f5469a1ef77a05430a5195d0f2e6399d3af31c3", + "5ebcbca2e03bd0686e677f44ea551e97bd9395c6b119f832fa784818733aa652", ] extras = [ @@ -137,6 +145,8 @@ "d393f27a85c9229433b50daee8154e11517160beb1049c1de9c55fc31dd11fac", "8f49026a80eb8685cbfb6d3d3b9898dd083df4d71893984ae5330d4804c685fb", "8955aa9d039fd6c1ff2e26d7298f0bf09bbcf03f09c6df92c91a9ab2510df9da", + "017bfed52fbe08185d8dbde79377918454215683562519a9e47acf403d9a1c29", + "437e2017cfe2ab73b15ada0fc1ea88f794f0b108cc5410f457268ae7e4e8985a", ] versions = [ @@ -162,6 +172,8 @@ "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ] versions_dict = dict() # type: Dict[str,Dict[str,str]] components = ["aomp", "devlib", "llvm", "flang", "extras"] @@ -183,6 +195,8 @@ class RocmOpenmpExtras(Package): tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath", "estewart08") + version("5.6.1", sha256=versions_dict["5.6.1"]["aomp"]) + version("5.6.0", sha256=versions_dict["5.6.0"]["aomp"]) version("5.5.1", sha256=versions_dict["5.5.1"]["aomp"]) version("5.5.0", sha256=versions_dict["5.5.0"]["aomp"]) version("5.4.3", sha256=versions_dict["5.4.3"]["aomp"]) @@ -237,13 +251,15 @@ class RocmOpenmpExtras(Package): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hsakmt-roct@" + ver, when="@" + ver) depends_on("comgr@" + ver, when="@" + ver) depends_on("hsa-rocr-dev@" + ver, when="@" + ver) depends_on("llvm-amdgpu@{0} ~openmp".format(ver), when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) # tag changed to 'rocm-' in 4.0.0 diff --git a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py index 80ced92254c075..11ad3aa2ab257e 100644 --- a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py +++ b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py @@ -25,6 +25,8 @@ class RocmSmiLib(CMakePackage): libraries = ["librocm_smi64"] version("master", branch="master") + version("5.6.1", sha256="9e94f9a941202c3d7ce917fd1cd78c4e0f06f48d6c929f3aa916378ccef1e02c") + version("5.6.0", sha256="88be875948a29454b8aacced8bb8ad967502a7a074ecbc579ed673c1650a2f7e") version("5.5.1", sha256="37f32350bfaf6c697312628696d1b1d5fd9165f183882759bc6cb9a5d65b9430") version("5.5.0", sha256="0703f49b1c2924cc1d3f613258eabdff1925cb5bcf7cf22bb6b955dd065e4ce8") version("5.4.3", sha256="34d550272e420684230ceb7845aefcef79b155e51cf9ec55e31fdba2a4ed177b") @@ -112,14 +114,14 @@ class RocmSmiLib(CMakePackage): depends_on("cmake@3:", type="build") depends_on("python@3:", type=("build", "run"), when="@3.9.0:") - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) patch("disable_pdf_generation_with_doxygen_and_latex.patch", when="@4.5.2:") def cmake_args(self): args = [ self.define_from_variant("BUILD_SHARED_LIBS", "shared"), - self.define("CMAKE_INSTALL_LIBDIR", self.prefix.lib), + self.define("CMAKE_INSTALL_LIBDIR", "lib"), ] return args diff --git a/var/spack/repos/builtin/packages/rocm-tensile/package.py b/var/spack/repos/builtin/packages/rocm-tensile/package.py index 19d3b3d63d51c5..29a6e82e092e3c 100644 --- a/var/spack/repos/builtin/packages/rocm-tensile/package.py +++ b/var/spack/repos/builtin/packages/rocm-tensile/package.py @@ -18,6 +18,8 @@ class RocmTensile(CMakePackage): maintainers("srekolam", "renjithravindrankannath", "haampie") + version("5.6.1", sha256="3e78c933563fade8781a1dca2079bff135af2f5d2c6eb0147797d2c1f24d006c") + version("5.6.0", sha256="383728ecf49def59ab9a7f8a1d1e2eaf8b528e36b461e27030a2aab1a1ed80cb") version("5.5.1", sha256="b65cb7335abe51ba33be9d46a5ede992b4e5932fa33797397899a6bf33a770e9") version("5.5.0", sha256="70fd736d40bb4c3461f07c77ad3ae6c485e3e842671ce9b223d023d836884ae2") version("5.4.3", sha256="a4c5e62edd33ea6b8528eb3f017a14c28eaa67c540f5c9023f6a245340198b0f") @@ -157,6 +159,8 @@ class RocmTensile(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-cmake@" + ver, type="build", when="@" + ver) depends_on("hip@" + ver, when="@" + ver) @@ -174,6 +178,8 @@ class RocmTensile(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-openmp-extras@" + ver, when="@" + ver) @@ -201,6 +207,8 @@ class RocmTensile(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("rocm-smi-lib@" + ver, type="build", when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.6.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.6.patch new file mode 100644 index 00000000000000..7acd9606141590 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.6.patch @@ -0,0 +1,532 @@ +From 795e7474acf23eb2f7815fd54ffdd3fd41ff8c35 Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Tue, 12 Sep 2023 07:00:31 +0000 +Subject: [PATCH] 5.6 Patch to add rocm-smi library and include path + +--- + CMakeLists.txt | 105 ++++----------------------------- + babel.so/CMakeLists.txt | 16 ++--- + cmake_modules/tests_unit.cmake | 2 +- + edp.so/CMakeLists.txt | 3 +- + gm.so/CMakeLists.txt | 4 +- + gpup.so/CMakeLists.txt | 2 +- + gst.so/CMakeLists.txt | 4 +- + iet.so/CMakeLists.txt | 6 +- + mem.so/CMakeLists.txt | 4 +- + pbqt.so/CMakeLists.txt | 2 +- + pebb.so/CMakeLists.txt | 2 +- + peqt.so/CMakeLists.txt | 4 +- + perf.so/CMakeLists.txt | 4 +- + pesm.so/CMakeLists.txt | 2 +- + rcqt.so/CMakeLists.txt | 2 +- + rvs/CMakeLists.txt | 2 +- + rvs/tests.cmake | 2 +- + rvslib/CMakeLists.txt | 2 +- + smqt.so/CMakeLists.txt | 2 +- + testif.so/CMakeLists.txt | 2 +- + 20 files changed, 45 insertions(+), 127 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a12eb41..900657a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,13 +68,12 @@ endif(rocblas_FOUND) + # variables since we will pass them as cmake params appropriately, and + # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH + set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path") +-set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory") +-set(CMAKE_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages") ++set (CMAKE_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ) + list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}") +-set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE) +-set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE) +-set(HIP_INC_DIR "${ROCM_PATH}" CACHE PATH "Contains header files exported by ROC Runtime") +-set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE) ++set(ROCR_INC_DIR "${HSA_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime") ++set(ROCR_LIB_DIR "${HSA_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime") ++set(HIP_INC_DIR "${HIP_PATH}" CACHE PATH "Contains header files exported by ROC Runtime") ++set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk") + + + # +@@ -193,8 +192,6 @@ set(RVS_ROCBLAS "0" CACHE STRING "1 = use local rocBLAS") + set(RVS_ROCMSMI "0" CACHE STRING "1 = use local rocm_smi_lib") + + set(RVS_LIB_DIR "${CMAKE_BINARY_DIR}/rvslib" CACHE PATH "Contains RVS library") +-set(YAML_INC_DIR "${CMAKE_BINARY_DIR}/yaml-src/include" CACHE PATH "Contains header files exported by yaml-cpp") +-set(YAML_LIB_DIR "${CMAKE_BINARY_DIR}/yaml-build" CACHE PATH "Contains library files exported by yaml-cpp") + + if (${RVS_OS_TYPE} STREQUAL "centos") + set(ROCT_LIB_DIR "${ROCM_PATH}/lib64" CACHE PATH "Contains library files exported by ROC Trunk") +@@ -238,86 +235,6 @@ if (NOT DEFINED CPACK_GENERATOR ) + endif() + message (STATUS "CPACK_GENERATOR ${CPACK_GENERATOR}" ) + +- +-################################################################################ +-# Download and unpack yaml-cpp at configure time +-configure_file(CMakeYamlDownload.cmake yaml-download/CMakeLists.txt) +-execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download ) +-if(result) +- message(FATAL_ERROR "CMake step for yaml-download failed: ${result}") +-endif() +-execute_process(COMMAND ${CMAKE_COMMAND} --build . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-download ) +-if(result) +- message(FATAL_ERROR "Build step for yaml-download failed: ${result}") +-endif() +-execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/yaml-src -B${CMAKE_BINARY_DIR}/yaml-build +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src ) +-if(result) +- message(FATAL_ERROR "Config step for yaml-src failed: ${result}") +-endif() +- +-add_custom_target(rvs_yaml_target +- DEPENDS ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a +-) +- +-add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/yaml-build/libyaml-cpp.a +- COMMAND make -C ${CMAKE_BINARY_DIR}/yaml-build +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/yaml-src +- COMMENT "Generating yaml-cpp targets" +- VERBATIM) +- +-################################################################################ +-## GOOGLE TEST +-if(RVS_BUILD_TESTS) +- # Download and unpack googletest at configure time +- configure_file(CMakeGtestDownload.cmake googletest-download/CMakeLists.txt) +- execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) +- if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +- endif() +- execute_process(COMMAND ${CMAKE_COMMAND} --build . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) +- if(result) +- message(FATAL_ERROR "Build step for googletest failed: ${result}") +- endif() +- execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/googletest-src -B${CMAKE_BINARY_DIR}/googletest-build +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-src ) +- if(result) +- message(FATAL_ERROR "Config step for googletest-src failed: ${result}") +- endif() +- +- add_custom_target(rvs_gtest_target +- DEPENDS ${CMAKE_BINARY_DIR}/googletest-build/lib/libgtest_main.a +- ) +- +- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/googletest-build/lib/libgtest_main.a +- COMMAND make -C ${CMAKE_BINARY_DIR}/googletest-build +- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-src +- COMMENT "Generating googletest targets" +- VERBATIM) +- +- ## Set default unit test framework include path +- if (NOT DEFINED UT_INC) +- set (UT_INC "${CMAKE_BINARY_DIR}/googletest-src/googletest/include") +- message ("UT_INC ${UT_INC}") +- endif () +- +- ## Set default unit test framework include path +- if (NOT DEFINED UT_LIB) +- set (UT_LIB "${CMAKE_BINARY_DIR}/googletest-build/lib") +- message ("UT_LIB ${UT_LIB}") +- endif() +- +-endif() + ################################################################################ + ## rocBLAS + +@@ -441,8 +358,8 @@ if (RVS_ROCBLAS EQUAL 1) + set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install") + set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/") + else() +- set(ROCBLAS_INC_DIR "${ROCM_PATH}/include") +- set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib") ++ set(ROCBLAS_INC_DIR "${ROCBLAS_DIR}/include") ++ set(ROCBLAS_LIB_DIR "${ROCBLAS_DIR}/lib") + endif() + + if (RVS_ROCMSMI EQUAL 1) +@@ -457,8 +374,8 @@ else() + set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib") + else() + message( STATUS "ROCBLAS REORG Enabled Version: ${RVS_ROCBLAS_VERSION_FLAT}" ) +- set(ROCM_SMI_INC_DIR "${ROCM_PATH}/include") +- set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/lib") ++ set(ROCM_SMI_INC_DIR "${ROCM_SMI_DIR}/include") ++ set(ROCM_SMI_LIB_DIR "${ROCM_SMI_DIR}/lib") + endif() + endif() + set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name") +@@ -502,7 +419,7 @@ if (RVS_BUILD_TESTS) + add_subdirectory(testif.so) + endif() + +-add_dependencies(rvshelper rvs_bin_folder rvs_doc rvs_yaml_target) ++add_dependencies(rvshelper rvs_bin_folder rvs_doc) + + + add_dependencies(pesm rvslib rvslibrt) +@@ -537,7 +454,7 @@ if (RVS_BUILD_TESTS) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Create the bintest directory" + VERBATIM) +- add_dependencies(rvshelper rvs_bintest_folder rvs_gtest_target) ++ add_dependencies(rvshelper rvs_bintest_folder) + endif() + + add_custom_target(rvs_doc ALL +diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt +index 7290cef..ebd55ad 100644 +--- a/babel.so/CMakeLists.txt ++++ b/babel.so/CMakeLists.txt +@@ -107,13 +107,13 @@ set(HIP_HCC_LIB "amdhip64") + add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT}) + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -133,16 +133,16 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${HIP_PATH}) + + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/cmake_modules/tests_unit.cmake b/cmake_modules/tests_unit.cmake +index 586f453..c8b6560 100644 +--- a/cmake_modules/tests_unit.cmake ++++ b/cmake_modules/tests_unit.cmake +@@ -27,7 +27,7 @@ + ## define additional unit testing include directories + include_directories(${UT_INC}) + ## define additional unit testing lib directories +-link_directories(${UT_LIB} ${RVS_LIB_DIR}) ++link_directories(${UT_LIB} ${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR}) + + file(GLOB TESTSOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/test*.cpp ) + #message ( "TESTSOURCES: ${TESTSOURCES}" ) +diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt +index a933061..d117e03 100644 +--- a/edp.so/CMakeLists.txt ++++ b/edp.so/CMakeLists.txt +@@ -129,6 +129,7 @@ endif() + + + if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") ++ message("${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so not found") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) + RETURN() + endif() +@@ -136,7 +137,7 @@ endif() + ## define include directories + include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpciaccess.so libpci.so libm.so) + +diff --git a/gm.so/CMakeLists.txt b/gm.so/CMakeLists.txt +index afaafcb..7c0cd79 100644 +--- a/gm.so/CMakeLists.txt ++++ b/gm.so/CMakeLists.txt +@@ -122,7 +122,7 @@ include_directories(./ ../ ${ROCM_SMI_INC_DIR}) + # Add directories to look for library files to link + link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries +-set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) ++set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so librocm_smi64.so) + + ## define source files + set(SOURCES src/rvs_module.cpp src/action.cpp src/worker.cpp) +@@ -133,7 +133,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES}) + set_target_properties(${RVS_TARGET} PROPERTIES + SUFFIX .so.${LIB_VERSION_STRING} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${ROCM_SMI_LIB}) ++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS}) + add_dependencies(${RVS_TARGET} rvslibrt rvslib) + + add_custom_command(TARGET ${RVS_TARGET} POST_BUILD +diff --git a/gpup.so/CMakeLists.txt b/gpup.so/CMakeLists.txt +index ca1674b..a9e4d16 100644 +--- a/gpup.so/CMakeLists.txt ++++ b/gpup.so/CMakeLists.txt +@@ -111,7 +111,7 @@ endif() + ## define include directories + include_directories(./ ../ include ../include) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpci.so libm.so) + +diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt +index d85eadb..ca7fff4 100644 +--- a/gst.so/CMakeLists.txt ++++ b/gst.so/CMakeLists.txt +@@ -137,7 +137,7 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") ++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) + RETURN() + endif() +@@ -145,7 +145,7 @@ endif() + ## define include directories + include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt +index 3263d12..62f4318 100644 +--- a/iet.so/CMakeLists.txt ++++ b/iet.so/CMakeLists.txt +@@ -140,7 +140,7 @@ if(DEFINED RVS_ROCMSMI) + endif() + endif() + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") ++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) + RETURN() + endif() +@@ -159,7 +159,7 @@ include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR + # Add directories to look for library files to link + link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries +-set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) ++set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so librocm_smi64.so) + + set(SOURCES src/rvs_module.cpp src/action.cpp src/iet_worker.cpp ) + +@@ -168,7 +168,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES}) + set_target_properties(${RVS_TARGET} PROPERTIES + SUFFIX .so.${LIB_VERSION_STRING} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +-target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCM_SMI_LIB}) ++target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_INC_DIR}/lib/ ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${ROCM_SMI_LIB_DIR}) + add_dependencies(${RVS_TARGET} rvslibrt rvslib) + + add_custom_command(TARGET ${RVS_TARGET} POST_BUILD +diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt +index 5a0f401..3fc4f51 100644 +--- a/mem.so/CMakeLists.txt ++++ b/mem.so/CMakeLists.txt +@@ -134,7 +134,7 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") ++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) + RETURN() + endif() +@@ -143,7 +143,7 @@ endif() + include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) + + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt +index d75211d..80abe22 100644 +--- a/pbqt.so/CMakeLists.txt ++++ b/pbqt.so/CMakeLists.txt +@@ -138,7 +138,7 @@ endif() + ## define include directories + include_directories(./ ../ pci ${ROCR_INC_DIR}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt +index 7ba031c..e64be8e 100644 +--- a/pebb.so/CMakeLists.txt ++++ b/pebb.so/CMakeLists.txt +@@ -139,7 +139,7 @@ endif() + ## define include directories + include_directories(./ ../ pci ${ROCR_INC_DIR}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/peqt.so/CMakeLists.txt b/peqt.so/CMakeLists.txt +index 2248d91..7f5912d 100644 +--- a/peqt.so/CMakeLists.txt ++++ b/peqt.so/CMakeLists.txt +@@ -107,9 +107,9 @@ else() + endif() + + ## define include directories +-include_directories(./ ../) ++include_directories(./ ../ ${HSA_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpci.so libm.so) + +diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt +index b319396..b9abe15 100644 +--- a/perf.so/CMakeLists.txt ++++ b/perf.so/CMakeLists.txt +@@ -137,7 +137,7 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") ++if(NOT EXISTS "${HIP_INC_DIR}/lib/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) + RETURN() + endif() +@@ -145,7 +145,7 @@ endif() + ## define include directories + include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${HIP_INC_DIR}/lib ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt +index ff60729..e7a2402 100644 +--- a/pesm.so/CMakeLists.txt ++++ b/pesm.so/CMakeLists.txt +@@ -109,7 +109,7 @@ endif() + ## define include directories + include_directories(./ ../ pci) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) + +diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt +index 32e1004..ac826ea 100644 +--- a/rcqt.so/CMakeLists.txt ++++ b/rcqt.so/CMakeLists.txt +@@ -110,7 +110,7 @@ endif() + ## define include directories + include_directories(./ ../) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib) + +diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt +index b350429..c855a32 100644 +--- a/rvs/CMakeLists.txt ++++ b/rvs/CMakeLists.txt +@@ -115,7 +115,7 @@ endif() + ## define include directories + include_directories(./ ../ ${YAML_INC_DIR} ${YAML_LIB_DIR}/include) + ## define lib directories +-link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS libdl.so "${YAML_LIB_DIR}/libyaml-cpp.a" libpthread.so) + +diff --git a/rvs/tests.cmake b/rvs/tests.cmake +index 32301c8..a058749 100644 +--- a/rvs/tests.cmake ++++ b/rvs/tests.cmake +@@ -179,7 +179,7 @@ add_test(NAME unit.ttf.rvs.config.noconfig + ## define include directories + include_directories(${UT_INC}) + ## define lib directories +-link_directories(${UT_LIB}) ++link_directories(${UT_LIB} ${ROCM_SMI_LIB_DIR}) + ## additional libraries for unit tests + set (PROJECT_TEST_LINK_LIBS ${PROJECT_LINK_LIBS} libpci.so) + +diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt +index 31e6143..4ffed0f 100644 +--- a/rvslib/CMakeLists.txt ++++ b/rvslib/CMakeLists.txt +@@ -115,7 +115,7 @@ endif() + + ## define include directories + include_directories(./ ../ +- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ++ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} + ) + link_directories(${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + +diff --git a/smqt.so/CMakeLists.txt b/smqt.so/CMakeLists.txt +index e6b8ec4..722f329 100644 +--- a/smqt.so/CMakeLists.txt ++++ b/smqt.so/CMakeLists.txt +@@ -108,7 +108,7 @@ endif() + ## define include directories + include_directories(./ ../ pci) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpci.so libm.so) + +diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt +index ed7d3d3..f09951e 100644 +--- a/testif.so/CMakeLists.txt ++++ b/testif.so/CMakeLists.txt +@@ -110,7 +110,7 @@ endif() + ## define include directories + include_directories(./ ../ pci) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) + +-- +2.39.3 + diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py index c3f5c88c9a74e7..dfefd8ef75d5c5 100644 --- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py @@ -21,6 +21,8 @@ class RocmValidationSuite(CMakePackage): maintainers("srekolam", "renjithravindrankannath") + version("5.6.1", sha256="d5e4100e2d07311dfa101563c15d026a8130442cdee8af9ef861832cd7866c0d") + version("5.6.0", sha256="54cc5167055870570c97ee7114f48d24d5415f984e0c9d7b58b83467e0cf18fb") version("5.5.1", sha256="0fbfaa9f68642b590ef04f9778013925bbf3f17bdcd35d4c85a8ffd091169a6e") version("5.5.0", sha256="296add772171db67ab8838d2db1ea56df21e895c0348c038768e40146e4fe86a") version("5.4.3", sha256="1f0888e559104a4b8c2f5322f7463e425f2baaf12aeb1a8982a5974516e7b667") @@ -111,7 +113,11 @@ class RocmValidationSuite(CMakePackage): patch("006-library-path.patch", when="@4.5.0:5.2") patch( "007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.3.patch", - when="@5.3.0:", + when="@5.3.0:5.5", + ) + patch( + "007-cleanup-path-reference-donot-download-googletest-yaml-library-path_5.6.patch", + when="@5.6:", ) depends_on("cmake@3.5:", type="build") @@ -150,6 +156,8 @@ def setup_build_environment(self, build_env): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocminfo@" + ver, when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocminfo/package.py b/var/spack/repos/builtin/packages/rocminfo/package.py index 1d45ed1f86d824..92fcd8c826cc3c 100644 --- a/var/spack/repos/builtin/packages/rocminfo/package.py +++ b/var/spack/repos/builtin/packages/rocminfo/package.py @@ -18,6 +18,8 @@ class Rocminfo(CMakePackage): maintainers("srekolam", "renjithravindrankannath", "haampie") version("master", branch="master") + version("5.6.1", sha256="780b186ac7410a503eca1060f4bbc35db1b7b4d1d714d15c7534cd26d8af7b54") + version("5.6.0", sha256="87d98a736e4f7510d1475d35717842068d826096a0af7c15a395bcf9d36d7fa0") version("5.5.1", sha256="bcab27bb3595d5a4c981e2416458d169e85c27e603c22e743d9240473bfbe98a") version("5.5.0", sha256="b6107d362b70e20a10911741eb44247139b4eb43489f7fa648daff880b6de37f") version("5.4.3", sha256="72159eed31f8deee0df9228b9e306a18fe9efdd4d6c0eead871cad4617874170") @@ -128,12 +130,14 @@ class Rocminfo(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", "master", ]: depends_on("hsakmt-roct@" + ver, when="@" + ver) depends_on("hsa-rocr-dev@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/rocprim/package.py b/var/spack/repos/builtin/packages/rocprim/package.py index daa61544824630..5394f73958f428 100644 --- a/var/spack/repos/builtin/packages/rocprim/package.py +++ b/var/spack/repos/builtin/packages/rocprim/package.py @@ -16,6 +16,8 @@ class Rocprim(CMakePackage): maintainers("cgmb", "srekolam", "renjithravindrankannath") + version("5.6.1", sha256="e9ec1b0039c07cf3096653a04224fe5fe755afc6ba000f6838b3a8bc84df27de") + version("5.6.0", sha256="360d6ece3c4a3c289dd88043432026fb989e982ae4d05230d8cdc858bcd50466") version("5.5.1", sha256="63cdc682afb39efd18f097faf695ce64c851c4a550a8ad96fa89d694451b6a42") version("5.5.0", sha256="968d9059f93d3f0f8a602f7b989e54e36cff2f9136486b6869e4534a5bf8c7d9") version("5.4.3", sha256="7be6314a46195912d3203e7e59cb8880a46ed7c1fd221e92fadedd20532e0e48") @@ -138,6 +140,8 @@ class Rocprim(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("comgr@" + ver, when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocrand/package.py b/var/spack/repos/builtin/packages/rocrand/package.py index 893e3e4851089a..eb6496d3386b3d 100644 --- a/var/spack/repos/builtin/packages/rocrand/package.py +++ b/var/spack/repos/builtin/packages/rocrand/package.py @@ -25,6 +25,8 @@ class Rocrand(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("5.6.1", sha256="6bf71e687ffa0fcc1b00e3567dd43da4147a82390f1b2db5e6f1f594dee6066d") + version("5.6.0", sha256="cc894d2f1af55e16b62c179062063946609c656043556189c656a115fd7d6f5f") version("5.5.1", sha256="e8bed3741b19e296bd698fc55b43686206f42f4deea6ace71513e0c48258cc6e") version("5.5.0", sha256="0481e7ef74c181026487a532d1c17e62dd468e508106edde0279ca1adeee6f9a") version("5.4.3", sha256="463aa760e9f74e45b326765040bb8a8a4fa27aaeaa5e5df16f8289125f88a619") @@ -193,6 +195,8 @@ class Rocrand(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index f8c081299faa07..3b1cfcb51173dd 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -39,6 +39,8 @@ class Rocsolver(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("5.6.1", sha256="6a8f366218aee599a0e56755030f94ee690b34f30e6d602748632226c5dc21bb") + version("5.6.0", sha256="54baa7f35f3c53da9005054e6f7aeecece5526dafcb277af32cbcb3996b0cbbc") version("5.5.1", sha256="8bf843e42d2e89203ea5fdb6e6082cea90da8d02920ab4c09bcc2b6f69909760") version("5.5.0", sha256="6775aa5b96731208c12c5b450cf218d4c262a80b7ea20c2c3034c448bb2ca4d2") version("5.4.3", sha256="5308b68ea72f465239a4bb2ed1a0507f0df7c98d3df3fd1f392e6d9ed7975232") @@ -132,7 +134,7 @@ class Rocsolver(CMakePackage): # Backport https://github.com/ROCmSoftwarePlatform/rocSOLVER/commit/2bbfb8976f6e4d667499c77e41a6433850063e88 patch("fmt-8.1-compatibility.patch", when="@4.5.0:5.1.3") # Maximize compatibility with other libraries that are using fmt. - patch("fmt-9-compatibility.patch", when="@5.2.0:") + patch("fmt-9-compatibility.patch", when="@5.2.0:5.5") def check(self): exe = join_path(self.build_directory, "clients", "staging", "rocsolver-test") @@ -173,9 +175,13 @@ def check(self): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocblas@" + ver, when="@" + ver) + for ver in ["5.6.0", "5.6.1"]: + depends_on("rocsparse@5.2:", when="@5.6:") for tgt in itertools.chain(["auto"], amdgpu_targets): depends_on("rocblas amdgpu_target={0}".format(tgt), when="amdgpu_target={0}".format(tgt)) diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index 8f3693b469f0d8..4fb8fb1646b4fc 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -32,6 +32,9 @@ class Rocsparse(CMakePackage): sticky=True, ) variant("test", default=False, description="Build rocsparse-test client") + + version("5.6.1", sha256="6a50a64354507f1374e1a86aa7f5c07d1aaa96ac193ac292c279153087bb5d54") + version("5.6.0", sha256="5797db3deb4a532e691447e3e8c923b93bd9fe4c468f3a88f00cecd80bebcae4") version("5.5.1", sha256="1dd2d18898dfebdf898e8fe7d1c1198e8f8451fd70ff12a1990ec1419cf359e1") version("5.5.0", sha256="cbee79b637691bc710c1c83fbaa91db7498d38d4df873be23e28ed5617acde72") version("5.4.3", sha256="9fb633f235eb0567cc54fae6bdc779f16bf0bb4e6f5bdddb40312c6d11ca8478") @@ -142,6 +145,8 @@ class Rocsparse(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocprim@" + ver, when="@" + ver) diff --git a/var/spack/repos/builtin/packages/rocthrust/package.py b/var/spack/repos/builtin/packages/rocthrust/package.py index 62bf4fb3da3c28..196bd7eaa15408 100644 --- a/var/spack/repos/builtin/packages/rocthrust/package.py +++ b/var/spack/repos/builtin/packages/rocthrust/package.py @@ -19,6 +19,8 @@ class Rocthrust(CMakePackage): maintainers("cgmb", "srekolam", "renjithravindrankannath") + version("5.6.1", sha256="63df61d5ab46d4cfda6066d748274bacecc77151692e372e6f7df5e91852bdc2") + version("5.6.0", sha256="e52a27bcb4add38a5f0f3a5c7e409c230bf4ba9afae19bd2e06c2be00d39db59") version("5.5.1", sha256="66f126e5ea46ca761533411f81e83402773f95d3184cb7645ca73df227413023") version("5.5.0", sha256="c031f71cd4b6eaf98664fd2ad50fc18f7ccbfa67be415dca425169d2d1c81e9e") version("5.4.3", sha256="d133e14ea6d27d358d1bd4d31b79fb1562d1aea7c400e5a2d28d0f159cb6c8a8") @@ -142,6 +144,8 @@ class Rocthrust(CMakePackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hip@" + ver, when="@" + ver) depends_on("rocprim@" + ver, when="@" + ver) diff --git a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py index 505dc254c18597..c7a80816c4ed0e 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev-api/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev-api/package.py @@ -17,6 +17,8 @@ class RoctracerDevApi(Package): tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") + version("5.6.1", sha256="007c498be25b067ad9a7631a2b0892f9129150ee9714e471a921225875d45e69") + version("5.6.0", sha256="cbcfe4fa2e8b627006b320a93992fb3078696d8ef2ef049b4b880b6b7d57e13e") version("5.5.1", sha256="3afc31ebfdb14b0365185ca6b9326a83b1503a94a51d910f5ce7ced192d8c133") version("5.5.0", sha256="fe9ad95628fa96639db6fc33f78d334c814c7161b4a754598f5a4a7852625777") version("5.4.3", sha256="6b5111be5efd4d7fd6935ca99b06fab19b43d97a58d26fc1fe6e783c4de9a926") diff --git a/var/spack/repos/builtin/packages/roctracer-dev/package.py b/var/spack/repos/builtin/packages/roctracer-dev/package.py index b50574667eba67..328aa0844bfa4f 100644 --- a/var/spack/repos/builtin/packages/roctracer-dev/package.py +++ b/var/spack/repos/builtin/packages/roctracer-dev/package.py @@ -20,6 +20,8 @@ class RoctracerDev(CMakePackage, ROCmPackage): maintainers("srekolam", "renjithravindrankannath") libraries = ["libroctracer64"] + version("5.6.1", sha256="007c498be25b067ad9a7631a2b0892f9129150ee9714e471a921225875d45e69") + version("5.6.0", sha256="cbcfe4fa2e8b627006b320a93992fb3078696d8ef2ef049b4b880b6b7d57e13e") version("5.5.1", sha256="3afc31ebfdb14b0365185ca6b9326a83b1503a94a51d910f5ce7ced192d8c133") version("5.5.0", sha256="fe9ad95628fa96639db6fc33f78d334c814c7161b4a754598f5a4a7852625777") version("5.4.3", sha256="6b5111be5efd4d7fd6935ca99b06fab19b43d97a58d26fc1fe6e783c4de9a926") @@ -72,6 +74,8 @@ class RoctracerDev(CMakePackage, ROCmPackage): "5.4.3", "5.5.0", "5.5.1", + "5.6.0", + "5.6.1", ]: depends_on("hsakmt-roct@" + ver, when="@" + ver) depends_on("hsa-rocr-dev@" + ver, when="@" + ver) @@ -94,7 +98,7 @@ class RoctracerDev(CMakePackage, ROCmPackage): ]: depends_on("rocprofiler-dev@" + ver, when="@" + ver) - for ver in ["5.5.0", "5.5.1"]: + for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) patch("0001-include-rocprofiler-dev-path.patch", when="@5.3:5.4") diff --git a/var/spack/repos/builtin/packages/rocwmma/0001-add-rocm-smi-lib-path-for-building-tests.patch b/var/spack/repos/builtin/packages/rocwmma/0001-add-rocm-smi-lib-path-for-building-tests.patch new file mode 100644 index 00000000000000..cfa3cb4180c722 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocwmma/0001-add-rocm-smi-lib-path-for-building-tests.patch @@ -0,0 +1,31 @@ +From 099ac638f41d9224f649fe23a64783bb408a2b09 Mon Sep 17 00:00:00 2001 +From: Sreenivasa Murthy Kolam +Date: Wed, 30 Aug 2023 09:41:15 +0000 +Subject: [PATCH] add rocm-smi-lib path for building tests + +--- + test/CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 85f98d0..269f517 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -69,11 +69,12 @@ function(add_rocwmma_test TEST_TARGET TEST_SOURCE) + + list(APPEND TEST_SOURCE ${ARGN}) + add_executable(${TEST_TARGET} ${TEST_SOURCE}) +- target_link_libraries(${TEST_TARGET} rocwmma gtest) ++ target_link_libraries(${TEST_TARGET} rocwmma gtest ${ROCM_SMI_DIR}/lib) + target_link_libraries(${TEST_TARGET} OpenMP::OpenMP_CXX "-L${HIP_CLANG_ROOT}/lib" "-Wl,-rpath=${HIP_CLANG_ROOT}/lib") + target_include_directories(${TEST_TARGET} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +- ${ROCWMMA_TEST_INCLUDE_DIRS}) ++ ${ROCWMMA_TEST_INCLUDE_DIRS} ++ ${ROCM_SMI_DIR}/include) + + # Add support to include extended test coverage + if(ROCWMMA_BUILD_EXTENDED_TESTS) +-- +2.39.3 + diff --git a/var/spack/repos/builtin/packages/rocwmma/package.py b/var/spack/repos/builtin/packages/rocwmma/package.py index 774bfe6b26b728..96978f7862ba70 100644 --- a/var/spack/repos/builtin/packages/rocwmma/package.py +++ b/var/spack/repos/builtin/packages/rocwmma/package.py @@ -25,7 +25,8 @@ class Rocwmma(CMakePackage): tags = ["rocm"] maintainers("srekolam", "renjithravindrankannath") - + version("5.6.1", sha256="41a5159ee1ad5fc411fe6220f37bd754e26d3883c24c0f2378f50ef628bc1b8f") + version("5.6.0", sha256="78b6ab10fce71d10a9d762b2eaab3390eb13b05c764f47a3b0a303ec3d37acf8") version("5.5.1", sha256="ada30d5e52df5da0d3f4e212a25efb492dbedc129628f4db4ef4ed77667da228") version("5.5.0", sha256="b9e1938cba111eeea295414c42de34d54a878f0d41a26e433809d60c12d31dbf") version("5.4.3", sha256="0968366c83b78a9d058d483be536aba03e79b300ccb6890d3da43298be54c288") @@ -59,16 +60,33 @@ class Rocwmma(CMakePackage): depends_on("googletest@1.10.0:", type="test") - for ver in ["5.2.0", "5.2.1", "5.2.3", "5.3.0", "5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1"]: + for ver in [ + "5.2.0", + "5.2.1", + "5.2.3", + "5.3.0", + "5.3.3", + "5.4.0", + "5.4.3", + "5.5.0", + "5.5.1", + "5.6.0", + "5.6.1", + ]: depends_on("rocm-cmake@%s:" % ver, type="build", when="@" + ver) depends_on("llvm-amdgpu@" + ver, type="build", when="@" + ver) depends_on("hip@" + ver, when="@" + ver) depends_on("rocblas@" + ver, type="build", when="@" + ver) depends_on("rocm-openmp-extras@" + ver, type="build", when="@" + ver) + for ver in ["5.6.0", "5.6.1"]: + depends_on("rocm-smi-lib@" + ver, when="@" + ver) + for tgt in itertools.chain(["auto"], amdgpu_targets): depends_on("rocblas amdgpu_target={0}".format(tgt), when="amdgpu_target={0}".format(tgt)) + patch("0001-add-rocm-smi-lib-path-for-building-tests.patch", when="@5.6:") + def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) @@ -93,5 +111,7 @@ def cmake_args(self): tgt = self.spec.variants["amdgpu_target"] if "auto" not in tgt: args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target")) + if self.spec.satisfies("@5.6.0:"): + args.append(self.define("ROCM_SMI_DIR", self.spec["rocm-smi-lib"].prefix)) return args From 4c111554ae47a666e619ceeaf572653d9f303428 Mon Sep 17 00:00:00 2001 From: Christoph Weber <96774182+Christoph-TU@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:46:17 +0200 Subject: [PATCH 021/806] Add ipm package (#40069) --- .../repos/builtin/packages/ipm/package.py | 103 ++++++++++++++++++ ...MPI_2COMPLEX_and_MPI_2DOUBLE_COMPLEX.patch | 37 +++++++ 2 files changed, 140 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ipm/package.py create mode 100644 var/spack/repos/builtin/packages/ipm/remove_MPI_2COMPLEX_and_MPI_2DOUBLE_COMPLEX.patch diff --git a/var/spack/repos/builtin/packages/ipm/package.py b/var/spack/repos/builtin/packages/ipm/package.py new file mode 100644 index 00000000000000..0c4b94c8c47b4f --- /dev/null +++ b/var/spack/repos/builtin/packages/ipm/package.py @@ -0,0 +1,103 @@ +# Copyright 2013-2023 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 * +from spack.util.executable import Executable + + +class Ipm(AutotoolsPackage): + """IPM is a portable profiling infrastructure for parallel codes. + It provides a low-overhead profile of application performance + and resource utilization in a parallel program. Communication, + computation, and IO are the primary focus.""" + + homepage = "https://github.com/nerscadmin/IPM" + git = "https://github.com/nerscadmin/IPM.git" + + maintainers("Christoph-TU") + + version("master", branch="master", preferred=True) + version("2.0.6", tag="2.0.6") + + variant("papi", default=False, description="Enable PAPI") + variant("cuda", default=False, description="Enable CUDA") + variant("libunwind", default=False, description="Enable libunwind") + + variant( + "papi_multiplexing", default=False, when="+papi", description="Enable PAPI multiplexing" + ) + variant( + "coll_details", + default=False, + description="Enable detailed monitoring of collective operations (experimental)", + ) + variant("posixio", default=False, description="Enable POSIXIO") + variant("pmon", default=False, description="Enable power monitoring module") + variant("parser", default=False, description="Add dependencies for running ipm_parse") + + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + depends_on("m4", type="build") + + depends_on("mpi") + depends_on("papi", when="+papi") + depends_on("cuda", when="+cuda") + depends_on("libunwind", when="+libunwind") + + # These are required when running the perl script ipm_parse, + # which is used to create reports from the generated xml file + depends_on("perl", type="run", when="+parser") + depends_on("ploticus", type="run", when="+parser") + + # 2COMPLEX and 2DOUBLE_COMPLEX are non-standard types and lead + # to compile errors when building with coll_details + patch("remove_MPI_2COMPLEX_and_MPI_2DOUBLE_COMPLEX.patch", when="+coll_details") + + def patch(self): + filter_file(r"#!/usr/bin/perl", "#!/usr/bin/env perl", "bin/ipm_parse") + + def setup_build_environment(self, env): + spec = self.spec + env.set("MPICC", spec["mpi"].mpicc) + env.set("MPIFC", spec["mpi"].mpifc) + env.set("MPICXX", spec["mpi"].mpicxx) + env.set("MPIF77", spec["mpi"].mpif77) + + def autoreconf(self, spec, prefix): + script = Executable(join_path(self.stage.source_path, "bootstrap.sh")) + script() + + def configure_args(self): + args = [] + spec = self.spec + if "+papi" in spec: + args.append("--with-papi={0}".format(spec["papi"].prefix)) + + if "+cuda" in spec: + args.append("--with-cudapath={0}".format(spec["cuda"].prefix)) + + if "+libunwind" in spec: + args.append("--with-libunwind={0}".format(spec["libunwind"].prefix)) + + if "+papi_multiplexing" in spec: + args.append("--enable-papi-multiplexing") + + if "+posixio" in spec: + args.append("--enable-posixio") + + if "+pmon" in spec: + args.append("--enable-pmon") + + if "+coll_details" in spec: + args.append("--enable-coll-details") + + args.extend( + [ + "CFLAGS={0}".format(self.compiler.cc_pic_flag), + "CXXFLAGS={0}".format(self.compiler.cxx_pic_flag), + ] + ) + return args diff --git a/var/spack/repos/builtin/packages/ipm/remove_MPI_2COMPLEX_and_MPI_2DOUBLE_COMPLEX.patch b/var/spack/repos/builtin/packages/ipm/remove_MPI_2COMPLEX_and_MPI_2DOUBLE_COMPLEX.patch new file mode 100644 index 00000000000000..2958e95a1c86b9 --- /dev/null +++ b/var/spack/repos/builtin/packages/ipm/remove_MPI_2COMPLEX_and_MPI_2DOUBLE_COMPLEX.patch @@ -0,0 +1,37 @@ +diff --git a/include/mod_mpi.h b/include/mod_mpi.h +index 135a558..00b5382 100755 +--- a/include/mod_mpi.h ++++ b/include/mod_mpi.h +@@ -316,8 +316,6 @@ extern char* ipm_mpi_op[MAXNUM_MPI_OPS]; + #define IPM_MPI_2INTEGER 34 + #define IPM_MPI_2REAL 35 + #define IPM_MPI_2DOUBLE_PRECISION 36 +-#define IPM_MPI_2COMPLEX 37 +-#define IPM_MPI_2DOUBLE_COMPLEX 38 + + extern char* ipm_mpi_type[MAXNUM_MPI_TYPES]; + +@@ -380,8 +378,6 @@ extern char* ipm_mpi_type[MAXNUM_MPI_TYPES]; + else if( mpitype==MPI_2INTEGER ) ipmtype=IPM_MPI_2INTEGER; \ + else if( mpitype==MPI_2REAL ) ipmtype=IPM_MPI_2REAL; \ + else if( mpitype==MPI_2DOUBLE_PRECISION ) ipmtype=IPM_MPI_2DOUBLE_PRECISION; \ +- else if( mpitype==MPI_2COMPLEX ) ipmtype=IPM_MPI_2COMPLEX; \ +- else if( mpitype==MPI_2DOUBLE_COMPLEX ) ipmtype=IPM_MPI_2DOUBLE_COMPLEX; \ + else ipmtype=0; \ + } + +diff --git a/src/mod_mpi.c b/src/mod_mpi.c +index 00ca4ab..d91e853 100755 +--- a/src/mod_mpi.c ++++ b/src/mod_mpi.c +@@ -94,8 +94,6 @@ int mod_mpi_init(ipm_mod_t* mod, int flags) + ipm_mpi_type[IPM_MPI_2INTEGER] = "MPI_2INTEGER"; + ipm_mpi_type[IPM_MPI_2REAL] = "MPI_2REAL"; + ipm_mpi_type[IPM_MPI_2DOUBLE_PRECISION] = "MPI_2DOUBLE_PRECISION"; +- ipm_mpi_type[IPM_MPI_2COMPLEX] = "MPI_2COMPLEX"; +- ipm_mpi_type[IPM_MPI_2DOUBLE_COMPLEX] = "MPI_2DOUBLE_COMPLEX"; + + mod->state = STATE_ACTIVE; + return IPM_OK; + + From 1da8477a3c4cafe63590faea0528b4c7b6292f1c Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:26:55 -0700 Subject: [PATCH 022/806] vtk-m@2.0: depend on kokkos@3.7:3.9 per issue #40268 (#40281) --- var/spack/repos/builtin/packages/vtk-m/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py index a8d350d028af14..bec8dc963af12d 100644 --- a/var/spack/repos/builtin/packages/vtk-m/package.py +++ b/var/spack/repos/builtin/packages/vtk-m/package.py @@ -102,6 +102,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage): # VTK-m uses the default Kokkos backend depends_on("kokkos", when="+kokkos") + depends_on("kokkos@3.7:3.9", when="@2.0 +kokkos") # VTK-m native CUDA and Kokkos CUDA backends are not compatible depends_on("kokkos ~cuda", when="+kokkos +cuda +cuda_native") depends_on("kokkos +cuda", when="+kokkos +cuda ~cuda_native") From 75ed26258ccbf84b9bc6dd11d8a9ccadbd54ff9e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 2 Oct 2023 15:23:49 -0500 Subject: [PATCH 023/806] py-torchgeo: add v0.5.0 (#40267) * py-torchgeo: add v0.5.0 * Better documentation of dependency quirks --- .../builtin/packages/py-torchgeo/package.py | 204 +++++++++--------- 1 file changed, 107 insertions(+), 97 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torchgeo/package.py b/var/spack/repos/builtin/packages/py-torchgeo/package.py index d67c928b0901f4..f5ef2ddc4bc783 100644 --- a/var/spack/repos/builtin/packages/py-torchgeo/package.py +++ b/var/spack/repos/builtin/packages/py-torchgeo/package.py @@ -7,11 +7,7 @@ class PyTorchgeo(PythonPackage): - """TorchGeo: datasets, samplers, transforms, and pre-trained models for geospatial data. - - TorchGeo is a PyTorch domain library, similar to torchvision, providing datasets, samplers, - transforms, and pre-trained models specific to geospatial data. - """ + """TorchGeo: datasets, samplers, transforms, and pre-trained models for geospatial data.""" homepage = "https://github.com/microsoft/torchgeo" pypi = "torchgeo/torchgeo-0.1.0.tar.gz" @@ -20,6 +16,7 @@ class PyTorchgeo(PythonPackage): maintainers("adamjstewart", "calebrob6") version("main", branch="main") + version("0.5.0", sha256="2bc2f9c4a19a569790cb3396499fdec17496632b0e52b86be390a2cc7a1a7033") version("0.4.1", sha256="a3692436bf63df8d2f9b76d16eea5ee309dd1bd74e0fde6e64456abfdb2a5b58") version("0.4.0", sha256="a0812487205aa2db7bc92119d896ae4bf4f1014e6fdc0ce0f75bcb24fada6613") version("0.3.1", sha256="ba7a716843575d173abab383c6cc2d5fc8faf5834472f16a4abe1b932040ece5") @@ -34,114 +31,127 @@ class PyTorchgeo(PythonPackage): variant("style", default=False, description="Install style checking tools") variant("tests", default=False, description="Install testing tools") + # NOTE: historically, dependencies had upper bounds based on semantic version compatibility. + # However, these were removed to improve maintainability and flexibility of the recipe. + # Required dependencies - depends_on("python@3.7:3+bz2", when="@0.3:", type=("build", "run")) - depends_on("python@3.6:3+bz2", when="@:0.2", type=("build", "run")) - depends_on("py-setuptools@42:67", when="@0.4.1:", type="build") - depends_on("py-setuptools@42:66", when="@0.4.0", type="build") - depends_on("py-setuptools@42:65", when="@0.3.1", type="build") - depends_on("py-setuptools@42:63", when="@:0.3.0", type="build") - depends_on("py-einops@0.3:0.6", when="@0.4:", type=("build", "run")) - depends_on("py-einops@0.3:0.4", when="@:0.3", type=("build", "run")) - depends_on("py-fiona@1.8:1", when="@0.3:", type=("build", "run")) - depends_on("py-fiona@1.5:1", when="@:0.2", type=("build", "run")) - depends_on("py-kornia@0.6.5:0.6", when="@0.4.1:", type=("build", "run")) + depends_on("python@3.9:", when="@0.5:", type=("build", "run")) + # COWC dataset requires unpacking .bz2 files. + depends_on("python+bz2", type=("build", "run")) + depends_on("py-setuptools@61:", when="@0.5:", type="build") + depends_on("py-setuptools@42:", type="build") + depends_on("py-einops@0.3:", type=("build", "run")) + depends_on("py-fiona@1.8.19:", when="@0.5:", type=("build", "run")) + depends_on("py-fiona@1.8:", when="@0.3:", type=("build", "run")) + depends_on("py-fiona@1.5:", type=("build", "run")) + # Only part of lightning[pytorch-extra] we actually require. + depends_on("py-jsonargparse@4.18:+signatures", when="@0.5:", type=("build", "run")) + depends_on("py-kornia@0.6.9:", when="@0.5:", type=("build", "run")) + depends_on("py-kornia@0.6.5:", when="@0.4.1:", type=("build", "run")) + # https://github.com/microsoft/torchgeo/pull/1123 depends_on("py-kornia@0.6.5:0.6.9", when="@0.4.0", type=("build", "run")) depends_on("py-kornia@0.6.4:0.6.9", when="@0.3", type=("build", "run")) depends_on("py-kornia@0.5.11:0.6.9", when="@0.2", type=("build", "run")) depends_on("py-kornia@0.5.4:0.6.9", when="@0.1", type=("build", "run")) - depends_on("py-lightning@1.8:1", when="@0.4.1:", type=("build", "run")) - depends_on("py-matplotlib@3.3:3", type=("build", "run")) - depends_on("py-numpy@1.17.2:1", type=("build", "run")) - depends_on("py-omegaconf@2.1:2", when="@:0.4.0", type=("build", "run")) - depends_on("py-packaging@17:21", when="@0.3", type=("build", "run")) - depends_on("pil@6.2:9+zlib+jpeg+tiff", type=("build", "run")) - depends_on("py-pyproj@2.2:3", type=("build", "run")) - depends_on("py-pytorch-lightning@1.5.1:1", when="@0.4.0", type=("build", "run")) - depends_on("py-pytorch-lightning@1.5.1:1", when="@0.3.1", type=("build", "run")) - depends_on("py-pytorch-lightning@1.5.1:1.8", when="@0.3.0", type=("build", "run")) - depends_on("py-pytorch-lightning@1.3:1.8", when="@:0.2", type=("build", "run")) - depends_on("py-rasterio@1.0.20:1", when="@0.3:", type=("build", "run")) - depends_on("py-rasterio@1.0.16:1", when="@:0.2", type=("build", "run")) - depends_on("py-rtree@1", when="@0.3:", type=("build", "run")) - depends_on("py-rtree@0.9.4:1", when="@0.2.1", type=("build", "run")) - depends_on("py-rtree@0.5:1", when="@:0.2.0", type=("build", "run")) - depends_on("py-scikit-learn@0.21:1", when="@0.3:", type=("build", "run")) - depends_on("py-scikit-learn@0.18:1", when="@:0.2", type=("build", "run")) - depends_on("py-segmentation-models-pytorch@0.2:0.3", when="@0.3.1:", type=("build", "run")) - depends_on("py-segmentation-models-pytorch@0.2", when="@:0.3.0", type=("build", "run")) - depends_on("py-shapely@1.3:2", when="@0.4:", type=("build", "run")) - depends_on("py-shapely@1.3:1", when="@:0.3", type=("build", "run")) - depends_on("py-timm@0.4.12:0.6", when="@0.4:", type=("build", "run")) - depends_on("py-timm@0.4.12:0.4", when="@:0.3", type=("build", "run")) - depends_on("py-torch@1.12:2", when="@0.4.1:", type=("build", "run")) - depends_on("py-torch@1.12:1", when="@0.4.0", type=("build", "run")) - depends_on("py-torch@1.9:1", when="@0.2:0.3", type=("build", "run")) - depends_on("py-torch@1.7:1", when="@0.1", type=("build", "run")) - depends_on("py-torchmetrics@0.10:0.11", when="@0.4:", type=("build", "run")) - depends_on("py-torchmetrics@0.7:0.9", when="@0.3", type=("build", "run")) - depends_on("py-torchmetrics@0.7:0.8", when="@0.2.1", type=("build", "run")) - depends_on("py-torchmetrics@0.7", when="@:0.2.0", type=("build", "run")) - depends_on("py-torchvision@0.13:0.15", when="@0.4.1:", type=("build", "run")) - depends_on("py-torchvision@0.13:0.14", when="@0.4.0", type=("build", "run")) - depends_on("py-torchvision@0.10:0.13", when="@0.3", type=("build", "run")) - depends_on("py-torchvision@0.10:0.12", when="@0.2", type=("build", "run")) - depends_on("py-torchvision@0.3:0.12", when="@0.1", type=("build", "run")) + depends_on("py-lightly@1.4.4:", when="@0.5:", type=("build", "run")) + depends_on("py-lightning@2:", when="@0.5:", type=("build", "run")) + depends_on("py-lightning@1.8:", when="@0.4.1:", type=("build", "run")) + depends_on("py-matplotlib@3.3.3:", when="@0.5:", type=("build", "run")) + depends_on("py-matplotlib@3.3:", type=("build", "run")) + depends_on("py-numpy@1.19.3:", when="@0.5:", type=("build", "run")) + depends_on("py-numpy@1.17.2:", type=("build", "run")) + depends_on("py-pandas@1.1.3:", when="@0.5:", type=("build", "run")) + depends_on("pil@8:", when="@0.5:", type=("build", "run")) + depends_on("pil@6.2:", type=("build", "run")) + # JPEG, TIFF, and compressed PNG support required for file I/O in several datasets. + depends_on("pil+jpeg+tiff+zlib", type=("build", "run")) + depends_on("py-pyproj@3:", when="@0.5:", type=("build", "run")) + depends_on("py-pyproj@2.2:", type=("build", "run")) + depends_on("py-rasterio@1.2:", when="@0.5:", type=("build", "run")) + depends_on("py-rasterio@1.0.20:", when="@0.3:", type=("build", "run")) + depends_on("py-rasterio@1.0.16:", type=("build", "run")) + depends_on("py-rtree@1:", when="@0.3:", type=("build", "run")) + depends_on("py-rtree@0.9.4:", when="@0.2.1:", type=("build", "run")) + depends_on("py-rtree@0.5:", type=("build", "run")) + depends_on("py-segmentation-models-pytorch@0.2:", type=("build", "run")) + depends_on("py-shapely@1.7.1:", when="@0.5:", type=("build", "run")) + depends_on("py-shapely@1.3:", type=("build", "run")) + depends_on("py-timm@0.4.12:", type=("build", "run")) + depends_on("py-torch@1.12:", when="@0.4:", type=("build", "run")) + depends_on("py-torch@1.9:", when="@0.2:", type=("build", "run")) + depends_on("py-torch@1.7:", type=("build", "run")) + depends_on("py-torchmetrics@0.10:", when="@0.4:", type=("build", "run")) + depends_on("py-torchmetrics@0.7:", type=("build", "run")) + depends_on("py-torchvision@0.13:", when="@0.4:", type=("build", "run")) + depends_on("py-torchvision@0.10:", when="@0.2:", type=("build", "run")) + depends_on("py-torchvision@0.3:", type=("build", "run")) # Optional dependencies with when("+datasets"): - depends_on("py-h5py@2.6:3", type="run") - depends_on("py-laspy@2", when="@0.2:", type="run") + # GDAL and libtiff are both dependencies of rasterio. + # Sentinel 2 dataset requires OpenJPEG to read .jp2 files. depends_on("gdal+openjpeg", when="@0.3.1:", type="run") - depends_on("libtiff+jpeg+zlib", type="run") - depends_on("open3d@0.11.2:0.14+python", when="@0.2:0.3", type="run") - depends_on("opencv@3.4.2.17:4+python3+imgcodecs+tiff+jpeg+png", type="run") - depends_on("py-pandas@0.23.2:2", when="@0.4.1:", type="run") - depends_on("py-pandas@0.23.2:1", when="@0.3:0.4.0", type="run") - depends_on("py-pandas@0.19.1:1", when="@0.2", type="run") - depends_on("py-pycocotools@2", type="run") - depends_on("py-pyvista@0.20:0.38", when="@0.4.1:", type="run") - depends_on("py-pyvista@0.20:0.37", when="@0.4.0", type="run") - depends_on("py-radiant-mlhub@0.3:0.5", when="@0.4.1:", type="run") + # JPEG required for GDAL to read JPEG files + # LIBDEFLATE, ZLIB, and ZSTD required for compressed file I/O. + depends_on("libtiff+jpeg+libdeflate+zlib+zstd", type="run") + depends_on("py-h5py@3:", when="@0.5:", type="run") + depends_on("py-h5py@2.6:", type="run") + depends_on("py-laspy@2:", when="@0.2:", type="run") + depends_on("opencv@4.4.0.46:", when="@0.5:", type="run") + depends_on("opencv@3.4.2.17:", type="run") + # LandCover.ai dataset requires ability to read .tif and write .jpg and .png files. + # Doing this from Python requires both imgcodecs and Python bindings. + depends_on("opencv+imgcodecs+jpeg+png+python3+tiff", type="run") + depends_on("py-pycocotools@2.0.5:", when="@0.5:", type="run") + depends_on("py-pycocotools@2:", type="run") + depends_on("py-pyvista@0.34.2:", when="@0.5:", type="run") + depends_on("py-pyvista@0.20:", when="@0.4:", type="run") + depends_on("py-radiant-mlhub@0.3:", when="@0.4.1:", type="run") depends_on("py-radiant-mlhub@0.2.1:0.4", when="@:0.4.0", type="run") - depends_on("py-rarfile@3:4", type="run") - depends_on("py-scikit-image@0.18:0.20", when="@0.4.1:", type="run") - depends_on("py-scikit-image@0.18:0.19", when="@0.4.0", type="run") - depends_on("py-scipy@1.6.2:1", when="@0.4:", type="run") - depends_on("py-scipy@1.2:1", when="@0.3", type="run") - depends_on("py-scipy@0.9:1", when="@:0.2", type="run") - depends_on("py-zipfile-deflate64@0.2", when="@0.2.1:", type="run") + depends_on("py-rarfile@4:", when="@0.5:", type="run") + depends_on("py-rarfile@3:", type="run") + depends_on("py-scikit-image@0.18:", when="@0.4:", type="run") + depends_on("py-scipy@1.6.2:", when="@0.4:", type="run") + depends_on("py-scipy@1.2:", when="@0.3:", type="run") + depends_on("py-scipy@0.9:", type="run") + depends_on("py-zipfile-deflate64@0.2:", when="@0.2.1:", type="run") with when("+docs"): - depends_on("py-ipywidgets@7:8", when="@0.3.1:", type="run") - depends_on("py-ipywidgets@7", when="@:0.3.0", type="run") - depends_on("py-nbsphinx@0.8.5:0.9", when="@0.4.1:", type="run") - depends_on("py-nbsphinx@0.8.5:0.8", when="@:0.4.0", type="run") + depends_on("py-ipywidgets@7:", type="run") + depends_on("py-nbsphinx@0.8.5:", type="run") depends_on("py-pytorch-sphinx-theme", type="run") depends_on("py-sphinx@4:5", type="run") with when("+style"): - depends_on("py-black@21.8:23+jupyter", when="@0.4.1:", type="run") - depends_on("py-black@21.8:22+jupyter", when="@0.3:0.4.0", type="run") - depends_on("py-black@21:22", when="@:0.2", type="run") - depends_on("py-flake8@3.8:6", when="@0.4:", type="run") - depends_on("py-flake8@3.8:5", when="@0.3.1", type="run") - depends_on("py-flake8@3.8:4", when="@:0.3.0", type="run") - depends_on("py-isort@5.8:5+colors", type="run") - depends_on("py-pydocstyle@6.1:6+toml", type="run") - depends_on("py-pyupgrade@1.24:3", when="@0.4:", type="run") - depends_on("py-pyupgrade@1.24:2", when="@0.3", type="run") + depends_on("py-black@21.8:+jupyter", when="@0.3:", type="run") + depends_on("py-black@21:", type="run") + depends_on("py-flake8@3.8:", type="run") + depends_on("py-isort@5.8:+colors", type="run") + depends_on("py-pydocstyle@6.1:+toml", type="run") + depends_on("py-pyupgrade@2.8:", when="@0.5:", type="run") + depends_on("py-pyupgrade@1.24:", when="@0.3:", type="run") with when("+tests"): - depends_on("py-mypy@0.900:1", when="@0.4.1:", type="run") - depends_on("py-mypy@0.900:0.991", when="@0.4.0", type="run") - depends_on("py-mypy@0.900:0.971", when="@0.3.1", type="run") - depends_on("py-mypy@0.900:0.961", when="@:0.3.0", type="run") - depends_on("py-nbmake@1.3.3:1", when="@0.4.1:", type="run") - depends_on("py-nbmake@0.1:1", when="@0.3.1:0.4.0", type="run") + depends_on("py-mypy@0.900:", type="run") + depends_on("py-nbmake@1.3.3:", when="@0.4.1:", type="run") + depends_on("py-nbmake@0.1:", when="@0.3.1:", type="run") depends_on("py-nbmake@0.1:1.1", when="@:0.3.0", type="run") - depends_on("py-omegaconf@2.1:2", when="@0.4.1:", type="run") - depends_on("py-pytest@6.1.2:7", type="run") - depends_on("py-pytest-cov@2.4:4", when="@0.4:", type="run") - depends_on("py-pytest-cov@2.4:3", when="@:0.3", type="run") - depends_on("py-tensorboard@2.9.1:2", when="@0.4.1:", type="run") + depends_on("py-pytest@6.2:", when="@0.5:", type="run") + depends_on("py-pytest@6.1.2:", type="run") + depends_on("py-pytest-cov@2.4:", type="run") + + # Historical dependencies + depends_on("py-omegaconf@2.1:", when="@:0.4.0", type=("build", "run")) + depends_on("py-packaging@17:", when="@0.3", type=("build", "run")) + depends_on("py-pytorch-lightning@1.5.1:", when="@0.3.1:0.4.0", type=("build", "run")) + # https://github.com/microsoft/torchgeo/pull/697 + depends_on("py-pytorch-lightning@1.5.1:1.8", when="@0.3.0", type=("build", "run")) + depends_on("py-pytorch-lightning@1.3:1.8", when="@:0.2", type=("build", "run")) + depends_on("py-scikit-learn@0.21:", when="@0.3:0.4", type=("build", "run")) + depends_on("py-scikit-learn@0.18:", when="@:0.2", type=("build", "run")) + depends_on("open3d@0.11.2:+python", when="@0.2:0.3+datasets", type="run") + # https://github.com/microsoft/torchgeo/pull/1537 + depends_on("py-pandas@0.23.2:2.0", when="@0.3:0.4+datasets", type="run") + depends_on("py-pandas@0.19.1:2.0", when="@0.2+datasets", type="run") + depends_on("py-omegaconf@2.1:", when="@0.4.1+tests", type="run") + depends_on("py-tensorboard@2.9.1:", when="@0.4.1+tests", type="run") From bb03a1768b317607204ae05e66485ce7f7398a6f Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:27:13 -0700 Subject: [PATCH 024/806] Add AdditiveFOAM package (#39295) * Add AdditiveFOAM package * Add AdditiveFOAM build and install Co-authored-by: kjrstory Co-authored-by: Knapp, Gerry --------- Co-authored-by: kjrstory Co-authored-by: Knapp, Gerry --- .../packages/additivefoam/assets/Allwmake | 4 ++ .../additivefoam/assets/applications/Allwmake | 5 ++ .../builtin/packages/additivefoam/package.py | 59 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100755 var/spack/repos/builtin/packages/additivefoam/assets/Allwmake create mode 100755 var/spack/repos/builtin/packages/additivefoam/assets/applications/Allwmake create mode 100644 var/spack/repos/builtin/packages/additivefoam/package.py diff --git a/var/spack/repos/builtin/packages/additivefoam/assets/Allwmake b/var/spack/repos/builtin/packages/additivefoam/assets/Allwmake new file mode 100755 index 00000000000000..e0aa5c6b87a127 --- /dev/null +++ b/var/spack/repos/builtin/packages/additivefoam/assets/Allwmake @@ -0,0 +1,4 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +applications/Allwmake $targetType $* diff --git a/var/spack/repos/builtin/packages/additivefoam/assets/applications/Allwmake b/var/spack/repos/builtin/packages/additivefoam/assets/applications/Allwmake new file mode 100755 index 00000000000000..c0edc3142b8d10 --- /dev/null +++ b/var/spack/repos/builtin/packages/additivefoam/assets/applications/Allwmake @@ -0,0 +1,5 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +wmake libso solvers/additiveFoam/movingHeatSource +wmake solvers/additiveFoam diff --git a/var/spack/repos/builtin/packages/additivefoam/package.py b/var/spack/repos/builtin/packages/additivefoam/package.py new file mode 100644 index 00000000000000..3141c4b6ee8a8b --- /dev/null +++ b/var/spack/repos/builtin/packages/additivefoam/package.py @@ -0,0 +1,59 @@ +# Copyright 2013-2023 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) + +import os + +from spack.package import * +from spack.pkg.builtin.openfoam import add_extra_files + + +class Additivefoam(Package): + """AdditiveFOAM is a heat and mass transfer software for Additive Manufacturing (AM)""" + + homepage = "https://github.com/ORNL/AdditiveFOAM" + git = "https://github.com/ORNL/AdditiveFOAM.git" + url = "https://github.com/ORNL/AdditiveFOAM/archive/1.0.0.tar.gz" + + maintainers("streeve", "colemanjs", "gknapp1") + + tags = ["ecp"] + + version("main", branch="main") + version("1.0.0", sha256="abbdf1b0230cd2f26f526be76e973f508978611f404fe8ec4ecdd7d5df88724c") + + depends_on("openfoam-org@10") + + common = ["spack-derived-Allwmake"] + assets = ["applications/Allwmake", "Allwmake"] + + build_script = "./spack-derived-Allwmake" + + phases = ["configure", "build", "install"] + + def patch(self): + add_extra_files(self, self.common, self.assets) + + def configure(self, spec, prefix): + pass + + def build(self, spec, prefix): + """Build with Allwmake script, wrapped to source environment first.""" + args = [] + if self.parallel: # Parallel build? - pass via environment + os.environ["WM_NCOMPPROCS"] = str(make_jobs) + builder = Executable(self.build_script) + builder(*args) + + def install(self, spec, prefix): + """Install under the prefix directory""" + + for f in ["README.md", "LICENSE"]: + if os.path.isfile(f): + install(f, join_path(self.prefix, f)) + + dirs = ["tutorials", "applications"] + for d in dirs: + if os.path.isdir(d): + install_tree(d, join_path(self.prefix, d), symlinks=True) From 06057d6dbac34a1f775f6cab1ab88ee8e145087f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 3 Oct 2023 09:56:18 +0200 Subject: [PATCH 025/806] Buildcache tarballs with rootfs structure (#39341) Two changes in this PR: 1. Register absolute paths in tarballs, which makes it easier to use them as container image layers, or rootfs in general, outside of Spack. Spack supports this already on develop. 2. Assemble the tarfile entries "by hand", which has a few advantages: 1. Avoid reading `/etc/passwd`, `/etc/groups`, `/etc/nsswitch.conf` which `tar.add(dir)` does _for each file it adds_ 2. Reduce the number of stat calls per file added by a factor two, compared to `tar.add`, which should help with slow, shared filesystems where these calls are expensive 4. Create normalized `TarInfo` entries from the start, instead of letting Python create them and patching them after the fact 5. Don't recurse into subdirs before processing files, to avoid keeping nested directories opened. (this changes the tar entry order slightly, it's like sorting by `(not is_dir, name)`. --- lib/spack/spack/binary_distribution.py | 143 ++++++++++++++++--------- lib/spack/spack/test/bindist.py | 92 ++++++++++++---- 2 files changed, 162 insertions(+), 73 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 90cd577fe8070e..a9b1d6280b7f27 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -23,7 +23,7 @@ import warnings from contextlib import closing, contextmanager from gzip import GzipFile -from typing import List, NamedTuple, Optional, Union +from typing import Dict, List, NamedTuple, Optional, Tuple, Union from urllib.error import HTTPError, URLError import llnl.util.filesystem as fsys @@ -625,8 +625,7 @@ def buildinfo_file_name(prefix): """ Filename of the binary package meta-data file """ - name = os.path.join(prefix, ".spack/binary_distribution") - return name + return os.path.join(prefix, ".spack/binary_distribution") def read_buildinfo_file(prefix): @@ -1158,57 +1157,99 @@ def gzip_compressed_tarfile(path): yield tar -def deterministic_tarinfo(tarinfo: tarfile.TarInfo): - # We only add files, symlinks, hardlinks, and directories - # No character devices, block devices and FIFOs should ever enter a tarball. - if tarinfo.isdev(): - return None +def _tarinfo_name(p: str): + return p.lstrip("/") - # For distribution, it makes no sense to user/group data; since (a) they don't exist - # on other machines, and (b) they lead to surprises as `tar x` run as root will change - # ownership if it can. We want to extract as the current user. By setting owner to root, - # root will extract as root, and non-privileged user will extract as themselves. - tarinfo.uid = 0 - tarinfo.gid = 0 - tarinfo.uname = "" - tarinfo.gname = "" - - # Reset mtime to epoch time, our prefixes are not truly immutable, so files may get - # touched; as long as the content does not change, this ensures we get stable tarballs. - tarinfo.mtime = 0 - - # Normalize mode - if tarinfo.isfile() or tarinfo.islnk(): - # If user can execute, use 0o755; else 0o644 - # This is to avoid potentially unsafe world writable & exeutable files that may get - # extracted when Python or tar is run with privileges - tarinfo.mode = 0o644 if tarinfo.mode & 0o100 == 0 else 0o755 - else: # symbolic link and directories - tarinfo.mode = 0o755 - - return tarinfo - - -def tar_add_metadata(tar: tarfile.TarFile, path: str, data: dict): - # Serialize buildinfo for the tarball - bstring = syaml.dump(data, default_flow_style=True).encode("utf-8") - tarinfo = tarfile.TarInfo(name=path) - tarinfo.size = len(bstring) - tar.addfile(deterministic_tarinfo(tarinfo), io.BytesIO(bstring)) - - -def deterministic_tarinfo_without_buildinfo(tarinfo: tarfile.TarInfo): - """Skip buildinfo file when creating a tarball, and normalize other tarinfo fields.""" - if tarinfo.name.endswith("/.spack/binary_distribution"): - return None - return deterministic_tarinfo(tarinfo) +def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None: + """Create a tarfile of an install prefix of a spec. Skips existing buildinfo file. + Only adds regular files, symlinks and dirs. Skips devices, fifos. Preserves hardlinks. + Normalizes permissions like git. Tar entries are added in depth-first pre-order, with + dir entries partitioned by file | dir, and sorted alphabetically, for reproducibility. + Partitioning ensures only one dir is in memory at a time, and sorting improves compression. + + Args: + tar: tarfile object to add files to + prefix: absolute install prefix of spec""" + if not os.path.isabs(prefix) or not os.path.isdir(prefix): + raise ValueError(f"prefix '{prefix}' must be an absolute path to a directory") + hardlink_to_tarinfo_name: Dict[Tuple[int, int], str] = dict() + stat_key = lambda stat: (stat.st_dev, stat.st_ino) + + try: # skip buildinfo file if it exists + files_to_skip = [stat_key(os.lstat(buildinfo_file_name(prefix)))] + except OSError: + files_to_skip = [] + + dir_stack = [prefix] + while dir_stack: + dir = dir_stack.pop() + + # Add the dir before its contents + dir_info = tarfile.TarInfo(_tarinfo_name(dir)) + dir_info.type = tarfile.DIRTYPE + dir_info.mode = 0o755 + tar.addfile(dir_info) + + # Sort by name: reproducible & improves compression + with os.scandir(dir) as it: + entries = sorted(it, key=lambda entry: entry.name) + + new_dirs = [] + for entry in entries: + if entry.is_dir(follow_symlinks=False): + new_dirs.append(entry.path) + continue + + file_info = tarfile.TarInfo(_tarinfo_name(entry.path)) + + s = entry.stat(follow_symlinks=False) + + # Skip existing binary distribution files. + id = stat_key(s) + if id in files_to_skip: + continue + + # Normalize the mode + file_info.mode = 0o644 if s.st_mode & 0o100 == 0 else 0o755 + + if entry.is_symlink(): + file_info.type = tarfile.SYMTYPE + file_info.linkname = os.readlink(entry.path) + tar.addfile(file_info) + + elif entry.is_file(follow_symlinks=False): + # Deduplicate hardlinks + if s.st_nlink > 1: + if id in hardlink_to_tarinfo_name: + file_info.type = tarfile.LNKTYPE + file_info.linkname = hardlink_to_tarinfo_name[id] + tar.addfile(file_info) + continue + hardlink_to_tarinfo_name[id] = file_info.name + + # If file not yet seen, copy it. + file_info.type = tarfile.REGTYPE + file_info.size = s.st_size + with open(entry.path, "rb") as f: + tar.addfile(file_info, f) -def _do_create_tarball(tarfile_path: str, binaries_dir: str, pkg_dir: str, buildinfo: dict): + dir_stack.extend(reversed(new_dirs)) # we pop, so reverse to stay alphabetical + + +def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict): with gzip_compressed_tarfile(tarfile_path) as tar: - tar.add(name=binaries_dir, arcname=pkg_dir, filter=deterministic_tarinfo_without_buildinfo) - tar_add_metadata(tar, buildinfo_file_name(pkg_dir), buildinfo) + # Tarball the install prefix + tarfile_of_spec_prefix(tar, binaries_dir) + + # Serialize buildinfo for the tarball + bstring = syaml.dump(buildinfo, default_flow_style=True).encode("utf-8") + tarinfo = tarfile.TarInfo(name=_tarinfo_name(buildinfo_file_name(binaries_dir))) + tarinfo.type = tarfile.REGTYPE + tarinfo.size = len(bstring) + tarinfo.mode = 0o644 + tar.addfile(tarinfo, io.BytesIO(bstring)) class PushOptions(NamedTuple): @@ -1280,14 +1321,12 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option ): raise NoOverwriteException(url_util.format(remote_specfile_path)) - pkg_dir = os.path.basename(spec.prefix.rstrip(os.path.sep)) - binaries_dir = spec.prefix # create info for later relocation and create tar buildinfo = get_buildinfo_dict(spec) - _do_create_tarball(tarfile_path, binaries_dir, pkg_dir, buildinfo) + _do_create_tarball(tarfile_path, binaries_dir, buildinfo) # get the sha256 checksum of the tarball checksum = checksum_tarball(tarfile_path) diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index ea065c26a54542..20802bbdd80e91 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -899,22 +899,21 @@ def test_tarball_doesnt_include_buildinfo_twice(tmpdir): tarball = str(tmpdir.join("prefix.tar.gz")) bindist._do_create_tarball( - tarfile_path=tarball, - binaries_dir=str(p), - pkg_dir="my-pkg-prefix", - buildinfo={"metadata": "new"}, + tarfile_path=tarball, binaries_dir=p.strpath, buildinfo={"metadata": "new"} ) + expected_prefix = p.strpath.lstrip("/") + # Verify we don't have a repeated binary_distribution file, # and that the tarball contains the new one, not the old one. with tarfile.open(tarball) as tar: - assert syaml.load(tar.extractfile("my-pkg-prefix/.spack/binary_distribution")) == { + assert syaml.load(tar.extractfile(f"{expected_prefix}/.spack/binary_distribution")) == { "metadata": "new" } assert tar.getnames() == [ - "my-pkg-prefix", - "my-pkg-prefix/.spack", - "my-pkg-prefix/.spack/binary_distribution", + f"{expected_prefix}", + f"{expected_prefix}/.spack", + f"{expected_prefix}/.spack/binary_distribution", ] @@ -935,15 +934,17 @@ def test_reproducible_tarball_is_reproducible(tmpdir): # Create a tarball with a certain mtime of bin/app os.utime(app, times=(0, 0)) - bindist._do_create_tarball(tarball_1, binaries_dir=p, pkg_dir="pkg", buildinfo=buildinfo) + bindist._do_create_tarball(tarball_1, binaries_dir=p.strpath, buildinfo=buildinfo) # Do it another time with different mtime of bin/app os.utime(app, times=(10, 10)) - bindist._do_create_tarball(tarball_2, binaries_dir=p, pkg_dir="pkg", buildinfo=buildinfo) + bindist._do_create_tarball(tarball_2, binaries_dir=p.strpath, buildinfo=buildinfo) # They should be bitwise identical: assert filecmp.cmp(tarball_1, tarball_2, shallow=False) + expected_prefix = p.strpath.lstrip("/") + # Sanity check for contents: with tarfile.open(tarball_1, mode="r") as f: for m in f.getmembers(): @@ -951,11 +952,11 @@ def test_reproducible_tarball_is_reproducible(tmpdir): assert m.uname == m.gname == "" assert set(f.getnames()) == { - "pkg", - "pkg/bin", - "pkg/bin/app", - "pkg/.spack", - "pkg/.spack/binary_distribution", + f"{expected_prefix}", + f"{expected_prefix}/bin", + f"{expected_prefix}/bin/app", + f"{expected_prefix}/.spack", + f"{expected_prefix}/.spack/binary_distribution", } @@ -979,21 +980,23 @@ def test_tarball_normalized_permissions(tmpdir): with open(data, "w", opener=lambda path, flags: os.open(path, flags, 0o477)) as f: f.write("hello world") - bindist._do_create_tarball(tarball, binaries_dir=p, pkg_dir="pkg", buildinfo={}) + bindist._do_create_tarball(tarball, binaries_dir=p.strpath, buildinfo={}) + + expected_prefix = p.strpath.lstrip("/") with tarfile.open(tarball) as tar: path_to_member = {member.name: member for member in tar.getmembers()} # directories should have 0o755 - assert path_to_member["pkg"].mode == 0o755 - assert path_to_member["pkg/bin"].mode == 0o755 - assert path_to_member["pkg/.spack"].mode == 0o755 + assert path_to_member[f"{expected_prefix}"].mode == 0o755 + assert path_to_member[f"{expected_prefix}/bin"].mode == 0o755 + assert path_to_member[f"{expected_prefix}/.spack"].mode == 0o755 # executable-by-user files should be 0o755 - assert path_to_member["pkg/bin/app"].mode == 0o755 + assert path_to_member[f"{expected_prefix}/bin/app"].mode == 0o755 # not-executable-by-user files should be 0o644 - assert path_to_member["pkg/share/file"].mode == 0o644 + assert path_to_member[f"{expected_prefix}/share/file"].mode == 0o644 def test_tarball_common_prefix(dummy_prefix, tmpdir): @@ -1062,3 +1065,50 @@ def test_tarfile_with_files_outside_common_prefix(tmpdir, dummy_prefix): ValueError, match="Tarball contains file /etc/config_file outside of prefix" ): bindist._ensure_common_prefix(tarfile.open("broken.tar", mode="r")) + + +def test_tarfile_of_spec_prefix(tmpdir): + """Tests whether hardlinks, symlinks, files and dirs are added correctly, + and that the order of entries is correct.""" + prefix = tmpdir.mkdir("prefix") + prefix.ensure("a_directory", dir=True).join("file").write("hello") + prefix.ensure("c_directory", dir=True).join("file").write("hello") + prefix.ensure("b_directory", dir=True).join("file").write("hello") + prefix.join("file").write("hello") + os.symlink(prefix.join("file"), prefix.join("symlink")) + os.link(prefix.join("file"), prefix.join("hardlink")) + + file = tmpdir.join("example.tar") + + with tarfile.open(file, mode="w") as tar: + bindist.tarfile_of_spec_prefix(tar, prefix.strpath) + + expected_prefix = prefix.strpath.lstrip("/") + + with tarfile.open(file, mode="r") as tar: + # Verify that entries are added in depth-first pre-order, files preceding dirs, + # entries ordered alphabetically + assert tar.getnames() == [ + f"{expected_prefix}", + f"{expected_prefix}/file", + f"{expected_prefix}/hardlink", + f"{expected_prefix}/symlink", + f"{expected_prefix}/a_directory", + f"{expected_prefix}/a_directory/file", + f"{expected_prefix}/b_directory", + f"{expected_prefix}/b_directory/file", + f"{expected_prefix}/c_directory", + f"{expected_prefix}/c_directory/file", + ] + + # Check that the types are all correct + assert tar.getmember(f"{expected_prefix}").isdir() + assert tar.getmember(f"{expected_prefix}/file").isreg() + assert tar.getmember(f"{expected_prefix}/hardlink").islnk() + assert tar.getmember(f"{expected_prefix}/symlink").issym() + assert tar.getmember(f"{expected_prefix}/a_directory").isdir() + assert tar.getmember(f"{expected_prefix}/a_directory/file").isreg() + assert tar.getmember(f"{expected_prefix}/b_directory").isdir() + assert tar.getmember(f"{expected_prefix}/b_directory/file").isreg() + assert tar.getmember(f"{expected_prefix}/c_directory").isdir() + assert tar.getmember(f"{expected_prefix}/c_directory/file").isreg() From 4b06862a7f3fee9352cd4834b4de7cb400cd4aa1 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 3 Oct 2023 11:06:36 +0200 Subject: [PATCH 026/806] Deactivate Cray sles, due to unavailable runner (#40291) This reverts commit 027409120408eb4d41d8bdd82a13c34b3ac7fea9. --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index a9a9fee13c073f..d7f8a38ef633d6 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -827,16 +827,16 @@ e4s-cray-rhel-build: variables: SPACK_CI_STACK_NAME: e4s-cray-sles -e4s-cray-sles-generate: - extends: [ ".generate-cray-sles", ".e4s-cray-sles" ] +# e4s-cray-sles-generate: +# extends: [ ".generate-cray-sles", ".e4s-cray-sles" ] -e4s-cray-sles-build: - extends: [ ".build", ".e4s-cray-sles" ] - trigger: - include: - - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - job: e4s-cray-sles-generate - strategy: depend - needs: - - artifacts: True - job: e4s-cray-sles-generate +# e4s-cray-sles-build: +# extends: [ ".build", ".e4s-cray-sles" ] +# trigger: +# include: +# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml +# job: e4s-cray-sles-generate +# strategy: depend +# needs: +# - artifacts: True +# job: e4s-cray-sles-generate From f2230100ac9d5d1438e0c0e48a9262fb5df9be66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:27:36 +0200 Subject: [PATCH 027/806] build(deps): bump urllib3 from 2.0.5 to 2.0.6 in /lib/spack/docs (#40286) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.5 to 2.0.6. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/v2.0.5...2.0.6) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 63951372ad428f..65b6386a8264f5 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -5,7 +5,7 @@ sphinx-rtd-theme==1.3.0 python-levenshtein==0.21.1 docutils==0.18.1 pygments==2.16.1 -urllib3==2.0.5 +urllib3==2.0.6 pytest==7.4.2 isort==5.12.0 black==23.9.1 From b7cb3462d499e29b2c760d20fedda76ca020a15a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:28:02 +0200 Subject: [PATCH 028/806] build(deps): bump actions/setup-python from 4.7.0 to 4.7.1 (#40287) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.0 to 4.7.1. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/61a6322f88396a6271a6ee3565807d608ecaddd1...65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/audit.yaml | 2 +- .github/workflows/nightly-win-builds.yml | 2 +- .github/workflows/unit_tests.yaml | 8 ++++---- .github/workflows/valid-style.yml | 4 ++-- .github/workflows/windows_python.yml | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 3d8e1f10ae9057..f5eddeca128646 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -23,7 +23,7 @@ jobs: operating_system: ["ubuntu-latest", "macos-latest"] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # @v2 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 with: python-version: ${{inputs.python_version}} - name: Install Python packages diff --git a/.github/workflows/nightly-win-builds.yml b/.github/workflows/nightly-win-builds.yml index c8148adb2d1acd..682ecc4b8384ab 100644 --- a/.github/workflows/nightly-win-builds.yml +++ b/.github/workflows/nightly-win-builds.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: 3.9 - name: Install Python packages diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 374847bd74f09f..e82531677dfc1d 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -50,7 +50,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # @v2 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 with: python-version: ${{ matrix.python-version }} - name: Install System packages @@ -97,7 +97,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # @v2 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 with: python-version: '3.11' - name: Install System packages @@ -155,7 +155,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # @v2 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 with: python-version: '3.11' - name: Install System packages @@ -190,7 +190,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # @v2 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 with: python-version: ${{ matrix.python-version }} - name: Install Python packages diff --git a/.github/workflows/valid-style.yml b/.github/workflows/valid-style.yml index ac2c22b0675d1d..2f93c627685e05 100644 --- a/.github/workflows/valid-style.yml +++ b/.github/workflows/valid-style.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: '3.11' cache: 'pip' @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: '3.11' cache: 'pip' diff --git a/.github/workflows/windows_python.yml b/.github/workflows/windows_python.yml index cdb15e833b747e..9a99a6ef976516 100644 --- a/.github/workflows/windows_python.yml +++ b/.github/workflows/windows_python.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: 3.9 - name: Install Python packages @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: 3.9 - name: Install Python packages @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: 3.9 - name: Install Python packages From 7a390f503d377bd56465e697ea7bccd23e551cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Tue, 3 Oct 2023 12:42:46 +0200 Subject: [PATCH 029/806] [add] py-metomi-isodatetime: new recipe, required by py-cylc-flow (#39990) * [add] py-metomi-isodatetime: new recipe, required by py-cylc-flow * py-metomi-isodatetime: use sources from pypi instead of github --- .../packages/py-metomi-isodatetime/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py diff --git a/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py b/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py new file mode 100644 index 00000000000000..feaa89161827dd --- /dev/null +++ b/var/spack/repos/builtin/packages/py-metomi-isodatetime/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyMetomiIsodatetime(PythonPackage): + """Python ISO 8601 date time parser and data model/manipulation utilities.""" + + homepage = "https://github.com/metomi/isodatetime" + pypi = "metomi-isodatetime/metomi-isodatetime-1!3.0.0.tar.gz" + + maintainers("LydDeb") + + version("3.0.0", sha256="2141e8aaa526ea7f7f1cb883e6c8ed83ffdab73269658d84d0624f63a6e1357e") + + depends_on("py-setuptools", type="build") From b480ae2b7d4325471e3826d802e5ae45c26152dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Tue, 3 Oct 2023 12:45:06 +0200 Subject: [PATCH 030/806] [add] py-graphql-relay: new package (#39807) * [add] py-graphql-relay: new package * py-graphql-relay: Update package.py Remove leftovers from version 3.2.0: * archive name in pypi * dependencies * [fix] py-graphql-relay: remove constraint on python version; add dependence py-rx because of ModuleNotFoundError during spack test * [fix] py-graphql-relay: remove py-rx dependence; py-graphql-core: add dependencies for version 2.3.2 * py-graphql-core: Update from review; set build backend, py-poetry for version 3: and py-setuptools for version 2 Co-authored-by: Adam J. Stewart --------- Co-authored-by: Adam J. Stewart --- .../packages/py-graphql-core/package.py | 6 ++++- .../packages/py-graphql-relay/package.py | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/py-graphql-relay/package.py diff --git a/var/spack/repos/builtin/packages/py-graphql-core/package.py b/var/spack/repos/builtin/packages/py-graphql-core/package.py index a9cb29523751c8..492444f5ccc429 100644 --- a/var/spack/repos/builtin/packages/py-graphql-core/package.py +++ b/var/spack/repos/builtin/packages/py-graphql-core/package.py @@ -20,4 +20,8 @@ class PyGraphqlCore(PythonPackage): version("2.3.2", sha256="aac46a9ac524c9855910c14c48fc5d60474def7f99fd10245e76608eba7af746") depends_on("python@3.6:3", type=("build", "run")) - depends_on("py-setuptools", type="build") + depends_on("py-poetry@1", when="@3:", type="build") + depends_on("py-setuptools", when="@2", type="build") + depends_on("py-six@1.10.0:", type=("build", "run"), when="@2.3.2") + depends_on("py-promise@2.3:2", type=("build", "run"), when="@2.3.2") + depends_on("py-rx@1.6:1", type=("build", "run"), when="@2.3.2") diff --git a/var/spack/repos/builtin/packages/py-graphql-relay/package.py b/var/spack/repos/builtin/packages/py-graphql-relay/package.py new file mode 100644 index 00000000000000..67aaa8d25a2c6a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-graphql-relay/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 PyGraphqlRelay(PythonPackage): + """Relay library for graphql-core.""" + + homepage = "https://github.com/graphql-python/graphql-relay-py" + pypi = "graphql-relay/graphql-relay-2.0.1.tar.gz" + + maintainers("LydDeb") + + version("2.0.1", sha256="870b6b5304123a38a0b215a79eace021acce5a466bf40cd39fa18cb8528afabb") + + depends_on("py-setuptools", type="build") + depends_on("py-graphql-core@2.2:2", type=("build", "run"), when="@2") + depends_on("py-six@1.12:", type=("build", "run"), when="@2") + depends_on("py-promise@2.2:2", type=("build", "run"), when="@2") From 071c1c38dcb85e26eccc31f1d85ff2e3b91b8cd1 Mon Sep 17 00:00:00 2001 From: Stephen Hudson Date: Tue, 3 Oct 2023 05:48:17 -0500 Subject: [PATCH 031/806] py-libEnsemble: add v1.0.0 (#40203) * py-libEnsemble: add v1.0.0 * Add version ranges for deps * Add comments to variants * Put when before type * Fix line lengths * Re-format * Update var/spack/repos/builtin/packages/py-libensemble/package.py Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * Update var/spack/repos/builtin/packages/py-libensemble/package.py Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --------- Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --- .../packages/py-libensemble/package.py | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py index 19a53d6520e8ba..d47a3d68fb932e 100644 --- a/var/spack/repos/builtin/packages/py-libensemble/package.py +++ b/var/spack/repos/builtin/packages/py-libensemble/package.py @@ -12,13 +12,14 @@ class PyLibensemble(PythonPackage): """Library for managing ensemble-like collections of computations.""" homepage = "https://libensemble.readthedocs.io" - pypi = "libensemble/libensemble-0.10.2.tar.gz" + pypi = "libensemble/libensemble-1.0.0.tar.gz" git = "https://github.com/Libensemble/libensemble.git" maintainers("shuds13", "jlnav") tags = ["e4s"] version("develop", branch="develop") + version("1.0.0", sha256="b164e044f16f15b68fd565684ad8ce876c93aaeb84e5078f4ea2a29684b110ca") version("0.10.2", sha256="ef8dfe5d233dcae2636a3d6aa38f3c2ad0f42c65bd38f664e99b3e63b9f86622") version("0.10.1", sha256="56ae42ec9a28d3df8f46bdf7d016db9526200e9df2a28d849902e3c44fe5c1ba") version("0.10.0", sha256="f800f38d02def526f1d2a325710d01fdd3637cd1e33a9a083a3cf4a7f419a726") @@ -40,7 +41,9 @@ class PyLibensemble(PythonPackage): version("0.2.0", sha256="ecac7275d4d0f4a5e497e5c9ef2cd998da82b2c020a0fb87546eeea262f495ff") version("0.1.0", sha256="0b27c59ae80f7af8b1bee92fcf2eb6c9a8fd3494bf2eb6b3ea17a7c03d3726bb") - variant("mpi", default=True, description="Install with MPI") + variant("mpi", default=True, description="Install with MPI") # Optional communications method + + # The following variants are for optional built-in generators variant("scipy", default=False, description="Install with scipy") variant("petsc4py", default=False, description="Install with petsc4py") variant("nlopt", default=False, description="Install with nlopt") @@ -48,24 +51,28 @@ class PyLibensemble(PythonPackage): variant("deap", default=False, description="Install with DEAP") variant("tasmanian", default=False, description="Install with tasmanian") + depends_on("py-numpy@1.21:", when="@1:", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) - depends_on("py-psutil", type=("build", "run"), when="@0.7.1:") + depends_on("py-psutil@5.9.4:", when="@1:", type=("build", "run")) + depends_on("py-psutil", when="@0.7.1:", type=("build", "run")) depends_on("py-setuptools", when="@0.10.2:", type="build") depends_on("py-setuptools", when="@:0.10.1", type=("build", "run")) - depends_on("py-pydantic@:2", type=("build", "run"), when="@0.10:") - depends_on("py-tomli", type=("build", "run"), when="@0.10:") - depends_on("py-pyyaml", type=("build", "run"), when="@0.10:") + depends_on("py-pydantic@:1", when="@0.10:", type=("build", "run")) + depends_on("py-tomli@1.2.1:", when="@1:", type=("build", "run")) + depends_on("py-tomli", when="@0.10:", type=("build", "run")) + depends_on("py-pyyaml@6.0:", when="@1:", type=("build", "run")) + depends_on("py-pyyaml", when="@0.10:", type=("build", "run")) depends_on("mpi", when="@:0.4.1") depends_on("mpi", when="+mpi") - depends_on("py-mpi4py@2.0:", type=("build", "run"), when="@:0.4.1") - depends_on("py-mpi4py@2.0:", type=("build", "run"), when="+mpi") - depends_on("py-scipy", type=("build", "run"), when="+scipy") - depends_on("py-petsc4py", type=("build", "run"), when="+petsc4py") - depends_on("py-petsc4py@main", type=("build", "run"), when="@develop+petsc4py") - depends_on("nlopt", type=("build", "run"), when="+nlopt") - depends_on("py-mpmath", type=("build", "run"), when="+mpmath") - depends_on("py-deap", type=("build", "run"), when="+deap") - depends_on("tasmanian+python", type=("build", "run"), when="+tasmanian") + depends_on("py-mpi4py@2.0:", when="@:0.4.1", type=("build", "run")) + depends_on("py-mpi4py@2.0:", when="+mpi", type=("build", "run")) + depends_on("py-scipy", when="+scipy", type=("build", "run")) + depends_on("py-petsc4py", when="+petsc4py", type=("build", "run")) + depends_on("py-petsc4py@main", when="@develop+petsc4py", type=("build", "run")) + depends_on("nlopt", when="+nlopt", type=("build", "run")) + depends_on("py-mpmath", when="+mpmath", type=("build", "run")) + depends_on("py-deap", when="+deap", type=("build", "run")) + depends_on("tasmanian+python", when="+tasmanian", type=("build", "run")) conflicts("~mpi", when="@:0.4.1") @run_after("install") From 36bb2a5d094392d401aff373a6e432b12fe70d4d Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:55:28 +0200 Subject: [PATCH 032/806] py-wrapt: add 1.15.0 (#40276) --- var/spack/repos/builtin/packages/py-wrapt/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-wrapt/package.py b/var/spack/repos/builtin/packages/py-wrapt/package.py index 2f0b92bf5952ee..8c6266dffe5f32 100644 --- a/var/spack/repos/builtin/packages/py-wrapt/package.py +++ b/var/spack/repos/builtin/packages/py-wrapt/package.py @@ -12,6 +12,7 @@ class PyWrapt(PythonPackage): homepage = "https://github.com/GrahamDumpleton/wrapt" pypi = "wrapt/wrapt-1.11.2.tar.gz" + version("1.15.0", sha256="d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a") version("1.14.1", sha256="380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d") version("1.13.3", sha256="1fea9cd438686e6682271d36f3481a9f3636195578bab9ca3382e2f5f01fc185") version("1.12.1", sha256="b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7") @@ -19,6 +20,4 @@ class PyWrapt(PythonPackage): version("1.11.1", sha256="4aea003270831cceb8a90ff27c4031da6ead7ec1886023b80ce0dfe0adf61533") version("1.10.10", sha256="42160c91b77f1bc64a955890038e02f2f72986c01d462d53cb6cb039b995cdd9") - depends_on("python@2.7:2,3.5:", when="@1.13.1:", type=("build", "run")) - depends_on("python@2.7:2,3.3:", when="@1.13:", type=("build", "run")) depends_on("py-setuptools@38.3:", type="build") From 994544f2088976dfd0a43a421b30826e40b1f659 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:57:27 +0200 Subject: [PATCH 033/806] py-werkzeug: add 2.3.7 and 3.0.0 (#40275) --- .../builtin/packages/py-werkzeug/package.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-werkzeug/package.py b/var/spack/repos/builtin/packages/py-werkzeug/package.py index b4bc4920ed7220..f0e7ca3f551a2a 100644 --- a/var/spack/repos/builtin/packages/py-werkzeug/package.py +++ b/var/spack/repos/builtin/packages/py-werkzeug/package.py @@ -10,9 +10,11 @@ class PyWerkzeug(PythonPackage): """The Swiss Army knife of Python web development""" homepage = "https://palletsprojects.com/p/werkzeug" - pypi = "Werkzeug/Werkzeug-0.16.0.tar.gz" + pypi = "werkzeug/werkzeug-3.0.0.tar.gz" git = "https://github.com/pallets/werkzeug.git" + version("3.0.0", sha256="3ffff4dcc32db52ef3cc94dff3000a3c2846890f3a5a51800a27b909c5e770f0") + version("2.3.7", sha256="2b8c0e447b4b9dbcc85dd97b6eeb4dcbaf6c8b6c3be0bd654e25553e0a2157d8") version("2.3.4", sha256="1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76") version("2.2.2", sha256="7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f") version("2.0.2", sha256="aa2bb6fc8dee8d6c504c0ac1e7f5f7dc5810a9903e793b6f715a9f015bdadb9a") @@ -29,5 +31,16 @@ class PyWerkzeug(PythonPackage): version("0.11.11", sha256="e72c46bc14405cba7a26bd2ce28df734471bc9016bc8b4cb69466c2c14c2f7e5") depends_on("python@3.8:", when="@2.3:", type=("build", "run")) - depends_on("py-setuptools", type="build") + depends_on("py-flit-core@:3", when="@2.3.7:", type="build") depends_on("py-markupsafe@2.1.1:", when="@2.2:", type=("build", "run")) + + # Historical dependencies + depends_on("py-setuptools", when="@:2.3.6", type="build") + + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/source/w/werkzeug/{0}-{1}.tar.gz" + if version >= Version("2.3.7"): + letter = "werkzeug" + else: + letter = "Werkzeug" + return url.format(letter, version) From 0d877b41842458659dd8869c28d46268fb0b2e05 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:58:53 +0200 Subject: [PATCH 034/806] py-websocket-client: add 1.6.3 (#40274) --- .../packages/py-websocket-client/package.py | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-websocket-client/package.py b/var/spack/repos/builtin/packages/py-websocket-client/package.py index 295108f0e45913..09a11e3f49289b 100644 --- a/var/spack/repos/builtin/packages/py-websocket-client/package.py +++ b/var/spack/repos/builtin/packages/py-websocket-client/package.py @@ -13,27 +13,24 @@ class PyWebsocketClient(PythonPackage): homepage = "https://github.com/websocket-client/websocket-client.git" pypi = "websocket-client/websocket-client-0.57.0.tar.gz" + version("1.6.3", sha256="3aad25d31284266bcfcfd1fd8a743f63282305a364b8d0948a43bd606acc652f") version("1.5.1", sha256="3f09e6d8230892547132177f575a4e3e73cfdf06526e20cc02aa1c3b47184d40") version("1.4.1", sha256="f9611eb65c8241a67fb373bef040b3cf8ad377a9f6546a12b620b6511e8ea9ef") version("1.2.1", sha256="8dfb715d8a992f5712fff8c843adae94e22b22a99b2c5e6b0ec4a1a981cc4e0d") - version( - "0.57.0", - sha256="d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010", - url="https://files.pythonhosted.org/packages/source/w/websocket_client/websocket_client-0.57.0.tar.gz", - ) - version( - "0.56.0", - sha256="1fd5520878b68b84b5748bb30e592b10d0a91529d5383f74f4964e72b297fd3a", - url="https://files.pythonhosted.org/packages/source/w/websocket_client/websocket_client-0.56.0.tar.gz", - ) - version( - "0.48.0", - sha256="18f1170e6a1b5463986739d9fd45c4308b0d025c1b2f9b88788d8f69e8a5eb4a", - url="https://files.pythonhosted.org/packages/source/w/websocket_client/websocket_client-0.48.0.tar.gz", - ) - - depends_on("python@2.6:2.8,3.4:", type=("build", "run")) - depends_on("python@3.6:", type=("build", "run"), when="@1.2.1:") - depends_on("python@3.7:", type=("build", "run"), when="@1.4.1:") + version("0.57.0", sha256="d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010") + version("0.56.0", sha256="1fd5520878b68b84b5748bb30e592b10d0a91529d5383f74f4964e72b297fd3a") + version("0.48.0", sha256="18f1170e6a1b5463986739d9fd45c4308b0d025c1b2f9b88788d8f69e8a5eb4a") + + depends_on("python@3.8:", when="@1.6.2:", type=("build", "run")) depends_on("py-setuptools", type="build") + + # Historical dependencies depends_on("py-six", type=("build", "run"), when="@:1.2.0") + + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/source/w/{0}/{0}-{1}.tar.gz" + if version >= Version("0.59.0"): + letter = "websocket-client" + else: + letter = "websocket_client" + return url.format(letter, version) From 487ea8b263c3d29dfec5e4140c7059f1fa7e0a27 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:03:35 +0200 Subject: [PATCH 035/806] py-virtualenv: add 20.24.5 (#40255) * py-virtualenv: add 20.22.0 * py-platformdirs: add 3.5.3 * py-filelock: add 3.12.4 * py-distlib: add 0.3.7 --- .../builtin/packages/py-distlib/package.py | 1 + .../builtin/packages/py-filelock/package.py | 5 ++- .../packages/py-platformdirs/package.py | 3 ++ .../builtin/packages/py-virtualenv/package.py | 42 +++++++++++-------- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-distlib/package.py b/var/spack/repos/builtin/packages/py-distlib/package.py index f4356b532829c2..f0a4c8d6e2a59d 100644 --- a/var/spack/repos/builtin/packages/py-distlib/package.py +++ b/var/spack/repos/builtin/packages/py-distlib/package.py @@ -12,6 +12,7 @@ class PyDistlib(PythonPackage): homepage = "https://bitbucket.org/pypa/distlib" pypi = "distlib/distlib-0.3.6.tar.gz" + version("0.3.7", sha256="9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8") version("0.3.6", sha256="14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46") version("0.3.4", sha256="e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579") version("0.3.3", sha256="d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05") diff --git a/var/spack/repos/builtin/packages/py-filelock/package.py b/var/spack/repos/builtin/packages/py-filelock/package.py index 5feb61cb544cee..be882c5ebc84b0 100644 --- a/var/spack/repos/builtin/packages/py-filelock/package.py +++ b/var/spack/repos/builtin/packages/py-filelock/package.py @@ -16,6 +16,7 @@ class PyFilelock(PythonPackage): homepage = "https://github.com/tox-dev/py-filelock" pypi = "filelock/filelock-3.0.4.tar.gz" + version("3.12.4", sha256="2e6f249f1f3654291606e046b09f1fd5eac39b360664c27f5aad072012f8bcbd") version("3.12.0", sha256="fc03ae43288c013d2ea83c8597001b1129db351aad9c57fe2409327916b8e718") version("3.8.0", sha256="55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc") version("3.5.0", sha256="137b661e657f7850eec9def2a001efadba3414be523b87cd3f9a037372d80a15") @@ -31,11 +32,13 @@ class PyFilelock(PythonPackage): version("2.0.9", sha256="0f91dce339c9f25d6f2e0733a17e4f9a47b139dffda52619a0e61e013e5c6782") version("2.0.8", sha256="7e48e4906de3c9a5d64d8f235eb3ae1050dfefa63fd65eaf318cc915c935212b") - depends_on("python@3.7:", when="@3.4.2:", type=("build", "run")) + depends_on("python@3.8:", when="@3.12.3:", type=("build", "run")) depends_on("py-hatch-vcs@0.3:", when="@3.8:", type="build") + depends_on("py-hatchling@1.18:", when="@3.12.3:", type="build") depends_on("py-hatchling@1.14:", when="@3.8:", type="build") + # Historical dependencies with when("@:3.8.0"): depends_on("py-setuptools@63.4:", when="@3.8:", type="build") depends_on("py-setuptools@41:", when="@3.1:", type="build") diff --git a/var/spack/repos/builtin/packages/py-platformdirs/package.py b/var/spack/repos/builtin/packages/py-platformdirs/package.py index c655d702da2c3b..82929c5c8e8da8 100644 --- a/var/spack/repos/builtin/packages/py-platformdirs/package.py +++ b/var/spack/repos/builtin/packages/py-platformdirs/package.py @@ -14,6 +14,7 @@ class PyPlatformdirs(PythonPackage): homepage = "https://github.com/platformdirs/platformdirs" pypi = "platformdirs/platformdirs-2.4.0.tar.gz" + version("3.10.0", sha256="b45696dab2d7cc691a3226759c0d3b00c47c8b6e293d96f6436f733303f77f6d") version("3.5.3", sha256="e48fabd87db8f3a7df7150a4a5ea22c546ee8bc39bc2473244730d4b56d2cc4e") version("3.5.0", sha256="7954a68d0ba23558d753f73437c55f89027cf8f5108c19844d4b82e5af396335") version("3.1.1", sha256="024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa") @@ -32,11 +33,13 @@ class PyPlatformdirs(PythonPackage): depends_on("python@3.7:", when="@2.4.1:", type=("build", "run")) depends_on("py-hatch-vcs@0.3:", when="@3:", type="build") depends_on("py-hatch-vcs", when="@2.5.2:", type="build") + depends_on("py-hatchling@1.17.1:", when="@3.10:", type="build") depends_on("py-hatchling@1.17:", when="@3.5.2:", type="build") depends_on("py-hatchling@1.14:", when="@3.3:", type="build") depends_on("py-hatchling@1.12.2:", when="@3:", type="build") depends_on("py-hatchling@0.22.0:", when="@2.5.2:", type="build") + depends_on("py-typing-extensions@4.7.1:", when="@3.10: ^python@:3.7", type=("build", "run")) depends_on("py-typing-extensions@4.6.3:", when="@3.5.2: ^python@:3.7", type=("build", "run")) depends_on("py-typing-extensions@4.5:", when="@3.2: ^python@:3.7", type=("build", "run")) depends_on("py-typing-extensions@4.4:", when="@3: ^python@:3.7", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py index 7b3790b82e90d7..4eec5ac359b883 100644 --- a/var/spack/repos/builtin/packages/py-virtualenv/package.py +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -13,6 +13,7 @@ class PyVirtualenv(PythonPackage): pypi = "virtualenv/virtualenv-16.7.6.tar.gz" git = "https://github.com/pypa/virtualenv.git" + version("20.24.5", sha256="e8361967f6da6fbdf1426483bfe9fca8287c242ac0bc30429905721cefbff752") version("20.22.0", sha256="278753c47aaef1a0f14e6db8a4c5e1e040e90aea654d0fc1dc7e0d8a42616cc3") version("20.17.1", sha256="f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058") version("20.16.4", sha256="014f766e4134d0008dcaa1f95bafa0fb0f575795d07cae50b1bee514185d6782") @@ -26,30 +27,21 @@ class PyVirtualenv(PythonPackage): version("1.11.6", sha256="3e7a4c151e2ee97f51db0215bfd2a073b04a91e9786df6cb67c916f16abe04f7") depends_on("py-hatch-vcs@0.3:", when="@20.18:", type="build") + depends_on("py-hatchling@1.17.1:", when="@20.23.1:", type="build") depends_on("py-hatchling@1.14:", when="@20.22:", type="build") depends_on("py-hatchling@1.12.2:", when="@20.18:", type="build") - with when("@:20.17"): - # not just build-time, requires pkg_resources - depends_on("py-setuptools@59.6:", when="@20.16.3:", type=("build", "run")) - depends_on("py-setuptools@41.0.0:", when="@20.0.0:20.16.2", type=("build", "run")) - depends_on("py-setuptools@40.6.3:", when="@16.1.2:16", type=("build", "run")) - depends_on("py-setuptools@40.0.4:", when="@16.1.0", type=("build", "run")) - depends_on("py-setuptools", type=("build", "run")) - depends_on("py-setuptools-scm@6.4.2:", when="@20.16.3:", type="build") - depends_on("py-setuptools-scm@2:", when="@20.0.5:20.16.2", type="build") - depends_on("py-setuptools-scm+toml@3.4:", when="@20.0.0:20.0.4", type="build") - depends_on("py-wheel@0.30:", when="@20.0.0:20.16.2", type="build") - depends_on("py-wheel@0.29:", when="@16.1:16", type="build") - - depends_on("py-distlib@0.3.6:0", when="@20.16.6:", type=("build", "run")) + depends_on("py-distlib@0.3.7:0", when="@20.24.2:", type=("build", "run")) + depends_on("py-distlib@0.3.6:0", when="@20.16.6:20.24.1", type=("build", "run")) depends_on("py-distlib@0.3.5:0", when="@20.16.3:20.16.5", type=("build", "run")) depends_on("py-distlib@0.3.1:0", when="@20.0.26:20.16.2", type=("build", "run")) depends_on("py-distlib@0.3.0:0", when="@20.0.0:20.0.25", type=("build", "run")) - depends_on("py-filelock@3.11:3", when="@20.22:", type=("build", "run")) - depends_on("py-filelock@3.4.1:3", when="@20.16.3:", type=("build", "run")) + depends_on("py-filelock@3.12.2:3", when="@20.24.2:", type=("build", "run")) + depends_on("py-filelock@3.11:3", when="@20.22:20.23.0", type=("build", "run")) + depends_on("py-filelock@3.4.1:3", when="@20.16.3:20.21", type=("build", "run")) depends_on("py-filelock@3.2:3", when="@20.9:20.16.2", type=("build", "run")) depends_on("py-filelock@3.0.0:3", when="@20.0:20.8", type=("build", "run")) + depends_on("py-importlib-metadata@6.6:", when="@20.23.1: ^python@:3.7", type=("build", "run")) depends_on("py-importlib-metadata@6.4.1:", when="@20.22: ^python@:3.7", type=("build", "run")) depends_on( "py-importlib-metadata@4.8.3:", when="@20.16.3: ^python@:3.7", type=("build", "run") @@ -58,11 +50,25 @@ class PyVirtualenv(PythonPackage): depends_on( "py-importlib-metadata@0.12:3", when="@20.0.0:20.2.0 ^python@:3.7", type=("build", "run") ) - depends_on("py-platformdirs@3.2:3", when="@20.22:", type=("build", "run")) + depends_on("py-platformdirs@3.9.1:3", when="@20.24.1:", type=("build", "run")) + depends_on("py-platformdirs@3.2:3", when="@20.22:20.23.0", type=("build", "run")) depends_on("py-platformdirs@2.4:2", when="@20.16.3:20.21", type=("build", "run")) depends_on("py-platformdirs@2:2", when="@20.5:20.16.2", type=("build", "run")) - # dependencies of old versions + # Historical dependencies + with when("@:20.17"): + # not just build-time, requires pkg_resources + depends_on("py-setuptools@59.6:", when="@20.16.3:", type=("build", "run")) + depends_on("py-setuptools@41.0.0:", when="@20.0.0:20.16.2", type=("build", "run")) + depends_on("py-setuptools@40.6.3:", when="@16.1.2:16", type=("build", "run")) + depends_on("py-setuptools@40.0.4:", when="@16.1.0", type=("build", "run")) + depends_on("py-setuptools", type=("build", "run")) + depends_on("py-setuptools-scm@6.4.2:", when="@20.16.3:", type="build") + depends_on("py-setuptools-scm@2:", when="@20.0.5:20.16.2", type="build") + depends_on("py-setuptools-scm+toml@3.4:", when="@20.0.0:20.0.4", type="build") + depends_on("py-wheel@0.30:", when="@20.0.0:20.16.2", type="build") + depends_on("py-wheel@0.29:", when="@16.1:16", type="build") + depends_on( "py-backports-entry-points-selectable @1.0.4:", when="@20.5:20.10", type=("build", "run") ) From 78e63fa257efd4485fd2c37c21089e4f6344f912 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:04:30 +0200 Subject: [PATCH 036/806] py-wcwidth: add 0.2.7 (#40256) --- var/spack/repos/builtin/packages/py-wcwidth/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-wcwidth/package.py b/var/spack/repos/builtin/packages/py-wcwidth/package.py index e0c4ad93ac876e..8120bab72bb568 100644 --- a/var/spack/repos/builtin/packages/py-wcwidth/package.py +++ b/var/spack/repos/builtin/packages/py-wcwidth/package.py @@ -9,8 +9,10 @@ class PyWcwidth(PythonPackage): """Measures number of Terminal column cells of wide-character codes""" + homepage = "https://github.com/jquast/wcwidth" pypi = "wcwidth/wcwidth-0.1.7.tar.gz" + version("0.2.7", sha256="1b6d30a98ddd5ce9bbdb33658191fd2423fc9da203fe3ef1855407dcb7ee4e26") version("0.2.5", sha256="c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83") version("0.1.7", sha256="3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e") From 992291c73855a322506cb7ba4af91c5cdb5f5646 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Tue, 3 Oct 2023 07:10:14 -0400 Subject: [PATCH 037/806] py-dipy: Update version to support python@3.10 (#40229) * py-dipy: Update version to support python@3.10 py-dipy only adds support to python@3.10 in py-dipy@1.5.0 See #40228 * py-dipy: fix formatting issues * py-dipy: another formatting fix * py-dipy: Use depends instead of conflicts * py-dipy: formatting fix * py-dipy: Updating for @1.7.0 Added new minimum version requirements for py-cython py-numpy py-scipy py-h5py as suggested by @manuelakuhn (py-nibabel min version unchanged for @1.7.0) --- var/spack/repos/builtin/packages/py-dipy/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-dipy/package.py b/var/spack/repos/builtin/packages/py-dipy/package.py index 4979e83e001991..467cb201602605 100644 --- a/var/spack/repos/builtin/packages/py-dipy/package.py +++ b/var/spack/repos/builtin/packages/py-dipy/package.py @@ -19,14 +19,20 @@ class PyDipy(PythonPackage): homepage = "https://dipy.org/" pypi = "dipy/dipy-1.4.1.tar.gz" + version("1.7.0", sha256="59bb647128aae7793215c813bb8ea35dae260ac9f0d938c724064f0af5a05cc3") version("1.4.1", sha256="b4bf830feae751f3f985d54cb71031fc35cea612838320f1f74246692b8a3cc0") depends_on("python@3.6:", type=("build", "run")) + depends_on("python@:3.9", type=("build", "run"), when="@:1.4") depends_on("py-setuptools", type="build") depends_on("py-cython@0.29:", type=("build")) + depends_on("py-cython@0.29.24:", type=("build"), when="@1.7:") depends_on("py-numpy@1.12.0:", type=("build", "run")) + depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@1.7:") depends_on("py-scipy@1.0:", type=("build", "run")) + depends_on("py-scipy@1.1:", type=("build", "run"), when="@1.7:") depends_on("py-nibabel@3.0.0:", type=("build", "run")) depends_on("py-h5py@2.5.0:", type=("build", "run")) + depends_on("py-h5py@2.8.0:", type=("build", "run"), when="@1.7:") depends_on("py-packaging@19.0:", type=("build", "run")) depends_on("py-tqdm@4.30.0:", type=("build", "run")) From 12e51da102d57a659de3f165f6297d183b46210d Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:22:20 +0200 Subject: [PATCH 038/806] py-yarl: add 1.9.2 (#40277) --- var/spack/repos/builtin/packages/py-yarl/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-yarl/package.py b/var/spack/repos/builtin/packages/py-yarl/package.py index b9dd00ca4b189d..bad47e340bfad6 100644 --- a/var/spack/repos/builtin/packages/py-yarl/package.py +++ b/var/spack/repos/builtin/packages/py-yarl/package.py @@ -13,19 +13,19 @@ class PyYarl(PythonPackage): homepage = "https://github.com/aio-libs/yarl" pypi = "yarl/yarl-1.4.2.tar.gz" + version("1.9.2", sha256="04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571") version("1.8.1", sha256="af887845b8c2e060eb5605ff72b6f2dd2aab7a761379373fd89d314f4752abbf") version("1.7.2", sha256="45399b46d60c253327a460e99856752009fcee5f5d3c80b2f7c0cae1c38d56dd") version("1.4.2", sha256="58cd9c469eced558cd81aa3f484b2924e8897049e06889e8ff2510435b7ef74b") version("1.3.0", sha256="024ecdc12bc02b321bc66b41327f930d1c2c543fa9a561b39861da9388ba7aa9") - depends_on("python@3.5:", type=("build", "run")) - depends_on("python@3.7:", when="@1.8.1:", type=("build", "run")) - depends_on("py-setuptools", type="build") depends_on("py-setuptools@40:", type="build", when="@1.7.2:") + depends_on("py-setuptools", type="build") depends_on("py-cython", type="build") + depends_on("py-multidict@4.0:", type=("build", "run")) depends_on("py-idna@2.0:", type=("build", "run")) - depends_on("py-typing-extensions@3.7.4:", type=("build", "run"), when="@1.7.2: ^python@:3.7") + depends_on("py-typing-extensions@3.7.4:", when="@1.7.2: ^python@:3.7", type=("build", "run")) @run_before("install") def fix_cython(self): From 1e3c7abc1c3ad50b259bc0bd97b21969e1e32265 Mon Sep 17 00:00:00 2001 From: GeorgeJuniorGG <66174086+GeorgeJuniorGG@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:23:29 -0300 Subject: [PATCH 039/806] Adding dynaconf module (#39762) * Adding dynaconf module * Fixing style * Adding dependency --- .../builtin/packages/py-dynaconf/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-dynaconf/package.py diff --git a/var/spack/repos/builtin/packages/py-dynaconf/package.py b/var/spack/repos/builtin/packages/py-dynaconf/package.py new file mode 100644 index 00000000000000..64c38a87683a8c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dynaconf/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 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 PyDynaconf(PythonPackage): + """Dynaconf is a dynamic configuration management package for Python projects""" + + homepage = "https://github.com/dynaconf/dynaconf" + pypi = "dynaconf/dynaconf-3.2.2.tar.gz" + + version("3.2.2", sha256="2f98ec85a2b8edb767b3ed0f82c6d605d30af116ce4622932a719ba70ff152fc") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools@38.6.0:", type="build") From e8f230199fc96e29c2651d3f632af1c01c54cbc0 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Tue, 3 Oct 2023 09:55:15 -0500 Subject: [PATCH 040/806] py-biom-format: Fix package file issues and bring up to date (#39962) * Fix python versioning issue for py-biom-format * Update deps according to feedback * Remove version requirement for py-cython Co-authored-by: Adam J. Stewart * Only depend on py-six for versions >=2.1.10 Co-authored-by: Adam J. Stewart * Add py-future as non-dependency for 2.1.15 * There we are. Everything anyone could ever want * Missed cython version change Co-authored-by: Adam J. Stewart --------- Co-authored-by: Adam J. Stewart --- .../packages/py-biom-format/package.py | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-biom-format/package.py b/var/spack/repos/builtin/packages/py-biom-format/package.py index e96614165eba51..79175dbfcb2a50 100644 --- a/var/spack/repos/builtin/packages/py-biom-format/package.py +++ b/var/spack/repos/builtin/packages/py-biom-format/package.py @@ -13,6 +13,10 @@ class PyBiomFormat(PythonPackage): pypi = "biom-format/biom-format-2.1.6.tar.gz" + version("2.1.15", sha256="3bda2096e663dc1cb6f90f51b394da0838b9be5164a44370c134ce5b3b2a4dd3") + version("2.1.14", sha256="c8bac94ab6aa8226c0d38af7a3341d65e5f3664b9f45ec44fdf8b5275b2f92c1") + version("2.1.13", sha256="c48ed8fe978adaff5832f9d65ffcf8b735298bb2175b0360251d556baac5d4dc") + version("2.1.12", sha256="a4460e803b2abfcabe76d5d8fec0f3f7e76a8cd0e09bf22bb38dea9fca224ac2") version("2.1.10", sha256="f5a277a8144f0b114606852c42f657b9cfde44b3cefa0b2638ab1c1d5e1d0488") version("2.1.9", sha256="18a6e4d4b4b2a6bf2d5544fa357ad168bedeac93f0837015ef9c72f41fa89491") version("2.1.7", sha256="b47e54282ef13cddffdb00aea9183a87175a2372c91a915259086a3f444c42f4") @@ -20,12 +24,18 @@ class PyBiomFormat(PythonPackage): depends_on("python@2.7:", type=("build", "run")) depends_on("python@3:", type=("build", "run"), when="@2.1.9:") - depends_on("py-setuptools", type=("build", "run")) - depends_on("py-cython@0.29:", type="build") - depends_on("py-h5py", type=("build", "run")) - depends_on("py-click", type=("build", "run"), when="@2.1.5:") - depends_on("py-numpy@1.9.2:", type=("build", "run")) - depends_on("py-future@0.16.0:", type=("build", "run")) - depends_on("py-scipy@1.3.1:", type=("build", "run")) - depends_on("py-pandas@0.20.0:", type=("build", "run")) - depends_on("py-six@1.10.0:", type=("build", "run")) + depends_on("py-setuptools", type="build") + depends_on("py-cython", type="build") + depends_on("py-h5py@2.2.0:", type=("build", "run")) + depends_on("py-click", type=("build", "run")) + depends_on("py-numpy@1.3.0:", type=("build", "run")) + depends_on("py-numpy@1.9.2:", type=("build", "run"), when="@2.1.7:") + depends_on("py-future@0.16.0:", type=("build", "run"), when="@:2.1.10") + depends_on("py-scipy@0.13.0:", type=("build", "run")) + depends_on("py-scipy@1.3.1:", type=("build", "run"), when="@2.1.8:") + depends_on("py-pandas@0.19.2:", type=("build", "run")) + depends_on("py-pandas@0.20.0:", type=("build", "run"), when="@2.1.7:") + depends_on("py-six@1.10.0:", type=("build", "run"), when="@:2.1.10") + + # https://github.com/biocore/biom-format/pull/865 + conflicts("^python@3.10:", when="@:2.1.10") From 8746c75db005b03e2ff8c85d320b2755a8822aac Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:12:51 -0700 Subject: [PATCH 041/806] e4s ci stacks: sync with e4s-23.08 (#40263) * e4s amd64 gcc ci stack: sync with e4s-23.08 * e4s amd64 oneapi ci stack: sync with e4s-23.08 * e4s ppc64 gcc ci stack: sync with e4s-23.08 * add new ci stack: e4s amd64 gcc w/ external rocm * add new ci stack: e4s arm gcc ci * updates * py-scipy: -fvisibility issue is resolved in 2023.1.0: #39464 * paraview oneapi fails * comment out pkgs that fail to build on power * fix arm stack name * fix cabana +cuda specification * comment out failing spces * visit fails build on arm * comment out slepc arm builds due to make issue * comment out failing dealii arm builds --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 52 ++- .../cloud_pipelines/stacks/e4s-arm/spack.yaml | 351 +++++++++++++++++ .../stacks/e4s-oneapi/spack.yaml | 170 ++++---- .../stacks/e4s-power/spack.yaml | 213 ++++++---- .../stacks/e4s-rocm-external/spack.yaml | 346 ++++++++++++++++ .../cloud_pipelines/stacks/e4s/spack.yaml | 369 ++++++++++++------ 6 files changed, 1212 insertions(+), 289 deletions(-) create mode 100644 share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml create mode 100644 share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index d7f8a38ef633d6..fe801e68f03d73 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -287,7 +287,7 @@ protected-publish: e4s-generate: extends: [ ".e4s", ".generate-x86_64"] - image: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01 + image: ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01 e4s-build: extends: [ ".e4s", ".build" ] @@ -300,6 +300,52 @@ e4s-build: - artifacts: True job: e4s-generate +######################################## +# E4S ARM pipeline +######################################## +.e4s-arm: + extends: [ ".linux_aarch64" ] + variables: + SPACK_CI_STACK_NAME: e4s-arm + +e4s-arm-generate: + extends: [ ".e4s-arm", ".generate-aarch64" ] + image: ecpe4s/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01 + +e4s-arm-build: + extends: [ ".e4s-arm", ".build" ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: e4s-arm-generate + strategy: depend + needs: + - artifacts: True + job: e4s-arm-generate + +######################################## +# E4S ROCm External pipeline +######################################## +.e4s-rocm-external: + extends: [ ".linux_x86_64_v3" ] + variables: + SPACK_CI_STACK_NAME: e4s-rocm-external + +e4s-rocm-external-generate: + extends: [ ".e4s-rocm-external", ".generate-x86_64"] + image: ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01 + +e4s-rocm-external-build: + extends: [ ".e4s-rocm-external", ".build" ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: e4s-rocm-external-generate + strategy: depend + needs: + - artifacts: True + job: e4s-rocm-external-generate + ######################################## # GPU Testing Pipeline ######################################## @@ -333,7 +379,7 @@ gpu-tests-build: e4s-oneapi-generate: extends: [ ".e4s-oneapi", ".generate-x86_64"] - image: ecpe4s/ubuntu20.04-runner-x86_64-oneapi:2023.07.21 + image: ecpe4s/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01 e4s-oneapi-build: extends: [ ".e4s-oneapi", ".build" ] @@ -350,7 +396,7 @@ e4s-oneapi-build: # E4S on Power ######################################## .e4s-power-generate-tags-and-image: - image: { "name": "ecpe4s/ubuntu20.04-runner-ppc64le:2023-01-01", "entrypoint": [""] } + image: { "name": "ecpe4s/ubuntu20.04-runner-ppc64-gcc-11.4:2023.08.01", "entrypoint": [""] } tags: ["spack", "public", "large", "ppc64le"] .e4s-power: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml new file mode 100644 index 00000000000000..4a15e62b9baf49 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml @@ -0,0 +1,351 @@ +spack: + view: false + + concretizer: + reuse: false + unify: false + + packages: + all: + require: '%gcc@11.4.0 target=aarch64' + providers: + blas: [openblas] + mpi: [mpich] + variants: +mpi + binutils: + variants: +ld +gold +headers +libiberty ~nls + elfutils: + variants: +bzip2 ~nls +xz + hdf5: + variants: +fortran +hl +shared + libfabric: + variants: fabrics=sockets,tcp,udp,rxm + libunwind: + variants: +pic +xz + openblas: + variants: threads=openmp + trilinos: + variants: +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext + +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu + +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos + +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long + xz: + variants: +pic + mesa: + version: [21.3.8] + mpi: + require: mpich + mpich: + require: '~wrapperrpath ~hwloc' + ncurses: + require: '@6.3 +termlib' + tbb: + require: intel-tbb + boost: + version: [1.79.0] + variants: +atomic +chrono +container +date_time +exception +filesystem +graph + +iostreams +locale +log +math +mpi +multithreaded +program_options +random + +regex +serialization +shared +signals +stacktrace +system +test +thread +timer + cxxstd=17 visibility=global + libffi: + require: "@3.4.4" + vtk-m: + require: "+examples" + cuda: + version: [11.8.0] + + compilers: + - compiler: + spec: gcc@11.4.0 + paths: + cc: /usr/bin/gcc + cxx: /usr/bin/g++ + f77: /usr/bin/gfortran + fc: /usr/bin/gfortran + flags: {} + operating_system: ubuntu20.04 + target: aarch64 + modules: [] + environment: {} + extra_rpaths: [] + + specs: + # CPU + - adios + - alquimia + - aml + - amrex + - arborx + - argobots + - ascent # ecp dav + - axom + - bolt + - boost + - bricks ~cuda + - butterflypack + - cabana + - caliper + - chai ~benchmarks ~tests + - charliecloud + - conduit + - datatransferkit + - dyninst + - exaworks + - flecsi + - flit + - flux-core + - fortrilinos + - gasnet + - ginkgo + - globalarrays + - gmp + - gotcha + - gptune ~mpispawn + - h5bench + - hdf5-vol-async + - hdf5-vol-cache + - hdf5-vol-log + - heffte +fftw + - hpctoolkit + - hpx networking=mpi + - hypre + - kokkos +openmp + - kokkos-kernels +openmp + - lammps + - lbann + - legion + - libnrm + - libquo + - libunwind + - loki + - mercury + - metall + - mfem + - mgard +serial +openmp +timing +unstructured ~cuda + - mpark-variant + - mpifileutils ~xattr + - nccmp + - nco + - netlib-scalapack + - nrm + - nvhpc + - omega-h + - openfoam + - openmpi + - openpmd-api + - papi + - papyrus + - parsec ~cuda + - pdt + - petsc + - phist + - plasma + - plumed + - precice + - pruners-ninja + - pumi + - py-h5py + - py-jupyterhub + - py-libensemble + - py-petsc4py + - py-warpx + - qthreads scheduler=distrib + - quantum-espresso + - raja + - rempi + - scr + - slate ~cuda + - slepc + - stc + - strumpack ~slate + - sundials + - superlu + - superlu-dist + - swig@4.0.2-fortran + - sz3 + - tasmanian + - tau +mpi +python + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long + - turbine + - umap + - umpire + - upcxx + - wannier90 + - xyce +mpi +shared +pymi +pymi_static_tpls + # INCLUDED IN ECP DAV CPU + - adios2 + - darshan-runtime + - darshan-util + - faodel + - hdf5 + - libcatalyst + - parallel-netcdf + - paraview + - py-cinemasci + - sz + - unifyfs + - veloc + # - visit # silo: https://github.com/spack/spack/issues/39538 + - vtk-m + - zfp + # -- + # - dealii # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. + # - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs@0.7.3: gcc: error: unrecognized command-line option '-mno-sse2' + # - archer # part of llvm +omp_tsan + - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ? + # - geopm # geopm: https://github.com/spack/spack/issues/38795 + # - variorum # variorum: https://github.com/spack/spack/issues/38786 + + # CUDA NOARCH + - bricks +cuda + - flux-core +cuda + - hpctoolkit +cuda + - papi +cuda + - tau +mpi +cuda + # -- + # - legion +cuda # legion: needs NVIDIA driver + + # CUDA 75 + - amrex +cuda cuda_arch=75 + - arborx +cuda cuda_arch=75 ^kokkos +wrapper + - cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75 + - caliper +cuda cuda_arch=75 + - chai ~benchmarks ~tests +cuda cuda_arch=75 ^umpire ~shared + - flecsi +cuda cuda_arch=75 + - ginkgo +cuda cuda_arch=75 + - heffte +cuda cuda_arch=75 + - hpx +cuda cuda_arch=75 + - hypre +cuda cuda_arch=75 + - kokkos +wrapper +cuda cuda_arch=75 + - kokkos-kernels +cuda cuda_arch=75 ^kokkos +wrapper +cuda cuda_arch=75 + - magma +cuda cuda_arch=75 + - mfem +cuda cuda_arch=75 + - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=75 + - omega-h +cuda cuda_arch=75 + - parsec +cuda cuda_arch=75 + - petsc +cuda cuda_arch=75 + - raja +cuda cuda_arch=75 + - slate +cuda cuda_arch=75 + - strumpack ~slate +cuda cuda_arch=75 + - sundials +cuda cuda_arch=75 + - superlu-dist +cuda cuda_arch=75 + - tasmanian +cuda cuda_arch=75 + - trilinos +cuda cuda_arch=75 + - umpire ~shared +cuda cuda_arch=75 + # INCLUDED IN ECP DAV CUDA + - adios2 +cuda cuda_arch=75 + - paraview +cuda cuda_arch=75 + - vtk-m +cuda cuda_arch=75 + - zfp +cuda cuda_arch=75 + # -- + # - ascent +cuda cuda_arch=75 # ascent: https://github.com/spack/spack/issues/38045 + # - axom +cuda cuda_arch=75 # axom: https://github.com/spack/spack/issues/29520 + # - cusz +cuda cuda_arch=75 # cusz: https://github.com/spack/spack/issues/38787 + # - dealii +cuda cuda_arch=75 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. + # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=75 # embree: https://github.com/spack/spack/issues/39534 + # - lammps +cuda cuda_arch=75 # lammps: needs NVIDIA driver + # - lbann +cuda cuda_arch=75 # lbann: https://github.com/spack/spack/issues/38788 + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=75 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 + # - py-torch +cuda cuda_arch=75 # skipped, installed by other means + # - slepc +cuda cuda_arch=75 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. + # - upcxx +cuda cuda_arch=75 # upcxx: needs NVIDIA driver + + # CUDA 80 + - amrex +cuda cuda_arch=80 + - arborx +cuda cuda_arch=80 ^kokkos +wrapper + - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80 + - caliper +cuda cuda_arch=80 + - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared + - flecsi +cuda cuda_arch=80 + - ginkgo +cuda cuda_arch=80 + - heffte +cuda cuda_arch=80 + - hpx +cuda cuda_arch=80 + - hypre +cuda cuda_arch=80 + - kokkos +wrapper +cuda cuda_arch=80 + - kokkos-kernels +cuda cuda_arch=80 ^kokkos +wrapper +cuda cuda_arch=80 + - magma +cuda cuda_arch=80 + - mfem +cuda cuda_arch=80 + - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=80 + - omega-h +cuda cuda_arch=80 + - parsec +cuda cuda_arch=80 + - petsc +cuda cuda_arch=80 + - raja +cuda cuda_arch=80 + - slate +cuda cuda_arch=80 + - strumpack ~slate +cuda cuda_arch=80 + - sundials +cuda cuda_arch=80 + - superlu-dist +cuda cuda_arch=80 + - tasmanian +cuda cuda_arch=80 + - trilinos +cuda cuda_arch=80 + - umpire ~shared +cuda cuda_arch=80 + # INCLUDED IN ECP DAV CUDA + - adios2 +cuda cuda_arch=80 + - paraview +cuda cuda_arch=80 + - vtk-m +cuda cuda_arch=80 + - zfp +cuda cuda_arch=80 + # -- + # - ascent +cuda cuda_arch=80 # ascent: https://github.com/spack/spack/issues/38045 + # - axom +cuda cuda_arch=80 # axom: https://github.com/spack/spack/issues/29520 + # - cusz +cuda cuda_arch=80 # cusz: https://github.com/spack/spack/issues/38787 + # - dealii +cuda cuda_arch=80 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. + # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # embree: https://github.com/spack/spack/issues/39534 + # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver + # - lbann +cuda cuda_arch=80 # lbann: https://github.com/spack/spack/issues/38788 + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=80 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 + # - py-torch +cuda cuda_arch=80 # skipped, installed by other means + # - slepc +cuda cuda_arch=80 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. + # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver + + # CUDA 90 + - amrex +cuda cuda_arch=90 + - arborx +cuda cuda_arch=90 ^kokkos +wrapper + - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90 + - caliper +cuda cuda_arch=90 + - chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared + - flecsi +cuda cuda_arch=90 + - ginkgo +cuda cuda_arch=90 + - heffte +cuda cuda_arch=90 + - hpx +cuda cuda_arch=90 + - kokkos +wrapper +cuda cuda_arch=90 + - kokkos-kernels +cuda cuda_arch=90 ^kokkos +wrapper +cuda cuda_arch=90 + - magma +cuda cuda_arch=90 + - mfem +cuda cuda_arch=90 + - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=90 + - parsec +cuda cuda_arch=90 + - petsc +cuda cuda_arch=90 + - raja +cuda cuda_arch=90 + - slate +cuda cuda_arch=90 + - strumpack ~slate +cuda cuda_arch=90 + - sundials +cuda cuda_arch=90 + - superlu-dist +cuda cuda_arch=90 + - trilinos +cuda cuda_arch=90 + - umpire ~shared +cuda cuda_arch=90 + # INCLUDED IN ECP DAV CUDA + - adios2 +cuda cuda_arch=90 + # - paraview +cuda cuda_arch=90 # paraview: InstallError: Incompatible cuda_arch=90 + - vtk-m +cuda cuda_arch=90 + - zfp +cuda cuda_arch=90 + # -- + # - ascent +cuda cuda_arch=90 # ascent: https://github.com/spack/spack/issues/38045 + # - axom +cuda cuda_arch=90 # axom: https://github.com/spack/spack/issues/29520 + # - cusz +cuda cuda_arch=90 # cusz: https://github.com/spack/spack/issues/38787 + # - dealii +cuda cuda_arch=90 # dealii: https://github.com/spack/spack/issues/39532 + # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=90 # embree: https://github.com/spack/spack/issues/39534 + # - hypre +cuda cuda_arch=90 # concretizer: hypre +cuda requires cuda@:11, but cuda_arch=90 requires cuda@12: + # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver + # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann" + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=90 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 + # - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535 + # - py-torch +cuda cuda_arch=90 # skipped, installed by other means + # - slepc +cuda cuda_arch=90 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. + # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12 + # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver + + mirrors: { "mirror": "s3://spack-binaries/develop/e4s-arm" } + + ci: + pipeline-gen: + - build-job: + image: "ecpe4s/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01" + + cdash: + build-group: E4S ARM \ No newline at end of file diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 798ba974ce3b29..160b079eb5d4bb 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -1,22 +1,51 @@ spack: - view: false concretizer: reuse: false unify: false + compilers: + - compiler: + spec: oneapi@2023.2.1 + paths: + cc: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/icx + cxx: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/icpx + f77: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/ifx + fc: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/ifx + flags: {} + operating_system: ubuntu20.04 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] + - compiler: + spec: gcc@=11.4.0 + paths: + cc: /usr/bin/gcc + cxx: /usr/bin/g++ + f77: /usr/bin/gfortran + fc: /usr/bin/gfortran + flags: {} + operating_system: ubuntu20.04 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] + packages: all: - require: '%oneapi' + require: '%oneapi target=x86_64_v3' providers: blas: [openblas] mpi: [mpich] tbb: [intel-tbb] - target: [x86_64] variants: +mpi elfutils: variants: +bzip2 ~nls +xz + hdf5: + require: "%gcc" + variants: +fortran +hl +shared libfabric: variants: fabrics=sockets,tcp,udp,rxm libunwind: @@ -34,15 +63,12 @@ spack: variants: +pic mesa: version: [21.3.8] - hdf5: - require: "%gcc" - variants: +fortran +hl +shared mpi: - require: "mpich" + require: 'mpich@4:' mpich: - require: '@4.1.1 ~wrapperrpath ~hwloc' + require: '~wrapperrpath ~hwloc' py-cryptography: - require: '@38.0' + require: '@38.0.1' unzip: require: '%gcc' binutils: @@ -60,40 +86,12 @@ spack: require: '%gcc' openssh: require: '%gcc' - bison: - require: '%gcc' libffi: require: "@3.4.4" dyninst: require: "%gcc" - - compilers: - - compiler: - spec: oneapi@2023.2.0 - paths: - cc: /opt/intel/oneapi/compiler/2023.2.0/linux/bin/icx - cxx: /opt/intel/oneapi/compiler/2023.2.0/linux/bin/icpx - f77: /opt/intel/oneapi/compiler/2023.2.0/linux/bin/ifx - fc: /opt/intel/oneapi/compiler/2023.2.0/linux/bin/ifx - flags: {} - operating_system: ubuntu20.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - - compiler: - spec: gcc@11.4.0 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - flags: {} - operating_system: ubuntu20.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] + bison: + require: '%gcc' specs: # CPU @@ -101,7 +99,6 @@ spack: - aml - amrex - arborx - - archer - argobots - axom - bolt @@ -121,11 +118,14 @@ spack: - flux-core - fortrilinos - gasnet + - ginkgo - globalarrays - gmp - gotcha + - gptune ~mpispawn - h5bench - hdf5-vol-async + - hdf5-vol-cache - hdf5-vol-log - heffte +fftw - hpx networking=mpi @@ -136,21 +136,21 @@ spack: - lbann - legion - libnrm + - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp - libquo - libunwind - loki - mercury - metall - mfem - - mgard +serial +openmp +timing +unstructured ~cuda - mpark-variant - mpifileutils ~xattr - nccmp - nco - netlib-scalapack + - nrm - omega-h - openmpi - - openpmd-api - papi - papyrus - parsec ~cuda @@ -160,14 +160,18 @@ spack: - plasma - plumed - precice + - pruners-ninja - pumi - py-h5py + - py-jupyterhub - py-libensemble - py-petsc4py + - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja - rempi + - scr - slate ~cuda - slepc - stc @@ -175,54 +179,46 @@ spack: - sundials - superlu - superlu-dist - - swig@4.0.2-fortran - sz3 - tasmanian - - trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long + - tau +mpi +python + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap - umpire - variorum - wannier90 + - xyce +mpi +shared +pymi +pymi_static_tpls # INCLUDED IN ECP DAV CPU - # - adios2 - # - ascent - # - darshan-runtime - # - darshan-util - # - faodel - # - hdf5 - # - libcatalyst - # - parallel-netcdf - # - paraview - # - py-cinemasci - # - sz - # - unifyfs - # - veloc - # - visit - # - vtk-m ~openmp # https://github.com/spack/spack/issues/31830 - # - zfp + - adios2 # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing] + - ascent + - darshan-runtime + - darshan-util + - faodel + - hdf5 + - libcatalyst + - parallel-netcdf + # - paraview # paraview: VTK/ThirdParty/cgns/vtkcgns/src/adfh/ADFH.c:2002:23: error: incompatible function pointer types passing 'herr_t (hid_t, const char *, const H5L_info1_t *, void *)' (aka 'int (long, const char *, const H5L_info1_t *, void *)') to parameter of type 'H5L_iterate2_t' (aka 'int (*)(long, const char *,const H5L_info2_t *, void *)') [-Wincompatible-function-pointer-types] + - py-cinemasci + - sz + - unifyfs + - veloc + # - visit # silo: https://github.com/spack/spack/issues/39538 + - vtk-m ~openmp # https://github.com/spack/spack/issues/31830 + - zfp # -- - # - alquimia # pflotran: pflotran/hdf5_aux.F90(5): error #7013: This module file was not generated by any release of this compiler. [HDF5] - # - dealii # intel-tbb: icpx: error: unknown argument: '-flifetime-dse=1' - # - dxt-explorer # r: https://github.com/spack/spack/issues/40257 - # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # sz: hdf5-filter/H5Z-SZ/src/H5Z_SZ.c:24:9: error: call to undeclared function 'gettimeofday'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] - # - geopm # geopm: In file included from src/ProfileTable.cpp:34: ./src/ProfileTable.hpp:79:45: error: no type named 'string' in namespace 'std' - # - ginkgo # ginkgo: icpx: error: clang frontend command failed with exit code 139 (use -v to see invocation) - # - gptune ~mpispawn # py-scipy: for_main.c:(.text+0x19): undefined reference to `MAIN__' - # - hdf5-vol-cache # /H5VLcache_ext.c:580:9: error: incompatible function pointer types initializing 'herr_t (*)(const void *, uint64_t *)' (aka 'int (*)(const void *, unsigned long *)') with an expression of type 'herr_t (const void *, unsigned int *)' (aka 'int (const void *, unsigned int *)') [-Wincompatible-function-pointer-types] - # - hpctoolkit # intel-tbb: icpx: error: unknown argument: '-flifetime-dse=1' - # - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs: c-blosc/internal-complibs/zlib-1.2.8/gzread.c:30:15: error: call to undeclared function 'read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] - # - nrm # py-scipy: for_main.c:(.text+0x19): undefined reference to `MAIN__' - # - openfoam # adios2: patch failed - # - pruners-ninja # pruners-ninja: ninja_test_pingpong.c:79:5: error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] - # - py-jupyterhub # py-ruamel-yaml-clib: setuptools/dist.py:287: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420). See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages - # - py-warpx ^warpx dims=2 # py-scipy: for_main.c:(.text+0x19): undefined reference to `MAIN__' - # - py-warpx ^warpx dims=3 # py-scipy: for_main.c:(.text+0x19): undefined reference to `MAIN__' - # - py-warpx ^warpx dims=rz # py-scipy: for_main.c:(.text+0x19): undefined reference to `MAIN__' - # - scr # libyogrt: configure: error: slurm is not in specified location! - # - tau +mpi +python # tau: x86_64/lib/Makefile.tau-icpx-papi-mpi-pthread-python-pdt: No such file or directory - # - upcxx # upcxx: /opt/intel/oneapi/mpi/2021.9.0//libfabric/bin/fi_info: error while loading shared libraries: libfabric.so.1: cannot open shared object file: No such file or directory - # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # cmake/tps.cmake:220 (message): Unable to compile against Trilinos. It is possible Trilinos was not properly configured, or the environment has changed since Trilinos was installed. See the CMake log files for more information. + # - alquimia # pflotran: https://github.com/spack/spack/issues/39474 + # - archer # subsumed under llvm +libomp_tsan + # - dealii # dealii: https://github.com/spack/spack/issues/39482 + # - dxt-explorer # r: https://github.com/spack/spack/issues/40257 + # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # embree: CMake Error at CMakeLists.txt:215 (MESSAGE): Unsupported compiler: IntelLLVM; qt: qtbase/src/corelib/global/qendian.h:333:54: error: incomplete type 'std::numeric_limits' used in nested name specifier + # - geopm # geopm issue: https://github.com/spack/spack/issues/38795 + # - hpctoolkit # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc + # - mgard +serial +openmp +timing +unstructured ~cuda # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing] + # - openfoam # cgal: https://github.com/spack/spack/issues/39481 + # - openpmd-api # mgard: mgard.tpp:63:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing] + # - swig@4.0.2-fortran # ? + # - upcxx # upcxx: /opt/intel/oneapi/mpi/2021.10.0//libfabric/bin/fi_info: error while loading shared libraries: libfabric.so.1: cannot open shared object file: No such file or directory # GPU - aml +ze @@ -231,27 +227,21 @@ spack: - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples + - tau +mpi +opencl +level_zero ~pdt # tau: requires libdrm.so to be installed - slate +sycl # -- # - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler. - # - hpctoolkit +level_zero # intel-tbb: icpx: error: unknown argument: '-flifetime-dse=1' + # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc # - sundials +sycl cxxstd=17 # sundials: include/sunmemory/sunmemory_sycl.h:20:10: fatal error: 'CL/sycl.hpp' file not found - # - tau +mpi +opencl +level_zero ~pdt # builds ok in container, but needs libdrm, will update container - # Not necessarily E4S, but useful for E4S packages - py-scipy - # SKIPPED - # - nvhpc - # - dyninst # only %gcc - - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-oneapi" } ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu20.04-runner-x86_64-oneapi:2023.07.21 + image: ecpe4s/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01 cdash: build-group: E4S OneAPI diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index a45fbbb3db2b01..1fcde50ca63fb1 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -1,19 +1,35 @@ spack: view: false + + concretizer: + reuse: false + unify: false + + compilers: + - compiler: + spec: gcc@9.4.0 + paths: + cc: /usr/bin/gcc + cxx: /usr/bin/g++ + f77: /usr/bin/gfortran + fc: /usr/bin/gfortran + flags: {} + operating_system: ubuntu20.04 + target: ppc64le + modules: [] + environment: {} + extra_rpaths: [] + packages: all: - compiler: [gcc@11.1.0] + require: "%gcc@9.4.0 target=ppc64le" + compiler: [gcc@9.4.0] providers: blas: [openblas] mpi: [mpich] - target: [ppc64le] variants: +mpi cuda_arch=70 - tbb: - require: intel-tbb binutils: variants: +ld +gold +headers +libiberty ~nls - cuda: - version: [11.7.0] elfutils: variants: +bzip2 ~nls +xz hdf5: @@ -22,30 +38,34 @@ spack: variants: fabrics=sockets,tcp,udp,rxm libunwind: variants: +pic +xz - mpich: - variants: ~wrapperrpath - ncurses: - variants: +termlib openblas: variants: threads=openmp - paraview: - require: '@5.11 ~qt+osmesa' trilinos: - require: - - one_of: [+amesos +amesos2 +anasazi +aztec +boost +epetra +epetraext +ifpack - +intrepid +intrepid2 +isorropia +kokkos +minitensor +nox +piro +phalanx - +rol +rythmos +sacado +stk +shards +stratimikos +tempus +tpetra - +trilinoscouplings +zoltan] - - one_of: [gotype=long_long, gotype=all] - - one_of: [~ml ~muelu ~zoltan2 ~teko, +ml +muelu +zoltan2 +teko] - - one_of: [+superlu-dist, ~superlu-dist] - - one_of: [+shylu, ~shylu] + variants: +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext + +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu + +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos + +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long xz: variants: +pic mesa: version: [21.3.8] + mpi: + require: mpich + mpich: + require: '~wrapperrpath ~hwloc' + ncurses: + require: '@6.3 +termlib' faodel: - require: ~tcmalloc # needed for ppc64le + require: "~tcmalloc" + tbb: + require: intel-tbb + libffi: + require: "@3.4.4" + vtk-m: + require: "+examples" + cuda: + require: "@11.4.4" + specs: # CPU @@ -57,6 +77,8 @@ spack: - argobots - axom - bolt + - boost + - bricks - butterflypack - cabana - caliper @@ -67,7 +89,7 @@ spack: - drishti - dxt-explorer - dyninst - - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 ~paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +paraview fails: FAILED: VTK/Filters/Statistics/CMakeFiles/FiltersStatistics-objects.dir/vtkPCAStatistics.cxx.o: /tmp/ccgvkIk5.s: Assembler messages: /tmp/ccgvkIk5.s:260012: Error: invalid machine `power10' + # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 ~paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: libext, libxkbfile, libxrender, libxt, silo (https://github.com/spack/spack/issues/39538), cairo - exaworks - flecsi - flit @@ -85,15 +107,17 @@ spack: - hdf5-vol-log - heffte +fftw - hpctoolkit - - hpx max_cpu_count=512 networking=mpi + - hpx networking=mpi - hypre - kokkos +openmp - kokkos-kernels +openmp - lammps + - lbann - legion - libnrm - libquo - libunwind + - loki - mercury - metall - mfem @@ -106,20 +130,23 @@ spack: - nrm - nvhpc - omega-h + - openfoam - openmpi - openpmd-api - papi - papyrus + - paraview ~cuda ~rocm - parsec ~cuda - pdt - petsc - - phist - plasma - plumed + - precice + - pruners-ninja - pumi - py-h5py - py-jupyterhub - - py-libensemble +mpi +nlopt + - py-libensemble - py-petsc4py - py-warpx - qthreads scheduler=distrib @@ -134,84 +161,102 @@ spack: - sundials - superlu - superlu-dist - - swig - swig@4.0.2-fortran + - sz3 - tasmanian - - tau +mpi +python - - trilinos +belos +ifpack2 +stokhos + - tau +mpi +python # tau: has issue with `spack env depfile` build + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap - umpire - upcxx - wannier90 - - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu + - xyce +mpi +shared +pymi +pymi_static_tpls + # INCLUDED IN ECP DAV CPU + - adios2 + - ascent + - darshan-runtime + - darshan-util + - faodel + - hdf5 + - libcatalyst + - parallel-netcdf + - paraview + - py-cinemasci + - sz + - unifyfs + - veloc + # - visit # libext, libxkbfile, libxrender, libxt, silo (https://github.com/spack/spack/issues/39538), cairo + - vtk-m + - zfp + # -- + # - archer # part of llvm +omp_tsan + # - dealii # fltk: https://github.com/spack/spack/issues/38791 + # - geopm # geopm: https://github.com/spack/spack/issues/38798 + # - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs: gcc: error: unrecognized command line option '-mno-sse2'; did you mean '-mno-isel'? gcc: error: unrecognized command line option '-mno-avx2' + # - phist +mpi # ghost@develop: gcc-9: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'? + # - variorum # variorum: https://github.com/spack/spack/issues/38786 - # CUDA - - amrex +cuda - - arborx +cuda ^kokkos +wrapper - - cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda - - caliper +cuda - - chai ~benchmarks ~tests +cuda ^umpire ~shared - - ecp-data-vis-sdk +cuda cuda_arch=70 +adios2 +hdf5 ~paraview +vtkm +zfp # +paraview fails: FAILED: VTK/Filters/Statistics/CMakeFiles/FiltersStatistics-objects.dir/vtkPCAStatistics.cxx.o; /tmp/ccjmJhb6.s: Assembler messages: /tmp/ccjmJhb6.s:260012: Error: invalid machine `power10' - - flecsi +cuda + # CUDA NOARCH + - bricks +cuda + - cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=70 - flux-core +cuda - - ginkgo +cuda - - heffte +cuda - hpctoolkit +cuda - - hpx max_cpu_count=512 +cuda - - hypre +cuda - - kokkos +wrapper +cuda - - kokkos-kernels +cuda ^kokkos +wrapper +cuda +cuda_lambda - - magma +cuda - - mfem +cuda - - mgard +serial +openmp +timing +unstructured +cuda - - omega-h +cuda - papi +cuda - - petsc +cuda - - py-torch +cuda - - raja +cuda - - slate +cuda - - slepc +cuda - - strumpack ~slate +cuda - - sundials +cuda - - superlu-dist +cuda - - tasmanian +cuda - - tau +mpi +cuda - - "trilinos@13.4.0: +belos +ifpack2 +stokhos +cuda" - - umpire ~shared +cuda - - parsec +cuda - - # CPU FAILURES - # - archer # llvm@8 - # - bricks # bricks - # - geopm # geopm - # - hdf5-vol-daos # hdf5-vol-daos: vhost/vhost_user.c:65:32: error: array size missing in 'vhost_message_handlers' - # - loki # loki - # - precice # precice - # - pruners-ninja # pruners-ninja - # - variorum # Intel/variorum_cpuid.c:11:5: error: impossible constraint in 'asm' + - tau +mpi +cuda # tau: has issue with `spack env depfile` build # -- - # bricks: VSBrick-7pt.py-Scalar-8x8x8-1:30:3: error: 'vfloat512' was not declared in this scope - # fltk: /usr/bin/ld: ../lib/libfltk_png.a(pngrutil.o): in function `png_read_filter_row': pngrutil.c:(.text.png_read_filter_row+0x90): undefined reference to `png_init_filter_functions_vsx' - # geopm: libtool.m4: error: problem compiling CXX test program - # llvm@8: clang/lib/Lex/Lexer.cpp:2547:34: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive] - # loki: include/loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications - # precice: /tmp/ccYNMwgE.s: Assembler messages: /tmp/ccYNMwgE.s:278115: Error: invalid machine `power10' - # pruners-ninja: test/ninja_test_util.c:34: multiple definition of `a'; + # - legion +cuda # legion: needs NVIDIA driver - # CUDA FAILURES - # - bricks +cuda # bricks - # - dealii +cuda # fltk + # CUDA 70 + - amrex +cuda cuda_arch=70 + - arborx +cuda cuda_arch=70 ^kokkos +wrapper + - caliper +cuda cuda_arch=70 + - chai ~benchmarks ~tests +cuda cuda_arch=70 ^umpire ~shared + - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=70 + - flecsi +cuda cuda_arch=70 + - ginkgo +cuda cuda_arch=70 + - heffte +cuda cuda_arch=70 + - hpx +cuda cuda_arch=70 + - hypre +cuda cuda_arch=70 + - kokkos +wrapper +cuda cuda_arch=70 + - kokkos-kernels +cuda cuda_arch=70 ^kokkos +wrapper +cuda cuda_arch=70 + - magma +cuda cuda_arch=70 + - mfem +cuda cuda_arch=70 + - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=70 + - omega-h +cuda cuda_arch=70 + - parsec +cuda cuda_arch=70 + - petsc +cuda cuda_arch=70 + - raja +cuda cuda_arch=70 + - slate +cuda cuda_arch=70 + - slepc +cuda cuda_arch=70 + - strumpack ~slate +cuda cuda_arch=70 + - sundials +cuda cuda_arch=70 + - superlu-dist +cuda cuda_arch=70 + - tasmanian +cuda cuda_arch=70 + - umpire ~shared +cuda cuda_arch=70 + # INCLUDED IN ECP DAV CUDA + - adios2 +cuda cuda_arch=70 + # - ascent +cuda cuda_arch=70 # ascent: https://github.com/spack/spack/issues/38045 + - paraview +cuda cuda_arch=70 + - vtk-m +cuda cuda_arch=70 + - zfp +cuda cuda_arch=70 # -- - # bricks: VSBrick-7pt.py-Scalar-8x8x8-1:30:3: error: 'vfloat512' was not declared in this scope - + # - axom +cuda cuda_arch=70 # axom: https://github.com/spack/spack/issues/29520 + # - cusz +cuda cuda_arch=70 # cusz: https://github.com/spack/spack/issues/38787 + # - dealii +cuda cuda_arch=70 # fltk: https://github.com/spack/spack/issues/38791 + # - lammps +cuda cuda_arch=70 # lammps: needs NVIDIA driver + # - lbann +cuda cuda_arch=70 # lbann: https://github.com/spack/spack/issues/38788 + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=70 ^cusz +cuda cuda_arch=70 # depends_on("cuda@11.7.1:", when="+cuda") + # - py-torch +cuda cuda_arch=70 # skipped + # - trilinos +cuda cuda_arch=70 # trilinos: https://github.com/trilinos/Trilinos/issues/11630 + # - upcxx +cuda cuda_arch=70 # upcxx: needs NVIDIA driver mirrors: { "mirror": "s3://spack-binaries/develop/e4s-power" } ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu20.04-runner-ppc64le:2023-01-01 + image: ecpe4s/ubuntu20.04-runner-ppc64-gcc-11.4:2023.08.01 cdash: build-group: E4S Power diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml new file mode 100644 index 00000000000000..dba404e9b3f910 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -0,0 +1,346 @@ +spack: + view: false + + concretizer: + reuse: false + unify: false + + compilers: + - compiler: + spec: gcc@=11.4.0 + paths: + cc: /usr/bin/gcc + cxx: /usr/bin/g++ + f77: /usr/bin/gfortran + fc: /usr/bin/gfortran + flags: {} + operating_system: ubuntu20.04 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] + + packages: + all: + require: '%gcc target=x86_64_v3' + providers: + blas: [openblas] + mpi: [mpich] + variants: +mpi + binutils: + variants: +ld +gold +headers +libiberty ~nls + elfutils: + variants: +bzip2 ~nls +xz + hdf5: + variants: +fortran +hl +shared + libfabric: + variants: fabrics=sockets,tcp,udp,rxm + libunwind: + variants: +pic +xz + openblas: + variants: threads=openmp + trilinos: + variants: +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext + +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu + +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos + +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long + xz: + variants: +pic + mesa: + version: [21.3.8] + mpi: + require: mpich + mpich: + require: '~wrapperrpath ~hwloc' + ncurses: + require: '@6.3 +termlib' + tbb: + require: intel-tbb + boost: + version: [1.79.0] + variants: +atomic +chrono +container +date_time +exception +filesystem +graph + +iostreams +locale +log +math +mpi +multithreaded +program_options +random + +regex +serialization +shared +signals +stacktrace +system +test +thread +timer + cxxstd=17 visibility=global + libffi: + require: "@3.4.4" + vtk-m: + require: "+examples" + cuda: + version: [11.8.0] + paraview: + # Don't build GUI support or GLX rendering for HPC/container deployments + require: "@5.11 ~qt+osmesa" + + # ROCm 5.4.3 + comgr: + buildable: false + externals: + - spec: comgr@5.4.3 + prefix: /opt/rocm-5.4.3/ + hip-rocclr: + buildable: false + externals: + - spec: hip-rocclr@5.4.3 + prefix: /opt/rocm-5.4.3/hip + hipblas: + buildable: false + externals: + - spec: hipblas@5.4.3 + prefix: /opt/rocm-5.4.3/ + hipcub: + buildable: false + externals: + - spec: hipcub@5.4.3 + prefix: /opt/rocm-5.4.3/ + hipfft: + buildable: false + externals: + - spec: hipfft@5.4.3 + prefix: /opt/rocm-5.4.3/ + hipsparse: + buildable: false + externals: + - spec: hipsparse@5.4.3 + prefix: /opt/rocm-5.4.3/ + miopen-hip: + buildable: false + externals: + - spec: hip-rocclr@5.4.3 + prefix: /opt/rocm-5.4.3/ + miopengemm: + buildable: false + externals: + - spec: miopengemm@5.4.3 + prefix: /opt/rocm-5.4.3/ + rccl: + buildable: false + externals: + - spec: rccl@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocblas: + buildable: false + externals: + - spec: rocblas@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocfft: + buildable: false + externals: + - spec: rocfft@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-clang-ocl: + buildable: false + externals: + - spec: rocm-clang-ocl@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-cmake: + buildable: false + externals: + - spec: rocm-cmake@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-dbgapi: + buildable: false + externals: + - spec: rocm-dbgapi@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-debug-agent: + buildable: false + externals: + - spec: rocm-debug-agent@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-device-libs: + buildable: false + externals: + - spec: rocm-device-libs@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-gdb: + buildable: false + externals: + - spec: rocm-gdb@5.4.3 + prefix: /opt/rocm-5.4.3/ + rocm-opencl: + buildable: false + externals: + - spec: rocm-opencl@5.4.3 + prefix: /opt/rocm-5.4.3/opencl + rocm-smi-lib: + buildable: false + externals: + - spec: rocm-smi-lib@5.4.3 + prefix: /opt/rocm-5.4.3/ + hip: + buildable: false + externals: + - spec: hip@5.4.3 + prefix: /opt/rocm-5.4.3 + extra_attributes: + compilers: + c: /opt/rocm-5.4.3/llvm/bin/clang++ + c++: /opt/rocm-5.4.3/llvm/bin/clang++ + hip: /opt/rocm-5.4.3/hip/bin/hipcc + hipify-clang: + buildable: false + externals: + - spec: hipify-clang@5.4.3 + prefix: /opt/rocm-5.4.3 + llvm-amdgpu: + buildable: false + externals: + - spec: llvm-amdgpu@5.4.3 + prefix: /opt/rocm-5.4.3/llvm + extra_attributes: + compilers: + c: /opt/rocm-5.4.3/llvm/bin/clang++ + cxx: /opt/rocm-5.4.3/llvm/bin/clang++ + hsakmt-roct: + buildable: false + externals: + - spec: hsakmt-roct@5.4.3 + prefix: /opt/rocm-5.4.3/ + hsa-rocr-dev: + buildable: false + externals: + - spec: hsa-rocr-dev@5.4.3 + prefix: /opt/rocm-5.4.3/ + extra_atributes: + compilers: + c: /opt/rocm-5.4.3/llvm/bin/clang++ + cxx: /opt/rocm-5.4.3/llvm/bin/clang++ + roctracer-dev-api: + buildable: false + externals: + - spec: roctracer-dev-api@5.4.3 + prefix: /opt/rocm-5.4.3 + roctracer-dev: + buildable: false + externals: + - spec: roctracer-dev@4.5.3 + prefix: /opt/rocm-5.4.3 + rocprim: + buildable: false + externals: + - spec: rocprim@5.4.3 + prefix: /opt/rocm-5.4.3 + rocrand: + buildable: false + externals: + - spec: rocrand@5.4.3 + prefix: /opt/rocm-5.4.3 + hipsolver: + buildable: false + externals: + - spec: hipsolver@5.4.3 + prefix: /opt/rocm-5.4.3 + rocsolver: + buildable: false + externals: + - spec: rocsolver@5.4.3 + prefix: /opt/rocm-5.4.3 + rocsparse: + buildable: false + externals: + - spec: rocsparse@5.4.3 + prefix: /opt/rocm-5.4.3 + rocthrust: + buildable: false + externals: + - spec: rocthrust@5.4.3 + prefix: /opt/rocm-5.4.3 + rocprofiler-dev: + buildable: false + externals: + - spec: rocprofiler-dev@5.4.3 + prefix: /opt/rocm-5.4.3 + + specs: + # ROCM NOARCH + - hpctoolkit +rocm + - tau +mpi +rocm # tau: has issue with `spack env depfile` build + + # ROCM 908 + - amrex +rocm amdgpu_target=gfx908 + - arborx +rocm amdgpu_target=gfx908 + - cabana +rocm amdgpu_target=gfx908 + - caliper +rocm amdgpu_target=gfx908 + - chai ~benchmarks +rocm amdgpu_target=gfx908 + - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908 + - gasnet +rocm amdgpu_target=gfx908 + - ginkgo +rocm amdgpu_target=gfx908 + - heffte +rocm amdgpu_target=gfx908 + - hpx +rocm amdgpu_target=gfx908 + - hypre +rocm amdgpu_target=gfx908 + - kokkos +rocm amdgpu_target=gfx908 + - legion +rocm amdgpu_target=gfx908 + - magma ~cuda +rocm amdgpu_target=gfx908 + - mfem +rocm amdgpu_target=gfx908 + - petsc +rocm amdgpu_target=gfx908 + - raja ~openmp +rocm amdgpu_target=gfx908 + - slate +rocm amdgpu_target=gfx908 + - slepc +rocm amdgpu_target=gfx908 ^petsc +rocm amdgpu_target=gfx908 + - strumpack ~slate +rocm amdgpu_target=gfx908 + - sundials +rocm amdgpu_target=gfx908 + - superlu-dist +rocm amdgpu_target=gfx908 + - tasmanian ~openmp +rocm amdgpu_target=gfx908 + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx908 + - umpire +rocm amdgpu_target=gfx908 + - upcxx +rocm amdgpu_target=gfx908 + # INCLUDED IN ECP DAV ROCM + # - hdf5 + # - hdf5-vol-async + # - hdf5-vol-cache + # - hdf5-vol-log + # - libcatalyst + - paraview +rocm amdgpu_target=gfx908 + # - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268 + # -- + # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807 + # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898 + + # ROCM 90a + - amrex +rocm amdgpu_target=gfx90a + - arborx +rocm amdgpu_target=gfx90a + - cabana +rocm amdgpu_target=gfx90a + - caliper +rocm amdgpu_target=gfx90a + - chai ~benchmarks +rocm amdgpu_target=gfx90a + - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a + - gasnet +rocm amdgpu_target=gfx90a + - ginkgo +rocm amdgpu_target=gfx90a + - heffte +rocm amdgpu_target=gfx90a + - hpx +rocm amdgpu_target=gfx90a + - hypre +rocm amdgpu_target=gfx90a + - kokkos +rocm amdgpu_target=gfx90a + - legion +rocm amdgpu_target=gfx90a + - magma ~cuda +rocm amdgpu_target=gfx90a + - mfem +rocm amdgpu_target=gfx90a + - petsc +rocm amdgpu_target=gfx90a + - raja ~openmp +rocm amdgpu_target=gfx90a + - slate +rocm amdgpu_target=gfx90a + - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a + - strumpack ~slate +rocm amdgpu_target=gfx90a + - sundials +rocm amdgpu_target=gfx90a + - superlu-dist +rocm amdgpu_target=gfx90a + - tasmanian ~openmp +rocm amdgpu_target=gfx90a + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx90a + - umpire +rocm amdgpu_target=gfx90a + - upcxx +rocm amdgpu_target=gfx90a + # INCLUDED IN ECP DAV ROCM + # - hdf5 + # - hdf5-vol-async + # - hdf5-vol-cache + # - hdf5-vol-log + # - libcatalyst + - paraview +rocm amdgpu_target=gfx90a + # - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268 + # -- + # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 + # - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898 + + mirrors: { "mirror": "s3://spack-binaries/develop/e4s-rocm-external" } + + ci: + pipeline-gen: + - build-job: + image: "ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01" + + cdash: + build-group: E4S ROCm External \ No newline at end of file diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index a10b279f532fcc..8b5947da34f366 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -1,21 +1,34 @@ spack: view: false + + concretizer: + reuse: false + unify: false + + compilers: + - compiler: + spec: gcc@=11.4.0 + paths: + cc: /usr/bin/gcc + cxx: /usr/bin/g++ + f77: /usr/bin/gfortran + fc: /usr/bin/gfortran + flags: {} + operating_system: ubuntu20.04 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] + packages: all: - compiler: [gcc@11.1.0] + require: '%gcc target=x86_64_v3' providers: blas: [openblas] mpi: [mpich] - require: target=x86_64_v3 - variants: +mpi amdgpu_target=gfx90a cuda_arch=80 - tbb: - require: "intel-tbb" + variants: +mpi binutils: variants: +ld +gold +headers +libiberty ~nls - boost: - variants: +python +filesystem +iostreams +system - cuda: - version: [11.7.0] elfutils: variants: +bzip2 ~nls +xz hdf5: @@ -24,29 +37,40 @@ spack: variants: fabrics=sockets,tcp,udp,rxm libunwind: variants: +pic +xz - mpich: - variants: ~wrapperrpath - ncurses: - variants: +termlib openblas: variants: threads=openmp - paraview: - # Don't build GUI support or GLX rendering for HPC/container deployments - require: "@5.11 ~qt+osmesa" trilinos: - require: - - one_of: [+amesos +amesos2 +anasazi +aztec +boost +epetra +epetraext +ifpack - +intrepid +intrepid2 +isorropia +kokkos +minitensor +nox +piro +phalanx - +rol +rythmos +sacado +stk +shards +stratimikos +tempus +tpetra - +trilinoscouplings +zoltan] - - one_of: [gotype=long_long, gotype=all] - - one_of: [~ml ~muelu ~zoltan2 ~teko, +ml +muelu +zoltan2 +teko] - - one_of: [+superlu-dist, ~superlu-dist] - - one_of: [+shylu, ~shylu] + variants: +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext + +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu + +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos + +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long xz: variants: +pic mesa: version: [21.3.8] + mpi: + require: mpich + mpich: + require: '~wrapperrpath ~hwloc' + ncurses: + require: '@6.3 +termlib' + tbb: + require: intel-tbb + boost: + version: [1.79.0] + variants: +atomic +chrono +container +date_time +exception +filesystem +graph + +iostreams +locale +log +math +mpi +multithreaded +program_options +random + +regex +serialization +shared +signals +stacktrace +system +test +thread +timer + cxxstd=17 visibility=global + libffi: + require: "@3.4.4" + vtk-m: + require: "+examples" + cuda: + version: [11.8.0] + paraview: + # Don't build GUI support or GLX rendering for HPC/container deployments + require: "@5.11 ~qt+osmesa" specs: # CPU @@ -55,13 +79,12 @@ spack: - aml - amrex - arborx - - archer - argobots - axom - bolt - - bricks + - boost + - bricks ~cuda - butterflypack - - boost +python +filesystem +iostreams +system - cabana - caliper - chai ~benchmarks ~tests @@ -72,7 +95,7 @@ spack: - drishti - dxt-explorer - dyninst - - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp ^hdf5@1.14 + - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp - exaworks - flecsi - flit @@ -83,24 +106,25 @@ spack: - globalarrays - gmp - gotcha - - gptune + - gptune ~mpispawn - h5bench - hdf5-vol-async - hdf5-vol-cache - hdf5-vol-log - heffte +fftw - hpctoolkit - - hpx max_cpu_count=512 networking=mpi + - hpx networking=mpi - hypre - kokkos +openmp - kokkos-kernels +openmp - lammps + - lbann - legion - libnrm - - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed - +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +mgard + - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp - libquo - libunwind + - loki - mercury - metall - mfem @@ -113,6 +137,7 @@ spack: - nrm - nvhpc - omega-h + - openfoam - openmpi - openpmd-api - papi @@ -124,16 +149,17 @@ spack: - plasma - plumed - precice + - pruners-ninja - pumi - - py-h5py +mpi - - py-h5py ~mpi + - py-h5py - py-jupyterhub - - py-libensemble +mpi +nlopt + - py-libensemble - py-petsc4py - py-warpx - qthreads scheduler=distrib - quantum-espresso - raja + - rempi - scr - slate ~cuda - slepc @@ -142,107 +168,226 @@ spack: - sundials - superlu - superlu-dist - - swig - swig@4.0.2-fortran - sz3 - tasmanian - tau +mpi +python - - trilinos@13.0.1 +belos +ifpack2 +stokhos + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap - umpire - upcxx - variorum - - veloc - wannier90 - - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos +shylu + - xyce +mpi +shared +pymi +pymi_static_tpls + # INCLUDED IN ECP DAV CPU + - adios2 + - ascent + - darshan-runtime + - darshan-util + - faodel + - hdf5 + - libcatalyst + - parallel-netcdf + - paraview + - py-cinemasci + - sz + - unifyfs + - veloc + # - visit # silo: https://github.com/spack/spack/issues/39538 + - vtk-m + - zfp + # -- + # - archer # submerged into llvm +libomp_tsan + # - geopm # geopm: https://github.com/spack/spack/issues/38795 - # CUDA - - amrex +cuda - - arborx +cuda ^kokkos +wrapper + # CUDA NOARCH - bricks +cuda - - cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda - - caliper +cuda - - chai ~benchmarks ~tests +cuda ^umpire ~shared - - cusz +cuda - - dealii +cuda - - ecp-data-vis-sdk +cuda ~ascent +adios2 +hdf5 +paraview +sz +vtkm +zfp ^hdf5@1.14 # Removing ascent because RAJA build failure - - flecsi +cuda - flux-core +cuda - - ginkgo +cuda - - heffte +cuda - hpctoolkit +cuda - - hpx max_cpu_count=512 +cuda - - hypre +cuda - - kokkos +wrapper +cuda - - kokkos-kernels +cuda ^kokkos +wrapper +cuda +cuda_lambda - - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua - +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz - +mgard +cuda ^cusz +cuda - - magma +cuda - - mfem +cuda - - mgard +serial +openmp +timing +unstructured +cuda - - omega-h +cuda - papi +cuda - - petsc +cuda - - py-torch +cuda - - raja +cuda - - slate +cuda - - slepc +cuda - - strumpack ~slate +cuda - - sundials +cuda - - superlu-dist +cuda - - tasmanian +cuda - tau +mpi +cuda - - "trilinos@13.4.0: +belos +ifpack2 +stokhos +cuda" - - umpire ~shared +cuda + # -- + # - legion +cuda # legion: needs NVIDIA driver + + # CUDA 80 + - amrex +cuda cuda_arch=80 + - arborx +cuda cuda_arch=80 ^kokkos +wrapper + - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80 + - caliper +cuda cuda_arch=80 + - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared + - cusz +cuda cuda_arch=80 + - dealii +cuda cuda_arch=80 + - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error + - flecsi +cuda cuda_arch=80 + - ginkgo +cuda cuda_arch=80 + - heffte +cuda cuda_arch=80 + - hpx +cuda cuda_arch=80 + - hypre +cuda cuda_arch=80 + - kokkos +wrapper +cuda cuda_arch=80 + - kokkos-kernels +cuda cuda_arch=80 ^kokkos +wrapper +cuda cuda_arch=80 + - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=80 ^cusz +cuda cuda_arch=80 + - magma +cuda cuda_arch=80 + - mfem +cuda cuda_arch=80 + - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=80 + - omega-h +cuda cuda_arch=80 + - parsec +cuda cuda_arch=80 + - petsc +cuda cuda_arch=80 + - py-torch +cuda cuda_arch=80 + - raja +cuda cuda_arch=80 + - slate +cuda cuda_arch=80 + - slepc +cuda cuda_arch=80 + - strumpack ~slate +cuda cuda_arch=80 + - sundials +cuda cuda_arch=80 + - superlu-dist +cuda cuda_arch=80 + - tasmanian +cuda cuda_arch=80 + - trilinos +cuda cuda_arch=80 + - umpire ~shared +cuda cuda_arch=80 + # INCLUDED IN ECP DAV CUDA + # - adios2 +cuda cuda_arch=80 + # - ascent +cuda cuda_arch=80 # ascent: https://github.com/spack/spack/issues/38045 + # - paraview +cuda cuda_arch=80 + # - vtk-m +cuda cuda_arch=80 + # - zfp +cuda cuda_arch=80 + # -- + # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver + # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver + # - axom +cuda cuda_arch=80 # axom: https://github.com/spack/spack/issues/29520 + # - lbann +cuda cuda_arch=80 # lbann: https://github.com/spack/spack/issues/38788 + + # CUDA 90 + - amrex +cuda cuda_arch=90 + - arborx +cuda cuda_arch=90 ^kokkos +wrapper + - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90 + - caliper +cuda cuda_arch=90 + - chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared + - cusz +cuda cuda_arch=90 + - flecsi +cuda cuda_arch=90 + - ginkgo +cuda cuda_arch=90 + - heffte +cuda cuda_arch=90 + - hpx +cuda cuda_arch=90 + - kokkos +wrapper +cuda cuda_arch=90 + - kokkos-kernels +cuda cuda_arch=90 ^kokkos +wrapper +cuda cuda_arch=90 + - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=90 ^cusz +cuda cuda_arch=90 + - magma +cuda cuda_arch=90 + - mfem +cuda cuda_arch=90 + - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=90 + - parsec +cuda cuda_arch=90 + - petsc +cuda cuda_arch=90 + - py-torch +cuda cuda_arch=90 + - raja +cuda cuda_arch=90 + - slate +cuda cuda_arch=90 + - slepc +cuda cuda_arch=90 + - strumpack ~slate +cuda cuda_arch=90 + - sundials +cuda cuda_arch=90 + - superlu-dist +cuda cuda_arch=90 + - trilinos +cuda cuda_arch=90 + - umpire ~shared +cuda cuda_arch=90 + # INCLUDED IN ECP DAV CUDA + - adios2 +cuda cuda_arch=90 + # - ascent +cuda cuda_arch=90 # ascent: https://github.com/spack/spack/issues/38045 + # - paraview +cuda cuda_arch=90 # paraview: InstallError: Incompatible cuda_arch=90 + - vtk-m +cuda cuda_arch=90 + - zfp +cuda cuda_arch=90 + # -- + # - axom +cuda cuda_arch=90 # axom: https://github.com/spack/spack/issues/29520 + # - dealii +cuda cuda_arch=90 # dealii: https://github.com/spack/spack/issues/39532 + # - ecp-data-vis-sdk ~rocm +adios2 +ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=90 # paraview: incompatible cuda_arch; vtk-m: CMake Error at CMake/VTKmWrappers.cmake:413 (message): vtkm_cont needs to be built STATIC as CUDA doesn't support virtual methods across dynamic library boundaries. You need to set the CMake opt ion BUILD_SHARED_LIBS to `OFF` or (better) turn VTKm_NO_DEPRECATED_VIRTUAL to `ON`. + # - hypre +cuda cuda_arch=90 # concretizer: hypre +cuda requires cuda@:11, but cuda_arch=90 requires cuda@12: + # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver + # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann" + # - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535 + # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12 + # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver - # ROCm - - amrex +rocm - - arborx +rocm - - cabana +rocm - - caliper +rocm - - chai ~benchmarks +rocm - - ecp-data-vis-sdk +adios2 +hdf5 +paraview +pnetcdf +sz +vtkm +zfp +rocm ^hdf5@1.14 # Excludes ascent for now due to C++ standard issues - - gasnet +rocm - - ginkgo +rocm - - heffte +rocm + # ROCM NOARCH - hpctoolkit +rocm - - hpx max_cpu_count=512 +rocm - - hypre +rocm - - kokkos +rocm - - magma ~cuda +rocm - - mfem +rocm - - papi +rocm - - petsc +rocm - - raja ~openmp +rocm - - slate +rocm - - slepc +rocm ^petsc +rocm - - strumpack ~slate +rocm - - sundials +rocm - - superlu-dist +rocm - - tasmanian ~openmp +rocm - - tau +mpi +rocm - - "trilinos@13.4.0: +belos ~ifpack2 ~stokhos +rocm" - - umpire +rocm - - upcxx +rocm + - tau +mpi +rocm # tau: has issue with `spack env depfile` build - # CPU failures - # - geopm # /usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: error:'__builtin_strncpy' specified bound 512 equals destination size [-Werror=stringop-truncation] - # - hdf5-vol-daos # hdf5-vol-daos: vhost/vhost_user.c:65:32: error: array size missing in 'vhost_message_handlers' - # - loki # ../include/loki/Singleton.h:158:14: warning: 'template class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations] - # - pruners-ninja # test/ninja_test_util.c:34: multiple definition of `a'; - # - rempi # rempi_message_manager.h:53:3: error: 'string' does not name a type + # ROCM 908 + - amrex +rocm amdgpu_target=gfx908 + - arborx +rocm amdgpu_target=gfx908 + - cabana +rocm amdgpu_target=gfx908 + - caliper +rocm amdgpu_target=gfx908 + - chai ~benchmarks +rocm amdgpu_target=gfx908 + - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908 + - gasnet +rocm amdgpu_target=gfx908 + - ginkgo +rocm amdgpu_target=gfx908 + - heffte +rocm amdgpu_target=gfx908 + - hpx +rocm amdgpu_target=gfx908 + - hypre +rocm amdgpu_target=gfx908 + - kokkos +rocm amdgpu_target=gfx908 + - legion +rocm amdgpu_target=gfx908 + - magma ~cuda +rocm amdgpu_target=gfx908 + - mfem +rocm amdgpu_target=gfx908 + - petsc +rocm amdgpu_target=gfx908 + - raja ~openmp +rocm amdgpu_target=gfx908 + - slate +rocm amdgpu_target=gfx908 + - slepc +rocm amdgpu_target=gfx908 ^petsc +rocm amdgpu_target=gfx908 + - strumpack ~slate +rocm amdgpu_target=gfx908 + - sundials +rocm amdgpu_target=gfx908 + - superlu-dist +rocm amdgpu_target=gfx908 + - tasmanian ~openmp +rocm amdgpu_target=gfx908 + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx908 + - umpire +rocm amdgpu_target=gfx908 + - upcxx +rocm amdgpu_target=gfx908 + # INCLUDED IN ECP DAV ROCM + # - hdf5 + # - hdf5-vol-async + # - hdf5-vol-cache + # - hdf5-vol-log + # - libcatalyst + - paraview +rocm amdgpu_target=gfx908 + # - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268 + # -- + # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807 + # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898 - # CUDA failures - # - parsec +cuda # parsec/mca/device/cuda/transfer.c:168: multiple definition of `parsec_CUDA_d2h_max_flows'; + # ROCM 90a + - amrex +rocm amdgpu_target=gfx90a + - arborx +rocm amdgpu_target=gfx90a + - cabana +rocm amdgpu_target=gfx90a + - caliper +rocm amdgpu_target=gfx90a + - chai ~benchmarks +rocm amdgpu_target=gfx90a + - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a + - gasnet +rocm amdgpu_target=gfx90a + - ginkgo +rocm amdgpu_target=gfx90a + - heffte +rocm amdgpu_target=gfx90a + - hpx +rocm amdgpu_target=gfx90a + - hypre +rocm amdgpu_target=gfx90a + - kokkos +rocm amdgpu_target=gfx90a + - legion +rocm amdgpu_target=gfx90a + - magma ~cuda +rocm amdgpu_target=gfx90a + - mfem +rocm amdgpu_target=gfx90a + - petsc +rocm amdgpu_target=gfx90a + - raja ~openmp +rocm amdgpu_target=gfx90a + - slate +rocm amdgpu_target=gfx90a + - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a + - strumpack ~slate +rocm amdgpu_target=gfx90a + - sundials +rocm amdgpu_target=gfx90a + - superlu-dist +rocm amdgpu_target=gfx90a + - tasmanian ~openmp +rocm amdgpu_target=gfx90a + - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack ~ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu ~stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long +rocm amdgpu_target=gfx90a + - umpire +rocm amdgpu_target=gfx90a + - upcxx +rocm amdgpu_target=gfx90a + # INCLUDED IN ECP DAV ROCM + # - hdf5 + # - hdf5-vol-async + # - hdf5-vol-cache + # - hdf5-vol-log + # - libcatalyst + - paraview +rocm amdgpu_target=gfx90a + # - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268 + # -- + # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 + # - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898 mirrors: { "mirror": "s3://spack-binaries/develop/e4s" } ci: pipeline-gen: - build-job: - image: "ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01" + image: "ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01" cdash: - build-group: E4S + build-group: E4S \ No newline at end of file From f0260c84b44e36a4bae911404bdfb017bf1737de Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:28:55 +0200 Subject: [PATCH 042/806] Fix binutils regression on +gas~ld fix (#40292) --- .../repos/builtin/packages/binutils/package.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 9e3e528c4002e5..30aee917e0125f 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -96,13 +96,7 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): when="@2.37:", ) variant("ld", default=False, description="Enable ld.") - # When you build binutils with ~ld and +gas and load it in your PATH, you - # may end up with incompatibilities between a potentially older system ld - # and a recent assembler. For instance the linker on ubuntu 16.04 from - # binutils 2.26 and the assembler from binutils 2.36.1 will result in: - # "unable to initialize decompress status for section .debug_info" - # when compiling with debug symbols on gcc. - variant("gas", default=False, when="+ld", description="Enable as assembler.") + variant("gas", default=False, description="Enable as assembler.") variant("interwork", default=False, description="Enable interwork.") variant("gprofng", default=False, description="Enable gprofng.", when="@2.39:") variant( @@ -162,6 +156,14 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): "~lto", when="+pgo", msg="Profile-guided optimization enables link-time optimization" ) + # When you build binutils with ~ld and +gas and load it in your PATH, you + # may end up with incompatibilities between a potentially older system ld + # and a recent assembler. For instance the linker on ubuntu 16.04 from + # binutils 2.26 and the assembler from binutils 2.36.1 will result in: + # "unable to initialize decompress status for section .debug_info" + # when compiling with debug symbols on gcc. + conflicts("+gas", "~ld", msg="Assembler not always compatible with system ld") + @classmethod def determine_version(cls, exe): output = Executable(exe)("--version", output=str, error=str) From 3b32a9918ce7d7124e8645c45f7081093a3e5e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Tue, 3 Oct 2023 19:21:36 +0200 Subject: [PATCH 043/806] [add] py-graphene: new recipe, required by py-cylc-flow (#39988) --- .../builtin/packages/py-graphene/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-graphene/package.py diff --git a/var/spack/repos/builtin/packages/py-graphene/package.py b/var/spack/repos/builtin/packages/py-graphene/package.py new file mode 100644 index 00000000000000..407156127f32ec --- /dev/null +++ b/var/spack/repos/builtin/packages/py-graphene/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 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 PyGraphene(PythonPackage): + """GraphQL Framework for Python.""" + + homepage = "https://github.com/graphql-python/graphene" + pypi = "graphene/graphene-3.3.tar.gz" + + maintainers("LydDeb") + + version("2.1.9", sha256="b9f2850e064eebfee9a3ef4a1f8aa0742848d97652173ab44c82cc8a62b9ed93") + + depends_on("py-setuptools", type="build") + depends_on("py-graphql-core@2.1:2", type=("build", "run")) + depends_on("py-graphql-relay@2", type=("build", "run")) + depends_on("py-aniso8601@3:7", type=("build", "run")) + depends_on("py-six@1.10.0:1", type=("build", "run")) From bf23be291b4faa27745f35743a6727a9bb3fcdbf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 Oct 2023 13:12:55 -0500 Subject: [PATCH 044/806] py-tables: add v3.8.0 (#40295) --- .../builtin/packages/py-blosc2/package.py | 30 ++++++++++++++++ .../builtin/packages/py-ndindex/package.py | 17 ++++++++++ .../builtin/packages/py-tables/package.py | 34 ++++++++++++------- 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-blosc2/package.py create mode 100644 var/spack/repos/builtin/packages/py-ndindex/package.py diff --git a/var/spack/repos/builtin/packages/py-blosc2/package.py b/var/spack/repos/builtin/packages/py-blosc2/package.py new file mode 100644 index 00000000000000..983ed0273b27e2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-blosc2/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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 PyBlosc2(PythonPackage): + """Python wrapper for the C-Blosc2 library.""" + + homepage = "https://github.com/Blosc/python-blosc2" + pypi = "blosc2/blosc2-2.2.8.tar.gz" + + version("2.2.8", sha256="59065aac5e9b01b0e9f3825d8e7f69f64b59bbfab148a47c54e4115f62a97474") + version("2.0.0", sha256="f19b0b3674f6c825b490f00d8264b0c540c2cdc11ec7e81178d38b83c57790a1") + + depends_on("python@3.9:3", when="@2.2:", type=("build", "link", "run")) + depends_on("python@3.8:3", when="@2.0", type=("build", "link", "run")) + depends_on("py-setuptools", type="build") + depends_on("py-scikit-build", type="build") + depends_on("py-cython", type="build") + # FIXME: why doesn't this work? + # depends_on("py-cmake", type="build") + depends_on("cmake@3.11:", type="build") + depends_on("py-ninja", type="build") + depends_on("py-numpy@1.20.3:", type=("build", "link", "run")) + depends_on("py-ndindex@1.4:", when="@2.2:", type=("build", "run")) + depends_on("py-msgpack", type=("build", "run")) + depends_on("py-py-cpuinfo", when="@2.2:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-ndindex/package.py b/var/spack/repos/builtin/packages/py-ndindex/package.py new file mode 100644 index 00000000000000..b8d579c08a33fc --- /dev/null +++ b/var/spack/repos/builtin/packages/py-ndindex/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 PyNdindex(PythonPackage): + """A Python library for manipulating indices of ndarrays.""" + + homepage = "https://quansight-labs.github.io/ndindex/" + pypi = "ndindex/ndindex-1.7.tar.gz" + + version("1.7", sha256="bf9bd0b76eeada1c8275e04091f8291869ed2b373b7af48e56faf7579fd2efd2") + + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-tables/package.py b/var/spack/repos/builtin/packages/py-tables/package.py index 9f88bfd9ee0572..a350e3c09c62b7 100644 --- a/var/spack/repos/builtin/packages/py-tables/package.py +++ b/var/spack/repos/builtin/packages/py-tables/package.py @@ -13,6 +13,7 @@ class PyTables(PythonPackage): homepage = "https://www.pytables.org/" pypi = "tables/tables-3.6.1.tar.gz" + version("3.8.0", sha256="34f3fa2366ce20b18f1df573a77c1d27306ce1f2a41d9f9eff621b5192ea8788") version("3.7.0", sha256="e92a887ad6f2a983e564a69902de4a7645c30069fc01abd353ec5da255c5e1fe") version("3.6.1", sha256="49a972b8a7c27a8a173aeb05f67acb45fe608b64cd8e9fa667c0962a60b71b49") version("3.6.0", sha256="db3488214864fb313a611fca68bf1c9019afe4e7877be54d0e61c84416603d4d") @@ -25,26 +26,35 @@ class PyTables(PythonPackage): variant("bzip2", default=False, description="Support for bzip2 compression") variant("lzo", default=False, description="Support for lzo compression") - # requirements.txt - depends_on("python@3.6:", when="@3.7.0:", type=("build", "run")) - depends_on("python@3.5:", when="@3.6.1:", type=("build", "run")) - depends_on("python@3.4:", when="@3.6.0:", type=("build", "run")) - depends_on("python@2.6:", type=("build", "run")) + # pyproject.toml + depends_on("py-setuptools@42:", when="@3.7:", type="build") + depends_on("py-setuptools", type="build") + + # setup.py + depends_on("python@3.8:", when="@3.8:", type=("build", "run")) - depends_on("py-setuptools", type=("build", "run")) - depends_on("py-setuptools@42.0:", when="@3.7.0:", type=("build", "run")) + # requirements.txt + depends_on("py-cython@0.29.21:", when="@3.7:", type=("build", "run")) depends_on("py-cython@0.21:", type="build") - depends_on("py-cython@0.29.21:", when="@3.7.0:", type="build") + depends_on("py-numpy@1.19:", when="@3.8:", type=("build", "run")) depends_on("py-numpy@1.9.3:", type=("build", "run")) depends_on("py-numexpr@2.6.2:", type=("build", "run")) - depends_on("py-six@1.9.0:", when="@:3.5", type=("build", "run")) - depends_on("py-packaging", when="@3.7.0:", type=("build", "run")) + depends_on("py-blosc2@2.0", type=("build", "run")) + depends_on("py-packaging", when="@3.7:", type=("build", "run")) + depends_on("py-py-cpuinfo", when="@3.8:", type=("build", "run")) + # tables/req_versions.py - depends_on("hdf5@1.8.4:1.8", when="@:3.3") depends_on("hdf5@1.8.4:", when="@3.4.0:") + depends_on("hdf5@1.8.4:1.8", when="@:3.3") + + # Historical dependencies + depends_on("py-six@1.9:", when="@:3.5", type=("build", "run")) + + # tables/req_versions.py # Versions prior to 3.3 must build with the internal blosc due to a lock # problem in a multithreaded environment. - depends_on("c-blosc@1.4.1:", when="@3.3.0:") + depends_on("c-blosc@1.11.1:", when="@3.8:") + depends_on("c-blosc@1.4.1:", when="@3.3:") depends_on("zlib-api", when="+zlib") depends_on("bzip2", when="+bzip2") depends_on("lzo", when="+lzo") From 86d2e1af973f0dd330cc65d401bfc3342ab1d391 Mon Sep 17 00:00:00 2001 From: George Young Date: Tue, 3 Oct 2023 19:26:49 +0100 Subject: [PATCH 045/806] falco: new package @1.2.1 (#40289) * falco: new package @1.2.1 * specifying gmake * Replacing homepage - readthedocs is empty --------- Co-authored-by: LMS Bioinformatics --- .../repos/builtin/packages/falco/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/falco/package.py diff --git a/var/spack/repos/builtin/packages/falco/package.py b/var/spack/repos/builtin/packages/falco/package.py new file mode 100644 index 00000000000000..5acecbf5c0f3de --- /dev/null +++ b/var/spack/repos/builtin/packages/falco/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 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 Falco(AutotoolsPackage): + """A C++ drop-in replacement of FastQC to assess the quality of sequence read data""" + + homepage = "https://github.com/smithlabcode/falco" + url = "https://github.com/smithlabcode/falco/releases/download/v1.2.1/falco-1.2.1.tar.gz" + + version("1.2.1", sha256="33de8aafac45c7aea055ed7ab837d0a39d12dcf782816cea8a6c648acb911057") + + variant("htslib", default=False, description="Add support for BAM files") + + depends_on("gmake", type="build") + depends_on("zlib-ng") + depends_on("htslib", when="+htslib") + + def configure_args(self): + if self.spec.satisfies("+htslib"): + return ["--enable-htslib"] + return [] From 58017f484c6a5524a2c363bfde169d5955e3984a Mon Sep 17 00:00:00 2001 From: Sinan Date: Tue, 3 Oct 2023 12:21:51 -0700 Subject: [PATCH 046/806] fix_qgis_build_with_pysip5 (#39941) * fix_qgis_build_with_pysip5 * build fails with newer protobuf * somehow findgdal can figure this out. * Update var/spack/repos/builtin/packages/qgis/package.py Co-authored-by: Adam J. Stewart * fix gdal lib again * qgis needs QtPositioning provided by qt+location option * fix FindPyQt5 cmake file * fix bug * fix qsci sip issue * fix bug * blackify * improve * add latest LTR * add build dep * revert until bug is fixed * specify proj version for qgis 3.28 * improve gdal libs search via indicating gdal-config * make flake happy * improve deps * add 3.28.11, improve style * fix style * [@spackbot] updating style on behalf of Sinan81 --------- Co-authored-by: Sinan81 Co-authored-by: Adam J. Stewart Co-authored-by: Sinan81 --- .../repos/builtin/packages/qgis/package.py | 54 ++++++++++++++++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py index a269ba95a1e8a6..45bb05639910f2 100644 --- a/var/spack/repos/builtin/packages/qgis/package.py +++ b/var/spack/repos/builtin/packages/qgis/package.py @@ -17,15 +17,18 @@ class Qgis(CMakePackage): maintainers("adamjstewart", "Sinan81") - version("3.28.3", sha256="a09124f46465a520f6d735306ba3954c339b84aa396d6f52b476b82edcc4fe0e") # Prefer latest long term release version( - "3.22.16", - sha256="dbd1f8a639291bb2492eea61e4ef96079d7b27d3dfa538dab8cd98f31429254a", + "3.28.11", + sha256="c5eb703893c7f98de051c45d677c4a34b40f986db51782a4930ddefad4e193b4", preferred=True, ) + version("3.28.10", sha256="cff867e97909bbc2facce6343770dcb1b61fc6e4855f57783e30bf63d51c5218") + version("3.28.3", sha256="a09124f46465a520f6d735306ba3954c339b84aa396d6f52b476b82edcc4fe0e") + version("3.22.16", sha256="dbd1f8a639291bb2492eea61e4ef96079d7b27d3dfa538dab8cd98f31429254a") version("3.22.0", sha256="cf0c169863f332aab67d8c4943e14b73a564f0254bf54015f5826c6427e6785b") version("3.18.2", sha256="1913e4d5596bbc8b7d143f3defb18bf376f750a71f334f69d76af5deca7ecc5d") + version("3.16.16", sha256="ccd2f404534fcb00b5e17863375462090c9575e68b32ce50b2e7e925d1e01a49") version("3.16.12", sha256="65e9634b5c885c98f3555cf77bc2e3fae5e19279aa17e3f6626ff5d7455fd2b9") version("3.16.5", sha256="525f469ad6e40dd7a8f09ebab5eb6a2dffc45939b99b7d937750cc04ed78d61c") version("3.14.16", sha256="c9915c2e577f1812a2b35b678b123c58407e07824d73e5ec0dda13db7ca75c04") @@ -110,9 +113,12 @@ class Qgis(CMakePackage): depends_on("proj@4.4.0:") depends_on("proj@4.9.3:", when="@3.8.2:") depends_on("proj@7.2:", when="@3.28:") + depends_on("proj@:8", when="@3.28") # build fails with proj@9 depends_on("py-psycopg2", type=("build", "run")) # TODO: is build dependency necessary? depends_on("py-pyqt4", when="@2") depends_on("py-pyqt5@5.3:", when="@3") + depends_on("py-sip", type="build") + depends_on("py-pyqt-builder", type="build", when="^py-sip@5:") depends_on("py-requests", type=("build", "run")) # TODO: is build dependency necessary? depends_on("python@3.0.0:", type=("build", "run"), when="@3") depends_on("python@3.6:", type=("build", "run"), when="@3.18:") @@ -120,14 +126,15 @@ class Qgis(CMakePackage): depends_on("qca@2.2.1:") depends_on("qjson") depends_on("qscintilla +python") - depends_on("qt+dbus") - depends_on("qt+dbus@5.12.0:", when="@3.20:") - depends_on("qt+dbus@5.14.0:", when="@3.28:") + depends_on("qt+dbus+location") + depends_on("qt+dbus+location@5.12.0:", when="@3.20:") + depends_on("qt+dbus+location@5.14.0:", when="@3.28:") depends_on("qtkeychain@0.5:", when="@3:") depends_on("qwt@5:") depends_on("qwtpolar") depends_on("sqlite@3.0.0: +column_metadata") depends_on("protobuf", when="@3.16.4:") + depends_on("protobuf@:3.21", when="@:3.28") depends_on("zstd", when="@3.22:") # Runtime python dependencies, not mentioned in install instructions @@ -163,8 +170,38 @@ class Qgis(CMakePackage): depends_on("qt@:4", when="@2") patch("pyqt5.patch", when="@:3.14 ^qt@5") - patch("pyqt5_3165x.patch", when="@3.16.5:3.21 ^qt@5") - patch("pyqt5_322x.patch", when="@3.22: ^qt@5") + patch("pyqt5_3165x.patch", when="@3.16.5:3.21 ^qt@5 ^py-sip@4") + patch("pyqt5_322x.patch", when="@3.22: ^qt@5 ^py-sip@4") + + @run_before("cmake", when="^py-pyqt5") + def fix_pyqt5_cmake(self): + cmfile = FileFilter(join_path("cmake", "FindPyQt5.cmake")) + pyqtpath = join_path( + self.spec["py-pyqt5"].prefix, self.spec["python"].package.platlib, "PyQt5" + ) + cmfile.filter( + 'SET(PYQT5_MOD_DIR "${Python_SITEARCH}/PyQt5")', + 'SET(PYQT5_MOD_DIR "' + pyqtpath + '")', + string=True, + ) + cmfile.filter( + 'SET(PYQT5_SIP_DIR "${Python_SITEARCH}/PyQt5/bindings")', + 'SET(PYQT5_SIP_DIR "' + pyqtpath + '/bindings")', + string=True, + ) + + @run_before("build") + def fix_qsci_sip(self): + if "^py-pyqt5" in self.spec: + pyqtx = "PyQt5" + elif "^py-pyqt6" in self.spec: + pyqtx = "PyQt6" + + sip_inc_dir = join_path( + self.spec["qscintilla"].prefix, self.spec["python"].package.platlib, pyqtx, "bindings" + ) + with open(join_path("python", "gui", "pyproject.toml.in"), "a") as tomlfile: + tomlfile.write(f'\n[tool.sip.project]\nsip-include-dirs = ["{sip_inc_dir}"]\n') def cmake_args(self): spec = self.spec @@ -185,6 +222,7 @@ def cmake_args(self): "-DLIBZIP_INCLUDE_DIR=" + self.spec["libzip"].prefix.include, "-DLIBZIP_CONF_INCLUDE_DIR=" + self.spec["libzip"].prefix.lib.libzip.include, "-DGDAL_CONFIG_PREFER_PATH=" + self.spec["gdal"].prefix.bin, + "-DGDAL_CONFIG=" + join_path(self.spec["gdal"].prefix.bin, "gdal-config"), "-DGEOS_CONFIG_PREFER_PATH=" + self.spec["geos"].prefix.bin, "-DGSL_CONFIG_PREFER_PATH=" + self.spec["gsl"].prefix.bin, "-DPOSTGRES_CONFIG_PREFER_PATH=" + self.spec["postgresql"].prefix.bin, From 92a6ddcbc3db2cd36d5a588cb2666a00c3f3ccd8 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Tue, 3 Oct 2023 15:16:41 -0600 Subject: [PATCH 047/806] ci: Change how job names appear in gitlab (#39963) --- lib/spack/spack/ci.py | 48 +++++++++------------------------- lib/spack/spack/test/cmd/ci.py | 3 +-- 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 6d555798ce335e..bf5aaa79a3fba6 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -50,6 +50,9 @@ TEMP_STORAGE_MIRROR_NAME = "ci_temporary_mirror" SPACK_RESERVED_TAGS = ["public", "protected", "notary"] SHARED_PR_MIRROR_URL = "s3://spack-binaries-prs/shared_pr_mirror" +JOB_NAME_FORMAT = ( + "{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}" +) spack_gpg = spack.main.SpackCommand("gpg") spack_compiler = spack.main.SpackCommand("compiler") @@ -69,48 +72,23 @@ def __exit__(self, exc_type, exc_value, exc_traceback): return False -def get_job_name(spec, osarch, build_group): - """Given the necessary parts, format the gitlab job name +def get_job_name(spec: spack.spec.Spec, build_group: str = ""): + """Given a spec and possibly a build group, return the job name. If the + resulting name is longer than 255 characters, it will be truncated. Arguments: spec (spack.spec.Spec): Spec job will build - osarch: Architecture TODO: (this is a spack.spec.ArchSpec, - but sphinx doesn't recognize the type and fails). build_group (str): Name of build group this job belongs to (a CDash notion) Returns: The job name """ - item_idx = 0 - format_str = "" - format_args = [] - - format_str += "{{{0}}}".format(item_idx) - format_args.append(spec.name) - item_idx += 1 - - format_str += "/{{{0}}}".format(item_idx) - format_args.append(spec.dag_hash(7)) - item_idx += 1 - - format_str += " {{{0}}}".format(item_idx) - format_args.append(spec.version) - item_idx += 1 - - format_str += " {{{0}}}".format(item_idx) - format_args.append(spec.compiler) - item_idx += 1 - - format_str += " {{{0}}}".format(item_idx) - format_args.append(osarch) - item_idx += 1 + job_name = spec.format(JOB_NAME_FORMAT) if build_group: - format_str += " {{{0}}}".format(item_idx) - format_args.append(build_group) - item_idx += 1 + job_name = "{0} {1}".format(job_name, build_group) - return format_str.format(*format_args) + return job_name[:255] def _remove_reserved_tags(tags): @@ -337,7 +315,7 @@ def _spec_matches(spec, match_string): def _format_job_needs( - dep_jobs, osname, build_group, prune_dag, rebuild_decisions, enable_artifacts_buildcache + dep_jobs, build_group, prune_dag, rebuild_decisions, enable_artifacts_buildcache ): needs_list = [] for dep_job in dep_jobs: @@ -347,7 +325,7 @@ def _format_job_needs( if not prune_dag or rebuild: needs_list.append( { - "job": get_job_name(dep_job, dep_job.architecture, build_group), + "job": get_job_name(dep_job, build_group), "artifacts": enable_artifacts_buildcache, } ) @@ -1023,8 +1001,7 @@ def main_script_replacements(cmd): if "after_script" in job_object: job_object["after_script"] = _unpack_script(job_object["after_script"]) - osname = str(release_spec.architecture) - job_name = get_job_name(release_spec, osname, build_group) + job_name = get_job_name(release_spec, build_group) job_vars = job_object.setdefault("variables", {}) job_vars["SPACK_JOB_SPEC_DAG_HASH"] = release_spec_dag_hash @@ -1051,7 +1028,6 @@ def main_script_replacements(cmd): job_object["needs"].extend( _format_job_needs( dep_jobs, - osname, build_group, prune_dag, rebuild_decisions, diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index 25dc15e33197bf..a0de63517af1e8 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -1990,8 +1990,7 @@ def test_ci_reproduce( ci_cmd("generate", "--output-file", pipeline_path, "--artifacts-root", artifacts_root) - target_name = spack.platforms.test.Test.default - job_name = ci.get_job_name(job_spec, "test-debian6-%s" % target_name, None) + job_name = ci.get_job_name(job_spec) repro_file = os.path.join(working_dir.strpath, "repro.json") repro_details = { From 2817cd293636e58fa8283ff5c117134059ab85e3 Mon Sep 17 00:00:00 2001 From: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> Date: Tue, 3 Oct 2023 16:45:24 -0500 Subject: [PATCH 048/806] ADIOS2: v2.8 is not compatible with HDF5 v1.14: (#40258) --- var/spack/repos/builtin/packages/adios2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index ddd33862173798..47affe6f8a2cac 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -130,6 +130,7 @@ class Adios2(CMakePackage, CudaPackage): depends_on("libzmq", when="+dataman") depends_on("dataspaces@1.8.0:", when="+dataspaces") + depends_on("hdf5@:1.12", when="@:2.8 +hdf5") depends_on("hdf5~mpi", when="+hdf5~mpi") depends_on("hdf5+mpi", when="+hdf5+mpi") From 91178d40f3a0c9b4fca8cf66356be1b497825c3f Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Wed, 4 Oct 2023 00:51:14 -0700 Subject: [PATCH 049/806] e4s arm: disable bricks due to target=aarch64 not being respected (#40308) --- .../gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml index 4a15e62b9baf49..ebb254995deda7 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml @@ -81,7 +81,6 @@ spack: - axom - bolt - boost - - bricks ~cuda - butterflypack - cabana - caliper @@ -90,6 +89,7 @@ spack: - conduit - datatransferkit - dyninst + - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ? - exaworks - flecsi - flit @@ -189,21 +189,21 @@ spack: - vtk-m - zfp # -- - # - dealii # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. - # - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs@0.7.3: gcc: error: unrecognized command-line option '-mno-sse2' # - archer # part of llvm +omp_tsan - - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ? + # - bricks ~cuda # not respecting target=aarch64? + # - dealii # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. # - geopm # geopm: https://github.com/spack/spack/issues/38795 + # - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp # py-numcodecs@0.7.3: gcc: error: unrecognized command-line option '-mno-sse2' # - variorum # variorum: https://github.com/spack/spack/issues/38786 # CUDA NOARCH - - bricks +cuda - flux-core +cuda - hpctoolkit +cuda - papi +cuda - tau +mpi +cuda # -- - # - legion +cuda # legion: needs NVIDIA driver + # - bricks +cuda # not respecting target=aarch64? + # - legion +cuda # legion: needs NVIDIA driver # CUDA 75 - amrex +cuda cuda_arch=75 From 7bf6780de2b279629dece88f7ae054305f2693b8 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Wed, 4 Oct 2023 01:55:06 -0600 Subject: [PATCH 050/806] ci: pull E4S images from github instead of dockerhub (#40307) --- share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml | 10 +++++----- .../cloud_pipelines/stacks/e4s-arm/spack.yaml | 14 +++++++------- .../cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 4 ++-- .../cloud_pipelines/stacks/e4s-power/spack.yaml | 4 ++-- .../stacks/e4s-rocm-external/spack.yaml | 6 +++--- .../gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index fe801e68f03d73..df2c7f85ca2cca 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -287,7 +287,7 @@ protected-publish: e4s-generate: extends: [ ".e4s", ".generate-x86_64"] - image: ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01 + image: ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01 e4s-build: extends: [ ".e4s", ".build" ] @@ -310,7 +310,7 @@ e4s-build: e4s-arm-generate: extends: [ ".e4s-arm", ".generate-aarch64" ] - image: ecpe4s/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01 + image: ghcr.io/spack/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01 e4s-arm-build: extends: [ ".e4s-arm", ".build" ] @@ -333,7 +333,7 @@ e4s-arm-build: e4s-rocm-external-generate: extends: [ ".e4s-rocm-external", ".generate-x86_64"] - image: ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01 + image: ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01 e4s-rocm-external-build: extends: [ ".e4s-rocm-external", ".build" ] @@ -379,7 +379,7 @@ gpu-tests-build: e4s-oneapi-generate: extends: [ ".e4s-oneapi", ".generate-x86_64"] - image: ecpe4s/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01 + image: ghcr.io/spack/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01 e4s-oneapi-build: extends: [ ".e4s-oneapi", ".build" ] @@ -396,7 +396,7 @@ e4s-oneapi-build: # E4S on Power ######################################## .e4s-power-generate-tags-and-image: - image: { "name": "ecpe4s/ubuntu20.04-runner-ppc64-gcc-11.4:2023.08.01", "entrypoint": [""] } + image: { "name": "ghcr.io/spack/ubuntu20.04-runner-ppc64-gcc-11.4:2023.08.01", "entrypoint": [""] } tags: ["spack", "public", "large", "ppc64le"] .e4s-power: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml index ebb254995deda7..02aafd6addd1dc 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml @@ -187,7 +187,7 @@ spack: - veloc # - visit # silo: https://github.com/spack/spack/issues/39538 - vtk-m - - zfp + - zfp # -- # - archer # part of llvm +omp_tsan # - bricks ~cuda # not respecting target=aarch64? @@ -205,7 +205,7 @@ spack: # - bricks +cuda # not respecting target=aarch64? # - legion +cuda # legion: needs NVIDIA driver - # CUDA 75 + # CUDA 75 - amrex +cuda cuda_arch=75 - arborx +cuda cuda_arch=75 ^kokkos +wrapper - cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75 @@ -245,7 +245,7 @@ spack: # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=75 # embree: https://github.com/spack/spack/issues/39534 # - lammps +cuda cuda_arch=75 # lammps: needs NVIDIA driver # - lbann +cuda cuda_arch=75 # lbann: https://github.com/spack/spack/issues/38788 - # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=75 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=75 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 # - py-torch +cuda cuda_arch=75 # skipped, installed by other means # - slepc +cuda cuda_arch=75 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. # - upcxx +cuda cuda_arch=75 # upcxx: needs NVIDIA driver @@ -290,7 +290,7 @@ spack: # - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # embree: https://github.com/spack/spack/issues/39534 # - lammps +cuda cuda_arch=80 # lammps: needs NVIDIA driver # - lbann +cuda cuda_arch=80 # lbann: https://github.com/spack/spack/issues/38788 - # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=80 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=80 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 # - py-torch +cuda cuda_arch=80 # skipped, installed by other means # - slepc +cuda cuda_arch=80 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. # - upcxx +cuda cuda_arch=80 # upcxx: needs NVIDIA driver @@ -333,7 +333,7 @@ spack: # - hypre +cuda cuda_arch=90 # concretizer: hypre +cuda requires cuda@:11, but cuda_arch=90 requires cuda@12: # - lammps +cuda cuda_arch=90 # lammps: needs NVIDIA driver # - lbann +cuda cuda_arch=90 # concretizer: Cannot select a single "version" for package "lbann" - # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=90 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 + # - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf ~cusz +mgard +cuda cuda_arch=90 # libpressio: CMake Error at CMakeLists.txt:498 (find_library): Could not find CUFile_LIBRARY using the following names: cufile ; +cusz: https://github.com/spack/spack/issues/38787 # - omega-h +cuda cuda_arch=90 # omega-h: https://github.com/spack/spack/issues/39535 # - py-torch +cuda cuda_arch=90 # skipped, installed by other means # - slepc +cuda cuda_arch=90 # slepc: make[1]: *** internal error: invalid --jobserver-auth string 'fifo:/tmp/GMfifo1313'. @@ -345,7 +345,7 @@ spack: ci: pipeline-gen: - build-job: - image: "ecpe4s/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01" + image: "ghcr.io/spack/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01" cdash: - build-group: E4S ARM \ No newline at end of file + build-group: E4S ARM diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 160b079eb5d4bb..ec86c35b33d055 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -135,7 +135,7 @@ spack: - lammps - lbann - legion - - libnrm + - libnrm - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp - libquo - libunwind @@ -241,7 +241,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01 + image: ghcr.io/spack/ubuntu20.04-runner-amd64-oneapi-2023.2.1:2023.08.01 cdash: build-group: E4S OneAPI diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 1fcde50ca63fb1..72e06b060d2f1c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -189,7 +189,7 @@ spack: # - visit # libext, libxkbfile, libxrender, libxt, silo (https://github.com/spack/spack/issues/39538), cairo - vtk-m - zfp - # -- + # -- # - archer # part of llvm +omp_tsan # - dealii # fltk: https://github.com/spack/spack/issues/38791 # - geopm # geopm: https://github.com/spack/spack/issues/38798 @@ -256,7 +256,7 @@ spack: ci: pipeline-gen: - build-job: - image: ecpe4s/ubuntu20.04-runner-ppc64-gcc-11.4:2023.08.01 + image: ghcr.io/spack/ubuntu20.04-runner-ppc64-gcc-11.4:2023.08.01 cdash: build-group: E4S Power diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index dba404e9b3f910..cd9addbef0548c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -230,7 +230,7 @@ spack: buildable: false externals: - spec: hipsolver@5.4.3 - prefix: /opt/rocm-5.4.3 + prefix: /opt/rocm-5.4.3 rocsolver: buildable: false externals: @@ -340,7 +340,7 @@ spack: ci: pipeline-gen: - build-job: - image: "ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01" + image: "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4-rocm5.4.3:2023.08.01" cdash: - build-group: E4S ROCm External \ No newline at end of file + build-group: E4S ROCm External diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 8b5947da34f366..65ab32e80d0579 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -387,7 +387,7 @@ spack: ci: pipeline-gen: - build-job: - image: "ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01" + image: "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01" cdash: - build-group: E4S \ No newline at end of file + build-group: E4S From d9cacf664c3da8e0dfa3af6b75f256cc03ffd17f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 4 Oct 2023 09:59:59 +0200 Subject: [PATCH 051/806] petsc: add conflict on rocm 5.6: for now (#40300) hipsparse@5.6.0 changed hipsparseSpSV_solve() API, but reverted in 5.6.1 --- var/spack/repos/builtin/packages/petsc/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 4a8ac8657bb818..9d0d3a9016aa59 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -159,6 +159,10 @@ class Petsc(Package, CudaPackage, ROCmPackage): # https://github.com/spack/spack/issues/37416 conflicts("^rocprim@5.3.0:5.3.2", when="+rocm") + # petsc 3.20 has workaround for breaking change in hipsparseSpSV_solve api, + # but it seems to misdetect hipsparse@5.6.1 as 5.6.0, so the workaround + # only makes things worse + conflicts("^hipsparse@5.6", when="+rocm @3.20.0") # 3.8.0 has a build issue with MKL - so list this conflict explicitly conflicts("^intel-mkl", when="@3.8.0") From 42fbf17c821903de642bf0878e2acbab0e24abf4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 4 Oct 2023 04:28:49 -0500 Subject: [PATCH 052/806] py-einops: add v0.7.0 (#40296) --- var/spack/repos/builtin/packages/py-einops/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-einops/package.py b/var/spack/repos/builtin/packages/py-einops/package.py index 9394cdfc4621a7..d5d8eedebe6cf4 100644 --- a/var/spack/repos/builtin/packages/py-einops/package.py +++ b/var/spack/repos/builtin/packages/py-einops/package.py @@ -14,10 +14,12 @@ class PyEinops(PythonPackage): homepage = "https://github.com/arogozhnikov/einops" pypi = "einops/einops-0.3.2.tar.gz" + version("0.7.0", sha256="b2b04ad6081a3b227080c9bf5e3ace7160357ff03043cd66cc5b2319eb7031d1") version("0.6.1", sha256="f95f8d00f4ded90dbc4b19b6f98b177332614b0357dde66997f3ae5d474dc8c8") version("0.6.0", sha256="6f6c78739316a2e3ccbce8052310497e69da092935e4173f2e76ec4e3a336a35") version("0.5.0", sha256="8b7a83cffc1ea88e306df099b7cbb9c3ba5003bd84d05ae44be5655864abb8d3") version("0.3.2", sha256="5200e413539f0377f4177ef00dc019968f4177c49b1db3e836c7883df2a5fe2e") + depends_on("python@3.8:", when="@0.7:", type=("build", "run")) depends_on("py-hatchling@1.10:", when="@0.5:", type="build") depends_on("py-setuptools", when="@:0.4", type="build") From 931fce2c24a79eec0ec20c388d949ee088a82e28 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 4 Oct 2023 11:31:46 +0200 Subject: [PATCH 053/806] py-isort: needs setuptools build dep before v5 (#40234) * py-isort: needs setuptools build dep before v5 Detected in #40224. In the past, system setuptools could be picked up when using an external python, so py-isort@4 would install fine. With the linked PR, pip can only consider packages that Spack controls from PYTHONPATH, so the issue of missing py-setuptools showed up. * py-importlib-metadata: fix lowerbounds on python * review * py-isort unconditionally add optional setuptools dep to prevent picking up user package at runtime * style * drop optional py-setuptools run dep --- .../repos/builtin/packages/py-importlib-metadata/package.py | 3 +++ var/spack/repos/builtin/packages/py-isort/package.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-importlib-metadata/package.py b/var/spack/repos/builtin/packages/py-importlib-metadata/package.py index 910b287ac82e6b..0abad1fe97ef49 100644 --- a/var/spack/repos/builtin/packages/py-importlib-metadata/package.py +++ b/var/spack/repos/builtin/packages/py-importlib-metadata/package.py @@ -32,6 +32,9 @@ class PyImportlibMetadata(PythonPackage): version("0.19", sha256="23d3d873e008a513952355379d93cbcab874c58f4f034ff657c7a87422fa64e8") version("0.18", sha256="cb6ee23b46173539939964df59d3d72c3e0c1b5d54b84f1d8a7e912fe43612db") + depends_on("python@3.8:", when="@6.8.0:", type=("build", "run")) + # lowerbound needed as spack itself supports python 3.6 (can be dropped in spack 0.21) + depends_on("python@3.7:", when="@4.9.0:", type=("build", "run")) depends_on("py-setuptools@56:", when="@4.6.4:", type="build") depends_on("py-setuptools", type="build") depends_on("py-setuptools-scm@3.4.1:+toml", when="@3:", type="build") diff --git a/var/spack/repos/builtin/packages/py-isort/package.py b/var/spack/repos/builtin/packages/py-isort/package.py index ce49a3e1bc4ec7..aca4dd29047753 100644 --- a/var/spack/repos/builtin/packages/py-isort/package.py +++ b/var/spack/repos/builtin/packages/py-isort/package.py @@ -23,7 +23,8 @@ class PyIsort(PythonPackage): depends_on("python@3.8:", when="@5.12:", type=("build", "run")) depends_on("python@3.6.1:3", when="@5:5.10", type=("build", "run")) - depends_on("py-poetry-core@1:", type="build") + depends_on("py-setuptools", when="@:4", type=("build", "run")) + depends_on("py-poetry-core@1:", when="@5:", type="build") depends_on("py-colorama@0.4.3:", when="+colors @5.12:", type=("build", "run")) depends_on("py-colorama@0.4.3:0.4", when="+colors @:5.11", type=("build", "run")) From da637dba842c05ce45073b5cb986d3f6ee6b25e4 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 4 Oct 2023 09:34:23 -0600 Subject: [PATCH 054/806] Add new package awscli-v2 and its missing dependency awscrt (#40288) * Add new package awscli-v2 and its missing dependency awscrt * Remove boilerplate comments from awscli-v2 and awscrt packages * Fix typos in var/spack/repos/builtin/packages/awscli-v2/package.py * Update var/spack/repos/builtin/packages/awscli-v2/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/awscli-v2/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/awscli-v2/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/awscli-v2/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/awscli-v2/package.py Co-authored-by: Adam J. Stewart * Address reviewer comments * Remove py-pip version dependency from var/spack/repos/builtin/packages/awscli-v2/package.py --------- Co-authored-by: Adam J. Stewart --- .../builtin/packages/awscli-v2/package.py | 31 +++++++++++++++++++ .../builtin/packages/py-awscrt/package.py | 19 ++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 var/spack/repos/builtin/packages/awscli-v2/package.py create mode 100644 var/spack/repos/builtin/packages/py-awscrt/package.py diff --git a/var/spack/repos/builtin/packages/awscli-v2/package.py b/var/spack/repos/builtin/packages/awscli-v2/package.py new file mode 100644 index 00000000000000..49436945f9956e --- /dev/null +++ b/var/spack/repos/builtin/packages/awscli-v2/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2023 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 AwscliV2(PythonPackage): + """This package provides a unified command line interface to Amazon Web Services.""" + + homepage = "https://docs.aws.amazon.com/cli" + url = "https://github.com/aws/aws-cli/archive/refs/tags/2.13.22.tar.gz" + + maintainers("climbfuji") + + version("2.13.22", sha256="dd731a2ba5973f3219f24c8b332a223a29d959493c8a8e93746d65877d02afc1") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-flit-core@3.7.1:3.8.0", type=("build")) + depends_on("py-colorama@0.2.5:0.4.6", type=("build", "run")) + depends_on("py-docutils@0.10:0.19", type=("build", "run")) + depends_on("py-cryptography@3.3.2:40.0.1", type=("build", "run")) + depends_on("py-ruamel-yaml@0.15:0.17.21", type=("build", "run")) + depends_on("py-ruamel-yaml-clib@0.2:0.2.7", type=("build", "run")) + depends_on("py-prompt-toolkit@3.0.24:3.0.38", type=("build", "run")) + depends_on("py-distro@1.5:1.8", type=("build", "run")) + depends_on("py-awscrt@0.16.4:0.16.16", type=("build", "run")) + depends_on("py-python-dateutil@2.1:2", type=("build", "run")) + depends_on("py-jmespath@0.7.1:1.0", type=("build", "run")) + depends_on("py-urllib3@1.25.4:1.26", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-awscrt/package.py b/var/spack/repos/builtin/packages/py-awscrt/package.py new file mode 100644 index 00000000000000..652e7164a6f445 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-awscrt/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyAwscrt(PythonPackage): + """Python 3 bindings for the AWS Common Runtime.""" + + homepage = "https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html" + pypi = "awscrt/awscrt-0.16.16.tar.gz" + + maintainers("climbfuji") + + version("0.16.16", sha256="13075df2c1d7942fe22327b6483274517ee0f6ae765c4e6b6ae9ef5b4c43a827") + + depends_on("py-setuptools", type=("build")) From 284eaf1afef9c1f46f2750d4e658088ca12b3720 Mon Sep 17 00:00:00 2001 From: Josh Bowden Date: Wed, 4 Oct 2023 17:34:43 +0200 Subject: [PATCH 055/806] Damaris release v1.9.2 (#40285) * Update to latest dot versions and improved installation of Damaris python module damaris4py * fix for visit dependency typo * whitespace check * whitespace check * fix for style issue * reviewer suggestions for integrating Python added * suggestion for boost depends statement added --- var/spack/repos/builtin/packages/damaris/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/damaris/package.py b/var/spack/repos/builtin/packages/damaris/package.py index 44f56877b948b6..a93bbece1318c3 100644 --- a/var/spack/repos/builtin/packages/damaris/package.py +++ b/var/spack/repos/builtin/packages/damaris/package.py @@ -16,6 +16,8 @@ class Damaris(CMakePackage): maintainers("jcbowden") version("master", branch="master") + version("1.9.2", tag="v1.9.2") + version("1.9.1", tag="v1.9.1") version("1.9.0", tag="v1.9.0") version("1.8.2", tag="v1.8.2") version("1.8.1", tag="v1.8.1") @@ -44,13 +46,14 @@ class Damaris(CMakePackage): default=False, description="Enables building of Python enabled Damaris library using Boost::python", ) + extends("python", when="+python") depends_on("xsd") depends_on("xerces-c") depends_on("mpi") depends_on("cmake@3.18.0:", type=("build")) - depends_on("boost+thread+log+filesystem+date_time" "@1.67:") - depends_on("boost+thread+log+filesystem+date_time+python+numpy" "@1.67:", when="+python") + depends_on("boost@1.67:+thread+log+filesystem+date_time+system") + depends_on("boost+python", when="+python") depends_on("py-mpi4py", when="+python", type=("build", "run")) depends_on("hdf5@1.8.20:", when="+hdf5") depends_on("paraview+python+mpi+development_files", when="+catalyst") @@ -87,6 +90,8 @@ def cmake_args(self): if self.spec.variants["python"].value: args.extend(["-DENABLE_PYTHON:BOOL=ON"]) + args.extend(["-DENABLE_PYTHONMOD:BOOL=ON"]) + args.append(self.define("PYTHON_MODULE_INSTALL_PATH", python_platlib)) if self.spec.variants["visit"].value: args.extend(["-DENABLE_VISIT:BOOL=ON"]) From d297098504e80715e612695bd19c77f605b94f3f Mon Sep 17 00:00:00 2001 From: Ken Raffenetti Date: Wed, 4 Oct 2023 11:37:58 -0500 Subject: [PATCH 056/806] yaksa: Allow unsupported host compiler with CUDA (#40298) Fixes #40272. --- var/spack/repos/builtin/packages/yaksa/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py index b696c00e1263a6..46366659be0ffc 100644 --- a/var/spack/repos/builtin/packages/yaksa/package.py +++ b/var/spack/repos/builtin/packages/yaksa/package.py @@ -47,6 +47,8 @@ def configure_args(self): cuda_archs = spec.variants["cuda_arch"].value if "none" not in cuda_archs: config_args.append("--with-cuda-sm={0}".format(",".join(cuda_archs))) + if "^cuda+allow-unsupported-compilers" in self.spec: + config_args.append("NVCC_FLAGS=-allow-unsupported-compiler") if "+rocm" in spec: config_args.append("--with-hip={0}".format(spec["hip"].prefix)) From 0f43074f3e93d13445ea662a13f5672f960947c2 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 4 Oct 2023 21:38:50 +0200 Subject: [PATCH 057/806] Improve build isolation in PythonPipBuilder (#40224) We run pip with `--no-build-isolation` because we don't wanna let pip install build deps. As a consequence, when pip runs hooks, it runs hooks of *any* package it can find in `sys.path`. For Spack-built Python this includes user site packages -- there shouldn't be any system site packages. So in this case it suffices to set the environment variable PYTHONNOUSERSITE=1. For external Python, more needs to be done, cause there is no env variable that disables both system and user site packages; setting the `python -S` flag doesn't work because pip runs subprocesses that don't inherit this flag (and there is no API to know if -S was passed) So, for external Python, an empty venv is created before invoking pip in Spack's build env ensures that pip can no longer see anything but standard libraries and `PYTHONPATH`. The downside of this is that pip will generate shebangs that point to the python executable from the venv. So, for external python an extra step is necessary where we fix up shebangs post install. --- lib/spack/spack/build_systems/python.py | 100 +++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index 0d03813ddff8cf..fa27f8de495b67 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -6,6 +6,7 @@ import os import re import shutil +import stat from typing import Optional import archspec @@ -25,6 +26,7 @@ from spack.directives import build_system, depends_on, extends, maintainers from spack.error import NoHeadersError, NoLibrariesError, SpecError from spack.install_test import test_part +from spack.util.executable import Executable from spack.version import Version from ._checks import BaseBuilder, execute_install_time_tests @@ -351,6 +353,51 @@ def libs(self): raise NoLibrariesError(msg.format(self.spec.name, root)) +def fixup_shebangs(path: str, old_interpreter: bytes, new_interpreter: bytes): + # Recurse into the install prefix and fixup shebangs + exe = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH + dirs = [path] + hardlinks = set() + + while dirs: + with os.scandir(dirs.pop()) as entries: + for entry in entries: + if entry.is_dir(follow_symlinks=False): + dirs.append(entry.path) + continue + + # Only consider files, not symlinks + if not entry.is_file(follow_symlinks=False): + continue + + lstat = entry.stat(follow_symlinks=False) + + # Skip over files that are not executable + if not (lstat.st_mode & exe): + continue + + # Don't modify hardlinks more than once + if lstat.st_nlink > 1: + key = (lstat.st_ino, lstat.st_dev) + if key in hardlinks: + continue + hardlinks.add(key) + + # Finally replace shebangs if any. + with open(entry.path, "rb+") as f: + contents = f.read(2) + if contents != b"#!": + continue + contents += f.read() + + if old_interpreter not in contents: + continue + + f.seek(0) + f.write(contents.replace(old_interpreter, new_interpreter)) + f.truncate() + + @spack.builder.builder("python_pip") class PythonPipBuilder(BaseBuilder): phases = ("install",) @@ -447,8 +494,36 @@ def global_options(self, spec, prefix): """ return [] + @property + def _build_venv_path(self): + """Return the path to the virtual environment used for building when + python is external.""" + return os.path.join(self.spec.package.stage.path, "build_env") + + @property + def _build_venv_python(self) -> Executable: + """Return the Python executable in the build virtual environment when + python is external.""" + return Executable(os.path.join(self._build_venv_path, "bin", "python")) + def install(self, pkg, spec, prefix): """Install everything from build directory.""" + python: Executable = spec["python"].command + # Since we invoke pip with --no-build-isolation, we have to make sure that pip cannot + # execute hooks from user and system site-packages. + if spec["python"].external: + # There are no environment variables to disable the system site-packages, so we use a + # virtual environment instead. The downside of this approach is that pip produces + # incorrect shebangs that refer to the virtual environment, which we have to fix up. + python("-m", "venv", "--without-pip", self._build_venv_path) + pip = self._build_venv_python + else: + # For a Spack managed Python, system site-packages is empty/unused by design, so it + # suffices to disable user site-packages, for which there is an environment variable. + pip = python + pip.add_default_env("PYTHONNOUSERSITE", "1") + pip.add_default_arg("-m") + pip.add_default_arg("pip") args = PythonPipBuilder.std_args(pkg) + ["--prefix=" + prefix] @@ -472,8 +547,31 @@ def install(self, pkg, spec, prefix): else: args.append(".") - pip = inspect.getmodule(pkg).pip with fs.working_dir(self.build_directory): pip(*args) + @spack.builder.run_after("install") + def fixup_shebangs_pointing_to_build(self): + """When installing a package using an external python, we use a temporary virtual + environment which improves build isolation. The downside is that pip produces shebangs + that point to the temporary virtual environment. This method fixes them up to point to the + underlying Python.""" + # No need to fixup shebangs if no build venv was used. (this post install function also + # runs when install was overridden in another package, so check existence of the venv path) + if not os.path.exists(self._build_venv_path): + return + + # Use sys.executable, since that's what pip uses. + interpreter = ( + lambda python: python("-c", "import sys; print(sys.executable)", output=str) + .strip() + .encode("utf-8") + ) + + fixup_shebangs( + path=self.spec.prefix, + old_interpreter=interpreter(self._build_venv_python), + new_interpreter=interpreter(self.spec["python"].command), + ) + spack.builder.run_after("install")(execute_install_time_tests) From 79e7da94205fcdf642e8b6617b2162ae14c57ab2 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:32:30 -0700 Subject: [PATCH 058/806] trilinos: add variant to build tests (#40284) * trilinos: add variant: testing * trilinos: rename +testing to +test --- var/spack/repos/builtin/packages/trilinos/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 28f68b1b488571..b6ee39282e44c8 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -148,6 +148,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): variant("stratimikos", default=False, description="Compile with Stratimikos") variant("teko", default=False, description="Compile with Teko") variant("tempus", default=False, description="Compile with Tempus") + variant("test", default=False, description="Enable testing") variant("thyra", default=False, description="Compile with Thyra") variant("tpetra", default=True, description="Compile with Tpetra") variant("trilinoscouplings", default=False, description="Compile with TrilinosCouplings") @@ -616,6 +617,12 @@ def define_enable(suffix, value=None): ] ) + if "+test" in spec: + options.append(define_trilinos_enable("TESTS", True)) + options.append(define("BUILD_TESTING", True)) + else: + options.append(define_trilinos_enable("TESTS", False)) + if spec.version >= Version("13"): options.append(define_from_variant("CMAKE_CXX_STANDARD", "cxxstd")) else: From 9f0e3c0fed23e4b4192cb769c8d96d2248721fc9 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Wed, 4 Oct 2023 21:57:17 -0700 Subject: [PATCH 059/806] exago: add and logging variant. (#40188) --- var/spack/repos/builtin/packages/exago/package.py | 12 ++++++++---- var/spack/repos/builtin/packages/hiop/package.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index e5f789fa8376ba..d28b4fa1f82018 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * @@ -13,7 +15,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/pnnl/ExaGO" git = "https://github.com/pnnl/ExaGO.git" - maintainers("ryandanehy", "CameronRutherford", "pelesh") + maintainers("ryandanehy", "cameronrutherford", "pelesh") version("1.5.1", commit="7abe482c8da0e247f9de4896f5982c4cacbecd78", submodules=True) version("1.5.0", commit="227f49573a28bdd234be5500b3733be78a958f15", submodules=True) @@ -45,6 +47,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): conflicts( "+python", when="+ipopt+rocm", msg="Python bindings require -fPIC with Ipopt for rocm." ) + variant("logging", default=False, description="Enable/Disable spdlog based logging") # Solver options variant("hiop", default=False, description="Enable/Disable HiOp") @@ -175,17 +178,18 @@ def cmake_args(self): args.extend( [ self.define("EXAGO_ENABLE_GPU", "+cuda" in spec or "+rocm" in spec), + self.define("PETSC_DIR", spec["petsc"].prefix), + self.define("EXAGO_RUN_TESTS", self.run_tests), + self.define("LAPACK_LIBRARIES", spec["lapack"].libs + spec["blas"].libs), self.define_from_variant("EXAGO_ENABLE_CUDA", "cuda"), self.define_from_variant("EXAGO_ENABLE_HIP", "rocm"), - self.define("PETSC_DIR", spec["petsc"].prefix), - self.define("EXAGO_RUN_TESTS", True), + self.define_from_variant("EXAGO_ENABLE_LOGGING", "logging"), self.define_from_variant("EXAGO_ENABLE_MPI", "mpi"), self.define_from_variant("EXAGO_ENABLE_RAJA", "raja"), self.define_from_variant("EXAGO_ENABLE_HIOP", "hiop"), self.define_from_variant("EXAGO_ENABLE_IPOPT", "ipopt"), self.define_from_variant("EXAGO_ENABLE_PYTHON", "python"), self.define_from_variant("EXAGO_ENABLE_LOGGING", "logging"), - self.define("LAPACK_LIBRARIES", spec["lapack"].libs + spec["blas"].libs), ] ) diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index e23fc44380502f..0ee82f9c32a0e8 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -19,7 +19,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/LLNL/hiop" git = "https://github.com/LLNL/hiop.git" - maintainers("ryandanehy", "CameronRutherford", "pelesh") + maintainers("ryandanehy", "cameronrutherford", "pelesh") # Most recent tagged snapshot is the preferred version when profiling. version("1.0.0", commit="10b7d3ee0a15cb4949ccee8c905d447b9528794f", submodules=True) From bf7f54449ba8ed157c9ee258007e0a7a509600cf Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 5 Oct 2023 08:45:33 +0200 Subject: [PATCH 060/806] cray rhel: disable due to runner issues (#40324) --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index df2c7f85ca2cca..6dbc0d1581aadd 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -846,24 +846,24 @@ deprecated-ci-build: ####################################### # E4S - Cray RHEL ####################################### -.e4s-cray-rhel: - extends: [ ".cray_rhel_zen4" ] - variables: - SPACK_CI_STACK_NAME: e4s-cray-rhel +# .e4s-cray-rhel: +# extends: [ ".cray_rhel_zen4" ] +# variables: +# SPACK_CI_STACK_NAME: e4s-cray-rhel -e4s-cray-rhel-generate: - extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ] +# e4s-cray-rhel-generate: +# extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ] -e4s-cray-rhel-build: - extends: [ ".build", ".e4s-cray-rhel" ] - trigger: - include: - - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - job: e4s-cray-rhel-generate - strategy: depend - needs: - - artifacts: True - job: e4s-cray-rhel-generate +# e4s-cray-rhel-build: +# extends: [ ".build", ".e4s-cray-rhel" ] +# trigger: +# include: +# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml +# job: e4s-cray-rhel-generate +# strategy: depend +# needs: +# - artifacts: True +# job: e4s-cray-rhel-generate ####################################### # E4S - Cray SLES From bec873aec97c8c2f77353a2bc3b84d00335bf849 Mon Sep 17 00:00:00 2001 From: Auriane R <48684432+aurianer@users.noreply.github.com> Date: Thu, 5 Oct 2023 09:34:22 +0200 Subject: [PATCH 061/806] Add pika 0.19.0 (#40313) --- var/spack/repos/builtin/packages/pika/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index 35a0436bcef05a..f581a6cd0c8602 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -17,6 +17,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pika-org/pika.git" maintainers("msimberg", "albestro", "teonnik", "aurianer") + version("0.19.0", sha256="f45cc16e4e50cbb183ed743bdc8b775d49776ee33c13ea39a650f4230a5744cb") version("0.18.0", sha256="f34890e0594eeca6ac57f2b988d0807b502782817e53a7f7043c3f921b08c99f") version("0.17.0", sha256="717429fc1bc986d62cbec190a69939e91608122d09d54bda1b028871c9ca9ad4") version("0.16.0", sha256="59f2baec91cc9bf71ca96d21d0da1ec0092bf59da106efa51789089e0d7adcbb") From 9e9653ac58b1290d05eab834f27773220655c2b4 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Thu, 5 Oct 2023 17:53:56 +0200 Subject: [PATCH 062/806] whizard: Make sure to detect LCIO if requested (#40316) --- var/spack/repos/builtin/packages/whizard/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/whizard/package.py b/var/spack/repos/builtin/packages/whizard/package.py index a9ccf9de2ec987..3297c2eddbe5f1 100644 --- a/var/spack/repos/builtin/packages/whizard/package.py +++ b/var/spack/repos/builtin/packages/whizard/package.py @@ -103,6 +103,8 @@ def setup_build_environment(self, env): # and seems incompatible with # filter_compiler_wrappers, thus the # actual compilers need to be used to build + if self.spec.satisfies("+lcio"): + env.set("LCIO", self.spec["lcio"].prefix) env.set("CC", self.compiler.cc) env.set("CXX", self.compiler.cxx) env.set("FC", self.compiler.fc) From 4ce5d140667125525c09183d574957c64600c46a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 5 Oct 2023 18:52:23 +0200 Subject: [PATCH 063/806] unparse: drop python 3.4 remnants (#40333) --- lib/spack/spack/util/unparse/unparser.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index 27dba8f2873b59..c2e6376e509537 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -398,21 +398,6 @@ def visit_ClassDef(self, node): else: comma = True self.dispatch(e) - if sys.version_info[:2] < (3, 5): - if node.starargs: - if comma: - self.write(", ") - else: - comma = True - self.write("*") - self.dispatch(node.starargs) - if node.kwargs: - if comma: - self.write(", ") - else: - comma = True - self.write("**") - self.dispatch(node.kwargs) with self.block(): self.dispatch(node.body) From b0d49d4973aa17b7a56bc9eafb411c3d307f62ac Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Thu, 5 Oct 2023 12:13:50 -0500 Subject: [PATCH 064/806] pbmpi: adding new version and maintainer (#40319) --- var/spack/repos/builtin/packages/pbmpi/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/pbmpi/package.py b/var/spack/repos/builtin/packages/pbmpi/package.py index a2739c8a41251c..1fbb07177a0398 100644 --- a/var/spack/repos/builtin/packages/pbmpi/package.py +++ b/var/spack/repos/builtin/packages/pbmpi/package.py @@ -10,8 +10,13 @@ class Pbmpi(MakefilePackage): """A Bayesian software for phylogenetic reconstruction using mixture models""" homepage = "https://megasun.bch.umontreal.ca/People/lartillot/www/index.htm" + url = "https://github.com/bayesiancook/pbmpi/archive/refs/tags/v1.8c.tar.gz" git = "https://github.com/bayesiancook/pbmpi.git" + maintainers("snehring") + + version("1.9", sha256="567d8db995f23b2b0109c1e6088a7e5621e38fec91d6b2f27abd886b90ea31ce") + version("1.8c", sha256="2a80ec4a98d92ace61c67ff9ba78249d45d03094b364959d490b1ad05797a279") version("partition", branch="partition") depends_on("mpi") From e0e6ff5a680132bca32d1fc7df9e1a8c135f5467 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:32:52 -0700 Subject: [PATCH 065/806] Revert "cray rhel: disable due to runner issues (#40324)" (#40335) This reverts commit bf7f54449ba8ed157c9ee258007e0a7a509600cf. --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 6dbc0d1581aadd..df2c7f85ca2cca 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -846,24 +846,24 @@ deprecated-ci-build: ####################################### # E4S - Cray RHEL ####################################### -# .e4s-cray-rhel: -# extends: [ ".cray_rhel_zen4" ] -# variables: -# SPACK_CI_STACK_NAME: e4s-cray-rhel +.e4s-cray-rhel: + extends: [ ".cray_rhel_zen4" ] + variables: + SPACK_CI_STACK_NAME: e4s-cray-rhel -# e4s-cray-rhel-generate: -# extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ] +e4s-cray-rhel-generate: + extends: [ ".generate-cray-rhel", ".e4s-cray-rhel" ] -# e4s-cray-rhel-build: -# extends: [ ".build", ".e4s-cray-rhel" ] -# trigger: -# include: -# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml -# job: e4s-cray-rhel-generate -# strategy: depend -# needs: -# - artifacts: True -# job: e4s-cray-rhel-generate +e4s-cray-rhel-build: + extends: [ ".build", ".e4s-cray-rhel" ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: e4s-cray-rhel-generate + strategy: depend + needs: + - artifacts: True + job: e4s-cray-rhel-generate ####################################### # E4S - Cray SLES From 7254c76b6895d76fb83f9f4e95683ebfa33ecffe Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Thu, 5 Oct 2023 20:04:44 -0700 Subject: [PATCH 066/806] ecFlow update (#40305) * Support static openssl for ecflow * Update ecflow/static openssl * Update ssl settings in ecflow * add pic variant for ecflow * style fix * Update package.py * Update package.py --- .../repos/builtin/packages/ecflow/package.py | 46 +++++++++++++++++-- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/ecflow/package.py b/var/spack/repos/builtin/packages/ecflow/package.py index 2c30dbbd0cbf17..05519fc04d4963 100644 --- a/var/spack/repos/builtin/packages/ecflow/package.py +++ b/var/spack/repos/builtin/packages/ecflow/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * from spack.pkg.builtin.boost import Boost @@ -19,7 +21,7 @@ class Ecflow(CMakePackage): homepage = "https://confluence.ecmwf.int/display/ECFLOW/" url = "https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-4.11.1-Source.tar.gz" - maintainers("climbfuji") + maintainers("climbfuji", "AlexanderRichert-NOAA") # https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-5.8.3-Source.tar.gz?api=v2 version("5.8.3", sha256="1d890008414017da578dbd5a95cb1b4d599f01d5a3bb3e0297fe94a87fbd81a6") @@ -32,6 +34,7 @@ class Ecflow(CMakePackage): "static_boost", default=False, description="Use also static boost libraries when compiling" ) variant("ui", default=False, description="Enable ecflow_ui") + variant("pic", default=False, description="Enable position-independent code (PIC)") extends("python") @@ -59,6 +62,7 @@ class Ecflow(CMakePackage): ) depends_on("openssl@1:", when="@5:") + depends_on("pkgconfig", type="build", when="+ssl ^openssl ~shared") depends_on("qt@5:", when="+ui") # Requirement to use the Python3_EXECUTABLE variable depends_on("cmake@3.16:", type="build") @@ -72,15 +76,47 @@ def patch(self): "Pyext/CMakeLists.txt", ) + @when("+ssl ^openssl~shared") + def setup_build_environment(self, env): + env.set("LIBS", self.spec["zlib"].libs.search_flags) + def cmake_args(self): - boost_lib = self.spec["boost"].prefix.lib - return [ + spec = self.spec + boost_lib = spec["boost"].prefix.lib + args = [ self.define("Boost_PYTHON_LIBRARY_RELEASE", boost_lib), self.define_from_variant("ENABLE_UI", "ui"), self.define_from_variant("ENABLE_GUI", "ui"), self.define_from_variant("ENABLE_SSL", "ssl"), # https://jira.ecmwf.int/browse/SUP-2641#comment-208943 self.define_from_variant("ENABLE_STATIC_BOOST_LIBS", "static_boost"), - self.define("Python3_EXECUTABLE", self.spec["python"].package.command), - self.define("BOOST_ROOT", self.spec["boost"].prefix), + self.define("Python3_EXECUTABLE", spec["python"].package.command), + self.define("BOOST_ROOT", spec["boost"].prefix), + self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), ] + + if spec.satisfies("+ssl ^openssl ~shared"): + ssllibs = ";".join(spec["openssl"].libs + spec["zlib"].libs) + args.append(self.define("OPENSSL_CRYPTO_LIBRARY", ssllibs)) + + return args + + # A recursive link in the ecflow source code causes the binary cache + # creation to fail. This file is only in the install tree if the + # --source option is set when installing the package, but force_remove + # acts like "rm -f" and won't abort if the file doesn't exist. + @run_after("install") + def remove_recursive_symlink_in_source_code(self): + force_remove(join_path(self.prefix, "share/ecflow/src/cereal/cereal")) + + @when("+ssl ^openssl~shared") + def patch(self): + pkgconf = which("pkg-config") + liblist_l = pkgconf("--libs-only-l", "--static", "openssl", output=str).split() + liblist = " ".join([ll.replace("-l", "") for ll in liblist_l]) + for sdir in ["Client", "Server"]: + filter_file( + "(target_link_libraries.*pthread)", + f"\\1 {liblist}", + os.path.join(sdir, "CMakeLists.txt"), + ) From 36183eac408539e84323fe5ec514d7ae83e4bca6 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 6 Oct 2023 09:44:09 +0200 Subject: [PATCH 067/806] python: add 3.12.0 (but keep 3.11 preferred) (#40282) --- lib/spack/spack/build_systems/meson.py | 9 +- .../builtin/packages/flux-core/package.py | 2 + .../repos/builtin/packages/glib/package.py | 3 +- .../repos/builtin/packages/mesa/package.py | 3 +- .../repos/builtin/packages/meson/package.py | 4 + .../packages/meson/python-3.12-support.patch | 283 ++++++++++++++++++ .../repos/builtin/packages/py-cffi/package.py | 4 + .../packages/py-cryptography/package.py | 5 + .../repos/builtin/packages/python/package.py | 11 +- 9 files changed, 318 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/meson/python-3.12-support.patch diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py index 1a5e69e081b274..38939dc7adc323 100644 --- a/lib/spack/spack/build_systems/meson.py +++ b/lib/spack/spack/build_systems/meson.py @@ -10,7 +10,7 @@ import spack.builder import spack.package_base -from spack.directives import build_system, depends_on, variant +from spack.directives import build_system, conflicts, depends_on, variant from spack.multimethod import when from ._checks import BaseBuilder, execute_build_time_tests @@ -47,6 +47,13 @@ class MesonPackage(spack.package_base.PackageBase): variant("strip", default=False, description="Strip targets on install") depends_on("meson", type="build") depends_on("ninja", type="build") + # Python detection in meson requires distutils to be importable, but distutils no longer + # exists in Python 3.12. In Spack, we can't use setuptools as distutils replacement, + # because the distutils-precedence.pth startup file that setuptools ships with is not run + # when setuptools is in PYTHONPATH; it has to be in system site-packages. In a future meson + # release, the distutils requirement will be dropped, so this conflict can be relaxed. + # We have patches to make it work with meson 1.1 and above. + conflicts("^python@3.12:", when="^meson@:1.0") def flags_to_build_system_args(self, flags): """Produces a list of all command line arguments to pass the specified diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index 2e5126fc54b2a0..70d8cc9873c24c 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -141,6 +141,8 @@ class FluxCore(AutotoolsPackage): # `link` dependency on python due to Flux's `pymod` module depends_on("python@3.6:", when="@0.17:", type=("build", "link", "run")) depends_on("python@2.7:", type=("build", "link", "run")) + # Use of distutils in configure script dropped in v0.55 + depends_on("python@:3.11", when="@:0.54", type=("build", "link", "run")) depends_on("py-cffi@1.1:", type=("build", "run")) depends_on("py-six@1.9:", when="@:0.24", type=("build", "run")) depends_on("py-pyyaml@3.10:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index e1744d1d23af95..4f8d1415f1304b 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -139,7 +139,8 @@ class Glib(MesonPackage, AutotoolsPackage): depends_on("zlib-api") depends_on("gettext") depends_on("perl", type=("build", "run")) - depends_on("python", type=("build", "run"), when="@2.53.4:") + # Uses distutils in gio/gdbus-2.0/codegen/utils.py + depends_on("python@:3.11", type=("build", "run"), when="@2.53.4:") depends_on("pcre2", when="@2.73.2:") depends_on("pcre2@10.34:", when="@2.74:") depends_on("pcre+utf", when="@2.48:2.73.1") diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index 60fb95beb63740..e1e666a6bcd212 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -52,7 +52,8 @@ class Mesa(MesonPackage): depends_on("cmake", type="build") depends_on("flex", type="build") depends_on("gettext", type="build") - depends_on("python@3:", type="build") + # Upperbound on 3.11 because distutils is used for checking py-mako + depends_on("python@3:3.11", type="build") depends_on("py-mako@0.8.0:", type="build") depends_on("unwind") depends_on("expat") diff --git a/var/spack/repos/builtin/packages/meson/package.py b/var/spack/repos/builtin/packages/meson/package.py index 9cc6a63723951a..cabafbe0011b7b 100644 --- a/var/spack/repos/builtin/packages/meson/package.py +++ b/var/spack/repos/builtin/packages/meson/package.py @@ -18,6 +18,7 @@ class Meson(PythonPackage): maintainers("eli-schwartz", "michaelkuhn") + version("1.2.2", sha256="1caa0ef6082e311bdca9836e7907f548b8c3f041a42ed41f0ff916b83ac7dddd") version("1.2.1", sha256="e1f3b32b636cc86496261bd89e63f00f206754697c7069788b62beed5e042713") version("1.2.0", sha256="603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790") version("1.1.1", sha256="1c3b9e1a3a36b51adb5de498d582fd5cbf6763fadbcf151de9f2a762e02bd2e6") @@ -85,6 +86,9 @@ class Meson(PythonPackage): # https://github.com/mesonbuild/meson/pull/9850 patch("oneapi.patch", when="@0.62:0.63 %oneapi") + # Python 3.12 detection support + patch("python-3.12-support.patch", when="@1.1:1.2.2") + executables = ["^meson$"] @classmethod diff --git a/var/spack/repos/builtin/packages/meson/python-3.12-support.patch b/var/spack/repos/builtin/packages/meson/python-3.12-support.patch new file mode 100644 index 00000000000000..727976ff26234b --- /dev/null +++ b/var/spack/repos/builtin/packages/meson/python-3.12-support.patch @@ -0,0 +1,283 @@ +From 5f96e35b873d6230970fd63ba2e706bbd3f4e26f Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Fri, 8 Sep 2023 16:54:48 -0400 +Subject: [PATCH 1/6] python dependency: ensure that setuptools doesn't inject + itself into distutils + +We do not use setuptools for anything, and only lightly use distutils. +Unpredictable issues can occur due to setuptools monkey-patching, which +interferes with our intended use. Tell setuptools to simply never get +involved. + +Note: while it's otherwise possible to check if the probe is run using +sys.executable and avoid forking, setuptools unconditionally injects +itself at startup in a way that requires subprocess isolation to +disable. + +(cherry picked from commit 9f610ad5b72ea91de2d7aeb6f3266d0a7477062e) +--- + mesonbuild/dependencies/python.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py +index 160772888..f04494674 100644 +--- a/mesonbuild/dependencies/python.py ++++ b/mesonbuild/dependencies/python.py +@@ -113,7 +113,9 @@ class BasicPythonExternalProgram(ExternalProgram): + + with importlib.resources.path('mesonbuild.scripts', 'python_info.py') as f: + cmd = self.get_command() + [str(f)] +- p, stdout, stderr = mesonlib.Popen_safe(cmd) ++ env = os.environ.copy() ++ env['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib' ++ p, stdout, stderr = mesonlib.Popen_safe(cmd, env=env) + + try: + info = json.loads(stdout) +-- +2.39.2 + + +From cb4e62a8c55118988babac8b8254e0af1dc9698b Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Mon, 21 Nov 2022 20:47:14 -0500 +Subject: [PATCH 2/6] python module: stop using distutils schemes on + sufficiently new Debian + +Since 3.10.3, Debian finally started patching sysconfig with custom +paths, instead of just distutils. This means we can now go use that +instead. It reduces our reliance on the deprecated distutils module. + +Partial fix for #7702 + +(cherry picked from commit 40f897fa92f7d3cc43788d3000733310ce77cf0c) +--- + mesonbuild/scripts/python_info.py | 32 +++++++++++++++++++++++-------- + 1 file changed, 24 insertions(+), 8 deletions(-) + +diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py +index 9c3a0791a..65597b121 100755 +--- a/mesonbuild/scripts/python_info.py ++++ b/mesonbuild/scripts/python_info.py +@@ -13,7 +13,6 @@ if sys.path[0].endswith('scripts'): + del sys.path[0] + + import json, os, sysconfig +-import distutils.command.install + + def get_distutils_paths(scheme=None, prefix=None): + import distutils.dist +@@ -37,15 +36,32 @@ def get_distutils_paths(scheme=None, prefix=None): + # default scheme to a custom one pointing to /usr/local and replacing + # site-packages with dist-packages. + # See https://github.com/mesonbuild/meson/issues/8739. +-# XXX: We should be using sysconfig, but Debian only patches distutils. ++# ++# We should be using sysconfig, but before 3.10.3, Debian only patches distutils. ++# So we may end up falling back. + +-if 'deb_system' in distutils.command.install.INSTALL_SCHEMES: +- paths = get_distutils_paths(scheme='deb_system') +- install_paths = get_distutils_paths(scheme='deb_system', prefix='') +-else: +- paths = sysconfig.get_paths() ++def get_install_paths(): ++ if sys.version_info >= (3, 10): ++ scheme = sysconfig.get_default_scheme() ++ else: ++ scheme = sysconfig._get_default_scheme() ++ ++ if sys.version_info >= (3, 10, 3): ++ if 'deb_system' in sysconfig.get_scheme_names(): ++ scheme = 'deb_system' ++ else: ++ import distutils.command.install ++ if 'deb_system' in distutils.command.install.INSTALL_SCHEMES: ++ paths = get_distutils_paths(scheme='deb_system') ++ install_paths = get_distutils_paths(scheme='deb_system', prefix='') ++ return paths, install_paths ++ ++ paths = sysconfig.get_paths(scheme=scheme) + empty_vars = {'base': '', 'platbase': '', 'installed_base': ''} +- install_paths = sysconfig.get_paths(vars=empty_vars) ++ install_paths = sysconfig.get_paths(scheme=scheme, vars=empty_vars) ++ return paths, install_paths ++ ++paths, install_paths = get_install_paths() + + def links_against_libpython(): + from distutils.core import Distribution, Extension +-- +2.39.2 + + +From c179c18765514d5c37737dec996b4c91cb31477f Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Mon, 2 Oct 2023 16:40:15 -0400 +Subject: [PATCH 3/6] python module: refactor pypy detection into a consistent + variable + +(cherry picked from commit 3d3a10ef022284c8377bd9f8e1b1adec73c50d95) +--- + mesonbuild/scripts/python_info.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py +index 65597b121..d17b3a376 100755 +--- a/mesonbuild/scripts/python_info.py ++++ b/mesonbuild/scripts/python_info.py +@@ -72,6 +72,8 @@ def links_against_libpython(): + variables = sysconfig.get_config_vars() + variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)}) + ++is_pypy = '__pypy__' in sys.builtin_module_names ++ + if sys.version_info < (3, 0): + suffix = variables.get('SO') + elif sys.version_info < (3, 8, 7): +@@ -88,7 +90,7 @@ print(json.dumps({ + 'install_paths': install_paths, + 'version': sysconfig.get_python_version(), + 'platform': sysconfig.get_platform(), +- 'is_pypy': '__pypy__' in sys.builtin_module_names, ++ 'is_pypy': is_pypy, + 'is_venv': sys.prefix != variables['base_prefix'], + 'link_libpython': links_against_libpython(), + 'suffix': suffix, +-- +2.39.2 + + +From 3c493dae4bd8410bfb09e8f654605f65e15d8e66 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Tue, 22 Nov 2022 22:56:10 -0500 +Subject: [PATCH 4/6] python module: stop using distutils "link to libpython" + probe on recent python + +On python >=3.8, this information is expected to be encoded in the +sysconfig vars. + +In distutils, it is always necessary to link to libpython on Windows; +for posix platforms, it depends on the value of LIBPYTHON (which is the +library to link to, possibly the empty string) as generated by +configure.ac and embedded into python.pc and python-config.sh, and then +coded a second time in the distutils python sources. + +There are a couple of caveats which have ramifications for Cygwin and +Android: + +- python.pc and python-config.sh disagree with distutils when python is + not built shared. In that case, the former act the same as a shared + build, while the latter *never* links to libpython + +- python.pc disagrees with python-config.sh and distutils when python is + built shared. The former never links to libpython, while the latter do + +The disagreement is resolved in favor of distutils' behavior in all +cases, and python.pc is correct for our purposes on python 3.12; see: +https://github.com/python/cpython/pull/100356 +https://github.com/python/cpython/pull/100967 + +Although it was not backported to older releases, Cygwin at least has +always patched in a fix for python.pc, which behavior is now declared +canonical. We can reliably assume it is always correct. + +This is the other half of the fix for #7702 + +(cherry picked from commit 2d6c10908b3771216e7ce086af1ee4dc77e698c2) +--- + mesonbuild/scripts/python_info.py | 17 +++++++++++++---- + 1 file changed, 13 insertions(+), 4 deletions(-) + +diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py +index d17b3a376..a3f3d3535 100755 +--- a/mesonbuild/scripts/python_info.py ++++ b/mesonbuild/scripts/python_info.py +@@ -64,10 +64,19 @@ def get_install_paths(): + paths, install_paths = get_install_paths() + + def links_against_libpython(): +- from distutils.core import Distribution, Extension +- cmd = Distribution().get_command_obj('build_ext') +- cmd.ensure_finalized() +- return bool(cmd.get_libraries(Extension('dummy', []))) ++ # on versions supporting python-embed.pc, this is the non-embed lib ++ # ++ # PyPy is not yet up to 3.12 and work is still pending to export the ++ # relevant information (it doesn't automatically provide arbitrary ++ # Makefile vars) ++ if sys.version_info >= (3, 8) and not is_pypy: ++ variables = sysconfig.get_config_vars() ++ return bool(variables.get('LIBPYTHON', 'yes')) ++ else: ++ from distutils.core import Distribution, Extension ++ cmd = Distribution().get_command_obj('build_ext') ++ cmd.ensure_finalized() ++ return bool(cmd.get_libraries(Extension('dummy', []))) + + variables = sysconfig.get_config_vars() + variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)}) +-- +2.39.2 + + +From ae44d9a379faca6274db819be44ffca3e0159f56 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Mon, 2 Oct 2023 23:51:57 -0400 +Subject: [PATCH 5/6] tests: fix test case to not import distutils on python + 3.12 + +Testing the correctness of the `modules: ` kwarg can be done with other +guaranteed stdlib modules that are even more guaranteed since they +didn't get deprecated for removal. + +(cherry picked from commit ecf261330c498783760cbde00b613b7469f8d3c0) +--- + test cases/python/5 modules kwarg/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test cases/python/5 modules kwarg/meson.build b/test cases/python/5 modules kwarg/meson.build +index 9751adaab..41a9a4fae 100644 +--- a/test cases/python/5 modules kwarg/meson.build ++++ b/test cases/python/5 modules kwarg/meson.build +@@ -1,7 +1,7 @@ + project('python kwarg') + + py = import('python') +-prog_python = py.find_installation('python3', modules : ['distutils']) ++prog_python = py.find_installation('python3', modules : ['os', 'sys', 're']) + assert(prog_python.found() == true, 'python not found when should be') + prog_python = py.find_installation('python3', modules : ['thisbetternotexistmod'], required : false) + assert(prog_python.found() == false, 'python not found but reported as found') +-- +2.39.2 + + +From d9abf4a97dc182b3c57204a792000d620f9f941e Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Tue, 3 Oct 2023 00:22:25 -0400 +Subject: [PATCH 6/6] mark the PyPI metadata as supporting python 3.12 + +meson itself runs okay on 3.12, and the last issue for *probing* against +3.12 is solved. Tests pass here locally. + +(cherry picked from commit 880f21281ee359e01de659fe7d45549d19e6b84d) +--- + setup.cfg | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.cfg b/setup.cfg +index dfaba76dd..2f2962eed 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -30,6 +30,7 @@ classifiers = + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 ++ Programming Language :: Python :: 3.12 + Topic :: Software Development :: Build Tools + long_description = Meson is a cross-platform build system designed to be both as fast and as user friendly as possible. It supports many languages and compilers, including GCC, Clang, PGI, Intel, and Visual Studio. Its build definitions are written in a simple non-Turing complete DSL. + +-- +2.39.2 + diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py index 606c678369f49a..ccbe262a159b7d 100644 --- a/var/spack/repos/builtin/packages/py-cffi/package.py +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -24,6 +24,10 @@ class PyCffi(PythonPackage): version("1.10.0", sha256="b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5") version("1.1.2", sha256="390970b602708c91ddc73953bb6929e56291c18a4d80f360afa00fad8b6f3339") + # ./spack-src/cffi/ffiplatform.py has _hack_at_distutils which imports + # setuptools before distutils, but only on Windows. This could be made + # unconditional to support Python 3.12 + depends_on("python@:3.11", type=("build", "run")) depends_on("pkgconfig", type="build") depends_on("py-setuptools", type="build") depends_on("py-pycparser", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-cryptography/package.py b/var/spack/repos/builtin/packages/py-cryptography/package.py index caadcf16f394a0..c17e07377755a0 100644 --- a/var/spack/repos/builtin/packages/py-cryptography/package.py +++ b/var/spack/repos/builtin/packages/py-cryptography/package.py @@ -13,6 +13,7 @@ class PyCryptography(PythonPackage): homepage = "https://github.com/pyca/cryptography" pypi = "cryptography/cryptography-1.8.1.tar.gz" + version("41.0.3", sha256="6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34") version("40.0.2", sha256="c33c0d32b8594fa647d2e01dbccc303478e16fdd7cf98652d5b3ed11aa5e5c99") version("38.0.1", sha256="1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7") version("37.0.4", sha256="63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82") @@ -28,12 +29,16 @@ class PyCryptography(PythonPackage): variant("idna", default=False, when="@2.5:3.0", description="Deprecated U-label support") + # distutils required in version <= 40 + depends_on("python@:3.11", when="@:40", type=("build", "run")) + depends_on("py-setuptools@61.0:", when="@41:", type="build") depends_on("py-setuptools@40.6:60.8,60.9.1:", when="@37:", type="build") depends_on("py-setuptools@40.6:", when="@2.7:36", type="build") depends_on("py-setuptools@18.5:", when="@2.2:2.6", type="build") depends_on("py-setuptools@11.3:", when="@:2.1", type="build") depends_on("py-setuptools-rust@0.11.4:", when="@3.4.2:", type="build") depends_on("py-setuptools-rust@0.11.4:", when="@3.4:3.4.1", type=("build", "run")) + depends_on("rust@1.56:", when="@41:", type="build") depends_on("rust@1.48:", when="@38:", type="build") depends_on("rust@1.41:", when="@3.4.5:", type="build") depends_on("rust@1.45:", when="@3.4.3:3.4.4", type="build") diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 2a904c738644d9..c07ad5d6ad461e 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -40,7 +40,12 @@ class Python(Package): install_targets = ["install"] build_targets: List[str] = [] - version("3.11.4", sha256="85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63") + version("3.12.0", sha256="51412956d24a1ef7c97f1cb5f70e185c13e3de1f50d131c0aac6338080687afb") + version( + "3.11.4", + sha256="85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63", + preferred=True, + ) version("3.11.3", sha256="1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048") version("3.11.2", sha256="2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849") version("3.11.1", sha256="baed518e26b337d4d8105679caf68c5c32630d702614fc174e98cb95c46bdfa4") @@ -272,7 +277,7 @@ class Python(Package): patch("python-3.7.2-distutils-C++.patch", when="@3.7.2") patch("python-3.7.3-distutils-C++.patch", when="@3.7.3") patch("python-3.7.4+-distutils-C++.patch", when="@3.7.4:3.10") - patch("python-3.7.4+-distutils-C++-testsuite.patch", when="@3.7.4:") + patch("python-3.7.4+-distutils-C++-testsuite.patch", when="@3.7.4:3.11") patch("python-3.11-distutils-C++.patch", when="@3.11.0:3.11") patch("cpython-windows-externals.patch", when="@:3.9.6 platform=windows") patch("tkinter-3.7.patch", when="@3.7 platform=darwin") @@ -287,7 +292,7 @@ class Python(Package): # Ensure that distutils chooses correct compiler option for RPATH on fj: patch("fj-rpath-3.1.patch", when="@:3.9.7,3.10.0 %fj") - patch("fj-rpath-3.9.patch", when="@3.9.8:3.9,3.10.1: %fj") + patch("fj-rpath-3.9.patch", when="@3.9.8:3.9,3.10.1:3.11 %fj") # Fixes build with the Intel compilers # https://github.com/python/cpython/pull/16717 From e20c05fcdfc7a9ad995956bfee269e123860288f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 6 Oct 2023 10:24:21 +0200 Subject: [PATCH 068/806] Make "minimal" the default duplicate strategy (#39621) * Allow branching out of the "generic build" unification set For cases like the one in https://github.com/spack/spack/pull/39661 we need to relax rules on unification sets. The issue is that, right now, nodes in the "generic build" unification set are unified together with their build dependencies. This was done out of caution to avoid the risk of circular dependencies, which would ultimately cause a very slow solve. For build-tools like Cython, however, the build dependencies is masked by a long chain of "build, run" dependencies that belong in the "generic build" unification space. To allow splitting on cases like this, we relax the rule disallowing branching out of the "generic build" unification set. * Fix issue with pure build virtual dependencies Pure build virtual dependencies were not accounted properly in the list of possible virtuals. This caused some facts connecting virtuals to the corresponding providers to not be emitted, and in the end lead to unsat problems. * Fixed a few issues in packages py-gevent: restore dependency on py-cython@3 jsoncpp: fix typo in build dependency ecp-data-vis-sdk: update spack.yaml and cmake recipe py-statsmodels: add v0.13.5 * Make dependency on "blt" of type "build" --- etc/spack/defaults/concretizer.yaml | 2 +- lib/spack/docs/build_settings.rst | 167 +- lib/spack/docs/images/shapely_duplicates.svg | 2784 +++++++++++++++++ lib/spack/spack/solver/asp.py | 1 + lib/spack/spack/solver/concretize.lp | 19 +- lib/spack/spack/solver/counter.py | 15 +- lib/spack/spack/spec.py | 11 +- lib/spack/spack/test/concretize.py | 28 +- .../spack/test/data/config/concretizer.yaml | 2 +- .../stacks/data-vis-sdk/spack.yaml | 16 +- .../repos/builtin/packages/camp/package.py | 2 +- .../repos/builtin/packages/cmake/package.py | 2 +- .../repos/builtin/packages/jsoncpp/package.py | 2 +- .../repos/builtin/packages/mgard/package.py | 2 +- .../builtin/packages/py-gevent/package.py | 3 +- .../packages/py-statsmodels/package.py | 12 +- .../repos/builtin/packages/raja/package.py | 2 +- .../repos/builtin/packages/umpire/package.py | 2 +- .../packages/pkg-config/package.py | 16 + .../packages/virtual-build/package.py | 16 + 20 files changed, 2984 insertions(+), 120 deletions(-) create mode 100644 lib/spack/docs/images/shapely_duplicates.svg create mode 100644 var/spack/repos/duplicates.test/packages/pkg-config/package.py create mode 100644 var/spack/repos/duplicates.test/packages/virtual-build/package.py diff --git a/etc/spack/defaults/concretizer.yaml b/etc/spack/defaults/concretizer.yaml index 598bb8c349d0b7..edefa552cee227 100644 --- a/etc/spack/defaults/concretizer.yaml +++ b/etc/spack/defaults/concretizer.yaml @@ -41,4 +41,4 @@ concretizer: # "none": allows a single node for any package in the DAG. # "minimal": allows the duplication of 'build-tools' nodes only (e.g. py-setuptools, cmake etc.) # "full" (experimental): allows separation of the entire build-tool stack (e.g. the entire "cmake" subDAG) - strategy: none \ No newline at end of file + strategy: minimal diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst index 0bbd27e8c32258..402b33f6a2585b 100644 --- a/lib/spack/docs/build_settings.rst +++ b/lib/spack/docs/build_settings.rst @@ -3,6 +3,103 @@ SPDX-License-Identifier: (Apache-2.0 OR MIT) + +.. _concretizer-options: + +========================================== +Concretization Settings (concretizer.yaml) +========================================== + +The ``concretizer.yaml`` configuration file allows to customize aspects of the +algorithm used to select the dependencies you install. The default configuration +is the following: + +.. literalinclude:: _spack_root/etc/spack/defaults/concretizer.yaml + :language: yaml + +-------------------------------- +Reuse already installed packages +-------------------------------- + +The ``reuse`` attribute controls whether Spack will prefer to use installed packages (``true``), or +whether it will do a "fresh" installation and prefer the latest settings from +``package.py`` files and ``packages.yaml`` (``false``). +You can use: + +.. code-block:: console + + % spack install --reuse + +to enable reuse for a single installation, and you can use: + +.. code-block:: console + + spack install --fresh + +to do a fresh install if ``reuse`` is enabled by default. +``reuse: true`` is the default. + +------------------------------------------ +Selection of the target microarchitectures +------------------------------------------ + +The options under the ``targets`` attribute control which targets are considered during a solve. +Currently the options in this section are only configurable from the ``concretizer.yaml`` file +and there are no corresponding command line arguments to enable them for a single solve. + +The ``granularity`` option can take two possible values: ``microarchitectures`` and ``generic``. +If set to: + +.. code-block:: yaml + + concretizer: + targets: + granularity: microarchitectures + +Spack will consider all the microarchitectures known to ``archspec`` to label nodes for +compatibility. If instead the option is set to: + +.. code-block:: yaml + + concretizer: + targets: + granularity: generic + +Spack will consider only generic microarchitectures. For instance, when running on an +Haswell node, Spack will consider ``haswell`` as the best target in the former case and +``x86_64_v3`` as the best target in the latter case. + +The ``host_compatible`` option is a Boolean option that determines whether or not the +microarchitectures considered during the solve are constrained to be compatible with the +host Spack is currently running on. For instance, if this option is set to ``true``, a +user cannot concretize for ``target=icelake`` while running on an Haswell node. + +--------------- +Duplicate nodes +--------------- + +The ``duplicates`` attribute controls whether the DAG can contain multiple configurations of +the same package. This is mainly relevant for build dependencies, which may have their version +pinned by some nodes, and thus be required at different versions by different nodes in the same +DAG. + +The ``strategy`` option controls how the solver deals with duplicates. If the value is ``none``, +then a single configuration per package is allowed in the DAG. This means, for instance, that only +a single ``cmake`` or a single ``py-setuptools`` version is allowed. The result would be a slightly +faster concretization, at the expense of making a few specs unsolvable. + +If the value is ``minimal`` Spack will allow packages tagged as ``build-tools`` to have duplicates. +This allows, for instance, to concretize specs whose nodes require different, and incompatible, ranges +of some build tool. For instance, in the figure below the latest `py-shapely` requires a newer `py-setuptools`, +while `py-numpy` still needs an older version: + +.. figure:: images/shapely_duplicates.svg + :scale: 70 % + :align: center + +Up to Spack v0.20 ``duplicates:strategy:none`` was the default (and only) behavior. From Spack v0.21 the +default behavior is ``duplicates:strategy:minimal``. + .. _build-settings: ================================ @@ -232,76 +329,6 @@ Specific limitations include: then Spack will not add a new external entry (``spack config blame packages`` can help locate all external entries). -.. _concretizer-options: - ----------------------- -Concretizer options ----------------------- - -``packages.yaml`` gives the concretizer preferences for specific packages, -but you can also use ``concretizer.yaml`` to customize aspects of the -algorithm it uses to select the dependencies you install: - -.. literalinclude:: _spack_root/etc/spack/defaults/concretizer.yaml - :language: yaml - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Reuse already installed packages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The ``reuse`` attribute controls whether Spack will prefer to use installed packages (``true``), or -whether it will do a "fresh" installation and prefer the latest settings from -``package.py`` files and ``packages.yaml`` (``false``). -You can use: - -.. code-block:: console - - % spack install --reuse - -to enable reuse for a single installation, and you can use: - -.. code-block:: console - - spack install --fresh - -to do a fresh install if ``reuse`` is enabled by default. -``reuse: true`` is the default. - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Selection of the target microarchitectures -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The options under the ``targets`` attribute control which targets are considered during a solve. -Currently the options in this section are only configurable from the ``concretizer.yaml`` file -and there are no corresponding command line arguments to enable them for a single solve. - -The ``granularity`` option can take two possible values: ``microarchitectures`` and ``generic``. -If set to: - -.. code-block:: yaml - - concretizer: - targets: - granularity: microarchitectures - -Spack will consider all the microarchitectures known to ``archspec`` to label nodes for -compatibility. If instead the option is set to: - -.. code-block:: yaml - - concretizer: - targets: - granularity: generic - -Spack will consider only generic microarchitectures. For instance, when running on an -Haswell node, Spack will consider ``haswell`` as the best target in the former case and -``x86_64_v3`` as the best target in the latter case. - -The ``host_compatible`` option is a Boolean option that determines whether or not the -microarchitectures considered during the solve are constrained to be compatible with the -host Spack is currently running on. For instance, if this option is set to ``true``, a -user cannot concretize for ``target=icelake`` while running on an Haswell node. - .. _package-requirements: -------------------- diff --git a/lib/spack/docs/images/shapely_duplicates.svg b/lib/spack/docs/images/shapely_duplicates.svg new file mode 100644 index 00000000000000..912f03b2e526cd --- /dev/null +++ b/lib/spack/docs/images/shapely_duplicates.svg @@ -0,0 +1,2784 @@ + + + + + + + + + + image/svg+xml + + + + + + + + G + + + + bqm4trdmbbqhrthe6flwnxp57cfbbser + + nghttp2@1.52.0/bqm4trd + + + + hsp7usvecwby6o6kszujxywbux5f5qc4 + + pkgconf@1.9.5/hsp7usv + + + + bqm4trdmbbqhrthe6flwnxp57cfbbser->hsp7usvecwby6o6kszujxywbux5f5qc4 + + + + + + s3mykqnlex5ygursynhv4cfu4p4jcp5c + + diffutils@3.9/s3mykqn + + + + gpd7yevon44acblslmgorfsxufgk3nhz + + libiconv@1.17/gpd7yev + + + + s3mykqnlex5ygursynhv4cfu4p4jcp5c->gpd7yevon44acblslmgorfsxufgk3nhz + + + + + + + al63766ivhemwb3bxsklvqmhdptf34fn + + geos@3.12.0/al63766 + + + + ma6zn6mykr7xe226v2hvu4ye7jltnddb + + cmake@3.27.4/ma6zn6m + + + + al63766ivhemwb3bxsklvqmhdptf34fn->ma6zn6mykr7xe226v2hvu4ye7jltnddb + + + + + + revhbmcsddofjb7jt3fql7fawtxjihvc + + ninja@1.11.1/revhbmc + + + + al63766ivhemwb3bxsklvqmhdptf34fn->revhbmcsddofjb7jt3fql7fawtxjihvc + + + + + + 7vxac6cvfyqggxsvd7votisi72rdfvoh + + ca-certificates-mozilla@2023-05-30/7vxac6c + + + + wuse2zg2p4ujfbsks4znlwyqumsa476w + + py-cython@0.29.36/wuse2zg + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + python@3.11.4/7ftqkn3 + + + + wuse2zg2p4ujfbsks4znlwyqumsa476w->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + 33tg442mk3uy52ocdgd7uxbusdtkozlq + + py-pip@23.1.2/33tg442 + + + + wuse2zg2p4ujfbsks4znlwyqumsa476w->33tg442mk3uy52ocdgd7uxbusdtkozlq + + + + + + isprdjk4hdva3owdr6bgzavgaqzyjwyj + + py-wheel@0.37.1/isprdjk + + + + wuse2zg2p4ujfbsks4znlwyqumsa476w->isprdjk4hdva3owdr6bgzavgaqzyjwyj + + + + + + esl2253adih4qsbluhmzdtsxfrws4fnt + + py-setuptools@59.4.0/esl2253 + + + + wuse2zg2p4ujfbsks4znlwyqumsa476w->esl2253adih4qsbluhmzdtsxfrws4fnt + + + + + + + e3xjka5zk6vtoen2oexuzxyorp6um5rv + + openssl@3.1.3/e3xjka5 + + + + e3xjka5zk6vtoen2oexuzxyorp6um5rv->7vxac6cvfyqggxsvd7votisi72rdfvoh + + + + + + ez3cm4rogbx7at45wfi6gquti6fbo3zz + + zlib-ng@2.1.3/ez3cm4r + + + + e3xjka5zk6vtoen2oexuzxyorp6um5rv->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + 7bvgd7zcvk3hglqgbqczma5h4urvrdjb + + perl@5.38.0/7bvgd7z + + + + e3xjka5zk6vtoen2oexuzxyorp6um5rv->7bvgd7zcvk3hglqgbqczma5h4urvrdjb + + + + + + ys6bcgmvdayitnod74ppxvzbn75e7227 + + py-shapely@2.0.1/ys6bcgm + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->al63766ivhemwb3bxsklvqmhdptf34fn + + + + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->wuse2zg2p4ujfbsks4znlwyqumsa476w + + + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->33tg442mk3uy52ocdgd7uxbusdtkozlq + + + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p + + py-numpy@1.25.2/ca3noh6 + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->ca3noh6upxuh3hdx2lnrsdvw7blgcj5p + + + + + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->isprdjk4hdva3owdr6bgzavgaqzyjwyj + + + + + + 2ok2ozl5i2qphhfsbxkdtq3iezemvpsv + + py-setuptools@68.0.0/2ok2ozl + + + + ys6bcgmvdayitnod74ppxvzbn75e7227->2ok2ozl5i2qphhfsbxkdtq3iezemvpsv + + + + + + aoucvoqqeft4hsw3poydbf4mvong4nry + + ncurses@6.4/aoucvoq + + + + aoucvoqqeft4hsw3poydbf4mvong4nry->hsp7usvecwby6o6kszujxywbux5f5qc4 + + + + + + 7aawlyt3hu24znvpgwedu2s3jmz46dkn + + xz@5.4.1/7aawlyt + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->e3xjka5zk6vtoen2oexuzxyorp6um5rv + + + + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->aoucvoqqeft4hsw3poydbf4mvong4nry + + + + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->7aawlyt3hu24znvpgwedu2s3jmz46dkn + + + + + + + ygkrrpeszr4j377qqtqqecmwt27pm2ho + + expat@2.5.0/ygkrrpe + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->ygkrrpeszr4j377qqtqqecmwt27pm2ho + + + + + + + qlqyzklm3yyv6tkqgnj4tzoy7g72ejyu + + sqlite@3.42.0/qlqyzkl + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->qlqyzklm3yyv6tkqgnj4tzoy7g72ejyu + + + + + + + ihtvssgtl7yz2wj7wdla4hsi7nqfny42 + + util-linux-uuid@2.38.1/ihtvssg + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->ihtvssgtl7yz2wj7wdla4hsi7nqfny42 + + + + + + + bvcsrijbs7lp5jvlyooahoxc3zfapwfp + + gdbm@1.23/bvcsrij + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->bvcsrijbs7lp5jvlyooahoxc3zfapwfp + + + + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv + + gettext@0.21.1/3o2rmrx + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->3o2rmrxpwkmmetxmzvba6sizei5womzv + + + + + + + bcjm3vxlgrjgewpdakhpfea3y2kzcspe + + bzip2@1.0.8/bcjm3vx + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->bcjm3vxlgrjgewpdakhpfea3y2kzcspe + + + + + + + 7pjirtey2xqww2bbkil3yj3mtmasruaw + + readline@8.2/7pjirte + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->7pjirtey2xqww2bbkil3yj3mtmasruaw + + + + + + + d24pqmu7ayswej2jfwwcgnw26t4gatgv + + libxcrypt@4.4.35/d24pqmu + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->d24pqmu7ayswej2jfwwcgnw26t4gatgv + + + + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->hsp7usvecwby6o6kszujxywbux5f5qc4 + + + + + + rei73bcylffduxjtuwt5sbibc2cbvuyt + + libffi@3.4.4/rei73bc + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->rei73bcylffduxjtuwt5sbibc2cbvuyt + + + + + + + 7ftqkn35sy5bmqv3wui3ap3gubqyu4f4->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + mof23fyk5qdmzll42yrtvvjeafzn45rl + + libbsd@0.11.7/mof23fy + + + + ygkrrpeszr4j377qqtqqecmwt27pm2ho->mof23fyk5qdmzll42yrtvvjeafzn45rl + + + + + + + pbpdelsw4pyldezsnide5zcc4ym5rrzg + + re2c@2.2/pbpdels + + + + qlqyzklm3yyv6tkqgnj4tzoy7g72ejyu->7pjirtey2xqww2bbkil3yj3mtmasruaw + + + + + + + qlqyzklm3yyv6tkqgnj4tzoy7g72ejyu->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + 33tg442mk3uy52ocdgd7uxbusdtkozlq->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + ihtvssgtl7yz2wj7wdla4hsi7nqfny42->hsp7usvecwby6o6kszujxywbux5f5qc4 + + + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p->wuse2zg2p4ujfbsks4znlwyqumsa476w + + + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p->33tg442mk3uy52ocdgd7uxbusdtkozlq + + + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p->isprdjk4hdva3owdr6bgzavgaqzyjwyj + + + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p->esl2253adih4qsbluhmzdtsxfrws4fnt + + + + + + + buscwcl7gy7xqmrsmtewcustpjoa3jy6 + + openblas@0.3.24/buscwcl + + + + ca3noh6upxuh3hdx2lnrsdvw7blgcj5p->buscwcl7gy7xqmrsmtewcustpjoa3jy6 + + + + + + + bvcsrijbs7lp5jvlyooahoxc3zfapwfp->7pjirtey2xqww2bbkil3yj3mtmasruaw + + + + + + + isprdjk4hdva3owdr6bgzavgaqzyjwyj->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + isprdjk4hdva3owdr6bgzavgaqzyjwyj->33tg442mk3uy52ocdgd7uxbusdtkozlq + + + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv->aoucvoqqeft4hsw3poydbf4mvong4nry + + + + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv->7aawlyt3hu24znvpgwedu2s3jmz46dkn + + + + + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv->gpd7yevon44acblslmgorfsxufgk3nhz + + + + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv->bcjm3vxlgrjgewpdakhpfea3y2kzcspe + + + + + + + jofugpdt2lki4tvw3xa56pxz4kzmjb33 + + tar@1.34/jofugpd + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv->jofugpdt2lki4tvw3xa56pxz4kzmjb33 + + + + + + + yry2pcjkl2hcfeexfi2yvnar2lyplbyg + + libxml2@2.10.3/yry2pcj + + + + 3o2rmrxpwkmmetxmzvba6sizei5womzv->yry2pcjkl2hcfeexfi2yvnar2lyplbyg + + + + + + + 2ok2ozl5i2qphhfsbxkdtq3iezemvpsv->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + 2ok2ozl5i2qphhfsbxkdtq3iezemvpsv->33tg442mk3uy52ocdgd7uxbusdtkozlq + + + + + + ma7u5unvr5auweq7clkgz75hca33j6eb + + pigz@2.7/ma7u5un + + + + ma7u5unvr5auweq7clkgz75hca33j6eb->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + ma6zn6mykr7xe226v2hvu4ye7jltnddb->aoucvoqqeft4hsw3poydbf4mvong4nry + + + + + + + omxtm4xh3xbta4le4ehihd26gi3qn2hc + + curl@8.1.2/omxtm4x + + + + ma6zn6mykr7xe226v2hvu4ye7jltnddb->omxtm4xh3xbta4le4ehihd26gi3qn2hc + + + + + + + ma6zn6mykr7xe226v2hvu4ye7jltnddb->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + bcjm3vxlgrjgewpdakhpfea3y2kzcspe->s3mykqnlex5ygursynhv4cfu4p4jcp5c + + + + + + 7pjirtey2xqww2bbkil3yj3mtmasruaw->aoucvoqqeft4hsw3poydbf4mvong4nry + + + + + + + esl2253adih4qsbluhmzdtsxfrws4fnt->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + + esl2253adih4qsbluhmzdtsxfrws4fnt->33tg442mk3uy52ocdgd7uxbusdtkozlq + + + + + + r3mipc2ezzxleb6g3yjy2rgio44tpsnr + + libmd@1.0.4/r3mipc2 + + + + tolbgopadusf5fpqzmhm7qfsnhpluyvv + + zstd@1.5.5/tolbgop + + + + omxtm4xh3xbta4le4ehihd26gi3qn2hc->bqm4trdmbbqhrthe6flwnxp57cfbbser + + + + + + + omxtm4xh3xbta4le4ehihd26gi3qn2hc->e3xjka5zk6vtoen2oexuzxyorp6um5rv + + + + + + + omxtm4xh3xbta4le4ehihd26gi3qn2hc->hsp7usvecwby6o6kszujxywbux5f5qc4 + + + + + + omxtm4xh3xbta4le4ehihd26gi3qn2hc->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + revhbmcsddofjb7jt3fql7fawtxjihvc->7ftqkn35sy5bmqv3wui3ap3gubqyu4f4 + + + + + + revhbmcsddofjb7jt3fql7fawtxjihvc->pbpdelsw4pyldezsnide5zcc4ym5rrzg + + + + + + d24pqmu7ayswej2jfwwcgnw26t4gatgv->7bvgd7zcvk3hglqgbqczma5h4urvrdjb + + + + + + jofugpdt2lki4tvw3xa56pxz4kzmjb33->7aawlyt3hu24znvpgwedu2s3jmz46dkn + + + + + + jofugpdt2lki4tvw3xa56pxz4kzmjb33->gpd7yevon44acblslmgorfsxufgk3nhz + + + + + + + jofugpdt2lki4tvw3xa56pxz4kzmjb33->ma7u5unvr5auweq7clkgz75hca33j6eb + + + + + + jofugpdt2lki4tvw3xa56pxz4kzmjb33->bcjm3vxlgrjgewpdakhpfea3y2kzcspe + + + + + + jofugpdt2lki4tvw3xa56pxz4kzmjb33->tolbgopadusf5fpqzmhm7qfsnhpluyvv + + + + + + buscwcl7gy7xqmrsmtewcustpjoa3jy6->7bvgd7zcvk3hglqgbqczma5h4urvrdjb + + + + + + yry2pcjkl2hcfeexfi2yvnar2lyplbyg->7aawlyt3hu24znvpgwedu2s3jmz46dkn + + + + + + + yry2pcjkl2hcfeexfi2yvnar2lyplbyg->gpd7yevon44acblslmgorfsxufgk3nhz + + + + + + + yry2pcjkl2hcfeexfi2yvnar2lyplbyg->hsp7usvecwby6o6kszujxywbux5f5qc4 + + + + + + yry2pcjkl2hcfeexfi2yvnar2lyplbyg->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + lcvuenzomq3fdqabnz22ih3kpt4g2nyd + + berkeley-db@18.1.40/lcvuenz + + + + 7bvgd7zcvk3hglqgbqczma5h4urvrdjb->bvcsrijbs7lp5jvlyooahoxc3zfapwfp + + + + + + + 7bvgd7zcvk3hglqgbqczma5h4urvrdjb->bcjm3vxlgrjgewpdakhpfea3y2kzcspe + + + + + + + 7bvgd7zcvk3hglqgbqczma5h4urvrdjb->ez3cm4rogbx7at45wfi6gquti6fbo3zz + + + + + + + 7bvgd7zcvk3hglqgbqczma5h4urvrdjb->lcvuenzomq3fdqabnz22ih3kpt4g2nyd + + + + + + + mof23fyk5qdmzll42yrtvvjeafzn45rl->r3mipc2ezzxleb6g3yjy2rgio44tpsnr + + + + + + diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 1afe31f162155f..ce0ae2ca7f4cd4 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -2595,6 +2595,7 @@ class SpecBuilder: r"^node_compiler$", r"^package_hash$", r"^root$", + r"^variant_default_value_from_cli$", r"^virtual_node$", r"^virtual_root$", ] diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 7a41a9e834830f..fd3fb94f498451 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -20,7 +20,7 @@ % Integrity constraints on DAG nodes :- attr("root", PackageNode), not attr("node", PackageNode). -:- attr("version", PackageNode), not attr("node", PackageNode). +:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode). :- attr("node_version_satisfies", PackageNode), not attr("node", PackageNode). :- attr("hash", PackageNode, _), not attr("node", PackageNode). :- attr("node_platform", PackageNode, _), not attr("node", PackageNode). @@ -58,7 +58,6 @@ unification_set(SetID, ChildNode) :- attr("depends_on", ParentNode, ChildNode, T unification_set(("build", node(X, Child)), node(X, Child)) :- attr("depends_on", ParentNode, node(X, Child), Type), Type == "build", - SetID != "generic_build", multiple_unification_sets(Child), unification_set(SetID, ParentNode). @@ -68,18 +67,18 @@ unification_set("generic_build", node(X, Child)) not multiple_unification_sets(Child), unification_set(_, ParentNode). -% Any dependency of type "build" in a unification set that is in the leaf unification set, -% stays in that unification set -unification_set(SetID, ChildNode) - :- attr("depends_on", ParentNode, ChildNode, Type), - Type == "build", - SetID == "generic_build", - unification_set(SetID, ParentNode). - unification_set(SetID, VirtualNode) :- provider(PackageNode, VirtualNode), unification_set(SetID, PackageNode). +% Do not allow split dependencies, for now. This ensures that we don't construct graphs where e.g. +% a python extension depends on setuptools@63.4 as a run dependency, but uses e.g. setuptools@68 +% as a build dependency. +% +% We'll need to relax the rule before we get to actual cross-compilation +:- depends_on(ParentNode, node(X, Dependency)), depends_on(ParentNode, node(Y, Dependency)), X < Y. + + #defined multiple_unification_sets/1. %---- diff --git a/lib/spack/spack/solver/counter.py b/lib/spack/spack/solver/counter.py index b238f60d8c0882..28883817dfe564 100644 --- a/lib/spack/spack/solver/counter.py +++ b/lib/spack/spack/solver/counter.py @@ -5,6 +5,8 @@ import collections from typing import List, Set +from llnl.util import lang + import spack.deptypes as dt import spack.package_base import spack.repo @@ -95,8 +97,17 @@ def _compute_cache_values(self): ) self._link_run_virtuals.update(self._possible_virtuals) for x in self._link_run: - current = spack.repo.PATH.get_pkg_class(x).dependencies_of_type(dt.BUILD) - self._direct_build.update(current) + build_dependencies = spack.repo.PATH.get_pkg_class(x).dependencies_of_type(dt.BUILD) + virtuals, reals = lang.stable_partition( + build_dependencies, spack.repo.PATH.is_virtual_safe + ) + + self._possible_virtuals.update(virtuals) + for virtual_dep in virtuals: + providers = spack.repo.PATH.providers_for(virtual_dep) + self._direct_build.update(str(x) for x in providers) + + self._direct_build.update(reals) self._total_build = set( spack.package_base.possible_dependencies( diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 85a638b60228f8..8300e4d8a7fb12 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1604,13 +1604,20 @@ def _add_dependency(self, spec: "Spec", *, depflag: dt.DepFlag, virtuals: Tuple[ try: dspec = next(dspec for dspec in orig if depflag == dspec.depflag) except StopIteration: - raise DuplicateDependencyError("Cannot depend on '%s' twice" % spec) + current_deps = ", ".join( + dt.flag_to_chars(x.depflag) + " " + x.spec.short_spec for x in orig + ) + raise DuplicateDependencyError( + f"{self.short_spec} cannot depend on '{spec.short_spec}' multiple times.\n" + f"\tRequired: {dt.flag_to_chars(depflag)}\n" + f"\tDependency: {current_deps}" + ) try: dspec.spec.constrain(spec) except spack.error.UnsatisfiableSpecError: raise DuplicateDependencyError( - "Cannot depend on incompatible specs '%s' and '%s'" % (dspec.spec, spec) + f"Cannot depend on incompatible specs '{dspec.spec}' and '{spec}'" ) def add_dependency_edge( diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 63c6699de2b4bc..53f9c64d5e8e48 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -2121,12 +2121,9 @@ def duplicates_test_repository(): @pytest.mark.usefixtures("mutable_config", "duplicates_test_repository") +@pytest.mark.only_clingo("Not supported by the original concretizer") class TestConcretizeSeparately: @pytest.mark.parametrize("strategy", ["minimal", "full"]) - @pytest.mark.skipif( - os.environ.get("SPACK_TEST_SOLVER") == "original", - reason="Not supported by the original concretizer", - ) def test_two_gmake(self, strategy): """Tests that we can concretize a spec with nodes using the same build dependency pinned at different versions. @@ -2151,10 +2148,6 @@ def test_two_gmake(self, strategy): assert len(pinned_gmake) == 1 and pinned_gmake[0].satisfies("@=3.0") @pytest.mark.parametrize("strategy", ["minimal", "full"]) - @pytest.mark.skipif( - os.environ.get("SPACK_TEST_SOLVER") == "original", - reason="Not supported by the original concretizer", - ) def test_two_setuptools(self, strategy): """Tests that we can concretize separate build dependencies, when we are dealing with extensions. @@ -2191,10 +2184,6 @@ def test_two_setuptools(self, strategy): gmake = s["python"].dependencies(name="gmake", deptype="build") assert len(gmake) == 1 and gmake[0].satisfies("@=3.0") - @pytest.mark.skipif( - os.environ.get("SPACK_TEST_SOLVER") == "original", - reason="Not supported by the original concretizer", - ) def test_solution_without_cycles(self): """Tests that when we concretize a spec with cycles, a fallback kicks in to recompute a solution without cycles. @@ -2207,6 +2196,21 @@ def test_solution_without_cycles(self): assert s["cycle-a"].satisfies("~cycle") assert s["cycle-b"].satisfies("+cycle") + @pytest.mark.parametrize("strategy", ["minimal", "full"]) + def test_pure_build_virtual_dependency(self, strategy): + """Tests that we can concretize a pure build virtual dependency, and ensures that + pure build virtual dependencies are accounted in the list of possible virtual + dependencies. + + virtual-build@1.0 + | [type=build, virtual=pkgconfig] + pkg-config@1.0 + """ + spack.config.CONFIG.set("concretizer:duplicates:strategy", strategy) + + s = Spec("virtual-build").concretized() + assert s["pkgconfig"].name == "pkg-config" + @pytest.mark.parametrize( "v_str,v_opts,checksummed", diff --git a/lib/spack/spack/test/data/config/concretizer.yaml b/lib/spack/spack/test/data/config/concretizer.yaml index ecf121a9170563..0dd810163dd77a 100644 --- a/lib/spack/spack/test/data/config/concretizer.yaml +++ b/lib/spack/spack/test/data/config/concretizer.yaml @@ -4,4 +4,4 @@ concretizer: granularity: microarchitectures host_compatible: false duplicates: - strategy: none + strategy: minimal diff --git a/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml index b4534f0814f8cc..9963f4b777c4e9 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml @@ -4,22 +4,16 @@ spack: cmake: variants: ~ownlibs ecp-data-vis-sdk: - require: - - one_of: - - +ascent +adios2 +cinema +darshan +faodel +hdf5 +pnetcdf +sensei +sz +unifyfs - +veloc +vtkm +zfp - - one_of: - - +paraview ~visit - - ~paraview +visit + require: "+ascent +adios2 +cinema +darshan +faodel +hdf5 +pnetcdf +sensei +sz +unifyfs +veloc +vtkm +zfp" hdf5: require: - one_of: ['@1.14', '@1.12'] mesa: - require: +glx +osmesa +opengl ~opengles +llvm + require: "+glx +osmesa +opengl ~opengles +llvm" libosmesa: - require: mesa +osmesa + require: "mesa +osmesa" libglx: - require: mesa +glx + require: "mesa +glx" ospray: require: '@2.8.0 +denoiser +mpi' llvm: @@ -57,9 +51,11 @@ spack: # Test ParaView and VisIt builds with different GL backends - matrix: - [$sdk_base_spec] + - ["+paraview ~visit"] - [$^paraview_specs] - matrix: - [$sdk_base_spec] + - ["~paraview +visit"] - [$^visit_specs] mirrors: {mirror: s3://spack-binaries/develop/data-vis-sdk} diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py index 8d7b4f62b1d2da..a1bdc830d36eab 100644 --- a/var/spack/repos/builtin/packages/camp/package.py +++ b/var/spack/repos/builtin/packages/camp/package.py @@ -53,7 +53,7 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage): depends_on("cub", when="+cuda") - depends_on("blt") + depends_on("blt", type="build") conflicts("^blt@:0.3.6", when="+rocm") diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index c4c61aee82a2f9..796eb4c397045f 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -239,7 +239,7 @@ class Cmake(Package): depends_on("libuv@1.10.0:1.10", when="@3.11.0:3.11") depends_on("libuv@1.10.0:", when="@3.12.0:") depends_on("rhash", when="@3.8.0:") - depends_on("jsoncpp", when="@3.2:") + depends_on("jsoncpp build_system=meson", when="@3.2:") depends_on("ncurses", when="+ncurses") diff --git a/var/spack/repos/builtin/packages/jsoncpp/package.py b/var/spack/repos/builtin/packages/jsoncpp/package.py index 55c2f22a028d3e..bd20e2b22e1a23 100644 --- a/var/spack/repos/builtin/packages/jsoncpp/package.py +++ b/var/spack/repos/builtin/packages/jsoncpp/package.py @@ -47,7 +47,7 @@ class Jsoncpp(CMakePackage, MesonPackage): with when("build_system=cmake"): depends_on("cmake@3.1:", type="build") - depends_on("cmake@1.9:", when="@1.9:", type="build") + depends_on("cmake@3.9:", when="@1.9:", type="build") with when("build_system=meson"): depends_on("meson@0.49.0:", type="build") diff --git a/var/spack/repos/builtin/packages/mgard/package.py b/var/spack/repos/builtin/packages/mgard/package.py index ca9f2f46e44b9d..b58f4c0bba0aa6 100644 --- a/var/spack/repos/builtin/packages/mgard/package.py +++ b/var/spack/repos/builtin/packages/mgard/package.py @@ -50,7 +50,7 @@ class Mgard(CMakePackage, CudaPackage): depends_on("libarchive", when="@2021-11-12:") depends_on("tclap", when="@2021-11-12") depends_on("yaml-cpp", when="@2021-11-12:") - depends_on("cmake@3.19:") + depends_on("cmake@3.19:", type="build") depends_on("nvcomp@2.2.0:", when="@2022-11-18:+cuda") depends_on("nvcomp@2.0.2", when="@:2021-11-12+cuda") conflicts("cuda_arch=none", when="+cuda") diff --git a/var/spack/repos/builtin/packages/py-gevent/package.py b/var/spack/repos/builtin/packages/py-gevent/package.py index b684829f5406f6..c41b815ef24320 100644 --- a/var/spack/repos/builtin/packages/py-gevent/package.py +++ b/var/spack/repos/builtin/packages/py-gevent/package.py @@ -24,8 +24,7 @@ class PyGevent(PythonPackage): depends_on("py-setuptools@40.8:", when="@20.5.1:", type=("build", "run")) depends_on("py-setuptools@40.8:", when="@1.5:", type="build") depends_on("py-setuptools@24.2:", when="@:1.4", type="build") - # TODO: relax this until we support separate concretization of build deps by default - # depends_on("py-cython@3:", when="@20.5.1:", type="build") + depends_on("py-cython@3:", when="@20.5.1:", type="build") depends_on("py-cython@0.29.14:", when="@1.5:", type="build") depends_on("py-cffi@1.12.3:", type=("build", "run")) depends_on("py-greenlet@3:", when="@23.7: ^python@3.12:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py index c99901d9ae6bd5..36968986a33abc 100644 --- a/var/spack/repos/builtin/packages/py-statsmodels/package.py +++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py @@ -14,6 +14,7 @@ class PyStatsmodels(PythonPackage): homepage = "https://www.statsmodels.org" pypi = "statsmodels/statsmodels-0.8.0.tar.gz" + version("0.13.5", sha256="593526acae1c0fda0ea6c48439f67c3943094c542fe769f8b90fe9e6c6cc4871") version("0.13.2", sha256="77dc292c9939c036a476f1770f9d08976b05437daa229928da73231147cde7d4") version("0.13.1", sha256="006ec8d896d238873af8178d5475203844f2c391194ed8d42ddac37f5ff77a69") version("0.13.0", sha256="f2efc02011b7240a9e851acd76ab81150a07d35c97021cb0517887539a328f8a") @@ -25,12 +26,15 @@ class PyStatsmodels(PythonPackage): depends_on("python@2.7:2.8,3.4:", when="@0.10.1:", type=("build", "link", "run")) depends_on("python@3.6:", when="@0.12.1:", type=("build", "link", "run")) - # according to https://www.statsmodels.org/dev/install.html earlier versions - # might work. - depends_on("py-setuptools@0.6c5:", type="build") - depends_on("py-cython@0.29:", type="build") + # according to https://www.statsmodels.org/dev/install.html earlier versions might work. + depends_on("py-setuptools", type="build") + depends_on("py-setuptools@59.2.0:", type="build", when="@0.13.5:") + + # https://github.com/statsmodels/statsmodels/blob/01b19d7d111b29c183f620ff0a949ef6391ff8ee/pyproject.toml + depends_on("py-cython@0", type="build") depends_on("py-cython@0.29.14:", type="build", when="@0.12.0:") depends_on("py-cython@0.29.22:", type="build", when="@0.13.0:") + depends_on("py-cython@0.29.32:", type="build", when="@0.13.5:") # patsy@0.5.1 works around a Python change # https://github.com/statsmodels/statsmodels/issues/5343 and diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index 88505b3a81be37..cc1ede76be35f4 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -137,7 +137,7 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@:3.20", when="@:2022.03+rocm", type="build") depends_on("cmake@3.23:", when="@2022.10:+rocm", type="build") - depends_on("cmake@3.14:", when="@2022.03.0:") + depends_on("cmake@3.14:", when="@2022.03.0:", type="build") depends_on("llvm-openmp", when="+openmp %apple-clang") diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py index 51f0c034b2f66b..c64bfdf256db78 100644 --- a/var/spack/repos/builtin/packages/umpire/package.py +++ b/var/spack/repos/builtin/packages/umpire/package.py @@ -168,7 +168,7 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.8:", type="build") depends_on("cmake@3.9:", when="+cuda", type="build") - depends_on("cmake@3.14:", when="@2022.03.0:") + depends_on("cmake@3.14:", when="@2022.03.0:", type="build") depends_on("blt@0.5.2:", type="build", when="@2022.10.0:") depends_on("blt@0.5.0:", type="build", when="@2022.03.0:") diff --git a/var/spack/repos/duplicates.test/packages/pkg-config/package.py b/var/spack/repos/duplicates.test/packages/pkg-config/package.py new file mode 100644 index 00000000000000..eb7b84b88fc87c --- /dev/null +++ b/var/spack/repos/duplicates.test/packages/pkg-config/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2023 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 PkgConfig(Package): + """A package providing a virtual, which is frequently used as a pure build dependency.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/tdep-1.0.tar.gz" + + version("1.0.0", md5="0123456789abcdef0123456789abcdef") + + provides("pkgconfig") diff --git a/var/spack/repos/duplicates.test/packages/virtual-build/package.py b/var/spack/repos/duplicates.test/packages/virtual-build/package.py new file mode 100644 index 00000000000000..17fc60955d9b4f --- /dev/null +++ b/var/spack/repos/duplicates.test/packages/virtual-build/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2023 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 VirtualBuild(Package): + """A package that has a pure build virtual dependency""" + + homepage = "http://www.example.com" + url = "http://www.example.com/tdep-1.0.tar.gz" + + version("1.0.0", md5="0123456789abcdef0123456789abcdef") + + depends_on("pkgconfig", type="build") From 55e0c2c90030292f92b2e255fcb33463dbb63964 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 6 Oct 2023 18:37:42 +0200 Subject: [PATCH 069/806] openssh: 9.5p1 (#40354) --- var/spack/repos/builtin/packages/openssh/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openssh/package.py b/var/spack/repos/builtin/packages/openssh/package.py index 49a14138934c97..64da3202e3a77b 100755 --- a/var/spack/repos/builtin/packages/openssh/package.py +++ b/var/spack/repos/builtin/packages/openssh/package.py @@ -23,6 +23,7 @@ class Openssh(AutotoolsPackage): tags = ["core-packages"] + version("9.5p1", sha256="f026e7b79ba7fb540f75182af96dc8a8f1db395f922bbc9f6ca603672686086b") version("9.4p1", sha256="3608fd9088db2163ceb3e600c85ab79d0de3d221e59192ea1923e23263866a85") version("9.3p1", sha256="e9baba7701a76a51f3d85a62c383a3c9dcd97fa900b859bc7db114c1868af8a8") version("9.2p1", sha256="3f66dbf1655fb45f50e1c56da62ab01218c228807b21338d634ebcdf9d71cf46") From 72ed8711a74ccf8c4c15325ae8d5bd469e3adcb1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 6 Oct 2023 18:42:47 +0200 Subject: [PATCH 070/806] unparse: drop python 2 remnants (#40329) --- lib/spack/spack/util/unparse/unparser.py | 40 ------------------------ 1 file changed, 40 deletions(-) diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index c2e6376e509537..375fb543a31494 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -270,16 +270,6 @@ def visit_Assert(self, node): self.write(", ") self.dispatch(node.msg) - def visit_Exec(self, node): - self.fill("exec ") - self.dispatch(node.body) - if node.globals: - self.write(" in ") - self.dispatch(node.globals) - if node.locals: - self.write(", ") - self.dispatch(node.locals) - def visit_Global(self, node): self.fill("global ") interleave(lambda: self.write(", "), self.write, node.names) @@ -338,31 +328,6 @@ def visit_Try(self, node): with self.block(): self.dispatch(node.finalbody) - def visit_TryExcept(self, node): - self.fill("try") - with self.block(): - self.dispatch(node.body) - - for ex in node.handlers: - self.dispatch(ex) - if node.orelse: - self.fill("else") - with self.block(): - self.dispatch(node.orelse) - - def visit_TryFinally(self, node): - if len(node.body) == 1 and isinstance(node.body[0], ast.TryExcept): - # try-except-finally - self.dispatch(node.body) - else: - self.fill("try") - with self.block(): - self.dispatch(node.body) - - self.fill("finally") - with self.block(): - self.dispatch(node.finalbody) - def visit_ExceptHandler(self, node): self.fill("except") if node.type: @@ -633,11 +598,6 @@ def visit_Name(self, node): def visit_NameConstant(self, node): self.write(repr(node.value)) - def visit_Repr(self, node): - self.write("`") - self.dispatch(node.value) - self.write("`") - def _write_constant(self, value): if isinstance(value, (float, complex)): # Substitute overflowing decimal literal for AST infinities. From 112f0453522dd54471d8a8560f8ba40dafcecaa9 Mon Sep 17 00:00:00 2001 From: Sam Gillingham Date: Sat, 7 Oct 2023 05:49:06 +1100 Subject: [PATCH 071/806] py-tuiview: add recent versions of tuiview (#40244) * add recent versions of tuiview and remove Qt4 version * reformat * fix stray tabs * add back a deprecated 1.1.7 * tabs * more tabs * reformat * comma --- .../builtin/packages/py-tuiview/package.py | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py index 7824f834e704d3..40c94a6fe1394e 100644 --- a/var/spack/repos/builtin/packages/py-tuiview/package.py +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -12,14 +12,28 @@ class PyTuiview(PythonPackage): """ homepage = "https://github.com/ubarsc/tuiview" - url = "https://github.com/ubarsc/tuiview/releases/download/tuiview-1.2.6/tuiview-1.2.6.tar.gz" + url = ( + "https://github.com/ubarsc/tuiview/releases/download/tuiview-1.2.13/TuiView-1.2.13.tar.gz" + ) + version("1.2.13", sha256="48c8d4175c324f70941dc49c5a119882c9d501bd20bc13c76bc2455dee5236a5") + version("1.2.12", sha256="3f0c1673f2f861db01726f3d7f6f1dde4a42ec57894a79b89457c398768dd25f") + version("1.2.11", sha256="81f870ad98ec1e3175f25028d261135b6198fa85038bfaa900789e04e3cf8517") + version("1.2.10", sha256="5ea777a4e89780488b03b346f00b586b46a0bd4c8a994e6def46a6494fa486ef") + version("1.2.9", sha256="b5d11e9501cf61cf62f1223416dfe408cf604ae48c06d697589dfc0a606ad6a9") + version("1.2.8", sha256="e75950908a2d1f7c7216dfeead82483e1d3b0267fff9561549d85ca00725456b") + version("1.2.7", sha256="35dfeb79b2bb57dfb5b8c90c3edf8c8a0a3f89cef85c33f9935e4a4add282aaf") version("1.2.6", sha256="61b136fa31c949d7a7a4dbf8562e6fc677d5b1845b152ec39e337f4eb2e91662") - version("1.1.7", sha256="fbf0bf29cc775357dad4f8a2f0c2ffa98bbf69d603a96353e75b321adef67573") + version( + "1.1.7", + sha256="fbf0bf29cc775357dad4f8a2f0c2ffa98bbf69d603a96353e75b321adef67573", + deprecated=True, + ) # pip silently replaces distutils with setuptools depends_on("py-setuptools", type="build") depends_on("py-pyqt4", type=("build", "run"), when="@:1.1") depends_on("py-pyqt5", type=("build", "run"), when="@1.2.0:") - depends_on("py-numpy", type=("build", "run")) - depends_on("gdal@1.11.0:+python") + depends_on("py-numpy", type=("build", "link", "run")) + depends_on("gdal+geos+python", type=("build", "run"), when="@1.2.0:") + depends_on("gdal@1.11.0:+python", when="@:1.1") From 5524492e2521f4fd053fa77876c66f637a549c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Fri, 6 Oct 2023 20:49:59 +0200 Subject: [PATCH 072/806] [add] py-metomi-rose: new recipe, required by py-cylc-rose (#39981) * [add] py-metomi-rose: new recipe, required by py-cylc-rose * py-metomi-rose: remove version constraint on python --------- Co-authored-by: LydDeb --- .../packages/py-metomi-rose/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-metomi-rose/package.py diff --git a/var/spack/repos/builtin/packages/py-metomi-rose/package.py b/var/spack/repos/builtin/packages/py-metomi-rose/package.py new file mode 100644 index 00000000000000..161edeb582ce8e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-metomi-rose/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2023 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 PyMetomiRose(PythonPackage): + """Rose, a framework for meteorological suites.""" + + homepage = "https://metomi.github.io/rose/doc/html/index.html" + pypi = "metomi-rose/metomi-rose-2.1.0.tar.gz" + + maintainers("LydDeb") + + version("2.1.0", sha256="1b60135a434fe4325d364a57e8f5e81e90f39b373b9d68733458c1adc2513c05") + + depends_on("py-setuptools", type="build") + depends_on("py-aiofiles", type=("build", "run")) + depends_on("py-jinja2@2.10.1:", type=("build", "run")) + depends_on("py-keyring@23", type=("build", "run")) + depends_on("py-ldap3", type=("build", "run")) + depends_on("py-metomi-isodatetime@3", type=("build", "run")) + depends_on("py-psutil@5.6.0:", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-sqlalchemy@1", type=("build", "run")) From b0f36b2cd9d59addec174c745c3408cd75bc8cfe Mon Sep 17 00:00:00 2001 From: Sam Gillingham Date: Sat, 7 Oct 2023 05:52:15 +1100 Subject: [PATCH 073/806] RIOS: add recent versions (#40243) * add recent versions of RIOS * fix depends_on syntax * fix typo * fix sha and add parallel variant * remove self * try doing in one --- var/spack/repos/builtin/packages/py-rios/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-rios/package.py b/var/spack/repos/builtin/packages/py-rios/package.py index de2f54c2ae2211..a2716f648e703e 100644 --- a/var/spack/repos/builtin/packages/py-rios/package.py +++ b/var/spack/repos/builtin/packages/py-rios/package.py @@ -15,11 +15,20 @@ class PyRios(PythonPackage): """ homepage = "https://www.rioshome.org/en/latest/" - url = "https://github.com/ubarsc/rios/archive/rios-1.4.10.tar.gz" + url = "https://github.com/ubarsc/rios/releases/download/rios-1.4.16/rios-1.4.16.tar.gz" - version("1.4.10", sha256="7f11b54eb1f2ec551d7fc01c039b60bf2c67f0c2fc5b2946f8d986d6a9bc7063") + version("1.4.16", sha256="2f553d85ff4ff26bfda2a8c6bd3d9dcce5ace847f7d9bd2f072c8943f3758ded") + version("1.4.15", sha256="71670508dbffcd8f5d24fbb25e6a2b7e1d23b5e899ddc78c90d403bd65981cf4") + version("1.4.14", sha256="ea22fde3fe70004aa1ad46bd36fad58f3346e9c161ca44ac913518a6e4fcad82") + version("1.4.13", sha256="9f99f41f20ce769101e61bc8347aa96718e6e5ac37ccb47cb3e555dc4ca83427") + version("1.4.12", sha256="6d897488ce1ca77e470483472998afcb2eb3bb3307f392a924b85f88a16d73eb") + version("1.4.11", sha256="b7ae5311f987b32f1afe1fabc16f25586de8d15c17a69405d1950aeada7b748e") + version("1.4.10", sha256="6324acccc6018f9e06c40370bc366dc459890e8c09d26e0ebd245f6fd46dad71") + + variant("parallel", default=True, description="Enables the parallel processing module") # pip silently replaces distutils with setuptools depends_on("py-setuptools", type="build") depends_on("py-numpy", type=("build", "run")) depends_on("gdal+python", type=("build", "run")) + depends_on("py-cloudpickle", type=("build", "run"), when="@1.4.16:+parallel") From e3f6df884e380daee27dea88ec2aec7aed991061 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:54:25 +0200 Subject: [PATCH 074/806] py-zipp: add 3.17.0 (#40278) * py-zipp: add 3.17.0 * Re-add python@3.7 dependency --- .../repos/builtin/packages/py-zipp/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-zipp/package.py b/var/spack/repos/builtin/packages/py-zipp/package.py index 50a9abe35ae154..113506c3ea03c5 100644 --- a/var/spack/repos/builtin/packages/py-zipp/package.py +++ b/var/spack/repos/builtin/packages/py-zipp/package.py @@ -12,16 +12,19 @@ class PyZipp(PythonPackage): homepage = "https://github.com/jaraco/zipp" pypi = "zipp/zipp-0.6.0.tar.gz" + version("3.17.0", sha256="84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0") version("3.8.1", sha256="05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2") version("3.6.0", sha256="71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832") version("0.6.0", sha256="3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e") version("0.5.1", sha256="ca943a7e809cc12257001ccfb99e3563da9af99d52f261725e96dfe0f9275bc3") - depends_on("python@2.7:", type=("build", "run")) - depends_on("python@3.6:", type=("build", "run"), when="@2.0.0:") - depends_on("python@3.7:", type=("build", "run"), when="@3.8.1:") - depends_on("py-setuptools@34.4:", type="build", when="@0.3.3:") - depends_on("py-setuptools@56:", type="build", when="@3.5.1:") + depends_on("python@3.8:", when="@3.16:", type=("build", "run")) + # needed for spack bootstrap as spack itself supports python 3.6 + depends_on("python@3.7:", when="@3.8.1:", type=("build", "run")) + depends_on("py-setuptools@56:", when="@3.5.1:", type="build") + depends_on("py-setuptools@34.4:", when="@0.3.3:", type="build") + depends_on("py-setuptools-scm@3.4.1: +toml", when="@2.0.1:", type="build") depends_on("py-setuptools-scm@1.15.0:", type="build") - depends_on("py-setuptools-scm@3.4.1: +toml", type="build", when="@2.0.1:") + + # Historical dependencies depends_on("py-more-itertools", type=("build", "run"), when="@0.6.0:2.1.0") From 98271c37121e97f09d4fb075aaaac1c4e30cd723 Mon Sep 17 00:00:00 2001 From: George Young Date: Fri, 6 Oct 2023 20:00:03 +0100 Subject: [PATCH 075/806] topaz: new package @0.2.5 (#40352) * topaz: new package @0.2.5 * switching over to pypi --------- Co-authored-by: LMS Bioinformatics --- .../repos/builtin/packages/topaz/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/topaz/package.py diff --git a/var/spack/repos/builtin/packages/topaz/package.py b/var/spack/repos/builtin/packages/topaz/package.py new file mode 100644 index 00000000000000..855cba4d6c90b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/topaz/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2023 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 Topaz(PythonPackage): + """topaz: Pipeline for particle picking in cryo-electron microscopy images using + convolutional neural networks trained from positive and unlabeled examples. Also + featuring micrograph and tomogram denoising with DNNs.""" + + homepage = "https://topaz-em.readthedocs.io/" + pypi = "topaz-em/topaz-em-0.2.5.tar.gz" + + version("0.2.5", sha256="002a6eb775598b6c4df0225f3a488bfe6a6da9246e8ca42eb4e7d58f694c25cc") + + depends_on("py-setuptools", type="build") + depends_on("py-torch@1:", type=("build", "run")) + depends_on("py-torchvision", type=("build", "run")) + depends_on("py-numpy@1.11:", type=("build", "run")) + depends_on("py-pandas", type=("build", "run")) + depends_on("py-scikit-learn@0.19.0:", type=("build", "run")) + depends_on("py-scipy@0.17.0:", type=("build", "run")) + depends_on("py-pillow@6.2.0:", type=("build", "run")) + depends_on("py-future", type=("build", "run")) From 1d6a14260821a25c2e063f5ca561cdedaff01e68 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:27:53 +0200 Subject: [PATCH 076/806] py-anyio: add 4.0.0 (#40346) --- var/spack/repos/builtin/packages/py-anyio/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-anyio/package.py b/var/spack/repos/builtin/packages/py-anyio/package.py index 09b8581b62670a..f5b74226a2ecfa 100644 --- a/var/spack/repos/builtin/packages/py-anyio/package.py +++ b/var/spack/repos/builtin/packages/py-anyio/package.py @@ -13,17 +13,24 @@ class PyAnyio(PythonPackage): homepage = "https://github.com/agronholm/anyio" pypi = "anyio/anyio-3.2.1.tar.gz" + version("4.0.0", sha256="f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a") version("3.6.2", sha256="25ea0d673ae30af41a0c442f81cf3b38c7e79fdc7b60335a4c14e05eb0947421") version("3.6.1", sha256="413adf95f93886e442aea925f3ee43baa5a765a64a0f52c6081894f9992fdd0b") version("3.5.0", sha256="a0aeffe2fb1fdf374a8e4b471444f0f3ac4fb9f5a5b542b48824475e0042a5a6") version("3.3.4", sha256="67da67b5b21f96b9d3d65daa6ea99f5d5282cb09f50eb4456f8fb51dffefc3ff") version("3.2.1", sha256="07968db9fa7c1ca5435a133dc62f988d84ef78e1d9b22814a59d1c62618afbc5") + depends_on("python@3.8:", when="@4:", type=("build", "run")) depends_on("python@3.6.2:", type=("build", "run")) + depends_on("py-setuptools@64:", when="@3.7:", type="build") depends_on("py-setuptools@42:", type="build") - depends_on("py-wheel@0.29:", type="build") - depends_on("py-setuptools-scm+toml@3.4:", type="build") + depends_on("py-setuptools-scm@6.4:", when="@3.7:", type="build") + depends_on("py-setuptools-scm+toml@3.4:", when="@:3.6", type="build") + depends_on("py-exceptiongroup@1.0.2:", when="@4: ^python@:3.10", type=("build", "run")) depends_on("py-idna@2.8:", type=("build", "run")) depends_on("py-sniffio@1.1:", type=("build", "run")) + + # Historical dependencies + depends_on("py-wheel@0.29:", when="@:3.6", type="build") depends_on("py-typing-extensions", when="^python@:3.7", type=("build", "run")) From db3d816f8b8c790d599b491f4e98815b77237a29 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:32:21 +0200 Subject: [PATCH 077/806] py-argcomplete: add 3.1.2 (#40348) --- var/spack/repos/builtin/packages/py-argcomplete/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py index 92e1319b2e049e..146562369311ae 100644 --- a/var/spack/repos/builtin/packages/py-argcomplete/package.py +++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py @@ -12,13 +12,17 @@ class PyArgcomplete(PythonPackage): homepage = "https://github.com/kislyuk/argcomplete" pypi = "argcomplete/argcomplete-1.12.0.tar.gz" + version("3.1.2", sha256="d5d1e5efd41435260b8f85673b74ea2e883affcbec9f4230c582689e8e78251b") version("3.0.8", sha256="b9ca96448e14fa459d7450a4ab5a22bbf9cee4ba7adddf03e65c398b5daeea28") version("2.0.0", sha256="6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20") version("1.12.3", sha256="2c7dbffd8c045ea534921e63b0be6fe65e88599990d8dc408ac8c542b72a5445") version("1.12.0", sha256="2fbe5ed09fd2c1d727d4199feca96569a5b50d44c71b16da9c742201f7cc295c") version("1.1.1", sha256="cca45b5fe07000994f4f06a0b95bd71f7b51b04f81c3be0b4ea7b666e4f1f084") + depends_on("py-setuptools@67.7.2:", when="@3.1:", type="build") depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm+toml@6.2:", when="@3.1:", type="build") + depends_on("py-importlib-metadata@0.23:6", when="@3.0.6: ^python@:3.7", type=("build", "run")) depends_on( "py-importlib-metadata@0.23:4", when="@1.12.3:2 ^python@:3.7", type=("build", "run") From c95d43771a2f2a8c77bef931aa511126d0c43761 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:33:56 +0200 Subject: [PATCH 078/806] py-asttokens: add 2.4.0 (#40349) --- var/spack/repos/builtin/packages/py-asttokens/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-asttokens/package.py b/var/spack/repos/builtin/packages/py-asttokens/package.py index 7bad57ade670b6..9f42ec37acec6e 100644 --- a/var/spack/repos/builtin/packages/py-asttokens/package.py +++ b/var/spack/repos/builtin/packages/py-asttokens/package.py @@ -12,6 +12,7 @@ class PyAsttokens(PythonPackage): homepage = "https://github.com/gristlabs/asttokens" pypi = "asttokens/asttokens-2.0.5.tar.gz" + version("2.4.0", sha256="2e0171b991b2c959acc6c49318049236844a5da1d65ba2672c4880c1c894834e") version("2.2.1", sha256="4622110b2a6f30b77e1473affaa97e711bc2f07d3f10848420ff1898edbe94f3") version("2.0.8", sha256="c61e16246ecfb2cde2958406b4c8ebc043c9e6d73aaa83c941673b35e5d3a76b") version("2.0.5", sha256="9a54c114f02c7a9480d56550932546a3f1fe71d8a02f1bc7ccd0ee3ee35cf4d5") @@ -19,4 +20,5 @@ class PyAsttokens(PythonPackage): depends_on("py-setuptools@44:", type="build") depends_on("py-setuptools-scm+toml@3.4.3:", type="build") + depends_on("py-six@1.12:", when="@2.3:", type=("build", "run")) depends_on("py-six", type=("build", "run")) From 921ed1c21b0c63bb93d1c728d95485828eff7ede Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:34:47 +0200 Subject: [PATCH 079/806] py-expecttest: new package (#40347) --- .../builtin/packages/py-expecttest/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-expecttest/package.py diff --git a/var/spack/repos/builtin/packages/py-expecttest/package.py b/var/spack/repos/builtin/packages/py-expecttest/package.py new file mode 100644 index 00000000000000..60857d5a9bdb8a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-expecttest/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 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 PyExpecttest(PythonPackage): + """This library implements expect tests (also known as "golden" tests).""" + + homepage = "https://github.com/ezyang/expecttest" + pypi = "expecttest/expecttest-0.1.6.tar.gz" + + version("0.1.6", sha256="fd49563b6703b9c060a0bc946dfafc62bad74898867432192927eb1e5f9d8952") + + depends_on("python@:3", type=("build", "run")) + depends_on("py-poetry-core@1:", type="build") From f70ae6e3c4897c6fa3b484ae8054b6c84e9f8a7d Mon Sep 17 00:00:00 2001 From: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:02:17 -0600 Subject: [PATCH 080/806] g2: updated for 3.4.8 release (#40366) * updated for 3.4.8 release --- var/spack/repos/builtin/packages/g2/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/g2/package.py b/var/spack/repos/builtin/packages/g2/package.py index 7441f764964fe1..63f6cd3ea82310 100644 --- a/var/spack/repos/builtin/packages/g2/package.py +++ b/var/spack/repos/builtin/packages/g2/package.py @@ -20,6 +20,7 @@ class G2(CMakePackage): maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett") version("develop", branch="develop") + version("3.4.8", sha256="071a6f799c4c4fdfd5d0478152a0cbb9d668d12d71c78d5bda71845fc5580a7f") version("3.4.7", sha256="d6530611e3a515122f11ed4aeede7641f6f8932ef9ee0d4828786572767304dc") version("3.4.6", sha256="c4b03946365ce0bacf1e10e8412a5debd72d8671d1696aa4fb3f3adb119175fe") version("3.4.5", sha256="c18e991c56964953d778632e2d74da13c4e78da35e8d04cb742a2ca4f52737b6") @@ -36,7 +37,8 @@ class G2(CMakePackage): ) variant("w3emc", default=True, description="Enable GRIB1 through w3emc", when="@3.4.6:") - depends_on("jasper@:2.0.32") + depends_on("jasper@:2.0.32", when="@:3.4.7") + depends_on("jasper") depends_on("libpng") depends_on("bacio", when="@3.4.6:") with when("+w3emc"): @@ -62,3 +64,7 @@ def setup_run_environment(self, env): lib = find_libraries("libg2_" + suffix, root=self.prefix, shared=False, recursive=True) env.set("G2_LIB" + suffix, lib[0]) env.set("G2_INC" + suffix, join_path(self.prefix, "include_" + suffix)) + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From 0357df0c8b8655b5e10511f48ebb4cefa43380f2 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Fri, 6 Oct 2023 14:06:37 -0600 Subject: [PATCH 081/806] openmpi: add 4.1.6 release (#40361) related to #40232 Signed-off-by: Howard Pritchard --- var/spack/repos/builtin/packages/openmpi/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index edc67c16a451a4..87e5bc4f2bfee5 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -42,10 +42,13 @@ class Openmpi(AutotoolsPackage, CudaPackage): # Current version( - "4.1.5", sha256="a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3" - ) # libmpi.so.40.30.5 + "4.1.6", sha256="f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415" + ) # libmpi.so.40.30.6 # Still supported + version( + "4.1.5", sha256="a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3" + ) # libmpi.so.40.30.5 version( "4.1.4", sha256="92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d" ) # libmpi.so.40.30.4 From b027d7d0de0fc0f79fedf95e7bd312a9f8ca661c Mon Sep 17 00:00:00 2001 From: George Young Date: Fri, 6 Oct 2023 22:14:45 +0100 Subject: [PATCH 082/806] metal: new package @2020-05-05 (#40355) * metal: new package * style --------- Co-authored-by: LMS Bioinformatics --- .../repos/builtin/packages/metal/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/metal/package.py diff --git a/var/spack/repos/builtin/packages/metal/package.py b/var/spack/repos/builtin/packages/metal/package.py new file mode 100644 index 00000000000000..24325c744b753e --- /dev/null +++ b/var/spack/repos/builtin/packages/metal/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 Metal(CMakePackage): + """METAL is a tool for the meta-analysis of genome-wide association studies""" + + homepage = "https://genome.sph.umich.edu/wiki/METAL" + url = "https://github.com/statgen/METAL/archive/refs/tags/2020-05-05.tar.gz" + + version( + "2020-05-05", sha256="0ffa2419ca2ab43766e7e6e8c97822c8ce1f5b6233fb5f992d1b1be1955fede7" + ) + + depends_on("cmake@3.1:", type="build") + depends_on("zlib-ng") + + @run_after("install") + def mv_binary(self): + with working_dir(self.build_directory): + install_tree("bin", self.prefix.bin) From d341be83e5e4d8cd8465f55b187b662b60c27eff Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 6 Oct 2023 23:19:49 +0200 Subject: [PATCH 083/806] VersionRange: improve error message for empty range (#40345) --- lib/spack/spack/test/versions.py | 5 +++-- lib/spack/spack/version/__init__.py | 2 ++ lib/spack/spack/version/common.py | 4 ++++ lib/spack/spack/version/version_types.py | 8 ++++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index c606fad8edcd4a..1dcf28cd711040 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -17,6 +17,7 @@ import spack.package_base import spack.spec from spack.version import ( + EmptyRangeError, GitVersion, StandardVersion, Version, @@ -695,9 +696,9 @@ def test_version_range_nonempty(): def test_empty_version_range_raises(): - with pytest.raises(ValueError): + with pytest.raises(EmptyRangeError, match="2:1.0 is an empty range"): assert VersionRange("2", "1.0") - with pytest.raises(ValueError): + with pytest.raises(EmptyRangeError, match="2:1.0 is an empty range"): assert ver("2:1.0") diff --git a/lib/spack/spack/version/__init__.py b/lib/spack/spack/version/__init__.py index 25745a94fd89d3..b25048f0523f9b 100644 --- a/lib/spack/spack/version/__init__.py +++ b/lib/spack/spack/version/__init__.py @@ -16,6 +16,7 @@ """ from .common import ( + EmptyRangeError, VersionChecksumError, VersionError, VersionLookupError, @@ -54,5 +55,6 @@ "VersionError", "VersionChecksumError", "VersionLookupError", + "EmptyRangeError", "any_version", ] diff --git a/lib/spack/spack/version/common.py b/lib/spack/spack/version/common.py index e26339d1320c1f..28dced815c3329 100644 --- a/lib/spack/spack/version/common.py +++ b/lib/spack/spack/version/common.py @@ -35,3 +35,7 @@ class VersionChecksumError(VersionError): class VersionLookupError(VersionError): """Raised for errors looking up git commits as versions.""" + + +class EmptyRangeError(VersionError): + """Raised when constructing an empty version range.""" diff --git a/lib/spack/spack/version/version_types.py b/lib/spack/spack/version/version_types.py index 223cad40d67ca2..87f4d26308cfff 100644 --- a/lib/spack/spack/version/version_types.py +++ b/lib/spack/spack/version/version_types.py @@ -12,6 +12,7 @@ from .common import ( COMMIT_VERSION, + EmptyRangeError, VersionLookupError, infinity_versions, is_git_version, @@ -595,14 +596,17 @@ def up_to(self, index) -> StandardVersion: class ClosedOpenRange: def __init__(self, lo: StandardVersion, hi: StandardVersion): if hi < lo: - raise ValueError(f"{lo}:{hi} is an empty range") + raise EmptyRangeError(f"{lo}..{hi} is an empty range") self.lo: StandardVersion = lo self.hi: StandardVersion = hi @classmethod def from_version_range(cls, lo: StandardVersion, hi: StandardVersion): """Construct ClosedOpenRange from lo:hi range.""" - return ClosedOpenRange(lo, next_version(hi)) + try: + return ClosedOpenRange(lo, next_version(hi)) + except EmptyRangeError as e: + raise EmptyRangeError(f"{lo}:{hi} is an empty range") from e def __str__(self): # This simplifies 3.1:<3.2 to 3.1:3.1 to 3.1 From 599220924ddaefd437bf8919a802836e9aeb17f4 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:24:44 -0500 Subject: [PATCH 084/806] wise2: adding new package wise2 (#40341) --- .../repos/builtin/packages/wise2/package.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 var/spack/repos/builtin/packages/wise2/package.py diff --git a/var/spack/repos/builtin/packages/wise2/package.py b/var/spack/repos/builtin/packages/wise2/package.py new file mode 100644 index 00000000000000..153305896befc8 --- /dev/null +++ b/var/spack/repos/builtin/packages/wise2/package.py @@ -0,0 +1,58 @@ +# Copyright 2013-2023 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 Wise2(MakefilePackage): + """The Wise2 package is now a rather stately bioinformatics package that + has be around for a while. Its key programs are genewise, a program + for aligning proteins or protein HMMs to DNA, and dynamite a rather + cranky "macro language" which automates the production of dynamic + programming.""" + + homepage = "https://www.ebi.ac.uk/~birney/wise2/" + url = "https://www.ebi.ac.uk/~birney/wise2/wise2.4.1.tar.gz" + + maintainers("snehring") + + version("2.4.1", sha256="240e2b12d6cd899040e2efbcb85b0d3c10245c255f3d07c1db45d0af5a4d5fa1") + + depends_on("gettext") + depends_on("glib") + depends_on("libiconv") + depends_on("pcre2") + + build_directory = "src" + + build_targets = ["all"] + + def edit(self, spec, prefix): + glib_include_include = join_path( + spec["glib"].prefix.include, "glib-" + str(spec["glib"].version[0]) + ".0" + ) + glib_lib_include = join_path( + spec["glib"].prefix.lib, "glib-" + str(spec["glib"].version[0]) + ".0", "include" + ) + glib_lib = spec["glib"].prefix.lib + glib_config_files = ["src/makefile", "src/network/makefile", "src/models/makefile"] + for f in glib_config_files: + filter_file( + "`glib-config --cflags`", + f"-I{glib_include_include} -I{glib_lib_include}", + f, + string=True, + ) + filter_file("`glib-config --libs`", f"-L{glib_lib} -lglib-2.0", f, string=True) + filter_file('"glib.h"', "", "src/dynlibsrc/subseqhash.h", string=True) + filter_file("getline", "getlineseq", "src/HMMer2/sqio.c", string=True) + filter_file("isnumber", "isdigit", "src/models/phasemodel.c", string=True) + filter_file(r".*welcome.csh.*", "", "src/makefile") + + def install(self, spec, prefix): + with working_dir("src"): + install_tree("bin", prefix.bin) + mkdirp(prefix.share.wise2) + install_tree("wisecfg", prefix.share.wise2) From 482525d0f9e11038e0b645740c406dd2a6797af5 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Fri, 6 Oct 2023 15:04:51 -0700 Subject: [PATCH 085/806] Update bufr recipe (#40033) * Update bufr recipe * Add v12.0.1 * style fixes * remove test-related functionality for bufr * Re-add testing --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../builtin/packages/bufr/c-tests-libm.patch | 11 ++ .../bufr/cmakelists-apple-llvm-ranlib.patch | 15 +++ .../repos/builtin/packages/bufr/package.py | 102 +++++++++++++++--- .../packages/bufr/python-version.patch | 12 +++ 4 files changed, 126 insertions(+), 14 deletions(-) create mode 100644 var/spack/repos/builtin/packages/bufr/c-tests-libm.patch create mode 100644 var/spack/repos/builtin/packages/bufr/cmakelists-apple-llvm-ranlib.patch create mode 100644 var/spack/repos/builtin/packages/bufr/python-version.patch diff --git a/var/spack/repos/builtin/packages/bufr/c-tests-libm.patch b/var/spack/repos/builtin/packages/bufr/c-tests-libm.patch new file mode 100644 index 00000000000000..1183659116013b --- /dev/null +++ b/var/spack/repos/builtin/packages/bufr/c-tests-libm.patch @@ -0,0 +1,11 @@ +--- a/test/CMakeLists.txt 2022-07-28 11:25:13.000000000 -0400 ++++ b/test/CMakeLists.txt 2022-07-28 11:26:40.000000000 -0400 +@@ -205,7 +205,7 @@ + set(test_exe ${test}.x) + add_executable(${test_exe} ${test_src}) + add_dependencies(${test_exe} bufr_${kind}) +- target_link_libraries(${test_exe} PRIVATE bufr::bufr_${kind}) ++ target_link_libraries(${test_exe} PRIVATE bufr::bufr_${kind} m) + add_test(NAME ${test} COMMAND ${CMAKE_BINARY_DIR}/test/${test_exe}) + endforeach() + endforeach() diff --git a/var/spack/repos/builtin/packages/bufr/cmakelists-apple-llvm-ranlib.patch b/var/spack/repos/builtin/packages/bufr/cmakelists-apple-llvm-ranlib.patch new file mode 100644 index 00000000000000..8f2e363e58d735 --- /dev/null +++ b/var/spack/repos/builtin/packages/bufr/cmakelists-apple-llvm-ranlib.patch @@ -0,0 +1,15 @@ +--- a/CMakeLists.txt 2022-02-08 10:03:55.000000000 -0700 ++++ b/CMakeLists.txt 2022-02-08 10:03:51.000000000 -0700 +@@ -39,9 +39,9 @@ + find_package(Python3 REQUIRED COMPONENTS Interpreter) + endif() + +-if(APPLE) +- # The linker on macOS does not include `common symbols` by default +- # Passing the -c flag includes them and fixes an error with undefined symbols ++if(APPLE AND NOT "${CMAKE_RANLIB}" MATCHES "^.*(llvm-ranlib)$") ++ # The linker on macOS does not include `common symbols` by default, Intel requires ++ # passing the -c flag to include them and fix an error with undefined symbols + set(CMAKE_Fortran_ARCHIVE_FINISH " -c ") + set(CMAKE_C_ARCHIVE_FINISH " -c ") + endif() diff --git a/var/spack/repos/builtin/packages/bufr/package.py b/var/spack/repos/builtin/packages/bufr/package.py index e02ebbe134e3ca..f475c0afd0962a 100644 --- a/var/spack/repos/builtin/packages/bufr/package.py +++ b/var/spack/repos/builtin/packages/bufr/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * @@ -11,37 +13,109 @@ class Bufr(CMakePackage): utilities that can be used to read (decode) and write (encode) data in BUFR, which is a WMO standard format for the exchange of meteorological data. This is part of the NCEPLIBS project. - + The library also includes a Python interface. """ homepage = "https://noaa-emc.github.io/NCEPLIBS-bufr" url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/bufr_v11.5.0.tar.gz" + git = "https://github.com/NOAA-EMC/NCEPLIBS-bufr" - maintainers("t-brown", "AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit") + maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit") + version("develop", branch="develop") + version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708") + version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75") version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8") version("11.7.0", sha256="6a76ae8e7682bbc790321bf80c2f9417775c5b01a5c4f10763df92e01b20b9ca") version("11.6.0", sha256="af4c04e0b394aa9b5f411ec5c8055888619c724768b3094727e8bb7d3ea34a54") version("11.5.0", sha256="d154839e29ef1fe82e58cf20232e9f8a4f0610f0e8b6a394b7ca052e58f97f43") + version("11.4.0", sha256="946482405e675b99e8e0c221d137768f246076f5e9ba92eed6cae47fb68b7a26") + + # Patch to not add "-c" to ranlib flags when using llvm-ranlib on Apple systems + patch("cmakelists-apple-llvm-ranlib.patch", when="@11.5.0:11.6.0") + # C test does not explicity link to -lm causing DSO error when building shared libs + patch("c-tests-libm.patch", when="@11.5.0:11.7.0") + # Patch to identify Python version correctly + patch("python-version.patch", when="@11.5:12.0.0 +python") + + variant("python", default=False, description="Enable Python interface?") + variant("shared", default=True, description="Build shared libraries", when="@11.5:") + + extends("python", when="+python") + + depends_on("python@3:", type=("build", "run"), when="+python") + depends_on("py-setuptools", type="build", when="+python") + depends_on("py-numpy", type=("build", "run"), when="+python") + depends_on("py-pip", type="build", when="+python") + depends_on("py-wheel", type="build", when="+python") + + def url_for_version(self, version): + pre = "bufr_" if version < Version("12.0.1") else "" + return ( + f"https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/{pre}v{version}.tar.gz" + ) + + # Need to make the lines shorter at least on some systems + def patch(self): + with when("@:11.7.1"): + filter_file("_lenslmax 120", "_lenslmax 60", "CMakeLists.txt") + + def cmake_args(self): + args = [ + self.define_from_variant("ENABLE_PYTHON", "python"), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define("BUILD_TESTS", self.run_tests), + ] + + return args + + def flag_handler(self, name, flags): + """ + On macOS if a library built with the ar utility contains objects + with Fortran module data but no executable functions, + the symbols corresponding to the module data may not be resolved + when an object referencing them is linked against the library. + You can work around this by compiling with option -fno-common. + """ + fc = self.compiler.fc + if self.spec.satisfies("platform=darwin"): + if name == "fflags": + if "ifort" in fc or "gfortran" in fc: + flags.append("-fno-common") + + # Bufr inserts a path into source code which may be longer than 132 + if name == "fflags" and "gfortran" in fc: + flags.append("-ffree-line-length-none") + + # Inject flags into CMake build + return (None, None, flags) def _setup_bufr_environment(self, env, suffix): libname = "libbufr_{0}".format(suffix) - lib = find_libraries(libname, root=self.prefix, shared=False, recursive=True) - lib_envname = "BUFR_LIB{0}".format(suffix) - inc_envname = "BUFR_INC{0}".format(suffix) - include_dir = "include_{0}".format(suffix) + shared = True if "+shared" in self.spec else False + # Bufr has _DA (dynamic allocation) libs in versions <= 11.5.0 + append = "" if self.spec.satisfies("@11.5.0:") else "_DA" + lib = find_libraries(libname + append, root=self.prefix, shared=shared, recursive=True) + lib_envname = "BUFR_LIB{0}".format(suffix) + append + inc_envname = "BUFR_INC{0}".format(suffix) + append + include_dir = "{0}_{1}".format(self.prefix.include.bufr, suffix) env.set(lib_envname, lib[0]) env.set(inc_envname, include_dir) - # Bufr has _DA (dynamic allocation) libs in versions <= 11.5.0 - if self.spec.satisfies("@:11.5.0"): - da_lib = find_libraries( - libname + "_DA", root=self.prefix, shared=False, recursive=True - ) - env.set(lib_envname + "_DA", da_lib[0]) - env.set(inc_envname + "_DA", include_dir) + if self.spec.satisfies("+python"): + pyver = self.spec["python"].version.up_to(2) + pydir = join_path(os.path.dirname(lib[0]), f"python{pyver}", "site-packages") + env.prepend_path("PYTHONPATH", pydir) def setup_run_environment(self, env): - for suffix in ("4", "8", "d"): + suffixes = ["4"] + if not self.spec.satisfies("@12:"): + suffixes += ["8", "d"] + for suffix in suffixes: self._setup_bufr_environment(env, suffix) + + def check(self): + if self.spec.satisfies("~python"): + with working_dir(self.builder.build_directory): + make("test") diff --git a/var/spack/repos/builtin/packages/bufr/python-version.patch b/var/spack/repos/builtin/packages/bufr/python-version.patch new file mode 100644 index 00000000000000..8b4b979d66c568 --- /dev/null +++ b/var/spack/repos/builtin/packages/bufr/python-version.patch @@ -0,0 +1,12 @@ +--- a/python/CMakeLists.txt 2023-06-08 12:39:26.000000000 -0600 ++++ b/python/CMakeLists.txt 2023-07-19 13:45:11.000000000 -0600 +@@ -8,8 +8,7 @@ + file( COPY ncepbufr utils DESTINATION . ) + + # Library installation directory +-execute_process(COMMAND ${Python3_EXECUTABLE} -c "from __future__ import print_function; import sys; print(sys.version[:3], end='')" +- OUTPUT_VARIABLE _PYVER) ++set(_PYVER "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}") + set(_install_dir "${CMAKE_INSTALL_FULL_LIBDIR}/python${_PYVER}/site-packages") + + # Build the extension module for use in install tree From b5079614b0f771f5feb1eaf222219e14172b87f1 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Fri, 6 Oct 2023 15:31:23 -0700 Subject: [PATCH 086/806] MFEM: add new version v4.6 (#40170) * [mfem] Initial changes for v4.6 * [@spackbot] updating style on behalf of v-dobrev * [mfem] Set the proper download link for v4.6 --- .../repos/builtin/packages/mfem/package.py | 25 ++++++++++++++++- .../builtin/packages/mfem/test_builds.sh | 27 +++++++++---------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 061ce98d43e5ef..eb869fc255b9e4 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -6,6 +6,7 @@ import os import shutil import sys +from platform import machine from spack.package import * @@ -48,6 +49,13 @@ class Mfem(Package, CudaPackage, ROCmPackage): # other version. version("develop", branch="master") + version( + "4.6.0", + sha256="5fa9465b5bec56bfb777a4d2826fba48d85fbace4aed8b64a2fd4059bf075b15", + url="https://bit.ly/mfem-4-6", + extension="tar.gz", + ) + version( "4.5.2", sha256="7003c908c8265810ff97cb37531521b3aed24959975833a01ea05adfdb36e0f7", @@ -286,6 +294,11 @@ class Mfem(Package, CudaPackage, ROCmPackage): "sundials@5.4.0:+cuda cuda_arch={0}".format(sm_), when="@4.2.0:+sundials+cuda cuda_arch={0}".format(sm_), ) + for gfx in ROCmPackage.amdgpu_targets: + depends_on( + "sundials@5.7.0:+rocm amdgpu_target={0}".format(gfx), + when="@4.6.0:+sundials+rocm amdgpu_target={0}".format(gfx), + ) depends_on("pumi", when="+pumi~shared") depends_on("pumi+shared", when="+pumi+shared") depends_on("pumi@2.2.3:2.2.5", when="@4.2.0:4.3.0+pumi") @@ -296,6 +309,16 @@ class Mfem(Package, CudaPackage, ROCmPackage): depends_on("gslib@1.0.7:", when="@4.3.0:+gslib") depends_on("suite-sparse", when="+suite-sparse") depends_on("superlu-dist", when="+superlu-dist") + for sm_ in CudaPackage.cuda_arch_values: + depends_on( + "superlu-dist+cuda cuda_arch={0}".format(sm_), + when="+superlu-dist+cuda cuda_arch={0}".format(sm_), + ) + for gfx in ROCmPackage.amdgpu_targets: + depends_on( + "superlu-dist+rocm amdgpu_target={0}".format(gfx), + when="+superlu-dist+rocm amdgpu_target={0}".format(gfx), + ) depends_on("strumpack@3.0.0:", when="+strumpack~shared") depends_on("strumpack@3.0.0:+shared", when="+strumpack+shared") for sm_ in CudaPackage.cuda_arch_values: @@ -921,7 +944,7 @@ def find_optional_library(name, prefix): options += ["HIP_DIR=%s" % hipsparse["rocsparse"].prefix] if "%cce" in spec: # We assume the proper Cray CCE module (cce) is loaded: - craylibs_path = env["CRAYLIBS_" + env["MACHTYPE"].capitalize()] + craylibs_path = env["CRAYLIBS_" + machine().upper()] craylibs = ["libmodules", "libfi", "libcraymath", "libf", "libu", "libcsup"] hip_libs += find_libraries(craylibs, craylibs_path) if hip_libs: diff --git a/var/spack/repos/builtin/packages/mfem/test_builds.sh b/var/spack/repos/builtin/packages/mfem/test_builds.sh index 13e72e7d558a5f..787f936be132d2 100755 --- a/var/spack/repos/builtin/packages/mfem/test_builds.sh +++ b/var/spack/repos/builtin/packages/mfem/test_builds.sh @@ -14,9 +14,9 @@ rocm_arch="gfx908" spack_jobs='' # spack_jobs='-j 128' -mfem='mfem@4.5.2'${compiler} +mfem='mfem@4.6.0'${compiler} # mfem_dev='mfem@develop'${compiler} -mfem_dev='mfem@4.5.2'${compiler} +mfem_dev='mfem@4.6.0'${compiler} backends='+occa+raja+libceed' backends_specs='^occa~cuda ^raja~openmp' @@ -24,11 +24,9 @@ backends_specs='^occa~cuda ^raja~openmp' # ~fortran is needed for Cray Fortran linking with tcmalloc* conduit_spec='^conduit~fortran' # petsc spec -petsc_spec='^petsc+suite-sparse+mumps' -petsc_spec_cuda='^petsc+cuda+suite-sparse+mumps' -# superlu-dist specs -superlu_spec_cuda='^superlu-dist+cuda cuda_arch='"${cuda_arch}" -superlu_spec_rocm='^superlu-dist+rocm amdgpu_target='"${rocm_arch}" +petsc_spec='^petsc+mumps' +petsc_spec_cuda='^petsc+cuda+mumps' +petsc_spec_rocm='^petsc+rocm+mumps' # strumpack spec without cuda (use version > 6.3.1) strumpack_spec='^strumpack~slate~openmp~cuda' strumpack_cuda_spec='^strumpack+cuda~slate~openmp' @@ -138,7 +136,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared'" $strumpack_cuda_spec"' \ - '"$superlu_spec_cuda $petsc_spec_cuda $conduit_spec" + '"$petsc_spec_cuda $conduit_spec" # hypre with cuda: # TODO: restore '+libceed' when the libCEED CUDA unit tests take less time. @@ -150,7 +148,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib \ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared ^hypre+cuda \ - '" $superlu_spec_cuda $strumpack_cuda_spec $conduit_spec" + '" $strumpack_cuda_spec $conduit_spec" # # same builds as above with ${mfem_dev} @@ -175,7 +173,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared'" $strumpack_cuda_spec"' \ - '"$superlu_spec_cuda $petsc_spec_cuda $conduit_spec" + '"$petsc_spec_cuda $conduit_spec" # hypre with cuda: # TODO: restore '+libceed' when the libCEED CUDA unit tests take less time. @@ -187,7 +185,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib \ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared ^hypre+cuda \ - '"$superlu_spec_cuda $strumpack_cuda_spec $conduit_spec" + '"$strumpack_cuda_spec $conduit_spec" ) @@ -203,15 +201,14 @@ builds_rocm=( ^raja+rocm~openmp ^occa~cuda~openmp ^hypre+rocm' # hypre without rocm: - # TODO: add "+petsc+slepc $petsc_spec_rocm" when it is supported. # TODO: add back '+hiop' when it is no longer linked with tcmalloc* through # its magma dependency. # TODO: add back '+ginkgo' when the Ginkgo example works. ${mfem}'+rocm+openmp+raja+occa+libceed amdgpu_target='"${rocm_arch}"' \ - +superlu-dist+strumpack+suite-sparse+gslib \ + +superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit \ ^raja+rocm~openmp ^occa~cuda'" $strumpack_rocm_spec"' \ - '"$superlu_spec_rocm $conduit_spec" + '"$petsc_spec_rocm $conduit_spec" # hypre with rocm: # TODO: add back "+petsc+slepc $petsc_spec_rocm" when it works. @@ -223,7 +220,7 @@ builds_rocm=( +superlu-dist+strumpack+suite-sparse+gslib \ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit \ ^raja+rocm~openmp ^occa~cuda ^hypre+rocm \ - '"$strumpack_rocm_spec $superlu_spec_rocm $conduit_spec" + '"$strumpack_rocm_spec $conduit_spec" # # same builds as above with ${mfem_dev} From 7a358c900535d7a35400822e6b630460070feac6 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:19:19 -0700 Subject: [PATCH 087/806] Change 'exit' to 'return' in setup-env.sh (#36137) * Change 'exit' to 'return' in `setup-env.sh` to avoid losing shell in some cases when sourcing twice. --- share/spack/setup-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 7d4554359fa6ab..b5f434863595f4 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -41,7 +41,7 @@ # prevent infinite recursion when spack shells out (e.g., on cray for modules) if [ -n "${_sp_initializing:-}" ]; then - exit 0 + return 0 fi export _sp_initializing=true From 4f992475f42021fc46bd437f6a427f438e679fc8 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 7 Oct 2023 02:03:00 +0200 Subject: [PATCH 088/806] Python add v3.11.5 (#40330) --- var/spack/repos/builtin/packages/python/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index c07ad5d6ad461e..04251b6c2339f6 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -42,14 +42,16 @@ class Python(Package): version("3.12.0", sha256="51412956d24a1ef7c97f1cb5f70e185c13e3de1f50d131c0aac6338080687afb") version( - "3.11.4", - sha256="85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63", + "3.11.5", + sha256="a12a0a013a30b846c786c010f2c19dd36b7298d888f7c4bd1581d90ce18b5e58", preferred=True, ) + version("3.11.4", sha256="85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63") version("3.11.3", sha256="1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048") version("3.11.2", sha256="2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849") version("3.11.1", sha256="baed518e26b337d4d8105679caf68c5c32630d702614fc174e98cb95c46bdfa4") version("3.11.0", sha256="64424e96e2457abbac899b90f9530985b51eef2905951febd935f0e73414caeb") + version("3.10.13", sha256="698ec55234c1363bd813b460ed53b0f108877c7a133d48bde9a50a1eb57b7e65") version("3.10.12", sha256="a43cd383f3999a6f4a7db2062b2fc9594fefa73e175b3aedafa295a51a7bb65c") version("3.10.11", sha256="f3db31b668efa983508bd67b5712898aa4247899a346f2eb745734699ccd3859") version("3.10.10", sha256="fba64559dde21ebdc953e4565e731573bb61159de8e4d4cedee70fb1196f610d") @@ -63,6 +65,7 @@ class Python(Package): version("3.10.2", sha256="3c0ede893011319f9b0a56b44953a3d52c7abf9657c23fb4bc9ced93b86e9c97") version("3.10.1", sha256="b76117670e7c5064344b9c138e141a377e686b9063f3a8a620ff674fa8ec90d3") version("3.10.0", sha256="c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758") + version("3.9.18", sha256="504ce8cfd59addc04c22f590377c6be454ae7406cb1ebf6f5a350149225a9354") version("3.9.17", sha256="8ead58f669f7e19d777c3556b62fae29a81d7f06a7122ff9bc57f7dd82d7e014") version("3.9.16", sha256="1ad539e9dbd2b42df714b69726e0693bc6b9d2d2c8e91c2e43204026605140c5") version("3.9.15", sha256="48d1ccb29d5fbaf1fb8f912271d09f7450e426d4dfe95978ef6aaada70ece4d8") @@ -81,6 +84,7 @@ class Python(Package): version("3.9.2", sha256="7899e8a6f7946748830d66739f2d8f2b30214dad956e56b9ba216b3de5581519") version("3.9.1", sha256="29cb91ba038346da0bd9ab84a0a55a845d872c341a4da6879f462e94c741f117") version("3.9.0", sha256="df796b2dc8ef085edae2597a41c1c0a63625ebd92487adaef2fed22b567873e8") + version("3.8.18", sha256="7c5df68bab1be81a52dea0cc2e2705ea00553b67107a301188383d7b57320b16") version("3.8.17", sha256="def428fa6cf61b66bcde72e3d9f7d07d33b2e4226f04f9d6fce8384c055113ae") version("3.8.16", sha256="71ca9d935637ed2feb59e90a368361dc91eca472a90acb1d344a2e8178ccaf10") version("3.8.15", sha256="924d46999df82aa2eaa1de5ca51d6800ffb56b4bf52486a28f40634e3362abc4") From 6c1868f8ae48e9547cfc66cd902ee7bd32f29148 Mon Sep 17 00:00:00 2001 From: Ken Raffenetti Date: Fri, 6 Oct 2023 23:28:15 -0500 Subject: [PATCH 089/806] yaksa: add version 0.3 (#40368) --- var/spack/repos/builtin/packages/yaksa/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/yaksa/package.py b/var/spack/repos/builtin/packages/yaksa/package.py index 46366659be0ffc..5d94f42740a41d 100644 --- a/var/spack/repos/builtin/packages/yaksa/package.py +++ b/var/spack/repos/builtin/packages/yaksa/package.py @@ -26,6 +26,7 @@ class Yaksa(AutotoolsPackage, CudaPackage, ROCmPackage): url = "https://github.com/pmodels/yaksa/archive/refs/tags/v0.2.tar.gz" maintainers("raffenet", "yfguo", "hzhou") + version("0.3", sha256="c9e5291211bee8852831bb464f430ad5ba1541e31db5718a6fa2f2d3329fc2d9") version("0.2", sha256="9401cb6153dc8c34ddb9781bbabd418fd26b0a27b5da3294ecc21af7be9c86f2") depends_on("autoconf", type="build") From 28c49930e2baea3f0c82ba034343a13501d60f3b Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 7 Oct 2023 09:21:04 +0200 Subject: [PATCH 090/806] Remove warning for custom module configuration, when no module is enabled (#40358) The warning was added in v0.20 and was slated for removal in v0.21 --- .../spack/hooks/module_file_generation.py | 1 - lib/spack/spack/modules/__init__.py | 9 +---- lib/spack/spack/modules/common.py | 39 ------------------- 3 files changed, 2 insertions(+), 47 deletions(-) diff --git a/lib/spack/spack/hooks/module_file_generation.py b/lib/spack/spack/hooks/module_file_generation.py index dc86c43205a8d5..0c6428ebd44198 100644 --- a/lib/spack/spack/hooks/module_file_generation.py +++ b/lib/spack/spack/hooks/module_file_generation.py @@ -11,7 +11,6 @@ def _for_each_enabled(spec, method_name, explicit=None): """Calls a method for each enabled module""" - spack.modules.ensure_modules_are_enabled_or_warn() set_names = set(spack.config.get("modules", {}).keys()) for name in set_names: enabled = spack.config.get("modules:%s:enable" % name) diff --git a/lib/spack/spack/modules/__init__.py b/lib/spack/spack/modules/__init__.py index ccd800cdecda11..13b8a95bed7d08 100644 --- a/lib/spack/spack/modules/__init__.py +++ b/lib/spack/spack/modules/__init__.py @@ -7,15 +7,10 @@ include Tcl non-hierarchical modules, Lua hierarchical modules, and others. """ -from .common import disable_modules, ensure_modules_are_enabled_or_warn +from .common import disable_modules from .lmod import LmodModulefileWriter from .tcl import TclModulefileWriter -__all__ = [ - "TclModulefileWriter", - "LmodModulefileWriter", - "disable_modules", - "ensure_modules_are_enabled_or_warn", -] +__all__ = ["TclModulefileWriter", "LmodModulefileWriter", "disable_modules"] module_types = {"tcl": TclModulefileWriter, "lmod": LmodModulefileWriter} diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 4dda4b183b1dc5..4a3485c8647959 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -33,10 +33,8 @@ import datetime import inspect import os.path -import pathlib import re import string -import warnings from typing import Optional import llnl.util.filesystem @@ -820,43 +818,6 @@ def verbose(self): return self.conf.verbose -def ensure_modules_are_enabled_or_warn(): - """Ensures that, if a custom configuration file is found with custom configuration for the - default tcl module set, then tcl module file generation is enabled. Otherwise, a warning - is emitted. - """ - - # TODO (v0.21 - Remove this function) - # Check if TCL module generation is enabled, return early if it is - enabled = spack.config.get("modules:default:enable", []) - if "tcl" in enabled: - return - - # Check if we have custom TCL module sections - for scope in spack.config.CONFIG.file_scopes: - # Skip default configuration - if scope.name.startswith("default"): - continue - - data = spack.config.get("modules:default:tcl", scope=scope.name) - if data: - config_file = pathlib.Path(scope.path) - if not scope.name.startswith("env"): - config_file = config_file / "modules.yaml" - break - else: - return - - # If we are here we have a custom "modules" section in "config_file" - msg = ( - f"detected custom TCL modules configuration in {config_file}, while TCL module file " - f"generation for the default module set is disabled. " - f"In Spack v0.20 module file generation has been disabled by default. To enable " - f"it run:\n\n\t$ spack config add 'modules:default:enable:[tcl]'\n" - ) - warnings.warn(msg) - - class BaseModuleFileWriter: def __init__(self, spec, module_set_name, explicit=None): self.spec = spec From e2a7f2ee9acdacd6bdd78cf12ac7fe1a15c578ca Mon Sep 17 00:00:00 2001 From: "Mark (he/his) C. Miller" Date: Sat, 7 Oct 2023 17:44:31 -0700 Subject: [PATCH 091/806] Update CITATION.cff (#40363) You will note the `Cite this repository` link is not working. This commit fixes the underlying file... * `authors` was not indented * `authors` required by `preferred-citation` * `authors` list required at top level (I simply duplicated) * `"USA"` not correct country code * `month` requires an integer month number * Added URL to the actual pdf of the cited paper * Used `identifiers` for doi and LLNL doc number * added `abstract` copied from paper Various fixes were confirmed by `cffconvert` using `docker run -v `pwd`:/app citationcff/cffconvert --validate` --- CITATION.cff | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 4ae54a57df4165..4753f6cc37f4fa 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -27,12 +27,51 @@ # And here's the CITATION.cff format: # cff-version: 1.2.0 +type: software message: "If you are referencing Spack in a publication, please cite the paper below." +title: "The Spack Package Manager: Bringing Order to HPC Software Chaos" +abstract: >- + Large HPC centers spend considerable time supporting software for thousands of users, but the complexity of HPC software is quickly outpacing the capabilities of existing software management tools. + Scientific applications require specific versions of compilers, MPI, and other dependency libraries, so using a single, standard software stack is infeasible. + However, managing many configurations is difficult because the configuration space is combinatorial in size. + We introduce Spack, a tool used at Lawrence Livermore National Laboratory to manage this complexity. + Spack provides a novel, re- cursive specification syntax to invoke parametric builds of packages and dependencies. + It allows any number of builds to coexist on the same system, and it ensures that installed packages can find their dependencies, regardless of the environment. + We show through real-world use cases that Spack supports diverse and demanding applications, bringing order to HPC software chaos. preferred-citation: + title: "The Spack Package Manager: Bringing Order to HPC Software Chaos" type: conference-paper - doi: "10.1145/2807591.2807623" - url: "https://github.com/spack/spack" + url: "https://tgamblin.github.io/pubs/spack-sc15.pdf" authors: + - family-names: "Gamblin" + given-names: "Todd" + - family-names: "LeGendre" + given-names: "Matthew" + - family-names: "Collette" + given-names: "Michael R." + - family-names: "Lee" + given-names: "Gregory L." + - family-names: "Moody" + given-names: "Adam" + - family-names: "de Supinski" + given-names: "Bronis R." + - family-names: "Futral" + given-names: "Scott" + conference: + name: "Supercomputing 2015 (SC’15)" + city: "Austin" + region: "Texas" + country: "US" + month: 11 + year: 2015 + identifiers: + - description: "The concept DOI of the work." + type: doi + value: 10.1145/2807591.2807623 + - description: "The DOE Document Release Number of the work" + type: other + value: "LLNL-CONF-669890" +authors: - family-names: "Gamblin" given-names: "Todd" - family-names: "LeGendre" @@ -47,12 +86,3 @@ preferred-citation: given-names: "Bronis R." - family-names: "Futral" given-names: "Scott" - title: "The Spack Package Manager: Bringing Order to HPC Software Chaos" - conference: - name: "Supercomputing 2015 (SC’15)" - city: "Austin" - region: "Texas" - country: "USA" - month: November 15-20 - year: 2015 - notes: LLNL-CONF-669890 From 633df545200994d5c80d71f3677bc803f0905e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Sun, 8 Oct 2023 17:06:13 +0200 Subject: [PATCH 092/806] [add] py-cylc-flow: new recipe (#39986) * [add] py-cylc-flow: new recipe * py-cylc-flow: fix py-protobuf version Co-authored-by: Adam J. Stewart * py-cylc-flow: fix py-colorama version Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * py-cylc-flow: Update dependence on py-aiofiles Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * py-cylc-flow: Update dependence on py-pyzmq Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * py-cylcflow: remove useless dependence * py-cylc-flow: fix indent * py-cylc-flow: fix argument in depends_on; move lines * py-cylc-flow: fix the type of the dependence py-setuptools --------- Co-authored-by: Adam J. Stewart Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Co-authored-by: LydDeb --- .../builtin/packages/py-cylc-flow/package.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cylc-flow/package.py diff --git a/var/spack/repos/builtin/packages/py-cylc-flow/package.py b/var/spack/repos/builtin/packages/py-cylc-flow/package.py new file mode 100644 index 00000000000000..bed0abd1b19788 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cylc-flow/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2023 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 PyCylcFlow(PythonPackage): + """A workflow engine for cycling systems.""" + + homepage = "https://cylc.org" + pypi = "cylc-flow/cylc-flow-8.1.4.tar.gz" + + maintainers("LydDeb") + + version("8.2.0", sha256="cbe35e0d72d1ca36f28a4cebe9b9040a3445a74253bc94051a3c906cf179ded0") + version("8.1.4", sha256="d1835ac18f6f24f3115c56b2bc821185484e834a86b12fd0033ff7e4dc3c1f63") + + depends_on("py-setuptools@49:66,68:", type=("build", "run")) + depends_on("py-aiofiles@0.7", type=("build", "run"), when="@:8.1") + depends_on("py-ansimarkup@1.0.0:", type=("build", "run")) + depends_on("py-async-timeout@3.0.0:", type=("build", "run")) + depends_on("py-colorama@0.4:1", type=("build", "run")) + depends_on("py-graphene@2.1:2", type=("build", "run")) + depends_on("py-jinja2@3.0", type=("build", "run")) + depends_on("py-metomi-isodatetime@3.0", type=("build", "run")) + depends_on("py-protobuf@4.21.2:4.21", type=("build", "run")) + depends_on("py-psutil@5.6.0:", type=("build", "run")) + depends_on("py-pyzmq@22:", type=("build", "run"), when="@8.2:") + depends_on("py-pyzmq@22", type=("build", "run"), when="@:8.1") + depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7") + depends_on("py-urwid@2", type=("build", "run")) + depends_on("py-rx", type=("build", "run")) + depends_on("py-promise", type=("build", "run")) + depends_on("py-tomli@2:", type=("build", "run"), when="^python@:3.10") From 9db782f8d9417b947ed7f782a9e668c55ac6d7de Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:16:08 +0200 Subject: [PATCH 093/806] py-bids-validator: add 1.13.1 (#40356) * py-bids-validator: add 1.13.1 * Fix style --- var/spack/repos/builtin/packages/py-bids-validator/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-bids-validator/package.py b/var/spack/repos/builtin/packages/py-bids-validator/package.py index a91047d9726f92..5ba74c229de73f 100644 --- a/var/spack/repos/builtin/packages/py-bids-validator/package.py +++ b/var/spack/repos/builtin/packages/py-bids-validator/package.py @@ -12,6 +12,7 @@ class PyBidsValidator(PythonPackage): homepage = "https://github.com/bids-standard/bids-validator" pypi = "bids-validator/bids-validator-1.7.2.tar.gz" + version("1.13.1", sha256="7205ce4e68fba172215332c786f1ac1665025b702b6dff2b1e158f00a2df9890") version("1.11.0", sha256="408c56748b7cf98cf7c31822f33a8d89c5e6e7db5254c345107e8d527576ff53") version("1.9.8", sha256="ff39799bb205f92d6f2c322f0b8eff0d1c0288f4291a0b18fce61afa4dfd7f3e") version("1.9.4", sha256="4bf07d375f231a2ad2f450beeb3ef6c54f93194fd993aa5157d57a8fba48ed50") @@ -19,4 +20,5 @@ class PyBidsValidator(PythonPackage): version("1.8.4", sha256="63e7a02c9ddb5505a345e178f4e436b82c35ec0a177d7047b67ea10ea3029a68") version("1.7.2", sha256="12398831a3a3a2ed7c67e693cf596610c23dd23e0889bfeae0830bbd1d41e5b9") + depends_on("python@3.8:", when="@1.12:", type=("build", "run")) depends_on("py-setuptools", type="build") From 2eb16a8ea2944652a3a29b27f78c826eead1a5c8 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Sun, 8 Oct 2023 11:18:01 -0400 Subject: [PATCH 094/806] [py-lvis] New package (#39080) * [py-lvis] New package * [py-lvis] flake8 * [py-lvis] os agnostic * [py-lvis] added comment for imported dependency * [py-lvis] style fix --- .../repos/builtin/packages/py-lvis/package.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-lvis/package.py diff --git a/var/spack/repos/builtin/packages/py-lvis/package.py b/var/spack/repos/builtin/packages/py-lvis/package.py new file mode 100644 index 00000000000000..4824f487d5fe52 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-lvis/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2023 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) + +import os + +from spack.package import * + + +class PyLvis(PythonPackage): + """Python API for LVIS dataset.""" + + pypi = "lvis/lvis-0.5.3.tar.gz" + + version("0.5.3", sha256="55aeeb84174abea2ed0d6985a8e93aa9bdbb60c61c6db130c8269a275ef61a6e") + + depends_on("py-setuptools", type="build") + depends_on("py-cycler@0.10:", type=("build", "run")) + depends_on("py-cython@0.29.12:", type=("build", "run")) + depends_on("py-kiwisolver@1.1:", type=("build", "run")) + depends_on("py-matplotlib@3.1.1:", type=("build", "run")) + depends_on("py-numpy@1.18.2:", type=("build", "run")) + depends_on("opencv@4.1.0.25:+python3", type=("build", "run")) + depends_on("py-pyparsing@2.4.0:", type=("build", "run")) + depends_on("py-python-dateutil@2.8:", type=("build", "run")) + depends_on("py-six@1.12:", type=("build", "run")) + + # imported at lvis/lvis.py:15 + depends_on("py-pycocotools", type=("build", "run")) + + def patch(self): + os.rename( + join_path(self.stage.source_path, "lvis.egg-info", "requires.txt"), + join_path(self.stage.source_path, "requirements.txt"), + ) From 81f58229ab75f22779b33ef51bbf24d90734f275 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Sun, 8 Oct 2023 11:20:46 -0400 Subject: [PATCH 095/806] py-torch-sparse: add v0.6.17 (#39495) * [py-torch-sparse] New version 0.6.17 * [py-torch-sparse] added dependency on parallel-hashmap * [py-torch-sparse] - spack only supports python@3.7: - py-pytest-runner only needed with old versions --- var/spack/repos/builtin/packages/py-torch-sparse/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch-sparse/package.py b/var/spack/repos/builtin/packages/py-torch-sparse/package.py index 4d4495301adb96..b74a7bed549f24 100644 --- a/var/spack/repos/builtin/packages/py-torch-sparse/package.py +++ b/var/spack/repos/builtin/packages/py-torch-sparse/package.py @@ -13,18 +13,19 @@ class PyTorchSparse(PythonPackage): homepage = "https://github.com/rusty1s/pytorch_sparse/" url = "https://github.com/rusty1s/pytorch_sparse/archive/0.6.7.tar.gz" + version("0.6.17", sha256="c964a70ed978bff65009250eb12fae96317c60c9a04d7d1b07f0beee8b4b9c22") version("0.6.8", sha256="98f7ff1f0f9cd5031bc81c70c11970c3864545ae33677025a6efd2466a97e6f9") version("0.6.7", sha256="0d038a1502548692972a085cd0496460b5d2050bb7328427add990f081d6c44d") variant("cuda", default=False, description="Enable CUDA support") - depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools", type="build") - depends_on("py-pytest-runner", type="build") + depends_on("py-pytest-runner", when="@:0.6.8", type="build") depends_on("py-scipy", type=("build", "run")) depends_on("py-torch", type=("build", "run")) depends_on("py-torch-scatter+cuda", when="+cuda") depends_on("py-torch-scatter~cuda", when="~cuda") + depends_on("parallel-hashmap", when="@0.6.17:") def setup_build_environment(self, env): if "+cuda" in self.spec: From a3be9cb8535676d97c32573253a0c7c9e064a284 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Sun, 8 Oct 2023 11:21:55 -0400 Subject: [PATCH 096/806] [py-tensorboardx] Added version 2.6.2.2 (#39731) * [py-tensorboardx] Added version 2.6.2.2 * [py-tensorboardx] flake8 * [py-tensorboardx] requires py-setuptools-scm --- var/spack/repos/builtin/packages/py-tensorboardx/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-tensorboardx/package.py b/var/spack/repos/builtin/packages/py-tensorboardx/package.py index 5c901eedb468e0..3bcd5f17545fee 100644 --- a/var/spack/repos/builtin/packages/py-tensorboardx/package.py +++ b/var/spack/repos/builtin/packages/py-tensorboardx/package.py @@ -17,6 +17,7 @@ class PyTensorboardx(PythonPackage): homepage = "https://github.com/lanpa/tensorboardX" pypi = "tensorboardx/tensorboardX-1.8.tar.gz" + version("2.6.2.2", sha256="c6476d7cd0d529b0b72f4acadb1269f9ed8b22f441e87a84f2a3b940bb87b666") version("2.5.1", sha256="ea85a3446f22ce8a917fe4fa4d8a7a96222ef84ac835267d038c34bb99f6d61b") version("2.1", sha256="9e8907cf2ab900542d6cb72bf91aa87b43005a7f0aa43126268697e3727872f9") version("2.0", sha256="835d85db0aef2c6768f07c35e69a74e3dcb122d6afceaf2b8504d7d16c7209a5") @@ -24,7 +25,10 @@ class PyTensorboardx(PythonPackage): version("1.8", sha256="13fe0abba27f407778a7321937190eedaf12bc8c544d9a4e294fcf0ba177fd76") depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", when="@2.6.2.2:", type="build") depends_on("py-numpy", type=("build", "run")) - depends_on("py-protobuf@3.8.0:3.20.1", type=("build", "run")) + depends_on("py-protobuf@3.8.0:3.20.1", when="@:2.5.1", type=("build", "run")) + depends_on("py-protobuf@3.20:", when="@2.6.2.2:", type=("build", "run")) + depends_on("py-packaging", when="@2.6.2.2:", type=("build", "run")) depends_on("py-six", when="@:2.1", type=("build", "run")) From 00396fbe6cb33a4e061b3db435ef2b2175212d2e Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Sun, 8 Oct 2023 11:27:18 -0400 Subject: [PATCH 097/806] [py-tokenizers] added version 0.13.3 (#40360) --- var/spack/repos/builtin/packages/py-tokenizers/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-tokenizers/package.py b/var/spack/repos/builtin/packages/py-tokenizers/package.py index c45f301c20baf8..5555fcdb087e4c 100644 --- a/var/spack/repos/builtin/packages/py-tokenizers/package.py +++ b/var/spack/repos/builtin/packages/py-tokenizers/package.py @@ -13,6 +13,7 @@ class PyTokenizers(PythonPackage): homepage = "https://github.com/huggingface/tokenizers" pypi = "tokenizers/tokenizers-0.6.0.tar.gz" + version("0.13.3", sha256="2e546dbb68b623008a5442353137fbb0123d311a6d7ba52f2667c8862a75af2e") version("0.13.1", sha256="3333d1cee5c8f47c96362ea0abc1f81c77c9b92c6c3d11cbf1d01985f0d5cf1d") version("0.10.3", sha256="1a5d3b596c6d3a237e1ad7f46c472d467b0246be7fd1a364f12576eb8db8f7e6") version("0.6.0", sha256="1da11fbfb4f73be695bed0d655576097d09a137a16dceab2f66399716afaffac") From 6b9e10330504da08703170ac71a8e22b94355fef Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:28:13 +0200 Subject: [PATCH 098/806] py-tables: add 3.9.0 (#40340) * py-tables: add 3.9.0 * Add conflict with apple-clang --- .../builtin/packages/py-tables/package.py | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tables/package.py b/var/spack/repos/builtin/packages/py-tables/package.py index a350e3c09c62b7..84cd48bc5843d3 100644 --- a/var/spack/repos/builtin/packages/py-tables/package.py +++ b/var/spack/repos/builtin/packages/py-tables/package.py @@ -12,7 +12,10 @@ class PyTables(PythonPackage): homepage = "https://www.pytables.org/" pypi = "tables/tables-3.6.1.tar.gz" + git = "https://github.com/PyTables/PyTables.git" + version("master", branch="master") + version("3.9.0", sha256="27c9ca14c359d875caf945a6a527c12690e017650402dd17d8eb8b6caf6687d5") version("3.8.0", sha256="34f3fa2366ce20b18f1df573a77c1d27306ce1f2a41d9f9eff621b5192ea8788") version("3.7.0", sha256="e92a887ad6f2a983e564a69902de4a7645c30069fc01abd353ec5da255c5e1fe") version("3.6.1", sha256="49a972b8a7c27a8a173aeb05f67acb45fe608b64cd8e9fa667c0962a60b71b49") @@ -27,38 +30,43 @@ class PyTables(PythonPackage): variant("lzo", default=False, description="Support for lzo compression") # pyproject.toml + depends_on("py-setuptools@61:", when="@3.9:", type="build") depends_on("py-setuptools@42:", when="@3.7:", type="build") depends_on("py-setuptools", type="build") + depends_on("py-cython@0.29.32:", when="@3.9:", type="build") + depends_on("py-cython@0.29.21:", when="@3.7:3.8", type=("build", "run")) + depends_on("py-cython@0.21:", type="build") # setup.py depends_on("python@3.8:", when="@3.8:", type=("build", "run")) # requirements.txt - depends_on("py-cython@0.29.21:", when="@3.7:", type=("build", "run")) - depends_on("py-cython@0.21:", type="build") depends_on("py-numpy@1.19:", when="@3.8:", type=("build", "run")) depends_on("py-numpy@1.9.3:", type=("build", "run")) depends_on("py-numexpr@2.6.2:", type=("build", "run")) - depends_on("py-blosc2@2.0", type=("build", "run")) depends_on("py-packaging", when="@3.7:", type=("build", "run")) depends_on("py-py-cpuinfo", when="@3.8:", type=("build", "run")) + depends_on("py-blosc2@2.2.8:", when="@3.9:", type=("build", "run")) + depends_on("py-blosc2@2.0", when="@3.8", type=("build", "run")) # tables/req_versions.py - depends_on("hdf5@1.8.4:", when="@3.4.0:") + depends_on("hdf5@1.10.5:", when="@3.8:") + depends_on("hdf5@1.8.4:", when="@3.4:") depends_on("hdf5@1.8.4:1.8", when="@:3.3") - - # Historical dependencies - depends_on("py-six@1.9:", when="@:3.5", type=("build", "run")) - - # tables/req_versions.py # Versions prior to 3.3 must build with the internal blosc due to a lock # problem in a multithreaded environment. depends_on("c-blosc@1.11.1:", when="@3.8:") depends_on("c-blosc@1.4.1:", when="@3.3:") + depends_on("zlib-api", when="+zlib") depends_on("bzip2", when="+bzip2") depends_on("lzo", when="+lzo") + conflicts("%apple-clang@15:", when="@:3.8") + + # Historical dependencies + depends_on("py-six@1.9:", when="@:3.5", type=("build", "run")) + def setup_build_environment(self, env): env.set("HDF5_DIR", self.spec["hdf5"].prefix) if "+bzip2" in self.spec: From 8089aedde11bc2aa0ae5bd478bde01b0960ccbd2 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Sun, 8 Oct 2023 08:42:21 -0700 Subject: [PATCH 099/806] gettext: Add static and pic options (#37957) --- var/spack/repos/builtin/packages/gettext/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index 4ae7eb59d98884..d7cccfb3391106 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -33,6 +33,8 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage): variant("tar", default=True, description="Enable tar support") variant("bzip2", default=True, description="Enable bzip2 support") variant("xz", default=True, description="Enable xz support") + variant("shared", default=True, description="Build shared libraries") + variant("pic", default=True, description="Enable position-independent code (PIC)") # Optional variants variant("libunistring", default=False, description="Use libunistring") @@ -54,6 +56,8 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage): depends_on("libunistring", when="+libunistring") # depends_on('cvs') + conflicts("+shared~pic") + patch("test-verify-parallel-make-check.patch", when="@:0.19.8.1") patch("nvhpc-builtin.patch", when="@:0.21.0 %nvhpc") patch("nvhpc-export-symbols.patch", when="%nvhpc") @@ -87,6 +91,8 @@ def configure_args(self): "--without-cvs", ] + config_args.extend(self.enable_or_disable("shared")) + if self.spec["iconv"].name == "libc": config_args.append("--without-libiconv-prefix") elif not is_system_path(self.spec["iconv"].prefix): @@ -115,12 +121,16 @@ def configure_args(self): else: config_args.append("--with-included-libunistring") + config_args.extend(self.with_or_without("pic")) + return config_args @property def libs(self): - return find_libraries( + libs = find_libraries( ["libasprintf", "libgettextlib", "libgettextpo", "libgettextsrc", "libintl"], root=self.prefix, recursive=True, + shared=self.spec.variants["shared"].value, ) + return libs From 512e41a84aa794ec0cc53872aaa6c228c36e0b49 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sun, 8 Oct 2023 19:47:36 +0200 Subject: [PATCH 100/806] py-setuptools: sdist + rpath patch backport (#40205) --- .../repos/builtin/packages/py-pip/package.py | 3 + .../builtin/packages/py-setuptools/package.py | 255 ++++-------------- .../py-setuptools/rpath-compiler-flag.patch | 13 + 3 files changed, 72 insertions(+), 199 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch diff --git a/var/spack/repos/builtin/packages/py-pip/package.py b/var/spack/repos/builtin/packages/py-pip/package.py index 149f042756675c..52d290d0b549c8 100644 --- a/var/spack/repos/builtin/packages/py-pip/package.py +++ b/var/spack/repos/builtin/packages/py-pip/package.py @@ -86,6 +86,9 @@ class PyPip(Package, PythonExtension): extends("python") depends_on("python@3.7:", when="@22:", type=("build", "run")) + # Uses collections.MutableMapping + depends_on("python@:3.9", when="@:19.1", type=("build", "run")) + def url_for_version(self, version): url = "https://files.pythonhosted.org/packages/{0}/p/pip/pip-{1}-{0}-none-any.whl" if version >= Version("21"): diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 128ba5018f4376..03487bfaa07aca 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -6,191 +6,60 @@ from spack.package import * -class PySetuptools(Package, PythonExtension): +class PySetuptools(PythonPackage): """A Python utility that aids in the process of downloading, building, upgrading, installing, and uninstalling Python packages.""" homepage = "https://github.com/pypa/setuptools" - url = "https://files.pythonhosted.org/packages/py3/s/setuptools/setuptools-62.3.2-py3-none-any.whl" - list_url = "https://pypi.org/simple/setuptools/" + pypi = "setuptools/setuptools-62.3.2.tar.gz" tags = ["build-tools"] - version( - "68.0.0", - sha256="11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f", - expand=False, - ) - version( - "67.6.0", - sha256="b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2", - expand=False, - ) - version( - "65.5.0", - sha256="f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356", - expand=False, - ) - version( - "65.0.0", - sha256="fe9a97f68b064a6ddd4bacfb0b4b93a4c65a556d97ce906255540439d0c35cef", - expand=False, - ) - version( - "64.0.0", - sha256="63f463b90ff5e0a1422010100268fd688e15c44ae0798659013c8412963e15e4", - expand=False, - ) - version( - "63.4.3", - sha256="7f61f7e82647f77d4118eeaf43d64cbcd4d87e38af9611694d4866eb070cd10d", - expand=False, - ) - version( - "63.0.0", - sha256="045aec56a3eee5c82373a70e02db8b6da9a10f7faf61ff89a14ab66c738ed370", - expand=False, - ) - version( - "62.6.0", - sha256="c1848f654aea2e3526d17fc3ce6aeaa5e7e24e66e645b5be2171f3f6b4e5a178", - expand=False, - ) - version( - "62.4.0", - sha256="5a844ad6e190dccc67d6d7411d119c5152ce01f7c76be4d8a1eaa314501bba77", - expand=False, - ) - version( - "62.3.2", - sha256="68e45d17c9281ba25dc0104eadd2647172b3472d9e01f911efa57965e8d51a36", - expand=False, - ) - version( - "59.4.0", - sha256="feb5ff19b354cde9efd2344ef6d5e79880ce4be643037641b49508bbb850d060", - expand=False, - ) - version( - "58.2.0", - sha256="2551203ae6955b9876741a26ab3e767bb3242dafe86a32a749ea0d78b6792f11", - expand=False, - ) - version( - "57.4.0", - sha256="a49230977aa6cfb9d933614d2f7b79036e9945c4cdd7583163f4e920b83418d6", - expand=False, - ) - version( - "57.1.0", - sha256="ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3", - expand=False, - ) - version( - "51.0.0", - sha256="8c177936215945c9a37ef809ada0fab365191952f7a123618432bbfac353c529", - expand=False, - ) - version( - "50.3.2", - sha256="2c242a0856fbad7efbe560df4a7add9324f340cf48df43651e9604924466794a", - expand=False, - ) - version( - "50.1.0", - sha256="4537c77e6e7dc170081f8547564551d4ff4e4999717434e1257600bbd3a23296", - expand=False, - ) - version( - "49.6.0", - sha256="4dd5bb0a0a0cff77b46ca5dd3a84857ee48c83e8223886b556613c724994073f", - expand=False, - ) - version( - "49.2.0", - sha256="272c7f48f5cddc5af5901f4265274c421c7eede5c8bc454ac2903d3f8fc365e9", - expand=False, - ) - version( - "46.1.3", - sha256="4fe404eec2738c20ab5841fa2d791902d2a645f32318a7850ef26f8d7215a8ee", - expand=False, - ) - version( - "44.1.1", - sha256="27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5", - expand=False, - ) - version( - "44.1.0", - sha256="992728077ca19db6598072414fb83e0a284aca1253aaf2e24bb1e55ee6db1a30", - expand=False, - ) - version( - "43.0.0", - sha256="a67faa51519ef28cd8261aff0e221b6e4c370f8fb8bada8aa3e7ad8945199963", - expand=False, - ) - version( - "41.4.0", - sha256="8d01f7ee4191d9fdcd9cc5796f75199deccb25b154eba82d44d6a042cf873670", - expand=False, - ) - version( - "41.3.0", - sha256="e9832acd9be6f3174f4c34b40e7d913a146727920cbef6465c1c1bd2d21a4ec4", - expand=False, - ) - version( - "41.0.1", - sha256="c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf", - expand=False, - ) - version( - "41.0.0", - sha256="e67486071cd5cdeba783bd0b64f5f30784ff855b35071c8670551fd7fc52d4a1", - expand=False, - ) - version( - "40.8.0", - sha256="e8496c0079f3ac30052ffe69b679bd876c5265686127a3159cfa415669b7f9ab", - expand=False, - ) - version( - "40.4.3", - sha256="ce4137d58b444bac11a31d4e0c1805c69d89e8ed4e91fde1999674ecc2f6f9ff", - expand=False, - ) - version( - "40.2.0", - sha256="ea3796a48a207b46ea36a9d26de4d0cc87c953a683a7b314ea65d666930ea8e6", - expand=False, - ) - version( - "39.2.0", - sha256="8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926", - expand=False, - ) - version( - "39.0.1", - sha256="8010754433e3211b9cdbbf784b50f30e80bf40fc6b05eb5f865fab83300599b8", - expand=False, - ) - version( - "25.2.0", - sha256="2845247c359bb91097ccf8f6be8a69edfa44847f3d2d5def39aa43c3d7f615ca", - expand=False, - ) - version( - "20.7.0", - sha256="8917a52aa3a389893221b173a89dae0471022d32bff3ebc31a1072988aa8039d", - expand=False, - ) - version( - "20.6.7", - sha256="9982ee4d279a2541dc1a7efee994ff9c535cfc05315e121e09df7f93da48c442", - expand=False, - ) + version("68.0.0", sha256="baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235") + version("67.6.0", sha256="2ee892cd5f29f3373097f5a814697e397cf3ce313616df0af11231e2ad118077") + version("65.5.0", sha256="512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17") + version("65.0.0", sha256="d73f8cd714a1a6691f5eb5abeeacbf313242b7aa2f5eba93776542c1aad90c6f") + version("64.0.0", sha256="9b5d2cb8df48f005825654e0cb17217418317e4d996c035f0bca7cbaeb8acf51") + version("63.4.3", sha256="521c833d1e5e1ef0869940e7f486a83de7773b9f029010ad0c2fe35453a9dad9") + version("63.0.0", sha256="7388e17e72f5c0c7279f59da950a7925910e35bc1a84e19d3affbb40da248d1d") + version("62.6.0", sha256="990a4f7861b31532871ab72331e755b5f14efbe52d336ea7f6118144dd478741") + version("62.4.0", sha256="bf8a748ac98b09d32c9a64a995a6b25921c96cc5743c1efa82763ba80ff54e91") + version("62.3.2", sha256="a43bdedf853c670e5fed28e5623403bad2f73cf02f9a2774e91def6bda8265a7") + version("59.4.0", sha256="b4c634615a0cf5b02cf83c7bedffc8da0ca439f00e79452699454da6fbd4153d") + version("58.2.0", sha256="2c55bdb85d5bb460bd2e3b12052b677879cffcf46c0c688f2e5bf51d36001145") + version("57.4.0", sha256="6bac238ffdf24e8806c61440e755192470352850f3419a52f26ffe0a1a64f465") + version("57.1.0", sha256="cfca9c97e7eebbc8abe18d5e5e962a08dcad55bb63afddd82d681de4d22a597b") + version("51.0.0", sha256="029c49fd713e9230f6a41c0298e6e1f5839f2cde7104c0ad5e053a37777e7688") + version("50.3.2", sha256="ed0519d27a243843b05d82a5e9d01b0b083d9934eaa3d02779a23da18077bd3c") + version("50.1.0", sha256="4a7708dafd2d360ce5e2ac7577374da9fb65fc867bc4cdaf461f9f834dfa6ac3") + version("49.6.0", sha256="46bd862894ed22c2edff033c758c2dc026324788d758e96788e8f7c11f4e9707") + version("49.2.0", sha256="afe9e81fee0270d3f60d52608549cc8ec4c46dada8c95640c1a00160f577acf2") + version("46.1.3", sha256="795e0475ba6cd7fa082b1ee6e90d552209995627a2a227a47c6ea93282f4bfb1") + version("44.1.1", sha256="c67aa55db532a0dadc4d2e20ba9961cbd3ccc84d544e9029699822542b5a476b") + version("44.1.0", sha256="794a96b0c1dc6f182c36b72ab70d7e90f1d59f7a132e6919bb37b4fd4d424aca") + version("43.0.0", sha256="db45ebb4a4b3b95ff0aca3ce5fe1e820ce17be393caf8902c78aa36240e8c378") + version("41.4.0", sha256="7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d") + version("41.3.0", sha256="9f5c54b529b2156c6f288e837e625581bb31ff94d4cfd116b8f271c589749556") + version("41.0.1", sha256="a222d126f5471598053c9a77f4b5d4f26eaa1f150ad6e01dcf1a42e185d05613") + version("41.0.0", sha256="79d30254b6fe7a8e672e43cd85f13a9f3f2a50080bc81d851143e2219ef0dcb1") + version("40.8.0", sha256="6e4eec90337e849ade7103723b9a99631c1f0d19990d6e8412dc42f5ae8b304d") + version("40.4.3", sha256="acbc5740dd63f243f46c2b4b8e2c7fd92259c2ddb55a4115b16418a2ed371b15") + version("40.2.0", sha256="47881d54ede4da9c15273bac65f9340f8929d4f0213193fa7894be384f2dcfa6") + version("39.2.0", sha256="f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2") + version("39.0.1", sha256="bec7badf0f60e7fc8153fac47836edc41b74e5d541d7692e614e635720d6a7c7") + version("25.2.0", sha256="b2757ddac2c41173140b111e246d200768f6dd314110e1e40661d0ecf9b4d6a6") + version("20.7.0", sha256="505cdf282c5f6e3a056e79f0244b8945f3632257bba8469386c6b9b396400233") + version("20.6.7", sha256="d20152ee6337323d3b6d95cd733fb719d6b4f3fbc40f61f7a48e5a1bb96478b2") + + def url_for_version(self, version): + url = self.url.rsplit("/", 1)[0] + if version.satisfies(ver("32.1.2:51.0.0")): + url += "/setuptools-{}.zip" + else: + url += "/setuptools-{}.tar.gz" + return url.format(version) + + patch("rpath-compiler-flag.patch", when="@48:58.2") extends("python") @@ -200,27 +69,15 @@ class PySetuptools(Package, PythonExtension): depends_on("python@2.7:2.8,3.5:", when="@44", type=("build", "run")) depends_on("python@2.7:2.8,3.4:", when="@:43", type=("build", "run")) - # https://github.com/pypa/setuptools/issues/3661 - conflicts("python@3.12:", when="@:67") + # Newer pip requires setuptools to be installed, before building + # setuptools. This issue was fixed or worked around in setuptools 54+ + depends_on("py-pip@:18", when="@:53", type="build") - depends_on("py-pip", type="build") + # Uses HTMLParser.unescape + depends_on("python@:3.8", when="@:41.0", type=("build", "run")) - def url_for_version(self, version): - url = "https://files.pythonhosted.org/packages/{0}/s/setuptools/setuptools-{1}-{0}-none-any.whl" - - if version >= Version("45.1.0"): - python_tag = "py3" - else: - python_tag = "py2.py3" - return url.format(python_tag, version) + # Uses collections.MutableMapping + depends_on("python@:3.9", when="@:40.4.2", type=("build", "run")) - def install(self, spec, prefix): - # When setuptools changes its entry point we might get weird - # incompatibilities if building from sources in a non-isolated environment. - # - # https://github.com/pypa/setuptools/issues/980#issuecomment-1154471423 - # - # We work around this issue by installing setuptools from wheels - whl = self.stage.archive_file - args = ["-m", "pip"] + std_pip_args + ["--prefix=" + prefix, whl] - python(*args) + # https://github.com/pypa/setuptools/issues/3661 + depends_on("python@:3.11", when="@:67", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch b/var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch new file mode 100644 index 00000000000000..6b37d623234a53 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch @@ -0,0 +1,13 @@ +diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py +--- a/setuptools/_distutils/unixccompiler.py ++++ b/setuptools/_distutils/unixccompiler.py +@@ -257,7 +257,7 @@ class UnixCCompiler(CCompiler): + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. +- return "-R" + dir ++ return "-Wl,-rpath," + dir + + def library_option(self, lib): + return "-l" + lib + From 3a18fe04ccb81eafedbeaabebea0f315981b9f50 Mon Sep 17 00:00:00 2001 From: "Mark (he/his) C. Miller" Date: Sun, 8 Oct 2023 18:04:25 -0700 Subject: [PATCH 101/806] Update CITATION.cff with conf dates (#40375) Add `start-date` and `end-date` to citation --- CITATION.cff | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CITATION.cff b/CITATION.cff index 4753f6cc37f4fa..16f42d01651f19 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -62,6 +62,8 @@ preferred-citation: city: "Austin" region: "Texas" country: "US" + date-start: 2015-11-15 + date-end: 2015-11-20 month: 11 year: 2015 identifiers: From 08da9a854a53542e1f71d30ed8d14d6b7d18119f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 9 Oct 2023 07:18:27 +0200 Subject: [PATCH 102/806] parser: use non-capturing groups (#40373) --- lib/spack/spack/parser.py | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py index d8f34d7e595d6e..5e46ddb1b17f7b 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -73,10 +73,10 @@ #: Valid name for specs and variants. Here we are not using #: the previous "w[\w.-]*" since that would match most #: characters that can be part of a word in any language -IDENTIFIER = r"([a-zA-Z_0-9][a-zA-Z_0-9\-]*)" -DOTTED_IDENTIFIER = rf"({IDENTIFIER}(\.{IDENTIFIER})+)" -GIT_HASH = r"([A-Fa-f0-9]{40})" -GIT_VERSION = rf"((git\.({DOTTED_IDENTIFIER}|{IDENTIFIER}))|({GIT_HASH}))" +IDENTIFIER = r"(?:[a-zA-Z_0-9][a-zA-Z_0-9\-]*)" +DOTTED_IDENTIFIER = rf"(?:{IDENTIFIER}(?:\.{IDENTIFIER})+)" +GIT_HASH = r"(?:[A-Fa-f0-9]{40})" +GIT_VERSION = rf"(?:(?:git\.(?:{DOTTED_IDENTIFIER}|{IDENTIFIER}))|(?:{GIT_HASH}))" NAME = r"[a-zA-Z_0-9][a-zA-Z_0-9\-.]*" @@ -85,15 +85,15 @@ #: A filename starts either with a "." or a "/" or a "{name}/, # or on Windows, a drive letter followed by a colon and "\" # or "." or {name}\ -WINDOWS_FILENAME = r"(\.|[a-zA-Z0-9-_]*\\|[a-zA-Z]:\\)([a-zA-Z0-9-_\.\\]*)(\.json|\.yaml)" -UNIX_FILENAME = r"(\.|\/|[a-zA-Z0-9-_]*\/)([a-zA-Z0-9-_\.\/]*)(\.json|\.yaml)" +WINDOWS_FILENAME = r"(?:\.|[a-zA-Z0-9-_]*\\|[a-zA-Z]:\\)(?:[a-zA-Z0-9-_\.\\]*)(?:\.json|\.yaml)" +UNIX_FILENAME = r"(?:\.|\/|[a-zA-Z0-9-_]*\/)(?:[a-zA-Z0-9-_\.\/]*)(?:\.json|\.yaml)" if not IS_WINDOWS: FILENAME = UNIX_FILENAME else: FILENAME = WINDOWS_FILENAME -VALUE = r"([a-zA-Z_0-9\-+\*.,:=\~\/\\]+)" -QUOTED_VALUE = r"[\"']+([a-zA-Z_0-9\-+\*.,:=\~\/\\\s]+)[\"']+" +VALUE = r"(?:[a-zA-Z_0-9\-+\*.,:=\~\/\\]+)" +QUOTED_VALUE = r"[\"']+(?:[a-zA-Z_0-9\-+\*.,:=\~\/\\\s]+)[\"']+" VERSION = r"=?([a-zA-Z0-9_][a-zA-Z_0-9\-\.]*\b)" VERSION_RANGE = rf"({VERSION}\s*:\s*{VERSION}(?!\s*=)|:\s*{VERSION}(?!\s*=)|{VERSION}\s*:|:)" @@ -125,34 +125,34 @@ class TokenType(TokenBase): """ # Dependency - DEPENDENCY = r"(\^)" + DEPENDENCY = r"(?:\^)" # Version - VERSION_HASH_PAIR = rf"(@({GIT_VERSION})=({VERSION}))" - VERSION = rf"(@\s*({VERSION_LIST}))" + VERSION_HASH_PAIR = rf"(?:@(?:{GIT_VERSION})=(?:{VERSION}))" + VERSION = rf"(?:@\s*(?:{VERSION_LIST}))" # Variants - PROPAGATED_BOOL_VARIANT = rf"((\+\+|~~|--)\s*{NAME})" - BOOL_VARIANT = rf"([~+-]\s*{NAME})" - PROPAGATED_KEY_VALUE_PAIR = rf"({NAME}\s*==\s*({VALUE}|{QUOTED_VALUE}))" - KEY_VALUE_PAIR = rf"({NAME}\s*=\s*({VALUE}|{QUOTED_VALUE}))" + PROPAGATED_BOOL_VARIANT = rf"(?:(?:\+\+|~~|--)\s*{NAME})" + BOOL_VARIANT = rf"(?:[~+-]\s*{NAME})" + PROPAGATED_KEY_VALUE_PAIR = rf"(?:{NAME}\s*==\s*(?:{VALUE}|{QUOTED_VALUE}))" + KEY_VALUE_PAIR = rf"(?:{NAME}\s*=\s*(?:{VALUE}|{QUOTED_VALUE}))" # Compilers - COMPILER_AND_VERSION = rf"(%\s*({NAME})([\s]*)@\s*({VERSION_LIST}))" - COMPILER = rf"(%\s*({NAME}))" + COMPILER_AND_VERSION = rf"(?:%\s*(?:{NAME})(?:[\s]*)@\s*(?:{VERSION_LIST}))" + COMPILER = rf"(?:%\s*(?:{NAME}))" # FILENAME - FILENAME = rf"({FILENAME})" + FILENAME = rf"(?:{FILENAME})" # Package name - FULLY_QUALIFIED_PACKAGE_NAME = rf"({DOTTED_IDENTIFIER})" - UNQUALIFIED_PACKAGE_NAME = rf"({IDENTIFIER})" + FULLY_QUALIFIED_PACKAGE_NAME = rf"(?:{DOTTED_IDENTIFIER})" + UNQUALIFIED_PACKAGE_NAME = rf"(?:{IDENTIFIER})" # DAG hash - DAG_HASH = rf"(/({HASH}))" + DAG_HASH = rf"(?:/(?:{HASH}))" # White spaces - WS = r"(\s+)" + WS = r"(?:\s+)" class ErrorTokenType(TokenBase): """Enum with regexes for error analysis""" # Unexpected character - UNEXPECTED = r"(.[\s]*)" + UNEXPECTED = r"(?:.[\s]*)" class Token: From eb4fd98f093eab6088b49874eaa90bc5169b14e8 Mon Sep 17 00:00:00 2001 From: Joe Schoonover <11430768+fluidnumerics-joe@users.noreply.github.com> Date: Mon, 9 Oct 2023 18:31:23 +0800 Subject: [PATCH 103/806] feq-parse: add v2.0.3 (#40230) --- var/spack/repos/builtin/packages/feq-parse/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/feq-parse/package.py b/var/spack/repos/builtin/packages/feq-parse/package.py index 6f51d5537cc457..687ae6f66fd297 100644 --- a/var/spack/repos/builtin/packages/feq-parse/package.py +++ b/var/spack/repos/builtin/packages/feq-parse/package.py @@ -16,8 +16,11 @@ class FeqParse(CMakePackage): maintainers("fluidnumerics-joe") + version("2.0.3", sha256="a1c42507801adc55a63a9a904807058079d54e002e10f2b29a916b06fc815f80") version("2.0.1", sha256="08dd08bd100a0a2eb672a5b2792ad56a337df575c634aac0d7a300d7e484b21c") version("1.1.0", sha256="d33a4fd6904939bb70780e8f25f37c1291c4f24fd207feb4ffc0f8d89637d1e3") version("1.0.2", sha256="1cd1db7562908ea16fc65dc5268b654405d0b3d9dcfe11f409949c431b48a3e8") depends_on("cmake@3.0.2:", type="build") + + parallel = False From f609093c6eccb7c63147f307c496453d9c4d0564 Mon Sep 17 00:00:00 2001 From: jmuddnv <143751186+jmuddnv@users.noreply.github.com> Date: Mon, 9 Oct 2023 03:35:59 -0700 Subject: [PATCH 104/806] Adding NVIDIA HPC SDK 23.9 (#40371) --- var/spack/repos/builtin/packages/nvhpc/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/nvhpc/package.py b/var/spack/repos/builtin/packages/nvhpc/package.py index 7579afd87346f8..2cabbfa056f90d 100644 --- a/var/spack/repos/builtin/packages/nvhpc/package.py +++ b/var/spack/repos/builtin/packages/nvhpc/package.py @@ -21,6 +21,20 @@ # - package key must be in the form '{os}-{arch}' where 'os' is in the # format returned by platform.system() and 'arch' by platform.machine() _versions = { + "23.9": { + "Linux-aarch64": ( + "dd32ae4233438adb71b2b4f8891f04802fdf90f67036ecf18bfde1b6043a03c3", + "https://developer.download.nvidia.com/hpc-sdk/23.9/nvhpc_2023_239_Linux_aarch64_cuda_multi.tar.gz", + ), + "Linux-ppc64le": ( + "984d61695499db098fd32be8345c1f7d7c637ea3bdb29cef17aad656f16b000f", + "https://developer.download.nvidia.com/hpc-sdk/23.9/nvhpc_2023_239_Linux_ppc64le_cuda_multi.tar.gz", + ), + "Linux-x86_64": ( + "ecf343ecad2398e21c8d7f24a580b2932348017dfd8ea38c1ef31b37114b2d4b", + "https://developer.download.nvidia.com/hpc-sdk/23.9/nvhpc_2023_239_Linux_x86_64_cuda_multi.tar.gz", + ), + }, "23.7": { "Linux-aarch64": ( "d3b9b674045e6e17156b298941be4e1e1e7dea6a3c1938f14ad653b180860ff2", From 215c699307a23fd7043116cfb13ccd0035fe812f Mon Sep 17 00:00:00 2001 From: Mike Renfro Date: Mon, 9 Oct 2023 05:47:54 -0500 Subject: [PATCH 105/806] velvet: improved variants (#40225) --- .../repos/builtin/packages/velvet/package.py | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/velvet/package.py b/var/spack/repos/builtin/packages/velvet/package.py index 89b88feaffe931..55c76fee335792 100644 --- a/var/spack/repos/builtin/packages/velvet/package.py +++ b/var/spack/repos/builtin/packages/velvet/package.py @@ -6,6 +6,13 @@ from spack.package import * +def is_positive_int(x): + if x.isdigit() and int(x) > 0: + return True + else: + return False + + class Velvet(MakefilePackage): """Velvet is a de novo genomic assembler specially designed for short read sequencing technologies.""" @@ -13,14 +20,54 @@ class Velvet(MakefilePackage): homepage = "https://www.ebi.ac.uk/~zerbino/velvet/" url = "https://www.ebi.ac.uk/~zerbino/velvet/velvet_1.2.10.tgz" + maintainers("snehring") + version("1.2.10", sha256="884dd488c2d12f1f89cdc530a266af5d3106965f21ab9149e8cb5c633c977640") + variant( + "categories", + default="2", + description="Number of channels which can be handled independently", + values=is_positive_int, + ) + variant( + "maxkmerlength", + default="31", + description="Longest kmer size you can use in an analysis", + values=is_positive_int, + ) + variant("bigassembly", default=False, description="Allow assemblies with more than 2^31 reads") + variant( + "vbigassembly", + default=False, + description="Allow unsigned 64-bit array index values (also enables bigassembly)", + ) + variant( + "longsequences", default=False, description="Allow assembling contigs longer than 32kb" + ) + variant("openmp", default=False, description="Enable multithreading") + variant("single_cov_cat", default=False, description="Per-library coverage") + depends_on("zlib-api") def edit(self, spec, prefix): + makefile = FileFilter("Makefile") if spec.target.family == "aarch64": - makefile = FileFilter("Makefile") makefile.filter("-m64", "") + maxkmerlength = self.spec.variants["maxkmerlength"].value + categories = self.spec.variants["categories"].value + makefile.filter(r"^MAXKMERLENGTH\s*=\s*.*", f"MAXKMERLENGTH = {maxkmerlength}") + makefile.filter(r"^CATEGORIES\s*=\s*.*", f"CATEGORIES = {categories}") + if "+bigassembly" in self.spec: + makefile.filter("^ifdef BIGASSEMBLY", "BIGASSEMBLY=1\nifdef BIGASSEMBLY") + if "+vbigassembly" in self.spec: + makefile.filter("^ifdef VBIGASSEMBLY", "VBIGASSEMBLY=1\nifdef VBIGASSEMBLY") + if "+longsequences" in self.spec: + makefile.filter("^ifdef LONGSEQUENCES", "LONGSEQUENCES=1\nifdef LONGSEQUENCES") + if "+openmp" in self.spec: + makefile.filter("^ifdef OPENMP", "OPENMP=1\nifdef OPENMP") + if "+single_cov_cat" in self.spec: + makefile.filter("^ifdef SINGLE_COV_CAT", "SINGLE_COV_CAT=1\nifdef SINGLE_COV_CAT") def install(self, spec, prefix): mkdirp(prefix.bin) From 3108036533ea623a4e0da513e07f9651c0a128ea Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:17:58 +0200 Subject: [PATCH 106/806] elfutils: fix +debuginfod again with new libarchive versions (#40314) --- var/spack/repos/builtin/packages/elfutils/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index c7417da21d5f06..15f0b11130e7bf 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -85,10 +85,10 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): provides("elf@1") - # libarchive with iconv doesn't configure. + # libarchive with iconv doesn't configure (still broken as of libarchive@3.7.1) # see https://github.com/spack/spack/issues/36710 # and https://github.com/libarchive/libarchive/issues/1819 - conflicts("^libarchive@3.6.2 +iconv", when="+debuginfod") + conflicts("^libarchive +iconv", when="+debuginfod") # https://sourceware.org/bugzilla/show_bug.cgi?id=24964 conflicts("%apple-clang") From c0f1072dc74a7e3f4dbede1424e64baff060a72c Mon Sep 17 00:00:00 2001 From: Thomas Dickerson Date: Mon, 9 Oct 2023 08:21:13 -0400 Subject: [PATCH 107/806] racket packages: fix typo after multiple build systems support (#40088) --- lib/spack/spack/build_systems/racket.py | 2 +- .../packages/rkt-racket-lib/package.py | 20 +++++++++++++++++++ .../packages/rkt-scheme-lib/package.py | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/rkt-racket-lib/package.py diff --git a/lib/spack/spack/build_systems/racket.py b/lib/spack/spack/build_systems/racket.py index 7dd0b23b017f71..50c4944a5d7ccb 100644 --- a/lib/spack/spack/build_systems/racket.py +++ b/lib/spack/spack/build_systems/racket.py @@ -64,7 +64,7 @@ class RacketBuilder(spack.builder.Builder): @property def subdirectory(self): - if self.racket_name: + if self.pkg.racket_name: return "pkgs/{0}".format(self.pkg.racket_name) return None diff --git a/var/spack/repos/builtin/packages/rkt-racket-lib/package.py b/var/spack/repos/builtin/packages/rkt-racket-lib/package.py new file mode 100644 index 00000000000000..a64e9527638f64 --- /dev/null +++ b/var/spack/repos/builtin/packages/rkt-racket-lib/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 RktRacketLib(RacketPackage): + """Stub package for packages which are currently part of core + racket installation (but which may change in the future).""" + + git = "ssh://git@github.com/racket/racket.git" + + maintainers = ["elfprince13"] + + version("8.3", commit="cab83438422bfea0e4bd74bc3e8305e6517cf25f") # tag="v8.3" + depends_on("racket@8.3", type=("build", "run"), when="@8.3") + + racket_name = "racket-lib" diff --git a/var/spack/repos/builtin/packages/rkt-scheme-lib/package.py b/var/spack/repos/builtin/packages/rkt-scheme-lib/package.py index e366a23b7951f2..d29ae350b7779a 100644 --- a/var/spack/repos/builtin/packages/rkt-scheme-lib/package.py +++ b/var/spack/repos/builtin/packages/rkt-scheme-lib/package.py @@ -17,3 +17,4 @@ class RktSchemeLib(RacketPackage): depends_on("rkt-base@8.3", type=("build", "run"), when="@8.3") racket_name = "scheme-lib" + subdirectory = None From 9cb291b41b043d520819f7b7ac2d839344985be4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 9 Oct 2023 07:33:45 -0500 Subject: [PATCH 108/806] py-jsonargparse: add v4.25.0 (#40185) --- .../packages/py-jsonargparse/package.py | 4 ++++ .../builtin/packages/py-tensorflow/package.py | 3 +++ .../builtin/packages/py-wheel/package.py | 21 +++++++++++++------ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-jsonargparse/package.py b/var/spack/repos/builtin/packages/py-jsonargparse/package.py index 2f4584e48b2352..a84a23c7fc6926 100644 --- a/var/spack/repos/builtin/packages/py-jsonargparse/package.py +++ b/var/spack/repos/builtin/packages/py-jsonargparse/package.py @@ -15,13 +15,17 @@ class PyJsonargparse(PythonPackage): homepage = "https://github.com/omni-us/jsonargparse" pypi = "jsonargparse/jsonargparse-4.19.0.tar.gz" + version("4.25.0", sha256="4eaadae69c387a3d83a76b1eaf20ca98d5274d8637f180dca0754ce5405adb6b") version("4.19.0", sha256="63aa3c7bbdb219d0f254a5ae86f3d54384ebc1ffa905e776cc19283bc843787b") variant("signatures", default=False, description="Enable signature features") + depends_on("py-setuptools@65.6.3:", when="@4.25:", type="build") depends_on("py-setuptools", type="build") + depends_on("py-wheel@0.38.4:", when="@4.25:", type="build") depends_on("py-pyyaml@3.13:", type=("build", "run")) with when("+signatures"): + depends_on("py-typing-extensions@3.10:", when="@4.25: ^python@:3.9", type=("build", "run")) depends_on("py-docstring-parser@0.15:", type=("build", "run")) depends_on("py-typeshed-client@2.1:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 86f5759cff5a7c..cd90b532c93336 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -437,6 +437,9 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): conflicts("~rocm", when="@2.7.4-rocm-enhanced") conflicts("+rocm", when="@:2.7.4-a,2.7.4.0:") + # wheel 0.40 upgrades vendored packaging, trips over tensorflow-io-gcs-filesystem identifier + conflicts("^py-wheel@0.40:", when="@2.11:2.13") + # https://www.tensorflow.org/install/source#tested_build_configurations conflicts("%gcc@:9.3.0", when="@2.9:") conflicts("%gcc@:7.3.0", when="@1.15:") diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py index 770397b09feb9b..66192db3298d57 100644 --- a/var/spack/repos/builtin/packages/py-wheel/package.py +++ b/var/spack/repos/builtin/packages/py-wheel/package.py @@ -10,11 +10,14 @@ class PyWheel(Package, PythonExtension): """A built-package format for Python.""" homepage = "https://github.com/pypa/wheel" - url = ( - "https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-0.34.2-py2.py3-none-any.whl" - ) + url = "https://files.pythonhosted.org/packages/py3/w/wheel/wheel-0.41.2-py3-none-any.whl" list_url = "https://pypi.org/simple/wheel/" + version( + "0.41.2", + sha256="75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8", + expand=False, + ) version( "0.37.1", sha256="4bdcd7d840138086126cd09254dc6195fb4fc6f01c050a1d7236f2630db1d22a", @@ -73,11 +76,17 @@ class PyWheel(Package, PythonExtension): extends("python") depends_on("python +ctypes", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:", when="@0.34:", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:", when="@0.30:", type=("build", "run")) - depends_on("python@2.6:2.8,3.2:", type=("build", "run")) + depends_on("python@3.7:", when="@0.38:", type=("build", "run")) depends_on("py-pip", type="build") + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/{0}/w/wheel/wheel-{1}-{0}-none-any.whl" + if version >= Version("0.38"): + python = "py3" + else: + python = "py2.py3" + return url.format(python, version) + def install(self, spec, prefix): # To build wheel from source, you need setuptools and wheel already installed. # We get around this by using a pre-built wheel, see: From c116eee921b904b95661c3bb22ff94c5d7f923fe Mon Sep 17 00:00:00 2001 From: Jacob King <12665462+jacobrking@users.noreply.github.com> Date: Mon, 9 Oct 2023 06:39:40 -0600 Subject: [PATCH 109/806] nimrod-aai: add v23.9. (#40303) --- .../repos/builtin/packages/nimrod-aai/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/nimrod-aai/package.py b/var/spack/repos/builtin/packages/nimrod-aai/package.py index 90bdd0832af9d5..1ad7101e1a918c 100644 --- a/var/spack/repos/builtin/packages/nimrod-aai/package.py +++ b/var/spack/repos/builtin/packages/nimrod-aai/package.py @@ -14,13 +14,14 @@ class NimrodAai(CMakePackage): homepage = "https://gitlab.com/NIMRODteam/nimrod-abstract" url = ( - "https://gitlab.com/NIMRODteam/nimrod-abstract/-/archive/23.6/nimrod-abstract-23.6.tar.gz" + "https://gitlab.com/NIMRODteam/nimrod-abstract/-/archive/23.9/nimrod-abstract-23.9.tar.gz" ) git = "https://gitlab.com/NIMRODteam/nimrod-abstract.git" maintainers("jacobrking") version("main", branch="main") + version("23.9", sha256="212d591c5a5e7a394b56a5cf2f92cc69feafc49dd5f042fa95eeb6441649390b") version("23.6", sha256="1794b89a5a64ff2b3c548818b90d17eef85d819ba4f63a76c41a682d5b76c14f") variant("debug", default=False, description="Whether to enable debug code") @@ -41,8 +42,9 @@ class NimrodAai(CMakePackage): ) depends_on("cmake", type="build") - depends_on("hdf5+fortran", type="build") depends_on("mpi", when="+mpi") + depends_on("hdf5+fortran~mpi", type="build", when="~mpi") + depends_on("hdf5+fortran+mpi", type="build", when="+mpi") def cmake_args(self): args = [ @@ -62,3 +64,9 @@ def cmake_args(self): ] args.append(addl_args) return args + + @run_after("build") + @on_package_attributes(run_tests=True) + def check(self): + with working_dir(self.builder.build_directory): + ctest("--output-on-failure") From 3488e83deb916a9dc8c873389d173921c992a2cc Mon Sep 17 00:00:00 2001 From: Gavin John Date: Mon, 9 Oct 2023 07:46:38 -0500 Subject: [PATCH 110/806] py-s3cmd: Add new versions (#40212) * Add new versions of py-s3cmd * Use correct hashes --- var/spack/repos/builtin/packages/py-s3cmd/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-s3cmd/package.py b/var/spack/repos/builtin/packages/py-s3cmd/package.py index b4400927ee766d..532df1438219b5 100644 --- a/var/spack/repos/builtin/packages/py-s3cmd/package.py +++ b/var/spack/repos/builtin/packages/py-s3cmd/package.py @@ -18,6 +18,9 @@ class PyS3cmd(PythonPackage): homepage = "https://github.com/s3tools/s3cmd" url = "https://github.com/s3tools/s3cmd/releases/download/v2.0.2/s3cmd-2.0.2.tar.gz" + version("2.3.0", sha256="15330776e7ff993d8ae0ac213bf896f210719e9b91445f5f7626a8fa7e74e30b") + version("2.2.0", sha256="2a7d2afe09ce5aa9f2ce925b68c6e0c1903dd8d4e4a591cd7047da8e983a99c3") + version("2.1.0", sha256="966b0a494a916fc3b4324de38f089c86c70ee90e8e1cae6d59102103a4c0cc03") version("2.0.2", sha256="9f244c0c10d58d0ccacbba3aa977463e32491bdd9d95109e27b67e4d46c5bd52") version("2.0.1", sha256="caf09f1473301c442fba6431c983c361c9af8bde503dac0953f0d2f8f2c53c8f") version("2.0.0", sha256="bf2a50802f1031cba83e99be488965803899d8ab0228c800c833b55c7269cd48") From 83e9537f57ece9c3235967982c2af31d72a1ea55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:02:14 +0200 Subject: [PATCH 111/806] build(deps): bump python-levenshtein in /lib/spack/docs (#40220) Bumps [python-levenshtein](https://github.com/maxbachmann/python-Levenshtein) from 0.21.1 to 0.22.0. - [Release notes](https://github.com/maxbachmann/python-Levenshtein/releases) - [Changelog](https://github.com/maxbachmann/python-Levenshtein/blob/main/HISTORY.md) - [Commits](https://github.com/maxbachmann/python-Levenshtein/compare/v0.21.1...v0.22.0) --- updated-dependencies: - dependency-name: python-levenshtein dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 65b6386a8264f5..4744d1339c062d 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -2,7 +2,7 @@ sphinx==7.2.6 sphinxcontrib-programoutput==0.17 sphinx_design==0.5.0 sphinx-rtd-theme==1.3.0 -python-levenshtein==0.21.1 +python-levenshtein==0.22.0 docutils==0.18.1 pygments==2.16.1 urllib3==2.0.6 From bb2ff802e28b931e8b538670256660ff0f9fad16 Mon Sep 17 00:00:00 2001 From: Patrick Broderick <50112491+broderickpt@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:06:59 -0400 Subject: [PATCH 112/806] fftx: add v1.1.3 (#40283) --- var/spack/repos/builtin/packages/fftx/package.py | 3 ++- var/spack/repos/builtin/packages/spiral-package-jit/package.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py index 301821a0eca3dc..b9229216ff1510 100644 --- a/var/spack/repos/builtin/packages/fftx/package.py +++ b/var/spack/repos/builtin/packages/fftx/package.py @@ -14,13 +14,14 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage): operations composed of linear operations combined with DFT transforms.""" homepage = "https://spiralgen.com" - url = "https://github.com/spiral-software/fftx/archive/refs/tags/1.1.2.tar.gz" + url = "https://github.com/spiral-software/fftx/archive/refs/tags/1.1.3.tar.gz" git = "https://github.com/spiral-software/fftx.git" maintainers("spiralgen") version("develop", branch="develop") version("main", branch="main") + version("1.1.3", sha256="17ed0baf9c2dcf30c789fdae530e006ae3ff2d2c9006989b1e6348e4ae50cef9") version("1.1.2", sha256="b2c4a7791305481af9e1bd358c1215efa4506c91c943cddca3780a1ccbc27810") version("1.1.1", sha256="5cbca66ef09eca02ee8f336f58eb45cfac69cfb29cd6eb945852ad74085d8a60") version("1.1.0", sha256="a6f95605abc11460bbf51839727a456a31488e27e12a970fc29a1b8c42f4e3b5") diff --git a/var/spack/repos/builtin/packages/spiral-package-jit/package.py b/var/spack/repos/builtin/packages/spiral-package-jit/package.py index cec1f02f33bdb2..c0d37abfbedc61 100644 --- a/var/spack/repos/builtin/packages/spiral-package-jit/package.py +++ b/var/spack/repos/builtin/packages/spiral-package-jit/package.py @@ -11,7 +11,7 @@ class SpiralPackageJit(Package): Compilation (RTC).""" homepage = "https://spiralgen.com" - url = "https://github.com/spiral-software/spiral-package-jit/archive/refs/tags/1.0.2.tar.gz" + url = "https://github.com/spiral-software/spiral-package-jit/archive/refs/tags/1.0.3.tar.gz" git = "https://github.com/spiral-software/spiral-package-jit.git" maintainers("spiralgen") @@ -21,6 +21,7 @@ class SpiralPackageJit(Package): version("develop", branch="develop") version("main", branch="main") + version("1.0.3", sha256="97ff0d7d46ed4e53b1971ca279a30b27f0d9b328c70585d4cc0c56dfe6701894") version("1.0.2", sha256="d7fac0493ac406a8b1874491223c3a9a1c6727ea1aa39de7ef4694c59aac9d26") version("1.0.1", sha256="acf22db04e705276f06642d7f2ebf161f6c347f93bb1bdd6e3ddcfc4b7be5707") From 831cbec71f338bcf3294621ec43f3bcca7340277 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 9 Oct 2023 08:09:59 -0500 Subject: [PATCH 113/806] py-pydevtool: add new package (#40377) --- .../repos/builtin/packages/py-doit/package.py | 20 +++++++++++++++++++ .../builtin/packages/py-pydevtool/package.py | 19 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-doit/package.py create mode 100644 var/spack/repos/builtin/packages/py-pydevtool/package.py diff --git a/var/spack/repos/builtin/packages/py-doit/package.py b/var/spack/repos/builtin/packages/py-doit/package.py new file mode 100644 index 00000000000000..aad45a5c2fa6a8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-doit/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 PyDoit(PythonPackage): + """doit - Automation Tool.""" + + homepage = "http://pydoit.org/" + pypi = "doit/doit-0.36.0.tar.gz" + + version("0.36.0", sha256="71d07ccc9514cb22fe59d98999577665eaab57e16f644d04336ae0b4bae234bc") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools", type="build") + depends_on("py-cloudpickle", type=("build", "run")) + depends_on("py-importlib-metadata@4.4:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-pydevtool/package.py b/var/spack/repos/builtin/packages/py-pydevtool/package.py new file mode 100644 index 00000000000000..ec9b69445fd66e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydevtool/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyPydevtool(PythonPackage): + """CLI dev tools powered by pydoit.""" + + homepage = "https://github.com/pydoit/pydevtool" + pypi = "pydevtool/pydevtool-0.3.0.tar.gz" + + version("0.3.0", sha256="25e3ba4f3d33ccac33ee2b9775995848d49e9b318b7a146477fb5d52f786fc8a") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools", type="build") + depends_on("py-doit@0.36:", type=("build", "run")) From 19202b2528b68fc8958b25398081ddf8bff64119 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 9 Oct 2023 15:41:36 +0200 Subject: [PATCH 114/806] docs: update Spack prerequisites (#40381) --- lib/spack/docs/tables/system_prerequisites.csv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/docs/tables/system_prerequisites.csv b/lib/spack/docs/tables/system_prerequisites.csv index 0bb82638eb9d70..f275bcef5be291 100644 --- a/lib/spack/docs/tables/system_prerequisites.csv +++ b/lib/spack/docs/tables/system_prerequisites.csv @@ -1,9 +1,8 @@ Name, Supported Versions, Notes, Requirement Reason -Python, 3.6--3.11, , Interpreter for Spack +Python, 3.6--3.12, , Interpreter for Spack C/C++ Compilers, , , Building software make, , , Build software patch, , , Build software -bash, , , Compiler wrappers tar, , , Extract/create archives gzip, , , Compress/Decompress archives unzip, , , Compress/Decompress archives From 82f1267486deb6fc7d1944ca0e5b7d77bbebb344 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 9 Oct 2023 17:22:27 +0200 Subject: [PATCH 115/806] unparse: drop python 3.3 remnants (#40331) --- lib/spack/spack/util/unparse/unparser.py | 28 +++++++----------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index 375fb543a31494..932ab8d0205b03 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -938,16 +938,10 @@ def visit_arguments(self, node): self.write(", ") self.write("*") if node.vararg: - if hasattr(node.vararg, "arg"): - self.write(node.vararg.arg) - if node.vararg.annotation: - self.write(": ") - self.dispatch(node.vararg.annotation) - else: - self.write(node.vararg) - if getattr(node, "varargannotation", None): - self.write(": ") - self.dispatch(node.varargannotation) + self.write(node.vararg.arg) + if node.vararg.annotation: + self.write(": ") + self.dispatch(node.vararg.annotation) # keyword-only arguments if getattr(node, "kwonlyargs", False): @@ -967,16 +961,10 @@ def visit_arguments(self, node): first = False else: self.write(", ") - if hasattr(node.kwarg, "arg"): - self.write("**" + node.kwarg.arg) - if node.kwarg.annotation: - self.write(": ") - self.dispatch(node.kwarg.annotation) - else: - self.write("**" + node.kwarg) - if getattr(node, "kwargannotation", None): - self.write(": ") - self.dispatch(node.kwargannotation) + self.write("**" + node.kwarg.arg) + if node.kwarg.annotation: + self.write(": ") + self.dispatch(node.kwarg.annotation) def visit_keyword(self, node): if node.arg is None: From 31b3e4898bc4730fa981efc80fbb68217e31b5a3 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:29:18 -0600 Subject: [PATCH 116/806] Add: flux-pmix 0.4.0 (#40323) * Automated deployment to update package flux-pmix 2023-10-05 * Pin exactly to flux-core 0.49.0 when between 0.3 and 0.4 * Update var/spack/repos/builtin/packages/flux-pmix/package.py Co-authored-by: Mark Grondona * Update var/spack/repos/builtin/packages/flux-pmix/package.py Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --------- Co-authored-by: github-actions Co-authored-by: Mark Grondona Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- var/spack/repos/builtin/packages/flux-pmix/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/flux-pmix/package.py b/var/spack/repos/builtin/packages/flux-pmix/package.py index 5969da47b2f50f..db6d580a61c5c3 100644 --- a/var/spack/repos/builtin/packages/flux-pmix/package.py +++ b/var/spack/repos/builtin/packages/flux-pmix/package.py @@ -18,10 +18,11 @@ class FluxPmix(AutotoolsPackage): maintainers("grondo") version("main", branch="main") + version("0.4.0", sha256="f7f58891fc9d9a97a0399b3ab186f2cae30a75806ba0b4d4c1307f07b3f6d1bc") version("0.3.0", sha256="88edb2afaeb6058b56ff915105a36972acc0d83204cff7f4a4d2f65a5dee9d34") version("0.2.0", sha256="d09f1fe6ffe54f83be4677e1e727640521d8110090515d94013eba0f58216934") - depends_on("flux-core@0.49.0:", when="@0.3.0:") + depends_on("flux-core@0.49:", when="@0.3:") depends_on("flux-core@0.30.0:") depends_on("pmix@v4.1.0:") depends_on("openmpi") From d846664165a1d78d5fa7549b42f939613c54ccfa Mon Sep 17 00:00:00 2001 From: George Young Date: Mon, 9 Oct 2023 17:54:44 +0100 Subject: [PATCH 117/806] paintor: new package @3.0 (#40359) * paintor: new package @3.0 * Update var/spack/repos/builtin/packages/paintor/package.py --------- Co-authored-by: LMS Bioinformatics Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- .../repos/builtin/packages/paintor/package.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin/packages/paintor/package.py diff --git a/var/spack/repos/builtin/packages/paintor/package.py b/var/spack/repos/builtin/packages/paintor/package.py new file mode 100644 index 00000000000000..421a92cb1160c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/paintor/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2023 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 Paintor(MakefilePackage): + """Probabilistic Annotation integrator. Fast, integrative fine mapping with functional + data""" + + homepage = "https://github.com/gkichaev/PAINTOR_V3.0" + url = "https://github.com/gkichaev/PAINTOR_V3.0/archive/refs/tags/3.0.tar.gz" + + version("3.0", sha256="cc39d3c334cc6d787e4f04847192c9d0185025a2ca46910bd38901b6679d198f") + + depends_on("nlopt") + depends_on("eigen") + + def edit(self, spec, prefix): + makefile = FileFilter("Makefile") + makefile.filter("CC = g\\+\\+", f"CC = {spack_cxx}") + makefile.filter( + r"(.*)-I/\$\(curr\)/eigen/Eigen(.*)", + r"\1-I{}/eigen3/Eigen\2".format(spec["eigen"].prefix.include), + ) + makefile.filter(r"(.*)-L/\$\{curr}/lib(.*)", r"\1-L{}\2".format(spec["nlopt"].prefix.lib)) + makefile.filter( + r"(.*)-I/\${curr}/include(.*)", r"\1-I{}\2".format(spec["nlopt"].prefix.include) + ) + + @run_after("install") + def mv_binary(self): + mkdirp(self.prefix.bin) + with working_dir(self.build_directory): + install("PAINTOR", self.prefix.bin) From 492a8111b92a49e3ca918a2a41d336b60dd58c2d Mon Sep 17 00:00:00 2001 From: kenche-linaro <133872317+kenche-linaro@users.noreply.github.com> Date: Mon, 9 Oct 2023 20:14:14 +0100 Subject: [PATCH 118/806] linaro-forge: added package file for rebranded product (#39587) --- .../builtin/packages/linaro-forge/package.py | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 var/spack/repos/builtin/packages/linaro-forge/package.py diff --git a/var/spack/repos/builtin/packages/linaro-forge/package.py b/var/spack/repos/builtin/packages/linaro-forge/package.py new file mode 100644 index 00000000000000..7724f87a29ce6d --- /dev/null +++ b/var/spack/repos/builtin/packages/linaro-forge/package.py @@ -0,0 +1,134 @@ +# Copyright 2013-2023 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) + +import os +import platform +import subprocess + +from spack.package import * + + +class LinaroForge(Package): + """Build reliable and optimized code for the right results on multiple + Server and HPC architectures, from the latest compilers and C++ standards + to Intel, 64-bit Arm, AMD, OpenPOWER and Nvidia GPU hardware. Linaro Forge + combines Linaro DDT, the leading debugger for time-saving high performance + application debugging, Linaro MAP, the trusted performance profiler for + invaluable optimization advice across native and Python HPC codes, and + Linaro Performance Reports for advanced reporting capabilities.""" + + homepage = "https://www.linaroforge.com" + maintainers("kenche-linaro") + + if platform.machine() in ["aarch64", "arm64"]: + version( + "23.0.3", sha256="a7e23ef2a187f8e2d6a6692cafb931c9bb614abf58e45ea9c2287191c4c44f02" + ) + version( + "23.0.2", sha256="698fda8f7cc05a06909e5dcc50b9956f94135d7b12e84ffb21999a5b45c70c74" + ) + version( + "23.0.1", sha256="552e4a3f408ed4eb5f1bfbb83c94530ee8733579c56c3e98050c0ad2d43eb433" + ) + version("23.0", sha256="7ae20bb27d539751d1776d1e09a65dcce821fc6a75f924675439f791261783fb") + version( + "22.1.4", sha256="4e2af481a37b4c99dba0de6fac75ac945316955fc4170d06e321530adea7ac9f" + ) + version( + "21.1.3", sha256="4a4ff7372aad5a31fc9e18b7b6c493691ab37d8d44a3158584e62d1ab82b0eeb" + ) + elif platform.machine() == "ppc64le": + version( + "23.0.3", sha256="5ff9770f4bc4a2df4bac8a2544a9d6bad9fba2556420fa2e659e5c21e741caf7" + ) + version( + "23.0.2", sha256="181b157bdfc8609b49addf63023f920ebb609dbc9a126e9dc26605188b756ff0" + ) + version( + "23.0.1", sha256="08cffef2195ea96872d56e827f320eed40aaa82fd3b62d4c661a598fb2fb3a47" + ) + version("23.0", sha256="0962c7e0da0f450cf6daffe1156e1f59e02c9f643df458ec8458527afcde5b4d") + version( + "22.1.3", sha256="6479c3a4ae6ce6648c37594eb0266161f06d9f89010fca9299855848661dda49" + ) + version( + "22.0.4", sha256="f4cb5bcbaa67f9209299fe4653186a2829760b8b16a2883913aa43766375b04c" + ) + version( + "21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e" + ) + elif platform.machine() == "x86_64": + version( + "23.0.3", sha256="f2a010b94838f174f057cd89d12d03a89ca946163536eab178dd1ec877cdc27f" + ) + version( + "23.0.2", sha256="565f0c073c6c8cbb06c062ca414e3f6ff8c6ca6797b03d247b030a9fbc55a5b1" + ) + version( + "23.0.1", sha256="1d681891c0c725363f0f45584c9b79e669d5c9782158453b7d24b4b865d72755" + ) + version("23.0", sha256="f4ab12289c992dd07cb1a15dd985ef4713d1f9c0cf362ec5e9c995cca9b1cf81") + version( + "22.1.3", sha256="4f8a8b1df6ad712e89c82eedf4bd85b93b57b3c8d5b37d13480ff058fa8f4467" + ) + version( + "22.0.4", sha256="a2c8c1da38b9684d7c4656a98b3fc42777b03fd474cd0bf969324804f47587e5" + ) + version( + "21.1.3", sha256="03dc82f1d075deb6f08d1e3e6592dc9b630d406c08a1316d89c436b5874f3407" + ) + + variant( + "probe", + default=False, + description='Detect available PMU counters via "forge-probe" during install', + ) + + variant("accept-eula", default=False, description="Accept the EULA") + + # forge-probe executes with "/usr/bin/env python" + depends_on("python@2.7:", type="build", when="+probe") + + # Licensing + license_required = True + license_comment = "#" + license_files = ["licences/Licence"] + license_vars = [ + "ALLINEA_LICENSE_DIR", + "ALLINEA_LICENCE_DIR", + "ALLINEA_LICENSE_FILE", + "ALLINEA_LICENCE_FILE", + ] + license_url = "https://docs.linaroforge.com/latest/html/licenceserver/index.html" + + def url_for_version(self, version): + pre = "arm" if version < Version("23.0") else "linaro" + return f"https://downloads.linaroforge.com/{version}/{pre}-forge-{version}-linux-{platform.machine()}.tar" + + @run_before("install") + def abort_without_eula_acceptance(self): + install_example = "spack install linaro-forge +accept-eula" + license_terms_path = os.path.join(self.stage.source_path, "license_terms") + if not self.spec.variants["accept-eula"].value: + raise InstallError( + "\n\n\nNOTE:\nUse +accept-eula " + + "during installation " + + "to accept the license terms in:\n" + + " {0}\n".format(os.path.join(license_terms_path, "license_agreement.txt")) + + " {0}\n\n".format(os.path.join(license_terms_path, "supplementary_terms.txt")) + + "Example: '{0}'\n".format(install_example) + ) + + def install(self, spec, prefix): + subprocess.call(["./textinstall.sh", "--accept-license", prefix]) + if spec.satisfies("+probe"): + probe = join_path(prefix, "bin", "forge-probe") + subprocess.call([probe, "--install", "global"]) + + def setup_run_environment(self, env): + # Only PATH is needed for Forge. + # Adding lib to LD_LIBRARY_PATH can cause conflicts with Forge's internal libs. + env.clear() + env.prepend_path("PATH", join_path(self.prefix, "bin")) From d2ddd99ef63191353a264ce83a0bdbe0c4fb37aa Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Tue, 10 Oct 2023 01:30:46 +0200 Subject: [PATCH 119/806] libzmq: add v4.3.5 (#40383) --- var/spack/repos/builtin/packages/libzmq/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libzmq/package.py b/var/spack/repos/builtin/packages/libzmq/package.py index 207b8672344314..086b0a6e4afcdc 100644 --- a/var/spack/repos/builtin/packages/libzmq/package.py +++ b/var/spack/repos/builtin/packages/libzmq/package.py @@ -12,12 +12,13 @@ class Libzmq(AutotoolsPackage): """The ZMQ networking/concurrency library and core API""" homepage = "https://zguide.zeromq.org/" - url = "https://github.com/zeromq/libzmq/releases/download/v4.3.2/zeromq-4.3.2.tar.gz" + url = "https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz" git = "https://github.com/zeromq/libzmq.git" maintainers("dennisklein") version("master", branch="master") + version("4.3.5", sha256="6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43") version("4.3.4", sha256="c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5") version("4.3.3", sha256="9d9285db37ae942ed0780c016da87060497877af45094ff9e1a1ca736e3875a2") version("4.3.2", sha256="ebd7b5c830d6428956b67a0454a7f8cbed1de74b3b01e5c33c5378e22740f763") From fb340f130b577b4e61d02f54b86e1327ca3e5039 Mon Sep 17 00:00:00 2001 From: Auriane R <48684432+aurianer@users.noreply.github.com> Date: Tue, 10 Oct 2023 04:23:54 +0200 Subject: [PATCH 120/806] Add pika 0.19.1 (#40385) --- var/spack/repos/builtin/packages/pika/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index f581a6cd0c8602..50ff40f4112d90 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -17,6 +17,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pika-org/pika.git" maintainers("msimberg", "albestro", "teonnik", "aurianer") + version("0.19.1", sha256="674675abf0dd4c6f5a0b2fa3db944b277ed65c62f654029d938a8cab608a9c1d") version("0.19.0", sha256="f45cc16e4e50cbb183ed743bdc8b775d49776ee33c13ea39a650f4230a5744cb") version("0.18.0", sha256="f34890e0594eeca6ac57f2b988d0807b502782817e53a7f7043c3f921b08c99f") version("0.17.0", sha256="717429fc1bc986d62cbec190a69939e91608122d09d54bda1b028871c9ca9ad4") From 2541b42fc2ff4582b89a4108bde8e7c342264e5c Mon Sep 17 00:00:00 2001 From: Tom Epperly Date: Mon, 9 Oct 2023 19:28:45 -0700 Subject: [PATCH 121/806] Add a new release sha256 hash (#37680) --- var/spack/repos/builtin/packages/caliper/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index 5cdbadacf9ee8d..66bd9cc84cd0ad 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -27,6 +27,7 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version("2.10.0", sha256="14c4fb5edd5e67808d581523b4f8f05ace8549698c0e90d84b53171a77f58565") + version("2.9.1", sha256="4771d630de505eff9227e0ec498d0da33ae6f9c34df23cb201b56181b8759e9e") version("2.9.0", sha256="507ea74be64a2dfd111b292c24c4f55f459257528ba51a5242313fa50978371f") version("2.8.0", sha256="17807b364b5ac4b05997ead41bd173e773f9a26ff573ff2fe61e0e70eab496e4") version( @@ -117,7 +118,10 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage): conflicts("+rocm+cuda") patch("for_aarch64.patch", when="target=aarch64:") - patch("sampler-service-missing-libunwind-include-dir.patch", when="@2.9.0 +libunwind +sampler") + patch( + "sampler-service-missing-libunwind-include-dir.patch", + when="@2.9.0:2.9.1 +libunwind +sampler", + ) def cmake_args(self): spec = self.spec From 9275f180bb14f3c2565fd2a0aa7b95cf81d84156 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Mon, 9 Oct 2023 22:33:40 -0400 Subject: [PATCH 122/806] openmm: new version 8.0.0 (#40396) --- var/spack/repos/builtin/packages/openmm/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmm/package.py b/var/spack/repos/builtin/packages/openmm/package.py index 3b8329fdea1683..6bdac8640351d2 100644 --- a/var/spack/repos/builtin/packages/openmm/package.py +++ b/var/spack/repos/builtin/packages/openmm/package.py @@ -17,6 +17,7 @@ class Openmm(CMakePackage, CudaPackage): homepage = "https://openmm.org/" url = "https://github.com/openmm/openmm/archive/7.4.1.tar.gz" + version("8.0.0", sha256="dc63d7b47c8bb7b169c409cfd63d909ed0ce1ae114d37c627bf7a4231acf488e") version("7.7.0", sha256="51970779b8dc639ea192e9c61c67f70189aa294575acb915e14be1670a586c25") version("7.6.0", sha256="5a99c491ded9ba83ecc3fb1d8d22fca550f45da92e14f64f25378fda0048a89d") version("7.5.1", sha256="c88d6946468a2bde2619acb834f57b859b5e114a93093cf562165612e10f4ff7") @@ -32,7 +33,7 @@ class Openmm(CMakePackage, CudaPackage): depends_on("doxygen@:1.9.1", type="build", when="@:7.6.0") depends_on("doxygen", type="build", when="@7.7:") depends_on("swig", type="build") - depends_on("fftw") + depends_on("fftw", when="@:7") depends_on("py-cython", type="build") depends_on("py-numpy", type=("build", "run")) depends_on("cuda", when="+cuda", type=("build", "link", "run")) From 6fe914421aec4570beb5f777c4933f214b797042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Tue, 10 Oct 2023 04:43:56 +0200 Subject: [PATCH 123/806] rkcommon: checksum 0.11.0 (#40391) --- var/spack/repos/builtin/packages/rkcommon/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/rkcommon/package.py b/var/spack/repos/builtin/packages/rkcommon/package.py index 50409f10a4e0de..4f0a07559ef9c6 100644 --- a/var/spack/repos/builtin/packages/rkcommon/package.py +++ b/var/spack/repos/builtin/packages/rkcommon/package.py @@ -16,6 +16,7 @@ class Rkcommon(CMakePackage): # maintainers("github_user1",o"github_user2") + version("1.11.0", sha256="9cfeedaccdefbdcf23c465cb1e6c02057100c4a1a573672dc6cfea5348cedfdd") version("1.10.0", sha256="57a33ce499a7fc5a5aaffa39ec7597115cf69ed4ff773546b5b71ff475ee4730") version("1.9.0", sha256="b68aa02ef44c9e35c168f826a14802bb5cc6a9d769ba4b64b2c54f347a14aa53") version("1.8.0", sha256="f037c15f7049610ef8bca37500b2ab00775af60ebbb9d491ba5fc2e5c04a7794") From 6db8e0a61e969835952a88c246166cc009af4e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Tue, 10 Oct 2023 04:44:10 +0200 Subject: [PATCH 124/806] embree: checksum 4.3.0 (#40395) --- var/spack/repos/builtin/packages/embree/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/embree/package.py b/var/spack/repos/builtin/packages/embree/package.py index 3da828eb6b0f56..6a6e91115eb4f3 100644 --- a/var/spack/repos/builtin/packages/embree/package.py +++ b/var/spack/repos/builtin/packages/embree/package.py @@ -13,6 +13,7 @@ class Embree(CMakePackage): url = "https://github.com/embree/embree/archive/v3.7.0.tar.gz" maintainers("aumuell") + version("4.3.0", sha256="baf0a57a45837fc055ba828a139467bce0bc0c6a9a5f2dccb05163d012c12308") version("4.2.0", sha256="b0479ce688045d17aa63ce6223c84b1cdb5edbf00d7eda71c06b7e64e21f53a0") version("4.1.0", sha256="117efd87d6dddbf7b164edd94b0bc057da69d6422a25366283cded57ed94738b") version("4.0.1", sha256="1fa3982fa3531f1b6e81f19e6028ae8a62b466597f150b853440fe35ef7c6c06") From 749e99bf11d52bd865b11c28d2a48e1ef84b8222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Bederi=C3=A1n?= <4043375+zzzoom@users.noreply.github.com> Date: Tue, 10 Oct 2023 04:53:04 -0300 Subject: [PATCH 125/806] python: add 3.11.6 (#40384) --- var/spack/repos/builtin/packages/python/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 04251b6c2339f6..b6c78adbe319c4 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -42,10 +42,11 @@ class Python(Package): version("3.12.0", sha256="51412956d24a1ef7c97f1cb5f70e185c13e3de1f50d131c0aac6338080687afb") version( - "3.11.5", - sha256="a12a0a013a30b846c786c010f2c19dd36b7298d888f7c4bd1581d90ce18b5e58", + "3.11.6", + sha256="c049bf317e877cbf9fce8c3af902436774ecef5249a29d10984ca3a37f7f4736", preferred=True, ) + version("3.11.5", sha256="a12a0a013a30b846c786c010f2c19dd36b7298d888f7c4bd1581d90ce18b5e58") version("3.11.4", sha256="85c37a265e5c9dd9f75b35f954e31fbfc10383162417285e30ad25cc073a0d63") version("3.11.3", sha256="1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048") version("3.11.2", sha256="2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849") From 6c7b2e1056bbd158544da9b6a79fd4099c18cd7a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 10 Oct 2023 11:48:06 +0200 Subject: [PATCH 126/806] git: optimize build by not setting CFLAGS (#40387) --- var/spack/repos/builtin/packages/git/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index b0984f52c1a641..b63335eabce4bc 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -253,8 +253,6 @@ def setup_build_environment(self, env): extlib_bits.append(spec["gettext"].libs.search_flags) extlib_bits.append("-lintl") env.append_flags("EXTLIBS", " ".join(extlib_bits)) - if not is_system_path(spec["gettext"].prefix): - env.append_flags("CFLAGS", spec["gettext"].headers.include_flags) if not self.spec["curl"].satisfies("libs=shared"): curlconfig = which(os.path.join(self.spec["curl"].prefix.bin, "curl-config")) From 4d5181088824506da05fbec5fef22d33344b9d98 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:42:26 -0400 Subject: [PATCH 127/806] find rocm fix (#40388) * find rocm fix * format fix * style fix * formatting is broken --- var/spack/repos/builtin/packages/tasmanian/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py index ff974c79d314b0..2a3db2ade34ba3 100644 --- a/var/spack/repos/builtin/packages/tasmanian/package.py +++ b/var/spack/repos/builtin/packages/tasmanian/package.py @@ -189,12 +189,14 @@ def test_make_test(self): options = [cmake_dir] if "+rocm" in self.spec: + options.append(f"-Dhip_DIR={self.spec['hip'].prefix.lib.cmake.hip}") options.append( f"-DAMDDeviceLibs_DIR={self.spec['llvm-amdgpu'].prefix.lib.cmake.AMDDeviceLibs}" ) options.append(f"-Damd_comgr_DIR={self.spec['comgr'].prefix.lib.cmake.amd_comgr}") options.append( - f"-Dhsa-runtime64_DIR={self.spec['hsa-rocr-dev'].prefix.lib.cmake.hsa-runtime64}" + "-Dhsa-runtime64_DIR=" + + join_path(self.spec["hsa-rocr-dev"].prefix.lib.cmake, "hsa-runtime64") ) options.append(f"-DHSA_HEADER={self.spec['hsa-rocr-dev'].prefix.include}") options.append(f"-DCMAKE_INCLUDE_PATH={self.spec['hsa-rocr-dev'].prefix.include.hsa}") From da10487219ccd3b738b910000fe307de3fc4fdbd Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 Oct 2023 13:45:32 -0500 Subject: [PATCH 128/806] Update PyTorch ecosystem (#40321) * Update PyTorch ecosystem * py-pybind11: better documentation of supported compilers * py-torchdata: add v0.7.0 * Black fixes * py-torchtext: fix Python reqs * py-horovod: py-torch 2.1.0 not yet supported --- .../builtin/packages/py-horovod/package.py | 2 + .../builtin/packages/py-pybind11/package.py | 13 +- .../builtin/packages/py-torch/package.py | 157 +++++++----------- .../builtin/packages/py-torchaudio/package.py | 114 ++++--------- .../builtin/packages/py-torchdata/package.py | 4 +- .../builtin/packages/py-torchtext/package.py | 83 ++++----- .../packages/py-torchvision/package.py | 15 +- 7 files changed, 139 insertions(+), 249 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-horovod/package.py b/var/spack/repos/builtin/packages/py-horovod/package.py index 6406ef85800e45..0e0bc5fd7f6068 100644 --- a/var/spack/repos/builtin/packages/py-horovod/package.py +++ b/var/spack/repos/builtin/packages/py-horovod/package.py @@ -225,6 +225,8 @@ class PyHorovod(PythonPackage, CudaPackage): conflicts( "controllers=gloo", when="@:0.20.0 platform=darwin", msg="Gloo cannot be compiled on MacOS" ) + # FIXME + conflicts("^py-torch@2.1:") # https://github.com/horovod/horovod/pull/1835 patch("fma.patch", when="@0.19.0:0.19.1") diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py index 1dc422793c0346..63625651bcd964 100644 --- a/var/spack/repos/builtin/packages/py-pybind11/package.py +++ b/var/spack/repos/builtin/packages/py-pybind11/package.py @@ -27,6 +27,8 @@ class PyPybind11(CMakePackage, PythonExtension): maintainers("ax3l") version("master", branch="master") + version("2.11.1", sha256="d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c") + version("2.11.0", sha256="7af30a84c6810e721829c4646e31927af9d8861e085aa5dd37c3c8b8169fcda1") version("2.10.4", sha256="832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970") version("2.10.1", sha256="111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad") version("2.10.0", sha256="eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec") @@ -52,9 +54,6 @@ class PyPybind11(CMakePackage, PythonExtension): depends_on("py-setuptools@42:", type="build") depends_on("py-pytest", type="test") - depends_on("python@2.7:2.8,3.5:", type=("build", "run")) - depends_on("python@3.6:", when="@2.10.0:", type=("build", "run")) - depends_on("py-pip", type="build") depends_on("py-wheel", type="build") extends("python") @@ -64,10 +63,12 @@ class PyPybind11(CMakePackage, PythonExtension): depends_on("cmake@3.13:", type="build") depends_on("cmake@3.18:", type="build", when="@2.6.0:") - # compiler support - conflicts("%gcc@:4.7") + # https://github.com/pybind/pybind11/#supported-compilers conflicts("%clang@:3.2") - conflicts("%intel@:16") + conflicts("%apple-clang@:4") + conflicts("%gcc@:4.7") + conflicts("%msvc@:16") + conflicts("%intel@:17") # https://github.com/pybind/pybind11/pull/1995 @when("@:2.4") diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index cc863fcbafc61b..30666314eea1f8 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -11,11 +11,11 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): - """Tensors and Dynamic neural networks in Python - with strong GPU acceleration.""" + """Tensors and Dynamic neural networks in Python with strong GPU acceleration.""" homepage = "https://pytorch.org/" git = "https://github.com/pytorch/pytorch.git" + submodules = True maintainers("adamjstewart") @@ -23,89 +23,36 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # core libraries to ensure that the package was successfully installed. import_modules = ["torch", "torch.autograd", "torch.nn", "torch.utils"] - version("main", branch="main", submodules=True) - version("master", branch="main", submodules=True, deprecated=True) - version( - "2.0.1", tag="v2.0.1", commit="e9ebda29d87ce0916ab08c06ab26fd3766a870e5", submodules=True - ) - version( - "2.0.0", tag="v2.0.0", commit="c263bd43e8e8502d4726643bc6fd046f0130ac0e", submodules=True - ) - version( - "1.13.1", tag="v1.13.1", commit="49444c3e546bf240bed24a101e747422d1f8a0ee", submodules=True - ) - version( - "1.13.0", tag="v1.13.0", commit="7c98e70d44abc7a1aead68b6ea6c8adc8c554db5", submodules=True - ) - version( - "1.12.1", tag="v1.12.1", commit="664058fa83f1d8eede5d66418abff6e20bd76ca8", submodules=True - ) - version( - "1.12.0", tag="v1.12.0", commit="67ece03c8cd632cce9523cd96efde6f2d1cc8121", submodules=True - ) - version( - "1.11.0", tag="v1.11.0", commit="bc2c6edaf163b1a1330e37a6e34caf8c553e4755", submodules=True - ) - version( - "1.10.2", tag="v1.10.2", commit="71f889c7d265b9636b93ede9d651c0a9c4bee191", submodules=True - ) - version( - "1.10.1", tag="v1.10.1", commit="302ee7bfb604ebef384602c56e3853efed262030", submodules=True - ) - version( - "1.10.0", tag="v1.10.0", commit="36449ea93134574c2a22b87baad3de0bf8d64d42", submodules=True - ) - version( - "1.9.1", tag="v1.9.1", commit="dfbd030854359207cb3040b864614affeace11ce", submodules=True - ) - version( - "1.9.0", tag="v1.9.0", commit="d69c22dd61a2f006dcfe1e3ea8468a3ecaf931aa", submodules=True - ) - version( - "1.8.2", tag="v1.8.2", commit="e0495a7aa104471d95dc85a1b8f6473fbcc427a8", submodules=True - ) - version( - "1.8.1", tag="v1.8.1", commit="56b43f4fec1f76953f15a627694d4bba34588969", submodules=True - ) - version( - "1.8.0", tag="v1.8.0", commit="37c1f4a7fef115d719104e871d0cf39434aa9d56", submodules=True - ) - version( - "1.7.1", tag="v1.7.1", commit="57bffc3a8e4fee0cce31e1ff1f662ccf7b16db57", submodules=True - ) - version( - "1.7.0", tag="v1.7.0", commit="e85d494707b835c12165976b8442af54b9afcb26", submodules=True - ) - version( - "1.6.0", tag="v1.6.0", commit="b31f58de6fa8bbda5353b3c77d9be4914399724d", submodules=True - ) - version( - "1.5.1", tag="v1.5.1", commit="3c31d73c875d9a4a6ea8a843b9a0d1b19fbe36f3", submodules=True - ) - version( - "1.5.0", tag="v1.5.0", commit="4ff3872a2099993bf7e8c588f7182f3df777205b", submodules=True - ) - version( - "1.4.1", tag="v1.4.1", commit="74044638f755cd8667bedc73da4dbda4aa64c948", submodules=True - ) - version( - "1.3.1", tag="v1.3.1", commit="ee77ccbb6da4e2efd83673e798acf7081bc03564", submodules=True - ) - version( - "1.3.0", tag="v1.3.0", commit="de394b672d0346f2f387a8bb1a1280d5d2eaf9cb", submodules=True - ) - version( - "1.2.0", tag="v1.2.0", commit="8554416a199c4cec01c60c7015d8301d2bb39b64", submodules=True - ) - version( - "1.1.0", tag="v1.1.0", commit="142c973f4179e768164cd578951489e89021b29c", submodules=True - ) - version( - "1.0.1", tag="v1.0.1", commit="83221655a8237ca80f9673dad06a98d34c43e546", submodules=True - ) - version( - "1.0.0", tag="v1.0.0", commit="db5d3131d16f57abd4f13d3f4b885d5f67bf6644", submodules=True - ) + version("main", branch="main") + version("master", branch="main", deprecated=True) + version("2.1.0", tag="v2.1.0", commit="7bcf7da3a268b435777fe87c7794c382f444e86d") + version("2.0.1", tag="v2.0.1", commit="e9ebda29d87ce0916ab08c06ab26fd3766a870e5") + version("2.0.0", tag="v2.0.0", commit="c263bd43e8e8502d4726643bc6fd046f0130ac0e") + version("1.13.1", tag="v1.13.1", commit="49444c3e546bf240bed24a101e747422d1f8a0ee") + version("1.13.0", tag="v1.13.0", commit="7c98e70d44abc7a1aead68b6ea6c8adc8c554db5") + version("1.12.1", tag="v1.12.1", commit="664058fa83f1d8eede5d66418abff6e20bd76ca8") + version("1.12.0", tag="v1.12.0", commit="67ece03c8cd632cce9523cd96efde6f2d1cc8121") + version("1.11.0", tag="v1.11.0", commit="bc2c6edaf163b1a1330e37a6e34caf8c553e4755") + version("1.10.2", tag="v1.10.2", commit="71f889c7d265b9636b93ede9d651c0a9c4bee191") + version("1.10.1", tag="v1.10.1", commit="302ee7bfb604ebef384602c56e3853efed262030") + version("1.10.0", tag="v1.10.0", commit="36449ea93134574c2a22b87baad3de0bf8d64d42") + version("1.9.1", tag="v1.9.1", commit="dfbd030854359207cb3040b864614affeace11ce") + version("1.9.0", tag="v1.9.0", commit="d69c22dd61a2f006dcfe1e3ea8468a3ecaf931aa") + version("1.8.2", tag="v1.8.2", commit="e0495a7aa104471d95dc85a1b8f6473fbcc427a8") + version("1.8.1", tag="v1.8.1", commit="56b43f4fec1f76953f15a627694d4bba34588969") + version("1.8.0", tag="v1.8.0", commit="37c1f4a7fef115d719104e871d0cf39434aa9d56") + version("1.7.1", tag="v1.7.1", commit="57bffc3a8e4fee0cce31e1ff1f662ccf7b16db57") + version("1.7.0", tag="v1.7.0", commit="e85d494707b835c12165976b8442af54b9afcb26") + version("1.6.0", tag="v1.6.0", commit="b31f58de6fa8bbda5353b3c77d9be4914399724d") + version("1.5.1", tag="v1.5.1", commit="3c31d73c875d9a4a6ea8a843b9a0d1b19fbe36f3") + version("1.5.0", tag="v1.5.0", commit="4ff3872a2099993bf7e8c588f7182f3df777205b") + version("1.4.1", tag="v1.4.1", commit="74044638f755cd8667bedc73da4dbda4aa64c948") + version("1.3.1", tag="v1.3.1", commit="ee77ccbb6da4e2efd83673e798acf7081bc03564") + version("1.3.0", tag="v1.3.0", commit="de394b672d0346f2f387a8bb1a1280d5d2eaf9cb") + version("1.2.0", tag="v1.2.0", commit="8554416a199c4cec01c60c7015d8301d2bb39b64") + version("1.1.0", tag="v1.1.0", commit="142c973f4179e768164cd578951489e89021b29c") + version("1.0.1", tag="v1.0.1", commit="83221655a8237ca80f9673dad06a98d34c43e546") + version("1.0.0", tag="v1.0.0", commit="db5d3131d16f57abd4f13d3f4b885d5f67bf6644") is_darwin = sys.platform == "darwin" @@ -191,12 +138,10 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # See python_min_version in setup.py # Upper bounds come from wheel availability on PyPI depends_on("python@3.8:3.11", when="@2:", type=("build", "link", "run")) - depends_on("python@3.7:3.10", when="@1.11:1", type=("build", "link", "run")) - depends_on("python@3.6.2:3.9", when="@1.7.1:1.10", type=("build", "link", "run")) - depends_on("python@3.6.1:3.8", when="@1.6:1.7.0", type=("build", "link", "run")) - depends_on("python@3.5:3.8", when="@1.5", type=("build", "link", "run")) - depends_on("python@2.7:2,3.5:3.8", when="@1.4", type=("build", "link", "run")) - depends_on("python@2.7:2,3.5:3.7", when="@:1.3", type=("build", "link", "run")) + depends_on("python@:3.10", when="@1.11:1", type=("build", "link", "run")) + depends_on("python@:3.9", when="@1.7.1:1.10", type=("build", "link", "run")) + depends_on("python@:3.8", when="@1.4:1.7.0", type=("build", "link", "run")) + depends_on("python@:3.7", when="@:1.3", type=("build", "link", "run")) # CMakelists.txt depends_on("cmake@3.18:", when="@2:", type="build") @@ -221,6 +166,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("py-sympy", when="@2:", type=("build", "run")) depends_on("py-networkx", when="@2:", type=("build", "run")) depends_on("py-jinja2", when="@2:", type=("build", "run")) + depends_on("py-fsspec", when="@2.1:", type=("build", "run")) # Undocumented dependencies depends_on("py-tqdm", type="run") @@ -228,7 +174,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("lapack") # third_party - depends_on("py-pybind11@2.10.1", when="@2:", type=("build", "link", "run")) + depends_on("py-pybind11@2.11.0", when="@2.1:", type=("build", "link", "run")) + depends_on("py-pybind11@2.10.1", when="@2.0", type=("build", "link", "run")) depends_on("py-pybind11@2.10.0", when="@1.13:1", type=("build", "link", "run")) depends_on("py-pybind11@2.6.2", when="@1.8:1.12", type=("build", "link", "run")) depends_on("py-pybind11@2.3.0", when="@1.1:1.7", type=("build", "link", "run")) @@ -243,7 +190,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("protobuf@:3", type=("build", "run")) depends_on("eigen") # https://github.com/pytorch/pytorch/issues/60329 - # depends_on("cpuinfo@2022-08-19", when="@1.13:") + # depends_on("cpuinfo@2023-01-13", when="@2.1:") + # depends_on("cpuinfo@2022-08-19", when="@1.13:2.0") # depends_on("cpuinfo@2020-12-17", when="@1.8:1.12") # depends_on("cpuinfo@2020-06-11", when="@1.6:1.7") # https://github.com/shibatch/sleef/issues/427 @@ -300,14 +248,16 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # depends_on("xnnpack@2020-03-23", when="@1.6:1.7+xnnpack") depends_on("mpi", when="+mpi") # https://github.com/pytorch/pytorch/issues/60270 - # depends_on("gloo@2023-01-17", when="@2:+gloo") + # depends_on("gloo@2023-05-19", when="@2.1:+gloo") + # depends_on("gloo@2023-01-17", when="@2.0+gloo") # depends_on("gloo@2022-05-18", when="@1.13:1+gloo") # depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo") # depends_on("gloo@2021-05-04", when="@1.9+gloo") # depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo") # depends_on("gloo@2020-03-17", when="@1.6+gloo") # https://github.com/pytorch/pytorch/issues/60331 - # depends_on("onnx@1.13.1", when="@2:+onnx_ml") + # depends_on("onnx@1.14.1", when="@2.1:+onnx_ml") + # depends_on("onnx@1.13.1", when="@2.0+onnx_ml") # depends_on("onnx@1.12.0", when="@1.13:1+onnx_ml") # depends_on("onnx@1.11.0", when="@1.12+onnx_ml") # depends_on("onnx@1.10.1_2021-10-08", when="@1.11+onnx_ml") @@ -420,7 +370,22 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): sha256="a54db63640b90e5833cc1099c0935572f5297d2d8625f62f01ac1fda79ed4569", when="@1.13 arch=ppc64le:", ) - conflicts("arch=ppc64le:", when="@:1.9,2:") + patch( + "https://github.com/open-ce/pytorch-feedstock/raw/open-ce-v1.9.0/pytorch-2.0/recipe/0309-fallback-to-cpu_kernel-with-VSX.patch", + sha256="27f41c8d6cb61e69e761be62f03dc1ce023cbca34926e3ba559996821a7ce726", + when="@2.0 arch=ppc64le:", + ) + patch( + "https://github.com/open-ce/pytorch-feedstock/raw/open-ce-v1.9.0/pytorch-2.0/recipe/0310-PR100149.patch", + sha256="1adbd38a9cc1611f1caaa325614695f4349d9ffd236332e0d8f0de5a3880f4dd", + when="@2.0 arch=ppc64le:", + ) + patch( + "https://github.com/open-ce/pytorch-feedstock/raw/open-ce-v1.10.0/pytorch-2.0/recipe/0311-PR104956.patch", + sha256="be27c906924a21be198a3ea6c459739a1daa8b8b89045af339dafa4cd6f90d6c", + when="@2.0 arch=ppc64le:", + ) + conflicts("arch=ppc64le:", when="@:1.9") # Cherry-pick a patch to allow earlier versions of PyTorch to work with CUDA 11.4 patch( diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index 679a43aba301f9..d07ce1de2182c7 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -8,93 +8,41 @@ class PyTorchaudio(PythonPackage): - """The aim of torchaudio is to apply PyTorch to the audio - domain. By supporting PyTorch, torchaudio follows the same - philosophy of providing strong GPU acceleration, having a focus on - trainable features through the autograd system, and having - consistent style (tensor names and dimension names). Therefore, it - is primarily a machine learning library and not a general signal - processing library. The benefits of Pytorch is be seen in - torchaudio through having all the computations be through Pytorch - operations which makes it easy to use and feel like a natural - extension.""" + """An audio package for PyTorch.""" homepage = "https://github.com/pytorch/audio" git = "https://github.com/pytorch/audio.git" + submodules = True - version("main", branch="main", submodules=True) - version( - "2.0.2", tag="v2.0.2", commit="31de77dad5c89274451b3f5c4bcb630be12787c4", submodules=True - ) - version( - "2.0.1", tag="v2.0.1", commit="3b40834aca41957002dfe074175e900cf8906237", submodules=True - ) - version( - "0.13.1", tag="v0.13.1", commit="b90d79882c3521fb3882833320b4b85df3b622f4", submodules=True - ) - version( - "0.13.0", tag="v0.13.0", commit="bc8640b4722abf6587fb4cc2521da45aeb55a711", submodules=True - ) - version( - "0.12.1", tag="v0.12.1", commit="58da31733e08438f9d1816f55f54756e53872a92", submodules=True - ) - version( - "0.12.0", tag="v0.12.0", commit="2e1388401c434011e9f044b40bc8374f2ddfc414", submodules=True - ) - version( - "0.11.0", tag="v0.11.0", commit="820b383b3b21fc06e91631a5b1e6ea1557836216", submodules=True - ) - version( - "0.10.2", tag="v0.10.2", commit="6f539cf3edc4224b51798e962ca28519e5479ffb", submodules=True - ) - version( - "0.10.1", tag="v0.10.1", commit="4b64f80bef85bd951ea35048c461c8304e7fc4c4", submodules=True - ) - version( - "0.10.0", tag="v0.10.0", commit="d2634d866603c1e2fc8e44cd6e9aea7ddd21fe29", submodules=True - ) - version( - "0.9.1", tag="v0.9.1", commit="a85b2398722182dd87e76d9ffcbbbf7e227b83ce", submodules=True - ) - version( - "0.9.0", tag="v0.9.0", commit="33b2469744955e2129c6367457dffe9bb4b05dea", submodules=True - ) - version( - "0.8.2", tag="v0.8.2", commit="d254d547d183e7203e455de6b99e56d3ffdd4499", submodules=True - ) - version( - "0.8.1", tag="v0.8.1", commit="e4e171a51714b2b2bd79e1aea199c3f658eddf9a", submodules=True - ) - version( - "0.8.0", tag="v0.8.0", commit="099d7883c6b7af1d1c3b416191e5f3edf492e104", submodules=True - ) - version( - "0.7.2", tag="v0.7.2", commit="a853dff25de36cc637b1f02029343790d2dd0199", submodules=True - ) - version( - "0.7.0", tag="v0.7.0", commit="ac17b64f4daedd45d0495e2512e22eaa6e5b7eeb", submodules=True - ) - version( - "0.6.0", tag="v0.6.0", commit="f17ae39ff9da0df8f795fef2fcc192f298f81268", submodules=True - ) - version( - "0.5.1", tag="v0.5.1", commit="71434798460a4ceca9d42004567ef419c62a612e", submodules=True - ) - version( - "0.5.0", tag="v0.5.0", commit="09494ea545738538f9db2dceeffe10d421060ee5", submodules=True - ) - version( - "0.4.0", tag="v0.4.0", commit="8afed303af3de41f3586007079c0534543c8f663", submodules=True - ) + version("main", branch="main") + version("2.1.0", tag="v2.1.0", commit="6ea1133706801ec6e81bb29142da2e21a8583a0a") + version("2.0.2", tag="v2.0.2", commit="31de77dad5c89274451b3f5c4bcb630be12787c4") + version("2.0.1", tag="v2.0.1", commit="3b40834aca41957002dfe074175e900cf8906237") + version("0.13.1", tag="v0.13.1", commit="b90d79882c3521fb3882833320b4b85df3b622f4") + version("0.13.0", tag="v0.13.0", commit="bc8640b4722abf6587fb4cc2521da45aeb55a711") + version("0.12.1", tag="v0.12.1", commit="58da31733e08438f9d1816f55f54756e53872a92") + version("0.12.0", tag="v0.12.0", commit="2e1388401c434011e9f044b40bc8374f2ddfc414") + version("0.11.0", tag="v0.11.0", commit="820b383b3b21fc06e91631a5b1e6ea1557836216") + version("0.10.2", tag="v0.10.2", commit="6f539cf3edc4224b51798e962ca28519e5479ffb") + version("0.10.1", tag="v0.10.1", commit="4b64f80bef85bd951ea35048c461c8304e7fc4c4") + version("0.10.0", tag="v0.10.0", commit="d2634d866603c1e2fc8e44cd6e9aea7ddd21fe29") + version("0.9.1", tag="v0.9.1", commit="a85b2398722182dd87e76d9ffcbbbf7e227b83ce") + version("0.9.0", tag="v0.9.0", commit="33b2469744955e2129c6367457dffe9bb4b05dea") + version("0.8.2", tag="v0.8.2", commit="d254d547d183e7203e455de6b99e56d3ffdd4499") + version("0.8.1", tag="v0.8.1", commit="e4e171a51714b2b2bd79e1aea199c3f658eddf9a") + version("0.8.0", tag="v0.8.0", commit="099d7883c6b7af1d1c3b416191e5f3edf492e104") + version("0.7.2", tag="v0.7.2", commit="a853dff25de36cc637b1f02029343790d2dd0199") + version("0.7.0", tag="v0.7.0", commit="ac17b64f4daedd45d0495e2512e22eaa6e5b7eeb") + version("0.6.0", tag="v0.6.0", commit="f17ae39ff9da0df8f795fef2fcc192f298f81268") + version("0.5.1", tag="v0.5.1", commit="71434798460a4ceca9d42004567ef419c62a612e") + version("0.5.0", tag="v0.5.0", commit="09494ea545738538f9db2dceeffe10d421060ee5") + version("0.4.0", tag="v0.4.0", commit="8afed303af3de41f3586007079c0534543c8f663") - # https://github.com/pytorch/audio#dependencies + # https://pytorch.org/audio/main/installation.html#dependencies depends_on("python@3.8:3.11", when="@2:", type=("build", "link", "run")) - depends_on("python@3.7:3.10", when="@0.12:0", type=("build", "link", "run")) - depends_on("python@3.7:3.9", when="@0.11", type=("build", "link", "run")) - depends_on("python@3.6:3.9", when="@0.7.2:0.10", type=("build", "link", "run")) - depends_on("python@3.6:3.8", when="@0.6:0.7.0", type=("build", "link", "run")) - depends_on("python@3.5:3.8", when="@0.5", type=("build", "link", "run")) - depends_on("python@2.7,3.5:3.8", when="@0.4", type=("build", "link", "run")) + depends_on("python@:3.10", when="@0.12:0", type=("build", "link", "run")) + depends_on("python@:3.9", when="@0.7.2:0.11", type=("build", "link", "run")) + depends_on("python@:3.8", when="@:0.7.0", type=("build", "link", "run")) # CMakelists.txt depends_on("cmake@3.18:", when="@0.10:", type="build") @@ -107,8 +55,8 @@ class PyTorchaudio(PythonPackage): depends_on("pkgconfig", type="build") depends_on("sox") - # https://github.com/pytorch/audio#dependencies - depends_on("py-torch@master", when="@main", type=("build", "link", "run")) + depends_on("py-torch@main", when="@main", type=("build", "link", "run")) + depends_on("py-torch@2.1.0", when="@2.1.0", type=("build", "link", "run")) depends_on("py-torch@2.0.1", when="@2.0.2", type=("build", "link", "run")) depends_on("py-torch@2.0.0", when="@2.0.1", type=("build", "link", "run")) depends_on("py-torch@1.13.1", when="@0.13.1", type=("build", "link", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py index a207d7f7b4192b..51b95c1cca7758 100644 --- a/var/spack/repos/builtin/packages/py-torchdata/package.py +++ b/var/spack/repos/builtin/packages/py-torchdata/package.py @@ -16,6 +16,7 @@ class PyTorchdata(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("0.7.0-rc1", sha256="9d48e1a5bc0fa4e50976b89aea38d028dcb7e580dba594755d266e19c369b747") version("0.6.1", sha256="c596db251c5e6550db3f00e4308ee7112585cca4d6a1c82a433478fd86693257") version("0.6.0", sha256="048dea12ee96c0ea1525097959fee811d7b38c2ed05f44a90f35f8961895fb5b") version("0.5.1", sha256="69d80bd33ce8f08e7cfeeb71cefddfc29cede25a85881e33dbae47576b96ed29") @@ -36,7 +37,8 @@ class PyTorchdata(PythonPackage): depends_on("ninja", when="@0.4:", type="build") # https://github.com/pytorch/data#version-compatibility - depends_on("py-torch@master", when="@main", type=("build", "run")) + depends_on("py-torch@main", when="@main", type=("build", "run")) + depends_on("py-torch@2.1.0", when="@0.7.0", type=("build", "run")) depends_on("py-torch@2.0.1", when="@0.6.1", type=("build", "run")) depends_on("py-torch@2.0.0", when="@0.6.0", type=("build", "run")) depends_on("py-torch@1.13.1", when="@0.5.1", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchtext/package.py b/var/spack/repos/builtin/packages/py-torchtext/package.py index 10e02316db7743..180b555069bc5e 100644 --- a/var/spack/repos/builtin/packages/py-torchtext/package.py +++ b/var/spack/repos/builtin/packages/py-torchtext/package.py @@ -8,67 +8,37 @@ class PyTorchtext(PythonPackage): - """Text utilities and datasets for PyTorch.""" + """Text utilities, models, transforms, and datasets for PyTorch.""" homepage = "https://github.com/pytorch/text" git = "https://github.com/pytorch/text.git" + submodules = True maintainers("adamjstewart") - version("main", branch="main", submodules=True) - version( - "0.15.2", tag="v0.15.2", commit="4571036cf66c539e50625218aeb99a288d79f3e1", submodules=True - ) - version( - "0.15.1", tag="v0.15.1", commit="c696895e524c61fd2b8b26916dd006411c5f3ba5", submodules=True - ) - version( - "0.14.1", tag="v0.14.1", commit="e1e969d4947bb3dd01ea927af2f8ac9a2d778c39", submodules=True - ) - version( - "0.14.0", tag="v0.14.0", commit="e2b27f9b06ca71d55c2fcf6d47c60866ee936f40", submodules=True - ) - version( - "0.13.1", tag="v0.13.1", commit="330201f1132dcd0981180c19bc6843a19d310ff0", submodules=True - ) - version( - "0.13.0", tag="v0.13.0", commit="35298c43f3ce908fe06c177ecbd8ef1503a1292b", submodules=True - ) - version( - "0.12.0", tag="v0.12.0", commit="d7a34d6ae0f4e36a52777854d0163b9e85f1576b", submodules=True - ) - version( - "0.11.2", tag="v0.11.2", commit="92f4d158d8cbe9136896befa2d4234ea8b8e2795", submodules=True - ) - version( - "0.11.1", tag="v0.11.1", commit="5c65ec05d7c1eba5b0ea2d7ee170ccf977d9674f", submodules=True - ) - version( - "0.10.1", tag="v0.10.1", commit="0d670e03c1eee7e30e032bb96df4c12b785a15ff", submodules=True - ) - version( - "0.10.0", tag="v0.10.0", commit="4da1de36247aa06622088e78508e0e38a4392e38", submodules=True - ) - version( - "0.9.2", tag="v0.9.2", commit="22e5ee7548a85190eee78e8ed6c8911ec2c53035", submodules=True - ) - version( - "0.8.1", tag="v0.8.1", commit="0f911ec35ab020983efbf36b8c14415651e98618", submodules=True - ) - version( - "0.6.0", tag="0.6.0", commit="3a54c7f52584f201c17ca7489b52b812152612dc", submodules=True - ) - version( - "0.5.0", tag="0.5.0", commit="0169cde2f1d446ae886ef0be07e9a673585ed256", submodules=True - ) + version("main", branch="main") + version("0.16.0", tag="v0.16.0", commit="4e255c95c76b1ccde4f6650391c0bc30650d6dbe") + version("0.15.2", tag="v0.15.2", commit="4571036cf66c539e50625218aeb99a288d79f3e1") + version("0.15.1", tag="v0.15.1", commit="c696895e524c61fd2b8b26916dd006411c5f3ba5") + version("0.14.1", tag="v0.14.1", commit="e1e969d4947bb3dd01ea927af2f8ac9a2d778c39") + version("0.14.0", tag="v0.14.0", commit="e2b27f9b06ca71d55c2fcf6d47c60866ee936f40") + version("0.13.1", tag="v0.13.1", commit="330201f1132dcd0981180c19bc6843a19d310ff0") + version("0.13.0", tag="v0.13.0", commit="35298c43f3ce908fe06c177ecbd8ef1503a1292b") + version("0.12.0", tag="v0.12.0", commit="d7a34d6ae0f4e36a52777854d0163b9e85f1576b") + version("0.11.2", tag="v0.11.2", commit="92f4d158d8cbe9136896befa2d4234ea8b8e2795") + version("0.11.1", tag="v0.11.1", commit="5c65ec05d7c1eba5b0ea2d7ee170ccf977d9674f") + version("0.10.1", tag="v0.10.1", commit="0d670e03c1eee7e30e032bb96df4c12b785a15ff") + version("0.10.0", tag="v0.10.0", commit="4da1de36247aa06622088e78508e0e38a4392e38") + version("0.9.2", tag="v0.9.2", commit="22e5ee7548a85190eee78e8ed6c8911ec2c53035") + version("0.8.1", tag="v0.8.1", commit="0f911ec35ab020983efbf36b8c14415651e98618") + version("0.6.0", tag="0.6.0", commit="3a54c7f52584f201c17ca7489b52b812152612dc") + version("0.5.0", tag="0.5.0", commit="0169cde2f1d446ae886ef0be07e9a673585ed256") # https://github.com/pytorch/text#installation - depends_on("python@3.8:3.11", when="@2:", type=("build", "link", "run")) - depends_on("python@3.7:3.10", when="@0.13:1", type=("build", "link", "run")) - depends_on("python@3.6:3.9", when="@0.8.1:0.12", type=("build", "link", "run")) - depends_on("python@3.6:3.8", when="@0.7:0.8.0", type=("build", "link", "run")) - depends_on("python@3.5:3.8", when="@0.6", type=("build", "link", "run")) - depends_on("python@2.7,3.5:3.8", when="@:0.5", type=("build", "link", "run")) + depends_on("python@3.8:3.11", when="@0.15:", type=("build", "link", "run")) + depends_on("python@:3.10", when="@0.13:0.14", type=("build", "link", "run")) + depends_on("python@:3.9", when="@0.8.1:0.12", type=("build", "link", "run")) + depends_on("python@:3.8", when="@:0.8.0", type=("build", "link", "run")) # CMakelists.txt depends_on("cmake@3.18:", when="@0.13:", type="build") @@ -79,13 +49,16 @@ class PyTorchtext(PythonPackage): depends_on("py-tqdm", type=("build", "run")) depends_on("py-requests", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) - depends_on("py-torchdata@0.6:", when="@0.15:", type=("build", "run")) + depends_on("py-torchdata@0.7.0", when="@0.16.0", type=("build", "run")) + depends_on("py-torchdata@0.6.1", when="@0.15.2", type=("build", "run")) + depends_on("py-torchdata@0.6.0", when="@0.15.1", type=("build", "run")) depends_on("py-pybind11", when="@0.8:", type=("build", "link")) depends_on("py-six", when="@:0.6", type=("build", "run")) depends_on("py-sentencepiece", when="@:0.7", type=("build", "run")) # https://github.com/pytorch/text#installation - depends_on("py-torch@master", when="@main", type=("build", "link", "run")) + depends_on("py-torch@main", when="@main", type=("build", "link", "run")) + depends_on("py-torch@2.1.0", when="@0.16.0", type=("build", "link", "run")) depends_on("py-torch@2.0.1", when="@0.15.2", type=("build", "link", "run")) depends_on("py-torch@2.0.0", when="@0.15.1", type=("build", "link", "run")) depends_on("py-torch@1.13.1", when="@0.14.1", type=("build", "link", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 55b35f37266f80..5aef4c6aef8a29 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -8,8 +8,7 @@ class PyTorchvision(PythonPackage): - """The torchvision package consists of popular datasets, model - architectures, and common image transformations for computer vision.""" + """Image and video datasets and models for torch deep learning.""" homepage = "https://github.com/pytorch/vision" url = "https://github.com/pytorch/vision/archive/v0.8.2.tar.gz" @@ -18,6 +17,7 @@ class PyTorchvision(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("0.16.0", sha256="79b30b082237e3ead21e74587cedf4a4d832f977cf7dfeccfb65f67988b12ceb") version("0.15.2", sha256="1efcb80e0a6e42c54f07ee16167839b4d302aeeecc12839cc47c74b06a2c20d4") version("0.15.1", sha256="689d23d4ebb0c7e54e8651c89b17155b64341c14ae4444a04ca7dc6f2b6a0a43") version("0.14.1", sha256="ced67e1cf1f97e168cdf271851a4d0b6d382ab7936e7bcbb39aaa87239c324b6") @@ -55,15 +55,14 @@ class PyTorchvision(PythonPackage): # https://github.com/pytorch/vision#installation depends_on("python@3.8:3.11", when="@0.15:", type=("build", "link", "run")) - depends_on("python@3.7:3.10", when="@0.12:0.14", type=("build", "link", "run")) - depends_on("python@3.6:3.9", when="@0.8.2:0.11", type=("build", "link", "run")) - depends_on("python@3.6:3.8", when="@0.7:0.8.1", type=("build", "link", "run")) - depends_on("python@3.5:3.8", when="@0.6", type=("build", "link", "run")) - depends_on("python@2.7,3.5:3.8", when="@0.5", type=("build", "link", "run")) - depends_on("python@2.7,3.5:3.7", when="@:0.4", type=("build", "link", "run")) + depends_on("python@:3.10", when="@0.12:0.14", type=("build", "link", "run")) + depends_on("python@:3.9", when="@0.8.2:0.11", type=("build", "link", "run")) + depends_on("python@:3.8", when="@0.5:0.8.1", type=("build", "link", "run")) + depends_on("python@:3.7", when="@:0.4", type=("build", "link", "run")) # https://github.com/pytorch/vision#installation depends_on("py-torch@main", when="@main", type=("build", "link", "run")) + depends_on("py-torch@2.1.0", when="@0.16.0", type=("build", "link", "run")) depends_on("py-torch@2.0.1", when="@0.15.2", type=("build", "link", "run")) depends_on("py-torch@2.0.0", when="@0.15.1", type=("build", "link", "run")) depends_on("py-torch@1.13.1", when="@0.14.1", type=("build", "link", "run")) From 620835e30c0a0f79879fc20a023d33205e9915f4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 Oct 2023 13:50:22 -0500 Subject: [PATCH 129/806] py-jupyter-packaging: remove duplicate packages (#38671) * py-jupyter-packaging: remove duplicate packages * Allow py-jupyter-packaging to be duplicated in DAG * Deprecate version of py-jupyterlab that requires py-jupyter-packaging at run-time --- .../builtin/packages/py-ipycanvas/package.py | 4 +--- .../builtin/packages/py-ipyevents/package.py | 4 +--- .../builtin/packages/py-ipympl/package.py | 4 +--- .../packages/py-jupyter-packaging/package.py | 2 ++ .../packages/py-jupyter-packaging11/package.py | 18 +++++++++++++++--- .../packages/py-jupyter-packaging7/package.py | 6 +++++- .../py-jupyter-server-mathjax/package.py | 2 +- .../py-jupyter-server-proxy/package.py | 2 +- .../packages/py-jupyter-server/package.py | 4 +--- .../packages/py-jupyterlab-server/package.py | 5 ++--- .../builtin/packages/py-jupyterlab/package.py | 15 ++++++++------- .../builtin/packages/py-jupytext/package.py | 4 +--- .../builtin/packages/py-nbclassic/package.py | 4 +--- .../builtin/packages/py-notebook/package.py | 4 +--- .../packages/py-widgetsnbextension/package.py | 3 +-- 15 files changed, 42 insertions(+), 39 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-ipycanvas/package.py b/var/spack/repos/builtin/packages/py-ipycanvas/package.py index 82f832ac8043e3..d61e222fb47a0d 100644 --- a/var/spack/repos/builtin/packages/py-ipycanvas/package.py +++ b/var/spack/repos/builtin/packages/py-ipycanvas/package.py @@ -17,9 +17,7 @@ class PyIpycanvas(PythonPackage): depends_on("python@3.5:", type=("build", "run")) depends_on("py-setuptools@40.8:", type="build") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging7", type="build") - # depends_on('py-jupyter-packaging@0.7.0:0.7', type='build') + depends_on("py-jupyter-packaging@0.7", type="build") depends_on("py-jupyterlab@3.0:3", type="build") depends_on("py-ipywidgets@7.6:", type=("build", "run")) depends_on("pil@6:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-ipyevents/package.py b/var/spack/repos/builtin/packages/py-ipyevents/package.py index 8f9d717d75e571..042cff2119353b 100644 --- a/var/spack/repos/builtin/packages/py-ipyevents/package.py +++ b/var/spack/repos/builtin/packages/py-ipyevents/package.py @@ -16,8 +16,6 @@ class PyIpyevents(PythonPackage): depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools@40.8:", type="build") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging7", type="build") - # depends_on('py-jupyter-packaging@0.7.0:0.7', type='build') + depends_on("py-jupyter-packaging@0.7", type="build") depends_on("py-jupyterlab@3.0:3", type="build") depends_on("py-ipywidgets@7.6:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-ipympl/package.py b/var/spack/repos/builtin/packages/py-ipympl/package.py index 158345349f4518..56eefb8429f3e6 100644 --- a/var/spack/repos/builtin/packages/py-ipympl/package.py +++ b/var/spack/repos/builtin/packages/py-ipympl/package.py @@ -23,8 +23,6 @@ class PyIpympl(PythonPackage): depends_on("py-traitlets@:5", type=("build", "run")) depends_on("py-ipywidgets@7.6:7", type=("build", "run")) depends_on("py-matplotlib@2:3", type=("build", "run")) - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging7", type="build") - # depends_on('py-jupyter-packaging@0.7', type='build') + depends_on("py-jupyter-packaging@0.7", type="build") depends_on("py-jupyterlab@3", type="build") depends_on("yarn", type="build") diff --git a/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py b/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py index 472d7e6bc93afc..cf333579fd2031 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py @@ -12,6 +12,8 @@ class PyJupyterPackaging(PythonPackage): homepage = "https://github.com/jupyter/jupyter-packaging" pypi = "jupyter_packaging/jupyter_packaging-0.10.4.tar.gz" + tags = ["build-tools"] + version("0.12.0", sha256="b27455d60adc93a7baa2e0b8f386be81b932bb4e3c0116046df9ed230cd3faac") version("0.11.1", sha256="6f5c7eeea98f7f3c8fb41d565a94bf59791768a93f93148b3c2dfb7ebade8eec") version("0.10.6", sha256="a8a2c90bf2e0cae83be63ccb0b7035032a1589f268cc08b1d479e37ce50fc940") diff --git a/var/spack/repos/builtin/packages/py-jupyter-packaging11/package.py b/var/spack/repos/builtin/packages/py-jupyter-packaging11/package.py index c74a7a5231d0a0..b15cfe8752e480 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-packaging11/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-packaging11/package.py @@ -16,9 +16,21 @@ class PyJupyterPackaging11(PythonPackage): homepage = "https://github.com/jupyter/jupyter-packaging" pypi = "jupyter_packaging/jupyter_packaging-0.11.1.tar.gz" - version("0.12.3", sha256="9d9b2b63b97ffd67a8bc5391c32a421bc415b264a32c99e4d8d8dd31daae9cf4") - version("0.12.0", sha256="b27455d60adc93a7baa2e0b8f386be81b932bb4e3c0116046df9ed230cd3faac") - version("0.11.1", sha256="6f5c7eeea98f7f3c8fb41d565a94bf59791768a93f93148b3c2dfb7ebade8eec") + version( + "0.12.3", + sha256="9d9b2b63b97ffd67a8bc5391c32a421bc415b264a32c99e4d8d8dd31daae9cf4", + deprecated=True, + ) + version( + "0.12.0", + sha256="b27455d60adc93a7baa2e0b8f386be81b932bb4e3c0116046df9ed230cd3faac", + deprecated=True, + ) + version( + "0.11.1", + sha256="6f5c7eeea98f7f3c8fb41d565a94bf59791768a93f93148b3c2dfb7ebade8eec", + deprecated=True, + ) depends_on("python@3.7:", type=("build", "run")) depends_on("py-packaging", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jupyter-packaging7/package.py b/var/spack/repos/builtin/packages/py-jupyter-packaging7/package.py index be160db5350ee1..8f0da9b9999cb4 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-packaging7/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-packaging7/package.py @@ -16,7 +16,11 @@ class PyJupyterPackaging7(PythonPackage): homepage = "https://github.com/jupyter/jupyter-packaging" pypi = "jupyter_packaging/jupyter-packaging-0.7.12.tar.gz" - version("0.7.12", sha256="b140325771881a7df7b7f2d14997b619063fe75ae756b9025852e4346000bbb8") + version( + "0.7.12", + sha256="b140325771881a7df7b7f2d14997b619063fe75ae756b9025852e4346000bbb8", + deprecated=True, + ) depends_on("python@3.6:", type=("build", "run")) depends_on("py-packaging", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py index ee2234d14747f5..c86e2f18147c0c 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-server-mathjax/package.py @@ -18,6 +18,6 @@ class PyJupyterServerMathjax(PythonPackage): depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-jupyter-packaging", type="build") - depends_on("py-jupyter-packaging11@:1", when="@0.2.6:", type="build") + depends_on("py-jupyter-packaging@0.10:1", when="@0.2.6:", type="build") depends_on("py-jupyter-server@1.1:1", when="@0.2.3", type=("build", "run")) depends_on("py-jupyter-server@1.1:", when="@0.2.6:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jupyter-server-proxy/package.py b/var/spack/repos/builtin/packages/py-jupyter-server-proxy/package.py index a44d656f773a63..4e111148069580 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-server-proxy/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-server-proxy/package.py @@ -19,7 +19,7 @@ class PyJupyterServerProxy(PythonPackage): version("3.2.2", sha256="54690ea9467035d187c930c599e76065017baf16e118e6eebae0d3a008c4d946") - depends_on("py-jupyter-packaging7@0.7.9:0.7", type="build") + depends_on("py-jupyter-packaging@0.7.9:0.7", type="build") depends_on("py-jupyterlab@3.0:3", type="build") depends_on("py-setuptools@40.8.0:", type="build") diff --git a/var/spack/repos/builtin/packages/py-jupyter-server/package.py b/var/spack/repos/builtin/packages/py-jupyter-server/package.py index 5f371a5403f437..4f461dca212cf3 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-server/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-server/package.py @@ -32,9 +32,7 @@ class PyJupyterServer(PythonPackage): depends_on("py-hatch-jupyter-builder@0.8.1:", when="@2:", type="build") with when("@:1"): - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging11", when="@1.6.2:", type="build") - # depends_on('py-jupyter-packaging@0.9:0', when='@1.6.2:', type='build') + depends_on("py-jupyter-packaging@0.9:0", when="@1.6.2:", type="build") depends_on("py-pre-commit", when="@1.16:", type="build") depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py b/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py index 35e5be5e8e198b..d6791671f645c4 100644 --- a/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py +++ b/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py @@ -24,9 +24,8 @@ class PyJupyterlabServer(PythonPackage): with when("@:2.14"): depends_on("py-setuptools", type="build") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging11", type="build") - # depends_on('py-jupyter-packaging@0.9:0', type='build') + depends_on("py-jupyter-packaging@0.10:1", when="@2.10.3", type="build") + depends_on("py-jupyter-packaging@0.9:0", when="@:2.6", type="build") depends_on("py-babel@2.10:", when="@2.16.4:", type=("build", "run")) depends_on("py-babel", when="@2.5.1:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jupyterlab/package.py b/var/spack/repos/builtin/packages/py-jupyterlab/package.py index 8865713bf5d270..ccacf77c8e8d62 100644 --- a/var/spack/repos/builtin/packages/py-jupyterlab/package.py +++ b/var/spack/repos/builtin/packages/py-jupyterlab/package.py @@ -24,7 +24,11 @@ class PyJupyterlab(PythonPackage): version("3.1.14", sha256="13174cb6076dd5da6f1b85725ccfcc9518d8f98e86b8b644fc89b1dfaeda63a9") version("3.0.18", sha256="0e4bb4b89014607a16658b54f13df2f0af14f3c286109a0e14d5a46cbbe28caf") version("3.0.16", sha256="7ad4fbe1f6d38255869410fd151a8b15692a663ca97c0a8146b3f5c40e275c23") - version("3.0.14", sha256="713a84991dfcca8c0bc260911f1bd54ac25a386a86285713b9555a60f795059b") + version( + "3.0.14", + sha256="713a84991dfcca8c0bc260911f1bd54ac25a386a86285713b9555a60f795059b", + deprecated=True, + ) version("2.2.7", sha256="a72ffd0d919cba03a5ef8422bc92c3332a957ff97b0490494209c83ad93826da") version("2.1.0", sha256="8c239aababf5baa0b3d36e375fddeb9fd96f3a9a24a8cda098d6a414f5bbdc81") @@ -50,12 +54,9 @@ class PyJupyterlab(PythonPackage): with when("@:3"): depends_on("py-setuptools", when="@:3", type=("build", "run")) - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging11", when="@3.0.15:3", type="build") - depends_on("py-jupyter-packaging7", when="@3.0.0:3.0.14", type="build") - # depends_on('py-jupyter-packaging@0.9:0', when='@3.0.15:', type='build') - # depends_on('py-jupyter-packaging@0.7.3:0.7', when='@3.0.0:3.0.14', - # type=('build', 'run')) + depends_on("py-jupyter-packaging@0.9:1", when="@3.4.8", type="build") + depends_on("py-jupyter-packaging@0.9:0", when="@3.0.15:3.4.2", type="build") + depends_on("py-jupyter-packaging@0.7.3:0.7", when="@3.0.0:3.0.14", type=("build", "run")) depends_on("py-pre-commit", when="@3.4:3.4.3", type="build") depends_on("py-ipython", when="@3", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-jupytext/package.py b/var/spack/repos/builtin/packages/py-jupytext/package.py index f9bf4efa8d1219..6491fd575611dc 100644 --- a/var/spack/repos/builtin/packages/py-jupytext/package.py +++ b/var/spack/repos/builtin/packages/py-jupytext/package.py @@ -31,6 +31,4 @@ class PyJupytext(PythonPackage): # todo: in order to use jupytext as a jupyterlab extension, # some additional dependencies need to be added (and checked): depends_on("py-jupyterlab@3", type=("build", "run")) - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging7", type="build") - # depends_on('py-jupyter-packaging@0.7.9:0.7', type='build')``` + depends_on("py-jupyter-packaging@0.7.9:0.7", type="build") diff --git a/var/spack/repos/builtin/packages/py-nbclassic/package.py b/var/spack/repos/builtin/packages/py-nbclassic/package.py index 0f9bf98d9c9465..e46a6cd01e48e4 100644 --- a/var/spack/repos/builtin/packages/py-nbclassic/package.py +++ b/var/spack/repos/builtin/packages/py-nbclassic/package.py @@ -18,9 +18,7 @@ class PyNbclassic(PythonPackage): version("0.3.1", sha256="f920f8d09849bea7950e1017ff3bd101763a8d68f565a51ce053572e65aa7947") depends_on("py-setuptools", type="build") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging11", when="@0.3.3:", type="build") - # depends_on('py-jupyter-packaging@0.9:1', when='@0.3.3:', type='build') + depends_on("py-jupyter-packaging@0.9:0", when="@0.3.3:", type="build") depends_on("py-babel", when="@0.4:", type="build") depends_on("py-jinja2", when="@0.4:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-notebook/package.py b/var/spack/repos/builtin/packages/py-notebook/package.py index 6c3a5a6983eb8d..382c0aa91d2e18 100644 --- a/var/spack/repos/builtin/packages/py-notebook/package.py +++ b/var/spack/repos/builtin/packages/py-notebook/package.py @@ -40,9 +40,7 @@ class PyNotebook(PythonPackage): depends_on("python@3.7:", type=("build", "run"), when="@6.4:") depends_on("python@3.6:", type=("build", "run"), when="@6.3:") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging11", when="@6.4.1:", type="build") - # depends_on('py-jupyter-packaging@0.9:0', when='@6.4.1:', type='build') + depends_on("py-jupyter-packaging@0.9:0", when="@6.4.1:", type="build") depends_on("py-setuptools", when="@5:", type="build") depends_on("py-jinja2", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-widgetsnbextension/package.py b/var/spack/repos/builtin/packages/py-widgetsnbextension/package.py index ba9a0ab5f171ed..ee53aac4e7b5ca 100644 --- a/var/spack/repos/builtin/packages/py-widgetsnbextension/package.py +++ b/var/spack/repos/builtin/packages/py-widgetsnbextension/package.py @@ -20,8 +20,7 @@ class PyWidgetsnbextension(PythonPackage): version("1.2.6", sha256="c618cfb32978c9517caf0b4ef3aec312f8dd138577745e7b0d4abfcc7315ce51") depends_on("py-setuptools", type="build") - # TODO: replace this after concretizer learns how to concretize separate build deps - depends_on("py-jupyter-packaging11", when="@4.0.3:", type="build") + depends_on("py-jupyter-packaging@0.10:0", when="@4.0.3:", type="build") depends_on("python@2.7:2.8,3.3:", type=("build", "run")) depends_on("python@3.7:", when="@4.0.3:", type=("build", "run")) From 390b0aa25c7e086088acf9c9e50fb35a962da02d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 10 Oct 2023 21:09:04 +0200 Subject: [PATCH 130/806] More helpful error when patch lookup fails (#40379) --- lib/spack/spack/patch.py | 20 +++++++++++--------- lib/spack/spack/spec.py | 11 ++++++++++- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index 23a5ee20a86d9d..8b094a7642d634 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -312,21 +312,19 @@ def from_json(cls, stream, repository): def to_json(self, stream): sjson.dump({"patches": self.index}, stream) - def patch_for_package(self, sha256, pkg): + def patch_for_package(self, sha256: str, pkg): """Look up a patch in the index and build a patch object for it. Arguments: - sha256 (str): sha256 hash to look up + sha256: sha256 hash to look up pkg (spack.package_base.PackageBase): Package object to get patch for. We build patch objects lazily because building them requires that - we have information about the package's location in its repo. - - """ + we have information about the package's location in its repo.""" sha_index = self.index.get(sha256) if not sha_index: - raise NoSuchPatchError( - "Couldn't find patch for package %s with sha256: %s" % (pkg.fullname, sha256) + raise PatchLookupError( + f"Couldn't find patch for package {pkg.fullname} with sha256: {sha256}" ) # Find patches for this class or any class it inherits from @@ -335,8 +333,8 @@ def patch_for_package(self, sha256, pkg): if patch_dict: break else: - raise NoSuchPatchError( - "Couldn't find patch for package %s with sha256: %s" % (pkg.fullname, sha256) + raise PatchLookupError( + f"Couldn't find patch for package {pkg.fullname} with sha256: {sha256}" ) # add the sha256 back (we take it out on write to save space, @@ -405,5 +403,9 @@ class NoSuchPatchError(spack.error.SpackError): """Raised when a patch file doesn't exist.""" +class PatchLookupError(NoSuchPatchError): + """Raised when a patch file cannot be located from sha256.""" + + class PatchDirectiveError(spack.error.SpackError): """Raised when the wrong arguments are suppled to the patch directive.""" diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8300e4d8a7fb12..20f7f222270c4b 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -74,6 +74,7 @@ import spack.deptypes as dt import spack.error import spack.hash_types as ht +import spack.patch import spack.paths import spack.platforms import spack.provider_index @@ -3906,7 +3907,15 @@ def patches(self): for sha256 in self.variants["patches"]._patches_in_order_of_appearance: index = spack.repo.PATH.patch_index pkg_cls = spack.repo.PATH.get_pkg_class(self.name) - patch = index.patch_for_package(sha256, pkg_cls) + try: + patch = index.patch_for_package(sha256, pkg_cls) + except spack.patch.PatchLookupError as e: + raise spack.error.SpecError( + f"{e}. This usually means the patch was modified or removed. " + "To fix this, either reconcretize or use the original package " + "repository" + ) from e + self._patches.append(patch) return self._patches From b781a530a1eed2957378e21fa0af906226746c07 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 Oct 2023 15:35:15 -0500 Subject: [PATCH 131/806] GCC: fix build with Apple Clang 15 (#40318) --- var/spack/repos/builtin/packages/gcc/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index f4ce615e7fcf7d..116371cdb272bc 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -783,6 +783,11 @@ def configure_args(self): "--with-as=" + binutils.join("as"), ] ) + elif spec.satisfies("%apple-clang@15:"): + # https://github.com/iains/gcc-darwin-arm64/issues/117 + # https://github.com/iains/gcc-12-branch/issues/22 + # https://github.com/iains/gcc-13-branch/issues/8 + options.append("--with-ld=/Library/Developer/CommandLineTools/usr/bin/ld-classic") # enable_bootstrap if spec.satisfies("+bootstrap"): From 37df8bfc731f074abf51d58732b417fc8cbec5e0 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 10 Oct 2023 14:32:51 -0700 Subject: [PATCH 132/806] e4s arm stack: duplicate and target neoverse v1 (#40369) * e4s arm stack: duplicate and target both neoverse n1, v1 * remove neoverse_n1 target until issue #40397 is resolved --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 24 +++++++++++-------- .../{e4s-arm => e4s-neoverse_v1}/spack.yaml | 6 ++--- 2 files changed, 17 insertions(+), 13 deletions(-) rename share/spack/gitlab/cloud_pipelines/stacks/{e4s-arm => e4s-neoverse_v1}/spack.yaml (98%) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index df2c7f85ca2cca..b5e57e3e8429a6 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -165,6 +165,10 @@ default: extends: [ ".generate-base" ] tags: ["spack", "public", "medium", "aarch64"] +.generate-neoverse_v1: + extends: [ ".generate-base" ] + tags: ["spack", "public", "medium", "aarch64", "graviton3"] + .generate-deprecated: extends: [ ".base-job" ] stage: generate @@ -301,27 +305,27 @@ e4s-build: job: e4s-generate ######################################## -# E4S ARM pipeline +# E4S Neoverse V1 pipeline ######################################## -.e4s-arm: - extends: [ ".linux_aarch64" ] +.e4s-neoverse_v1: + extends: [ ".linux_neoverse_v1" ] variables: - SPACK_CI_STACK_NAME: e4s-arm + SPACK_CI_STACK_NAME: e4s-neoverse_v1 -e4s-arm-generate: - extends: [ ".e4s-arm", ".generate-aarch64" ] +e4s-neoverse_v1-generate: + extends: [ ".e4s-neoverse_v1", ".generate-neoverse_v1" ] image: ghcr.io/spack/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01 -e4s-arm-build: - extends: [ ".e4s-arm", ".build" ] +e4s-neoverse_v1-build: + extends: [ ".e4s-neoverse_v1", ".build" ] trigger: include: - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - job: e4s-arm-generate + job: e4s-neoverse_v1-generate strategy: depend needs: - artifacts: True - job: e4s-arm-generate + job: e4s-neoverse_v1-generate ######################################## # E4S ROCm External pipeline diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml similarity index 98% rename from share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml rename to share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index 02aafd6addd1dc..b4e8114df67f51 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-arm/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -7,7 +7,7 @@ spack: packages: all: - require: '%gcc@11.4.0 target=aarch64' + require: '%gcc@11.4.0 target=neoverse_v1' providers: blas: [openblas] mpi: [mpich] @@ -340,7 +340,7 @@ spack: # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12 # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-arm" } + mirrors: { "mirror": "s3://spack-binaries/develop/e4s-arm-neoverse_v1" } ci: pipeline-gen: @@ -348,4 +348,4 @@ spack: image: "ghcr.io/spack/ubuntu20.04-runner-arm64-gcc-11.4:2023.08.01" cdash: - build-group: E4S ARM + build-group: E4S ARM Neoverse V1 From d385a57da3448e30baf9db34a2487fb70f21b2ab Mon Sep 17 00:00:00 2001 From: Edward Hartnett <38856240+edwardhartnett@users.noreply.github.com> Date: Tue, 10 Oct 2023 16:11:14 -0600 Subject: [PATCH 133/806] w3emc: add v2.11.0 (#40376) * added version 2.11.0 * more fixes --- var/spack/repos/builtin/packages/w3emc/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/w3emc/package.py b/var/spack/repos/builtin/packages/w3emc/package.py index d556f833cef012..335e9caa5e6fa8 100644 --- a/var/spack/repos/builtin/packages/w3emc/package.py +++ b/var/spack/repos/builtin/packages/w3emc/package.py @@ -16,9 +16,10 @@ class W3emc(CMakePackage): url = "https://github.com/NOAA-EMC/NCEPLIBS-w3emc/archive/refs/tags/v2.9.0.tar.gz" git = "https://github.com/NOAA-EMC/NCEPLIBS-w3emc" - maintainers("t-brown", "AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett") + maintainers("AlexanderRichert-NOAA", "Hang-Lei-NOAA", "edwardhartnett") version("develop", branch="develop") + version("2.11.0", sha256="53a03d03421c5da699b026ca220512ed494a531b83284693f66d2579d570c43b") version("2.10.0", sha256="366b55a0425fc3e729ecb9f3b236250349399fe4c8e19f325500463043fd2f18") version("2.9.3", sha256="9ca1b08dd13dfbad4a955257ae0cf38d2e300ccd8d983606212bc982370a29bc") version("2.9.2", sha256="eace811a1365f69b85fdf2bcd93a9d963ba72de5a7111e6fa7c0e6578b69bfbc") @@ -56,7 +57,7 @@ class W3emc(CMakePackage): def setup_run_environment(self, env): if self.spec.satisfies("@:2.9"): - suffixes = ["4", "d", "8"] + suffixes = ("4", "d", "8") shared = False else: suffixes = self.spec.variants["precision"].value @@ -81,3 +82,7 @@ def cmake_args(self): ] return args + + def check(self): + with working_dir(self.builder.build_directory): + make("test") From 1ebfcd3b1846042714ebb830ca4d09e7ed6cad3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Wed, 11 Oct 2023 05:24:17 +0200 Subject: [PATCH 134/806] openvkl: add 1.3.2 (#40392) * openvkl: add 1.3.2 works with (and requires) embree@4 * openvkl: simplify formatting with f-string thank you for the suggestion in the review --- var/spack/repos/builtin/packages/openvkl/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openvkl/package.py b/var/spack/repos/builtin/packages/openvkl/package.py index 69b80f270fc48c..32bbdcafe26c3b 100644 --- a/var/spack/repos/builtin/packages/openvkl/package.py +++ b/var/spack/repos/builtin/packages/openvkl/package.py @@ -16,6 +16,7 @@ class Openvkl(CMakePackage): # maintainers("github_user1", "github_user2") + version("1.3.2", sha256="7704736566bf17497a3e51c067bd575316895fda96eccc682dae4aac7fb07b28") version("1.3.1", sha256="c9cefb6c313f2b4c0331e9629931759a6bc204ec00deed6ec0becad1670a1933") version("1.3.0", sha256="c6d4d40e6d232839c278b53dee1e7bd3bd239c3ccac33f49b465fc65a0692be9") version("1.2.0", sha256="dc468c2f0a359aaa946e04a01c2a6634081f7b6ce31b3c212c74bf7b4b0c9ec2") @@ -24,7 +25,8 @@ class Openvkl(CMakePackage): version("1.0.0", sha256="81ccae679bfa2feefc4d4b1ce72bcd242ba34d2618fbb418a1c2a05d640d16b4") version("0.13.0", sha256="974608259e3a5d8e29d2dfe81c6b2b1830aadeb9bbdc87127f3a7c8631e9f1bd") - depends_on("embree@3.13.0:3") + depends_on("embree@4", when="@1.3.2:") + depends_on("embree@3.13.0:3", when="@:1.3.1") depends_on("embree@3.13.1:", when="@1.0.0:") depends_on("ispc@1.15.0:", type=("build")) depends_on("ispc@1.16.0:", when="@1.0.0:", type=("build")) @@ -32,10 +34,14 @@ class Openvkl(CMakePackage): depends_on("rkcommon@1.6.1:") depends_on("rkcommon@1.7.0:", when="@1.0.0:") depends_on("rkcommon@1.8.0:", when="@1.1:") + depends_on("rkcommon@:1.10.0", when="@:1.3.1") + depends_on("rkcommon@1.11.0:", when="@1.3.2:") depends_on("tbb") def cmake_args(self): args = [ + # otherwise, openvkl 1.3.2 tries to install its headers into /openvkl + self.define("CMAKE_INSTALL_INCLUDEDIR", f"{self.spec.prefix}/include"), self.define("BUILD_BENCHMARKS", False), self.define("BUILD_EXAMPLES", False), self.define("BUILD_TESTING", False), From da030617a1008dc74a960e9af7ca25f8e8072281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Wed, 11 Oct 2023 05:52:51 +0200 Subject: [PATCH 135/806] botan: checksum 3.2.0 (#40417) --- var/spack/repos/builtin/packages/botan/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/botan/package.py b/var/spack/repos/builtin/packages/botan/package.py index 57d1e79975eae8..0967c8b032d7ca 100644 --- a/var/spack/repos/builtin/packages/botan/package.py +++ b/var/spack/repos/builtin/packages/botan/package.py @@ -14,6 +14,7 @@ class Botan(MakefilePackage): maintainers("aumuell") + version("3.2.0", sha256="049c847835fcf6ef3a9e206b33de05dd38999c325e247482772a5598d9e5ece3") version("3.1.1", sha256="30c84fe919936a98fef5331f246c62aa2c0e4d2085b2d4511207f6a20afa3a6b") version("3.1.0", sha256="4e18e755a8bbc6bf96fac916fbf072ecd06740c72a72017c27162e4c0b4725fe") version("3.0.0", sha256="5da552e00fa1c047a90c22eb5f0247ec27e7432b68b78e10a7ce0955269ccad7") From 26f291ef2507f28563f09c7e4b8d5d644074e030 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 11 Oct 2023 13:09:21 +0200 Subject: [PATCH 136/806] spack buildcache: fix a typo in a function call (#40446) fixes #40415 --- lib/spack/spack/cmd/buildcache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 5eb0ea1ed405e8..13e77927add9ad 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -268,7 +268,7 @@ def _matching_specs(specs: List[Spec]) -> List[Spec]: return [spack.cmd.disambiguate_spec(s, ev.active_environment(), installed=any) for s in specs] -def push_fn(args): +def push_fn(args: argparse.Namespace): """create a binary package and push it to a mirror""" if args.spec_file: tty.warn( @@ -414,7 +414,7 @@ def preview_fn(args): ) -def check_fn(args): +def check_fn(args: argparse.Namespace): """check specs against remote binary mirror(s) to see if any need to be rebuilt this command uses the process exit code to indicate its result, specifically, if the @@ -429,7 +429,7 @@ def check_fn(args): specs = spack.cmd.parse_specs(args.spec or args.spec_file) if specs: - specs = _matching_specs(specs, specs) + specs = _matching_specs(specs) else: specs = spack.cmd.require_active_env("buildcache check").all_specs() From 6d1711f4c2cf15ffb04dab99af188802eb8bda77 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 05:35:37 -0700 Subject: [PATCH 137/806] Update legacy `.format()` calls to fstrings in installer.py (#40426) --- lib/spack/spack/installer.py | 284 ++++++++++++++++------------------- 1 file changed, 132 insertions(+), 152 deletions(-) diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 99ab7d45bd412c..51f70341761835 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -131,12 +131,12 @@ def set_term_title(self, text: str): if not sys.stdout.isatty(): return - status = "{0} {1}".format(text, self.get_progress()) - sys.stdout.write("\033]0;Spack: {0}\007".format(status)) + status = f"{text} {self.get_progress()}" + sys.stdout.write(f"\x1b]0;Spack: {status}\x07") sys.stdout.flush() def get_progress(self) -> str: - return "[{0}/{1}]".format(self.pkg_num, self.pkg_count) + return f"[{self.pkg_num}/{self.pkg_count}]" class TermStatusLine: @@ -175,7 +175,7 @@ def clear(self): # Move the cursor to the beginning of the first "Waiting for" message and clear # everything after it. - sys.stdout.write("\x1b[%sF\x1b[J" % lines) + sys.stdout.write(f"\x1b[{lines}F\x1b[J") sys.stdout.flush() @@ -220,14 +220,13 @@ def _handle_external_and_upstream(pkg: "spack.package_base.PackageBase", explici # consists in module file generation and registration in the DB. if pkg.spec.external: _process_external_package(pkg, explicit) - _print_installed_pkg("{0} (external {1})".format(pkg.prefix, package_id(pkg))) + _print_installed_pkg(f"{pkg.prefix} (external {package_id(pkg)})") return True if pkg.spec.installed_upstream: tty.verbose( - "{0} is installed in an upstream Spack instance at {1}".format( - package_id(pkg), pkg.spec.prefix - ) + f"{package_id(pkg)} is installed in an upstream Spack instance at " + f"{pkg.spec.prefix}" ) _print_installed_pkg(pkg.prefix) @@ -296,7 +295,7 @@ def _packages_needed_to_bootstrap_compiler( package is the bootstrap compiler (``True``) or one of its dependencies (``False``). The list will be empty if there are no compilers. """ - tty.debug("Bootstrapping {0} compiler".format(compiler)) + tty.debug(f"Bootstrapping {compiler} compiler") compilers = spack.compilers.compilers_for_spec(compiler, arch_spec=architecture) if compilers: return [] @@ -305,9 +304,9 @@ def _packages_needed_to_bootstrap_compiler( # Set the architecture for the compiler package in a way that allows the # concretizer to back off if needed for the older bootstrapping compiler - dep.constrain("platform=%s" % str(architecture.platform)) - dep.constrain("os=%s" % str(architecture.os)) - dep.constrain("target=%s:" % architecture.target.microarchitecture.family.name) + dep.constrain(f"platform={str(architecture.platform)}") + dep.constrain(f"os={str(architecture.os)}") + dep.constrain(f"target={architecture.target.microarchitecture.family.name}:") # concrete CompilerSpec has less info than concrete Spec # concretize as Spec to add that information dep.concretize() @@ -340,15 +339,15 @@ def _hms(seconds: int) -> str: if m: parts.append("%dm" % m) if s: - parts.append("%.2fs" % s) + parts.append(f"{s:.2f}s") return " ".join(parts) def _log_prefix(pkg_name) -> str: """Prefix of the form "[pid]: [pkg name]: ..." when printing a status update during the build.""" - pid = "{0}: ".format(os.getpid()) if tty.show_pid() else "" - return "{0}{1}:".format(pid, pkg_name) + pid = f"{os.getpid()}: " if tty.show_pid() else "" + return f"{pid}{pkg_name}:" def _print_installed_pkg(message: str) -> None: @@ -375,9 +374,9 @@ def print_install_test_log(pkg: "spack.package_base.PackageBase") -> None: def _print_timer(pre: str, pkg_id: str, timer: timer.BaseTimer) -> None: - phases = ["{}: {}.".format(p.capitalize(), _hms(timer.duration(p))) for p in timer.phases] - phases.append("Total: {}".format(_hms(timer.duration()))) - tty.msg("{0} Successfully installed {1}".format(pre, pkg_id), " ".join(phases)) + phases = [f"{p.capitalize()}: {_hms(timer.duration(p))}." for p in timer.phases] + phases.append(f"Total: {_hms(timer.duration())}") + tty.msg(f"{pre} Successfully installed {pkg_id}", " ".join(phases)) def _install_from_cache( @@ -402,14 +401,14 @@ def _install_from_cache( ) pkg_id = package_id(pkg) if not installed_from_cache: - pre = "No binary for {0} found".format(pkg_id) + pre = f"No binary for {pkg_id} found" if cache_only: - tty.die("{0} when cache-only specified".format(pre)) + tty.die(f"{pre} when cache-only specified") - tty.msg("{0}: installing from source".format(pre)) + tty.msg(f"{pre}: installing from source") return False t.stop() - tty.debug("Successfully extracted {0} from binary cache".format(pkg_id)) + tty.debug(f"Successfully extracted {pkg_id} from binary cache") _write_timer_json(pkg, t, True) _print_timer(pre=_log_prefix(pkg.name), pkg_id=pkg_id, timer=t) @@ -430,19 +429,19 @@ def _process_external_package(pkg: "spack.package_base.PackageBase", explicit: b """ assert pkg.spec.external, "Expected to post-install/register an external package." - pre = "{s.name}@{s.version} :".format(s=pkg.spec) + pre = f"{pkg.spec.name}@{pkg.spec.version} :" spec = pkg.spec if spec.external_modules: - tty.msg("{0} has external module in {1}".format(pre, spec.external_modules)) - tty.debug("{0} is actually installed in {1}".format(pre, spec.external_path)) + tty.msg(f"{pre} has external module in {spec.external_modules}") + tty.debug(f"{pre} is actually installed in {spec.external_path}") else: - tty.debug("{0} externally installed in {1}".format(pre, spec.external_path)) + tty.debug(f"{pre} externally installed in {spec.external_path}") try: # Check if the package was already registered in the DB. # If this is the case, then only make explicit if required. - tty.debug("{0} already registered in DB".format(pre)) + tty.debug(f"{pre} already registered in DB") record = spack.store.STORE.db.get_record(spec) if explicit and not record.explicit: spack.store.STORE.db.update_explicit(spec, explicit) @@ -451,11 +450,11 @@ def _process_external_package(pkg: "spack.package_base.PackageBase", explicit: b # If not, register it and generate the module file. # For external packages we just need to run # post-install hooks to generate module files. - tty.debug("{0} generating module file".format(pre)) + tty.debug(f"{pre} generating module file") spack.hooks.post_install(spec, explicit) # Add to the DB - tty.debug("{0} registering into DB".format(pre)) + tty.debug(f"{pre} registering into DB") spack.store.STORE.db.add(spec, None, explicit=explicit) @@ -490,7 +489,7 @@ def _process_binary_cache_tarball( if download_result is None: return False - tty.msg("Extracting {0} from binary cache".format(package_id(pkg))) + tty.msg(f"Extracting {package_id(pkg)} from binary cache") with timer.measure("install"), spack.util.path.filter_padding(): binary_distribution.extract_tarball( @@ -522,7 +521,7 @@ def _try_install_from_binary_cache( if not spack.mirror.MirrorCollection(binary=True): return False - tty.debug("Searching for binary cache of {0}".format(package_id(pkg))) + tty.debug(f"Searching for binary cache of {package_id(pkg)}") with timer.measure("search"): matches = binary_distribution.get_mirrors_for_spec(pkg.spec, index_only=True) @@ -590,9 +589,9 @@ def dump_packages(spec: "spack.spec.Spec", path: str) -> None: source_repo = spack.repo.Repo(source_repo_root) source_pkg_dir = source_repo.dirname_for_package_name(node.name) except spack.repo.RepoError as err: - tty.debug("Failed to create source repo for {0}: {1}".format(node.name, str(err))) + tty.debug(f"Failed to create source repo for {node.name}: {str(err)}") source_pkg_dir = None - tty.warn("Warning: Couldn't copy in provenance for {0}".format(node.name)) + tty.warn(f"Warning: Couldn't copy in provenance for {node.name}") # Create a destination repository dest_repo_root = os.path.join(path, node.namespace) @@ -632,7 +631,7 @@ def install_msg(name: str, pid: int, install_status: InstallStatus) -> str: Return: Colorized installing message """ - pre = "{0}: ".format(pid) if tty.show_pid() else "" + pre = f"{pid}: " if tty.show_pid() else "" post = ( " @*{%s}" % install_status.get_progress() if install_status and spack.config.get("config:install_status", True) @@ -698,7 +697,7 @@ def log(pkg: "spack.package_base.PackageBase") -> None: # in the stage tree (not arbitrary files) abs_expr = os.path.realpath(glob_expr) if os.path.realpath(pkg.stage.path) not in abs_expr: - errors.write("[OUTSIDE SOURCE PATH]: {0}\n".format(glob_expr)) + errors.write(f"[OUTSIDE SOURCE PATH]: {glob_expr}\n") continue # Now that we are sure that the path is within the correct # folder, make it relative and check for matches @@ -718,14 +717,14 @@ def log(pkg: "spack.package_base.PackageBase") -> None: # Here try to be conservative, and avoid discarding # the whole install procedure because of copying a # single file failed - errors.write("[FAILED TO ARCHIVE]: {0}".format(f)) + errors.write(f"[FAILED TO ARCHIVE]: {f}") if errors.getvalue(): error_file = os.path.join(target_dir, "errors.txt") fs.mkdirp(target_dir) with open(error_file, "w") as err: err.write(errors.getvalue()) - tty.warn("Errors occurred when archiving files.\n\t" "See: {0}".format(error_file)) + tty.warn(f"Errors occurred when archiving files.\n\tSee: {error_file}") dump_packages(pkg.spec, packages_dir) @@ -761,11 +760,11 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict): """ # Ensure dealing with a package that has a concrete spec if not isinstance(pkg, spack.package_base.PackageBase): - raise ValueError("{0} must be a package".format(str(pkg))) + raise ValueError(f"{str(pkg)} must be a package") self.pkg = pkg if not self.pkg.spec.concrete: - raise ValueError("{0} must have a concrete spec".format(self.pkg.name)) + raise ValueError(f"{self.pkg.name} must have a concrete spec") # Cache the package phase options with the explicit package, # popping the options to ensure installation of associated @@ -797,14 +796,14 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict): def __repr__(self) -> str: """Returns a formal representation of the build request.""" - rep = "{0}(".format(self.__class__.__name__) + rep = f"{self.__class__.__name__}(" for attr, value in self.__dict__.items(): - rep += "{0}={1}, ".format(attr, value.__repr__()) - return "{0})".format(rep.strip(", ")) + rep += f"{attr}={value.__repr__()}, " + return f"{rep.strip(', ')})" def __str__(self) -> str: """Returns a printable version of the build request.""" - return "package={0}, install_args={1}".format(self.pkg.name, self.install_args) + return f"package={self.pkg.name}, install_args={self.install_args}" def _add_default_args(self) -> None: """Ensure standard install options are set to at least the default.""" @@ -930,18 +929,18 @@ def __init__( # Ensure dealing with a package that has a concrete spec if not isinstance(pkg, spack.package_base.PackageBase): - raise ValueError("{0} must be a package".format(str(pkg))) + raise ValueError(f"{str(pkg)} must be a package") self.pkg = pkg if not self.pkg.spec.concrete: - raise ValueError("{0} must have a concrete spec".format(self.pkg.name)) + raise ValueError(f"{self.pkg.name} must have a concrete spec") # The "unique" identifier for the task's package self.pkg_id = package_id(self.pkg) # The explicit build request associated with the package if not isinstance(request, BuildRequest): - raise ValueError("{0} must have a build request".format(str(pkg))) + raise ValueError(f"{str(pkg)} must have a build request") self.request = request @@ -949,8 +948,9 @@ def __init__( # ensure priority queue invariants when tasks are "removed" from the # queue. if status == STATUS_REMOVED: - msg = "Cannot create a build task for {0} with status '{1}'" - raise InstallError(msg.format(self.pkg_id, status), pkg=pkg) + raise InstallError( + f"Cannot create a build task for {self.pkg_id} with status '{status}'", pkg=pkg + ) self.status = status @@ -964,9 +964,9 @@ def __init__( # to support tracking of parallel, multi-spec, environment installs. self.dependents = set(get_dependent_ids(self.pkg.spec)) - tty.debug("Pkg id {0} has the following dependents:".format(self.pkg_id)) + tty.debug(f"Pkg id {self.pkg_id} has the following dependents:") for dep_id in self.dependents: - tty.debug("- {0}".format(dep_id)) + tty.debug(f"- {dep_id}") # Set of dependencies # @@ -988,9 +988,9 @@ def __init__( if not spack.compilers.compilers_for_spec(compiler_spec, arch_spec=arch_spec): # The compiler is in the queue, identify it as dependency dep = spack.compilers.pkg_spec_for_compiler(compiler_spec) - dep.constrain("platform=%s" % str(arch_spec.platform)) - dep.constrain("os=%s" % str(arch_spec.os)) - dep.constrain("target=%s:" % arch_spec.target.microarchitecture.family.name) + dep.constrain(f"platform={str(arch_spec.platform)}") + dep.constrain(f"os={str(arch_spec.os)}") + dep.constrain(f"target={arch_spec.target.microarchitecture.family.name}:") dep.concretize() dep_id = package_id(dep.package) self.dependencies.add(dep_id) @@ -1026,14 +1026,14 @@ def __ne__(self, other): def __repr__(self) -> str: """Returns a formal representation of the build task.""" - rep = "{0}(".format(self.__class__.__name__) + rep = f"{self.__class__.__name__}(" for attr, value in self.__dict__.items(): - rep += "{0}={1}, ".format(attr, value.__repr__()) - return "{0})".format(rep.strip(", ")) + rep += f"{attr}={value.__repr__()}, " + return f"{rep.strip(', ')})" def __str__(self) -> str: """Returns a printable version of the build task.""" - dependencies = "#dependencies={0}".format(len(self.dependencies)) + dependencies = f"#dependencies={len(self.dependencies)}" return "priority={0}, status={1}, start={2}, {3}".format( self.priority, self.status, self.start, dependencies ) @@ -1056,7 +1056,7 @@ def add_dependent(self, pkg_id: str) -> None: pkg_id: package identifier of the dependent package """ if pkg_id != self.pkg_id and pkg_id not in self.dependents: - tty.debug("Adding {0} as a dependent of {1}".format(pkg_id, self.pkg_id)) + tty.debug(f"Adding {pkg_id} as a dependent of {self.pkg_id}") self.dependents.add(pkg_id) def flag_installed(self, installed: List[str]) -> None: @@ -1070,9 +1070,8 @@ def flag_installed(self, installed: List[str]) -> None: for pkg_id in now_installed: self.uninstalled_deps.remove(pkg_id) tty.debug( - "{0}: Removed {1} from uninstalled deps list: {2}".format( - self.pkg_id, pkg_id, self.uninstalled_deps - ), + f"{self.pkg_id}: Removed {pkg_id} from uninstalled deps list: " + f"{self.uninstalled_deps}", level=2, ) @@ -1170,18 +1169,18 @@ def __init__(self, installs: List[Tuple["spack.package_base.PackageBase", dict]] def __repr__(self) -> str: """Returns a formal representation of the package installer.""" - rep = "{0}(".format(self.__class__.__name__) + rep = f"{self.__class__.__name__}(" for attr, value in self.__dict__.items(): - rep += "{0}={1}, ".format(attr, value.__repr__()) - return "{0})".format(rep.strip(", ")) + rep += f"{attr}={value.__repr__()}, " + return f"{rep.strip(', ')})" def __str__(self) -> str: """Returns a printable version of the package installer.""" - requests = "#requests={0}".format(len(self.build_requests)) - tasks = "#tasks={0}".format(len(self.build_tasks)) - failed = "failed ({0}) = {1}".format(len(self.failed), self.failed) - installed = "installed ({0}) = {1}".format(len(self.installed), self.installed) - return "{0}: {1}; {2}; {3}; {4}".format(self.pid, requests, tasks, installed, failed) + requests = f"#requests={len(self.build_requests)}" + tasks = f"#tasks={len(self.build_tasks)}" + failed = f"failed ({len(self.failed)}) = {self.failed}" + installed = f"installed ({len(self.installed)}) = {self.installed}" + return f"{self.pid}: {requests}; {tasks}; {installed}; {failed}" def _add_bootstrap_compilers( self, @@ -1226,9 +1225,7 @@ def _modify_existing_task(self, pkgid: str, attr, value) -> None: for i, tup in enumerate(self.build_pq): key, task = tup if task.pkg_id == pkgid: - tty.debug( - "Modifying task for {0} to treat it as a compiler".format(pkgid), level=2 - ) + tty.debug(f"Modifying task for {pkgid} to treat it as a compiler", level=2) setattr(task, attr, value) self.build_pq[i] = (key, task) @@ -1293,7 +1290,7 @@ def _check_deps_status(self, request: BuildRequest) -> None: # Check for failure since a prefix lock is not required if spack.store.STORE.failure_tracker.has_failed(dep): action = "'spack install' the dependency" - msg = "{0} is marked as an install failure: {1}".format(dep_id, action) + msg = f"{dep_id} is marked as an install failure: {action}" raise InstallError(err.format(request.pkg_id, msg), pkg=dep_pkg) # Attempt to get a read lock to ensure another process does not @@ -1301,7 +1298,7 @@ def _check_deps_status(self, request: BuildRequest) -> None: # installed ltype, lock = self._ensure_locked("read", dep_pkg) if lock is None: - msg = "{0} is write locked by another process".format(dep_id) + msg = f"{dep_id} is write locked by another process" raise InstallError(err.format(request.pkg_id, msg), pkg=request.pkg) # Flag external and upstream packages as being installed @@ -1320,7 +1317,7 @@ def _check_deps_status(self, request: BuildRequest) -> None: or rec.installation_time > request.overwrite_time ) ): - tty.debug("Flagging {0} as installed per the database".format(dep_id)) + tty.debug(f"Flagging {dep_id} as installed per the database") self._flag_installed(dep_pkg) else: lock.release_read() @@ -1356,9 +1353,9 @@ def _prepare_for_install(self, task: BuildTask) -> None: # Ensure there is no other installed spec with the same prefix dir if spack.store.STORE.db.is_occupied_install_prefix(task.pkg.spec.prefix): raise InstallError( - "Install prefix collision for {0}".format(task.pkg_id), - long_msg="Prefix directory {0} already used by another " - "installed spec.".format(task.pkg.spec.prefix), + f"Install prefix collision for {task.pkg_id}", + long_msg=f"Prefix directory {task.pkg.spec.prefix} already " + "used by another installed spec.", pkg=task.pkg, ) @@ -1368,7 +1365,7 @@ def _prepare_for_install(self, task: BuildTask) -> None: if not keep_prefix: task.pkg.remove_prefix() else: - tty.debug("{0} is partially installed".format(task.pkg_id)) + tty.debug(f"{task.pkg_id} is partially installed") # Destroy the stage for a locally installed, non-DIYStage, package if restage and task.pkg.stage.managed_by_spack: @@ -1413,9 +1410,8 @@ def _cleanup_failed(self, pkg_id: str) -> None: lock = self.failed.get(pkg_id, None) if lock is not None: err = "{0} exception when removing failure tracking for {1}: {2}" - msg = "Removing failure mark on {0}" try: - tty.verbose(msg.format(pkg_id)) + tty.verbose(f"Removing failure mark on {pkg_id}") lock.release_write() except Exception as exc: tty.warn(err.format(exc.__class__.__name__, pkg_id, str(exc))) @@ -1442,19 +1438,19 @@ def _ensure_install_ready(self, pkg: "spack.package_base.PackageBase") -> None: pkg: the package being locally installed """ pkg_id = package_id(pkg) - pre = "{0} cannot be installed locally:".format(pkg_id) + pre = f"{pkg_id} cannot be installed locally:" # External packages cannot be installed locally. if pkg.spec.external: - raise ExternalPackageError("{0} {1}".format(pre, "is external")) + raise ExternalPackageError(f"{pre} is external") # Upstream packages cannot be installed locally. if pkg.spec.installed_upstream: - raise UpstreamPackageError("{0} {1}".format(pre, "is upstream")) + raise UpstreamPackageError(f"{pre} is upstream") # The package must have a prefix lock at this stage. if pkg_id not in self.locks: - raise InstallLockError("{0} {1}".format(pre, "not locked")) + raise InstallLockError(f"{pre} not locked") def _ensure_locked( self, lock_type: str, pkg: "spack.package_base.PackageBase" @@ -1481,14 +1477,14 @@ def _ensure_locked( assert lock_type in [ "read", "write", - ], '"{0}" is not a supported package management lock type'.format(lock_type) + ], f'"{lock_type}" is not a supported package management lock type' pkg_id = package_id(pkg) ltype, lock = self.locks.get(pkg_id, (lock_type, None)) if lock and ltype == lock_type: return ltype, lock - desc = "{0} lock".format(lock_type) + desc = f"{lock_type} lock" msg = "{0} a {1} on {2} with timeout {3}" err = "Failed to {0} a {1} for {2} due to {3}: {4}" @@ -1507,11 +1503,7 @@ def _ensure_locked( op = "acquire" lock = spack.store.STORE.prefix_locker.lock(pkg.spec, timeout) if timeout != lock.default_timeout: - tty.warn( - "Expected prefix lock timeout {0}, not {1}".format( - timeout, lock.default_timeout - ) - ) + tty.warn(f"Expected prefix lock timeout {timeout}, not {lock.default_timeout}") if lock_type == "read": lock.acquire_read() else: @@ -1536,7 +1528,7 @@ def _ensure_locked( tty.debug(msg.format("Upgrading to", desc, pkg_id, pretty_seconds(timeout or 0))) op = "upgrade to" lock.upgrade_read_to_write(timeout) - tty.debug("{0} is now {1} locked".format(pkg_id, lock_type)) + tty.debug(f"{pkg_id} is now {lock_type} locked") except (lk.LockDowngradeError, lk.LockTimeoutError) as exc: tty.debug(err.format(op, desc, pkg_id, exc.__class__.__name__, str(exc))) @@ -1561,14 +1553,14 @@ def _add_tasks(self, request: BuildRequest, all_deps): all_deps (defaultdict(set)): dictionary of all dependencies and associated dependents """ - tty.debug("Initializing the build queue for {0}".format(request.pkg.name)) + tty.debug(f"Initializing the build queue for {request.pkg.name}") # Ensure not attempting to perform an installation when user didn't # want to go that far for the requested package. try: _check_last_phase(request.pkg) except BadInstallPhase as err: - tty.warn("Installation request refused: {0}".format(str(err))) + tty.warn(f"Installation request refused: {str(err)}") return # Skip out early if the spec is not being installed locally (i.e., if @@ -1719,9 +1711,9 @@ def _install_task(self, task: BuildTask, install_status: InstallStatus) -> None: # A StopPhase exception means that do_install was asked to # stop early from clients, and is not an error at this point spack.hooks.on_install_failure(task.request.pkg.spec) - pid = "{0}: ".format(self.pid) if tty.show_pid() else "" - tty.debug("{0}{1}".format(pid, str(e))) - tty.debug("Package stage directory: {0}".format(pkg.stage.source_path)) + pid = f"{self.pid}: " if tty.show_pid() else "" + tty.debug(f"{pid}{str(e)}") + tty.debug(f"Package stage directory: {pkg.stage.source_path}") def _next_is_pri0(self) -> bool: """ @@ -1816,7 +1808,7 @@ def _remove_task(self, pkg_id: str) -> Optional[BuildTask]: pkg_id: identifier for the package to be removed """ if pkg_id in self.build_tasks: - tty.debug("Removing build task for {0} from list".format(pkg_id)) + tty.debug(f"Removing build task for {pkg_id} from list") task = self.build_tasks.pop(pkg_id) task.status = STATUS_REMOVED return task @@ -1832,10 +1824,8 @@ def _requeue_task(self, task: BuildTask, install_status: InstallStatus) -> None: """ if task.status not in [STATUS_INSTALLED, STATUS_INSTALLING]: tty.debug( - "{0} {1}".format( - install_msg(task.pkg_id, self.pid, install_status), - "in progress by another process", - ) + f"{install_msg(task.pkg_id, self.pid, install_status)} " + "in progress by another process" ) new_task = task.next_attempt(self.installed) @@ -1852,7 +1842,7 @@ def _setup_install_dir(self, pkg: "spack.package_base.PackageBase") -> None: """ if not os.path.exists(pkg.spec.prefix): path = spack.util.path.debug_padded_filter(pkg.spec.prefix) - tty.debug("Creating the installation directory {0}".format(path)) + tty.debug(f"Creating the installation directory {path}") spack.store.STORE.layout.create_install_directory(pkg.spec) else: # Set the proper group for the prefix @@ -1888,8 +1878,8 @@ def _update_failed( exc: optional exception if associated with the failure """ pkg_id = task.pkg_id - err = "" if exc is None else ": {0}".format(str(exc)) - tty.debug("Flagging {0} as failed{1}".format(pkg_id, err)) + err = "" if exc is None else f": {str(exc)}" + tty.debug(f"Flagging {pkg_id} as failed{err}") if mark: self.failed[pkg_id] = spack.store.STORE.failure_tracker.mark(task.pkg.spec) else: @@ -1898,14 +1888,14 @@ def _update_failed( for dep_id in task.dependents: if dep_id in self.build_tasks: - tty.warn("Skipping build of {0} since {1} failed".format(dep_id, pkg_id)) + tty.warn(f"Skipping build of {dep_id} since {pkg_id} failed") # Ensure the dependent's uninstalled dependents are # up-to-date and their build tasks removed. dep_task = self.build_tasks[dep_id] self._update_failed(dep_task, mark) self._remove_task(dep_id) else: - tty.debug("No build task for {0} to skip since {1} failed".format(dep_id, pkg_id)) + tty.debug(f"No build task for {dep_id} to skip since {pkg_id} failed") def _update_installed(self, task: BuildTask) -> None: """ @@ -1935,23 +1925,21 @@ def _flag_installed( # Already determined the package has been installed return - tty.debug("Flagging {0} as installed".format(pkg_id)) + tty.debug(f"Flagging {pkg_id} as installed") self.installed.add(pkg_id) # Update affected dependents dependent_ids = dependent_ids or get_dependent_ids(pkg.spec) for dep_id in set(dependent_ids): - tty.debug("Removing {0} from {1}'s uninstalled dependencies.".format(pkg_id, dep_id)) + tty.debug(f"Removing {pkg_id} from {dep_id}'s uninstalled dependencies.") if dep_id in self.build_tasks: # Ensure the dependent's uninstalled dependencies are # up-to-date. This will require requeueing the task. dep_task = self.build_tasks[dep_id] self._push_task(dep_task.next_attempt(self.installed)) else: - tty.debug( - "{0} has no build task to update for {1}'s success".format(dep_id, pkg_id) - ) + tty.debug(f"{dep_id} has no build task to update for {pkg_id}'s success") def _init_queue(self) -> None: """Initialize the build queue from the list of build requests.""" @@ -2032,8 +2020,8 @@ def install(self) -> None: pkg, pkg_id, spec = task.pkg, task.pkg_id, task.pkg.spec install_status.next_pkg(pkg) - install_status.set_term_title("Processing {0}".format(pkg.name)) - tty.debug("Processing {0}: task={1}".format(pkg_id, task)) + install_status.set_term_title(f"Processing {pkg.name}") + tty.debug(f"Processing {pkg_id}: task={task}") # Ensure that the current spec has NO uninstalled dependencies, # which is assumed to be reflected directly in its priority. # @@ -2045,24 +2033,19 @@ def install(self) -> None: if task.priority != 0: term_status.clear() tty.error( - "Detected uninstalled dependencies for {0}: {1}".format( - pkg_id, task.uninstalled_deps - ) + f"Detected uninstalled dependencies for {pkg_id}: " f"{task.uninstalled_deps}" ) left = [dep_id for dep_id in task.uninstalled_deps if dep_id not in self.installed] if not left: - tty.warn( - "{0} does NOT actually have any uninstalled deps" " left".format(pkg_id) - ) + tty.warn(f"{pkg_id} does NOT actually have any uninstalled deps left") dep_str = "dependencies" if task.priority > 1 else "dependency" # Hook to indicate task failure, but without an exception spack.hooks.on_install_failure(task.request.pkg.spec) raise InstallError( - "Cannot proceed with {0}: {1} uninstalled {2}: {3}".format( - pkg_id, task.priority, dep_str, ",".join(task.uninstalled_deps) - ), + f"Cannot proceed with {pkg_id}: {task.priority} uninstalled " + f"{dep_str}: {','.join(task.uninstalled_deps)}", pkg=pkg, ) @@ -2079,7 +2062,7 @@ def install(self) -> None: # assume using a separate (failed) prefix lock file. if pkg_id in self.failed or spack.store.STORE.failure_tracker.has_failed(spec): term_status.clear() - tty.warn("{0} failed to install".format(pkg_id)) + tty.warn(f"{pkg_id} failed to install") self._update_failed(task) # Mark that the package failed @@ -2096,7 +2079,7 @@ def install(self) -> None: # another process is likely (un)installing the spec or has # determined the spec has already been installed (though the # other process may be hung). - install_status.set_term_title("Acquiring lock for {0}".format(pkg.name)) + install_status.set_term_title(f"Acquiring lock for {pkg.name}") term_status.add(pkg_id) ltype, lock = self._ensure_locked("write", pkg) if lock is None: @@ -2119,7 +2102,7 @@ def install(self) -> None: task.request.overwrite_time = time.time() # Determine state of installation artifacts and adjust accordingly. - install_status.set_term_title("Preparing {0}".format(pkg.name)) + install_status.set_term_title(f"Preparing {pkg.name}") self._prepare_for_install(task) # Flag an already installed package @@ -2165,7 +2148,7 @@ def install(self) -> None: # Proceed with the installation since we have an exclusive write # lock on the package. - install_status.set_term_title("Installing {0}".format(pkg.name)) + install_status.set_term_title(f"Installing {pkg.name}") try: action = self._install_action(task) @@ -2186,8 +2169,9 @@ def install(self) -> None: except KeyboardInterrupt as exc: # The build has been terminated with a Ctrl-C so terminate # regardless of the number of remaining specs. - err = "Failed to install {0} due to {1}: {2}" - tty.error(err.format(pkg.name, exc.__class__.__name__, str(exc))) + tty.error( + f"Failed to install {pkg.name} due to " f"{exc.__class__.__name__}: {str(exc)}" + ) spack.hooks.on_install_cancel(task.request.pkg.spec) raise @@ -2196,9 +2180,10 @@ def install(self) -> None: raise # Checking hash on downloaded binary failed. - err = "Failed to install {0} from binary cache due to {1}:" - err += " Requeueing to install from source." - tty.error(err.format(pkg.name, str(exc))) + tty.error( + f"Failed to install {pkg.name} from binary cache due " + f"to {str(exc)}: Requeueing to install from source." + ) # this overrides a full method, which is ugly. task.use_cache = False # type: ignore[misc] self._requeue_task(task, install_status) @@ -2216,13 +2201,12 @@ def install(self) -> None: # lower levels -- skip printing if already printed. # TODO: sort out this and SpackError.print_context() tty.error( - "Failed to install {0} due to {1}: {2}".format( - pkg.name, exc.__class__.__name__, str(exc) - ) + f"Failed to install {pkg.name} due to " + f"{exc.__class__.__name__}: {str(exc)}" ) # Terminate if requested to do so on the first failure. if self.fail_fast: - raise InstallError("{0}: {1}".format(fail_fast_err, str(exc)), pkg=pkg) + raise InstallError(f"{fail_fast_err}: {str(exc)}", pkg=pkg) # Terminate at this point if the single explicit spec has # failed to install. @@ -2261,17 +2245,17 @@ def install(self) -> None: if failed_explicits or missing: for _, pkg_id, err in failed_explicits: - tty.error("{0}: {1}".format(pkg_id, err)) + tty.error(f"{pkg_id}: {err}") for _, pkg_id in missing: - tty.error("{0}: Package was not installed".format(pkg_id)) + tty.error(f"{pkg_id}: Package was not installed") if len(failed_explicits) > 0: pkg = failed_explicits[0][0] ids = [pkg_id for _, pkg_id, _ in failed_explicits] tty.debug( "Associating installation failure with first failed " - "explicit package ({0}) from {1}".format(ids[0], ", ".join(ids)) + f"explicit package ({ids[0]}) from {', '.join(ids)}" ) elif len(missing) > 0: @@ -2279,7 +2263,7 @@ def install(self) -> None: ids = [pkg_id for _, pkg_id in missing] tty.debug( "Associating installation failure with first " - "missing package ({0}) from {1}".format(ids[0], ", ".join(ids)) + f"missing package ({ids[0]}) from {', '.join(ids)}" ) raise InstallError( @@ -2357,7 +2341,7 @@ def run(self) -> bool: self.timer.stop("stage") tty.debug( - "{0} Building {1} [{2}]".format(self.pre, self.pkg_id, self.pkg.build_system_class) # type: ignore[attr-defined] # noqa: E501 + f"{self.pre} Building {self.pkg_id} [{self.pkg.build_system_class}]" # type: ignore[attr-defined] # noqa: E501 ) # get verbosity from do_install() parameter or saved value @@ -2402,7 +2386,7 @@ def _install_source(self) -> None: return src_target = os.path.join(pkg.spec.prefix, "share", pkg.name, "src") - tty.debug("{0} Copying source to {1}".format(self.pre, src_target)) + tty.debug(f"{self.pre} Copying source to {src_target}") fs.install_tree( pkg.stage.source_path, src_target, allow_broken_symlinks=(sys.platform != "win32") @@ -2464,8 +2448,7 @@ def _real_install(self) -> None: with logger.force_echo(): inner_debug_level = tty.debug_level() tty.set_debug(debug_level) - msg = "{0} Executing phase: '{1}'" - tty.msg(msg.format(self.pre, phase_fn.name)) + tty.msg(f"{self.pre} Executing phase: '{phase_fn.name}'") tty.set_debug(inner_debug_level) # Catch any errors to report to logging @@ -2539,12 +2522,9 @@ def install(self): except fs.CouldNotRestoreDirectoryBackup as e: self.database.remove(self.task.pkg.spec) tty.error( - "Recovery of install dir of {0} failed due to " - "{1}: {2}. The spec is now uninstalled.".format( - self.task.pkg.name, - e.outer_exception.__class__.__name__, - str(e.outer_exception), - ) + f"Recovery of install dir of {self.task.pkg.name} failed due to " + f"{e.outer_exception.__class__.__name__}: {str(e.outer_exception)}. " + "The spec is now uninstalled." ) # Unwrap the actual installation exception. @@ -2567,7 +2547,7 @@ class BadInstallPhase(InstallError): """Raised for an install phase option is not allowed for a package.""" def __init__(self, pkg_name, phase): - super().__init__("'{0}' is not a valid phase for package {1}".format(phase, pkg_name)) + super().__init__(f"'{phase}' is not a valid phase for package {pkg_name}") class ExternalPackageError(InstallError): From e3b71b32aa1290978b2f4a5eec762a9418c5b922 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 12:35:41 +0000 Subject: [PATCH 138/806] build(deps): bump mypy from 1.5.1 to 1.6.0 in /lib/spack/docs (#40424) Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.0. - [Commits](https://github.com/python/mypy/compare/v1.5.1...v1.6.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 4744d1339c062d..6d95f1d40d1ff2 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -10,4 +10,4 @@ pytest==7.4.2 isort==5.12.0 black==23.9.1 flake8==6.1.0 -mypy==1.5.1 +mypy==1.6.0 From 26136c337ffaa381cf4bf23301131c8b023aa0b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 06:35:51 -0600 Subject: [PATCH 139/806] build(deps): bump mypy from 1.5.1 to 1.6.0 in /.github/workflows/style (#40422) Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.0. - [Commits](https://github.com/python/mypy/compare/v1.5.1...v1.6.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt index ea8a7c40cfdf24..125c3559afe877 100644 --- a/.github/workflows/style/requirements.txt +++ b/.github/workflows/style/requirements.txt @@ -2,6 +2,6 @@ black==23.9.1 clingo==5.6.2 flake8==6.1.0 isort==5.12.0 -mypy==1.5.1 +mypy==1.6.0 types-six==1.16.21.9 vermin==1.5.2 From 1ab88866952e8dc73be7c93dcdcc3cb5965fda10 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:56:59 +0200 Subject: [PATCH 140/806] qt-base: fix-build without opengl (#40421) --- var/spack/repos/builtin/packages/qt-base/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index 7818313f45b623..f3fcfc0eed7193 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -235,6 +235,9 @@ def define_feature(key, variant=None): for k in features: define("FEATURE_" + k, True) + if "~opengl" in spec: + args.append(self.define("INPUT_opengl", "no")) + # INPUT_* arguments: undefined/no/qt/system sys_inputs = ["doubleconversion"] if "+sql" in spec: From 65e7ec0509a2191b0a323730e280bba8bd30395b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 11 Oct 2023 17:49:50 +0200 Subject: [PATCH 141/806] spider: respect tag (#40443) --- lib/spack/spack/util/web.py | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index eca7bd72a2ba1f..57158db950e917 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -110,19 +110,28 @@ def handle_starttag(self, tag, attrs): self.links.append(val) -class IncludeFragmentParser(HTMLParser): +class ExtractMetadataParser(HTMLParser): """This parser takes an HTML page and selects the include-fragments, - used on GitHub, https://github.github.io/include-fragment-element.""" + used on GitHub, https://github.github.io/include-fragment-element, + as well as a possible base url.""" def __init__(self): super().__init__() - self.links = [] + self.fragments = [] + self.base_url = None def handle_starttag(self, tag, attrs): + # if tag == "include-fragment": for attr, val in attrs: if attr == "src": - self.links.append(val) + self.fragments.append(val) + + # + elif tag == "base": + for attr, val in attrs: + if attr == "href": + self.base_url = val def read_from_url(url, accept_content_type=None): @@ -625,12 +634,15 @@ def _spider(url: urllib.parse.ParseResult, collect_nested: bool, _visited: Set[s # Parse out the include-fragments in the page # https://github.github.io/include-fragment-element - include_fragment_parser = IncludeFragmentParser() - include_fragment_parser.feed(page) + metadata_parser = ExtractMetadataParser() + metadata_parser.feed(page) + + # Change of base URL due to tag + response_url = metadata_parser.base_url or response_url fragments = set() - while include_fragment_parser.links: - raw_link = include_fragment_parser.links.pop() + while metadata_parser.fragments: + raw_link = metadata_parser.fragments.pop() abs_link = url_util.join(response_url, raw_link.strip(), resolve_href=True) try: From 861bb4d35a804be350dc576480ceef0323938580 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 11 Oct 2023 19:03:17 +0200 Subject: [PATCH 142/806] Update bootstrap buildcache to support Python 3.12 (#40404) * Add support for Python 3.12 * Use optimized build of clingo --- .github/workflows/bootstrap.yml | 14 +- .github/workflows/unit_tests.yaml | 8 +- etc/spack/defaults/bootstrap.yaml | 6 +- lib/spack/spack/bootstrap/core.py | 2 +- lib/spack/spack/spec.py | 4 +- lib/spack/spack/test/cmd/bootstrap.py | 2 +- .../spack/test/data/config/bootstrap.yaml | 2 +- .../bootstrap/github-actions-v0.3/clingo.json | 268 ------------ .../bootstrap/github-actions-v0.3/gnupg.json | 204 --------- .../bootstrap/github-actions-v0.5/clingo.json | 389 ++++++++++++++++++ .../bootstrap/github-actions-v0.5/gnupg.json | 254 ++++++++++++ .../metadata.yaml | 2 +- .../patchelf.json | 12 +- 13 files changed, 672 insertions(+), 495 deletions(-) delete mode 100644 share/spack/bootstrap/github-actions-v0.3/clingo.json delete mode 100644 share/spack/bootstrap/github-actions-v0.3/gnupg.json create mode 100644 share/spack/bootstrap/github-actions-v0.5/clingo.json create mode 100644 share/spack/bootstrap/github-actions-v0.5/gnupg.json rename share/spack/bootstrap/{github-actions-v0.3 => github-actions-v0.5}/metadata.yaml (83%) rename share/spack/bootstrap/{github-actions-v0.3 => github-actions-v0.5}/patchelf.json (56%) diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index fdfcf0fd57ed70..ab98e83f4ccebf 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -42,8 +42,8 @@ jobs: shell: runuser -u spack-test -- bash {0} run: | source share/spack/setup-env.sh + spack bootstrap disable github-actions-v0.5 spack bootstrap disable github-actions-v0.4 - spack bootstrap disable github-actions-v0.3 spack external find cmake bison spack -d solve zlib tree ~/.spack/bootstrap/store/ @@ -80,8 +80,8 @@ jobs: shell: runuser -u spack-test -- bash {0} run: | source share/spack/setup-env.sh + spack bootstrap disable github-actions-v0.5 spack bootstrap disable github-actions-v0.4 - spack bootstrap disable github-actions-v0.3 spack external find cmake bison spack -d solve zlib tree ~/.spack/bootstrap/store/ @@ -145,8 +145,8 @@ jobs: - name: Bootstrap clingo run: | source share/spack/setup-env.sh + spack bootstrap disable github-actions-v0.5 spack bootstrap disable github-actions-v0.4 - spack bootstrap disable github-actions-v0.3 spack external find cmake bison spack -d solve zlib tree ~/.spack/bootstrap/store/ @@ -163,8 +163,8 @@ jobs: run: | source share/spack/setup-env.sh export PATH=/usr/local/opt/bison@2.7/bin:$PATH + spack bootstrap disable github-actions-v0.5 spack bootstrap disable github-actions-v0.4 - spack bootstrap disable github-actions-v0.3 spack external find --not-buildable cmake bison spack -d solve zlib tree ~/.spack/bootstrap/store/ @@ -265,6 +265,7 @@ jobs: shell: runuser -u spack-test -- bash {0} run: | source share/spack/setup-env.sh + spack bootstrap disable github-actions-v0.4 spack bootstrap disable spack-install spack -d gpg list tree ~/.spack/bootstrap/store/ @@ -302,8 +303,8 @@ jobs: run: | source share/spack/setup-env.sh spack solve zlib + spack bootstrap disable github-actions-v0.5 spack bootstrap disable github-actions-v0.4 - spack bootstrap disable github-actions-v0.3 spack -d gpg list tree ~/.spack/bootstrap/store/ @@ -320,6 +321,7 @@ jobs: - name: Bootstrap GnuPG run: | source share/spack/setup-env.sh + spack bootstrap disable github-actions-v0.4 spack bootstrap disable spack-install spack -d gpg list tree ~/.spack/bootstrap/store/ @@ -338,8 +340,8 @@ jobs: run: | source share/spack/setup-env.sh spack solve zlib + spack bootstrap disable github-actions-v0.5 spack bootstrap disable github-actions-v0.4 - spack bootstrap disable github-actions-v0.3 spack -d gpg list tree ~/.spack/bootstrap/store/ diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index e82531677dfc1d..4e1d909f025848 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] concretizer: ['clingo'] on_develop: - ${{ github.ref == 'refs/heads/develop' }} @@ -45,6 +45,10 @@ jobs: os: ubuntu-latest concretizer: 'clingo' on_develop: false + - python-version: '3.11' + os: ubuntu-latest + concretizer: 'clingo' + on_develop: false steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 @@ -185,7 +189,7 @@ jobs: runs-on: macos-latest strategy: matrix: - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 with: diff --git a/etc/spack/defaults/bootstrap.yaml b/etc/spack/defaults/bootstrap.yaml index 464994d171e4b3..6f2dbe171c5f60 100644 --- a/etc/spack/defaults/bootstrap.yaml +++ b/etc/spack/defaults/bootstrap.yaml @@ -9,15 +9,15 @@ bootstrap: # may not be able to bootstrap all the software that Spack needs, # depending on its type. sources: + - name: 'github-actions-v0.5' + metadata: $spack/share/spack/bootstrap/github-actions-v0.5 - name: 'github-actions-v0.4' metadata: $spack/share/spack/bootstrap/github-actions-v0.4 - - name: 'github-actions-v0.3' - metadata: $spack/share/spack/bootstrap/github-actions-v0.3 - name: 'spack-install' metadata: $spack/share/spack/bootstrap/spack-install trusted: # By default we trust bootstrapping from sources and from binaries # produced on Github via the workflow + github-actions-v0.5: true github-actions-v0.4: true - github-actions-v0.3: true spack-install: true diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index 606e80d6d86224..4b7807e47bba23 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -228,7 +228,7 @@ def _install_and_test( if not abstract_spec.intersects(candidate_spec): continue - if python_spec is not None and python_spec not in abstract_spec: + if python_spec is not None and not abstract_spec.intersects(f"^{python_spec}"): continue for _, pkg_hash, pkg_sha256 in item["binaries"]: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 20f7f222270c4b..08576419f0d416 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3672,7 +3672,7 @@ def _autospec(self, spec_like): return spec_like return Spec(spec_like) - def intersects(self, other: "Spec", deps: bool = True) -> bool: + def intersects(self, other: Union[str, "Spec"], deps: bool = True) -> bool: """Return True if there exists at least one concrete spec that matches both self and other, otherwise False. @@ -3795,7 +3795,7 @@ def _intersects_dependencies(self, other): return True - def satisfies(self, other: "Spec", deps: bool = True) -> bool: + def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool: """Return True if all concrete specs matching self also match other, otherwise False. Args: diff --git a/lib/spack/spack/test/cmd/bootstrap.py b/lib/spack/spack/test/cmd/bootstrap.py index eff9bf042d5481..277a279222b8d7 100644 --- a/lib/spack/spack/test/cmd/bootstrap.py +++ b/lib/spack/spack/test/cmd/bootstrap.py @@ -169,7 +169,7 @@ def test_remove_and_add_a_source(mutable_config): assert not sources # Add it back and check we restored the initial state - _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.3") + _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.5") sources = spack.bootstrap.core.bootstrapping_sources() assert len(sources) == 1 diff --git a/lib/spack/spack/test/data/config/bootstrap.yaml b/lib/spack/spack/test/data/config/bootstrap.yaml index 6adb7ab9967e78..4757b8729d23a8 100644 --- a/lib/spack/spack/test/data/config/bootstrap.yaml +++ b/lib/spack/spack/test/data/config/bootstrap.yaml @@ -1,5 +1,5 @@ bootstrap: sources: - name: 'github-actions' - metadata: $spack/share/spack/bootstrap/github-actions-v0.3 + metadata: $spack/share/spack/bootstrap/github-actions-v0.5 trusted: {} diff --git a/share/spack/bootstrap/github-actions-v0.3/clingo.json b/share/spack/bootstrap/github-actions-v0.3/clingo.json deleted file mode 100644 index 60e771221df3dd..00000000000000 --- a/share/spack/bootstrap/github-actions-v0.3/clingo.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "verified": [ - { - "binaries": [ - [ - "clingo-bootstrap", - "i5rx6vbyw7cyg3snajcpnuozo7l3lcab", - "c55d1c76adb82ac9fbe67725641ef7e4fe1ae11e2e8da0dc93a3efe362549127" - ] - ], - "python": "python@3.10", - "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "xoxkdgo3n332ewhbh7pz2zuevrjxkrke", - "b50e2fba026e85af3f99b3c412b4f0c88ec2fbce15b48eeb75072f1d3737f3cc" - ] - ], - "python": "python@3.5", - "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "sgmirxbu3bpn4rdpfs6jlyycfrkfxl5i", - "b0a574df6f5d59491a685a31a8ed99fb345c850a91df62ef232fbe0cca716ed1" - ] - ], - "python": "python@3.6", - "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "5hn7hszlizeqq3leqi6lrdmyy5ssv6zs", - "36e24bc3bd27b125fdeb30d51d2554e44288877c0ce6df5a878bb4e8a1d5847a" - ] - ], - "python": "python@3.7", - "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "qk3ecxakadq4naakng6mhdfkwauef3dn", - "9d974c0d2b546d18f0ec35e08d5ba114bf2867f7ff7c7ea990b79d019ece6380" - ] - ], - "python": "python@3.8", - "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "2omdsvzshkn2u3l5vwvwoey4es5cowfu", - "cbf72eb932ac847f87b1640f8e70e26f5261967288f7d6db19206ef352e36a88" - ] - ], - "python": "python@3.9", - "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "ifgzrctoh2ibrmitp6ushrvrnaeqtkr7", - "1c609df7351286fe09aa3452fa7ed7fedf903e9fa12cde89b916a0fc4c022949" - ] - ], - "python": "python@3.10", - "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "esfzjhodgh5be22hvh3trg2ojzrmhzwt", - "8d070cdb2a5103cde3e6f873b1eb11d25f60464f3059d8643f943e5c9a9ec76c" - ] - ], - "python": "python@3.6", - "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "5b4uhkhrvtvdmsnctjx2isrxciy6v2o2", - "336b8b1202a8a28a0e34a98e5780ae0e2b2370b342ce67434551009b1a7c8db9" - ] - ], - "python": "python@3.7", - "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "czapgrrey6llnsu2m4qaamv3so2lybxm", - "16bdfe4b08ee8da38f3e2c7d5cc44a38d87696cc2b6de0971a4de25efb8ad8e4" - ] - ], - "python": "python@3.8", - "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "7za6vsetahbghs4d2qe4ajtf2iyiacwx", - "730ae7e6096ec8b83a0fc9464dda62bd6c2fec1f8565bb291f4d1ffe7746703b" - ] - ], - "python": "python@3.9", - "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "zulnxrmchldtasffqw6qacmgg4y2qumj", - "8988325db53c0c650f64372c21571ac85e9ba4577975d14ae7dba8ab7728b5fc" - ] - ], - "python": "python@3.10", - "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "lx54ebqzwtjpfgch7kagoxkmul56z7fa", - "81d64229299e76f9dc81f88d286bc94725e7cbcbb29ad0d66aaeaff73dd6473a" - ] - ], - "python": "python@3.6", - "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "isu2rjoicl4xzmbl3k2c4bg35gvejkgz", - "fcc4b052832cfd327d11f657c2b7715d981b0894ed03bbce18b23a842c7d706d" - ] - ], - "python": "python@3.7", - "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "ob3k3g2wjy7cw33lfobjar44sqmojyth", - "f51fd6256bfd3afc8470614d87df61e5c9dd582fcc70f707ca66ba2b7255da12" - ] - ], - "python": "python@3.8", - "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "norpsmparkl5dfuzdqj4537o77vjbgsl", - "477c041857b60f29ff9d6c7d2982b7eb49a2e02ebbc98af11488c32e2fb24081" - ] - ], - "python": "python@3.9", - "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "gypv5loj2ml73duq6sr76yg5rj25te2m", - "c855d7d32aadec37c41e51f19b83558b32bc0b946a9565dba0e659c6820bd6c3" - ] - ], - "python": "python@2.7+ucs4", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "rjopyx7hum3hqhgsdyw3st7frdfgrv3p", - "0e555f9bc99b4e4152939b30b2257f4f353941d152659e716bf6123c0ce11a60" - ] - ], - "python": "python@2.7~ucs4", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "2l45t4kw3cqqwj6vbxhfwhzlo6b3q2p4", - "6cb90de5a3d123b7408cfef693a9a78bb69c66abbfed746c1e85aa0acb848d03" - ] - ], - "python": "python@3.10", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "4psiezojm7dexequtbnav77wvgcajigq", - "b3fc33b5482357613294becb54968bd74de638abeae69e27c6c4319046a7e352" - ] - ], - "python": "python@3.5", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "dzhvhynye4z7oalowdcy5zt25lej3m2n", - "61c5f3e80bcc7acfc65e335f1910762df2cc5ded9d7e1e5977380a24de553dd7" - ] - ], - "python": "python@3.6", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "dtwevigmwgke4g6ee5byktpmzmrp2kvx", - "636937244b58611ec2eedb4422a1076fcaf09f3998593befb5a6ff1a74e1d5f7" - ] - ], - "python": "python@3.7", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "shqedxgvjnhiwdcdrvjhbd73jaevv7wt", - "b3615b2a94a8a15fddaa74cf4d9f9b3a516467a843cdeab597f72dcf6be5e31d" - ] - ], - "python": "python@3.8", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - }, - { - "binaries": [ - [ - "clingo-bootstrap", - "z6v6zvc6awioeompbvo735b4flr3yuyz", - "1389192bd74c1f7059d95c4a41500201cbc2905cbba553678613e0b7e3b96c71" - ] - ], - "python": "python@3.9", - "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" - } - ] -} \ No newline at end of file diff --git a/share/spack/bootstrap/github-actions-v0.3/gnupg.json b/share/spack/bootstrap/github-actions-v0.3/gnupg.json deleted file mode 100644 index 2f568297892227..00000000000000 --- a/share/spack/bootstrap/github-actions-v0.3/gnupg.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "verified": [ - { - "binaries": [ - [ - "libiconv", - "d6dhoguolmllbzy2h6pnvjm3tti6uy6f", - "7fe765a87945991d4e57782ed67c4bf42a10f95582eecd6f57de80a545bde821" - ], - [ - "npth", - "x6fb7zx6n7mos5knvi6wlnaadd7r2szx", - "fd1e5a62107339f45219c32ba20b5e82aa0880c31ac86d1b245d388ca4546990" - ], - [ - "zlib", - "c5wm3jilx6zsers3sfgdisjqusoza4wr", - "7500a717c62736872aa65df4599f797ef67b21086dd6236b4c7712cfffac9bf3" - ], - [ - "libassuan", - "3qv4bprobfwes37clg764cfipdzjdbto", - "d85cd9d2c63a296300d4dcbd667421956df241109daef5e12d3ca63fa241cb14" - ], - [ - "libgcrypt", - "3y4ubdgxvgpvhxr3bk4l5mkw4gv42n7e", - "9dad7c2635344957c4db68378964d3af84ea052d45dbe8ded9a6e6e47211daa8" - ], - [ - "libgpg-error", - "doido34kfwsvwpj4c4jcocahjb5ltebw", - "20e5c238bee91d2a841f0b4bd0358ded59a0bd665d7f251fd9cd42f83e0b283b" - ], - [ - "libksba", - "mttecm7gzdv544lbzcoahchnboxysrvi", - "1c0ae64e828a597e4cf15dd997c66cd677e41f68c63db09b9551480a197052a2" - ], - [ - "pinentry", - "se7xgv7yf4ywpjnbv7voxgeuuvs77ahb", - "2fd13fbee7ca2361dc5dd09708c72d0489611301b60635cb0206bc5b94add884" - ], - [ - "gnupg", - "yannph34bpaqkhsv5mz2icwhy3epiqxd", - "1de8b4e119fa3455d0170466fa0fb8e04957fab740aec32535b4667279312b3f" - ] - ], - "spec": "gnupg@2.3: %apple-clang platform=darwin target=x86_64" - }, - { - "binaries": [ - [ - "zlib", - "t2hjzsyf3txkg64e4bq3nihe26rzzdws", - "171e720840a28af50b62141be77bc525e666cffd1fbbe2ee62673214e8b0280f" - ], - [ - "libiconv", - "yjdji2wj4njz72fyrg46jlz5f5wfbhfr", - "94c773c3d0294cf248ec1f3e9862669dfa743fe1a76de580d9425c14c8f7dcd2" - ], - [ - "npth", - "kx3vzmpysee7jxwsudarthrmyop6hzgc", - "f8cc6204fa449ce576d450396ec2cad40a75d5712c1381a61ed1681a54f9c79f" - ], - [ - "libassuan", - "e5n5l5ftzwxs4ego5furrdbegphb6hxp", - "ef0428874aa81bcb9944deed88e1fc639f629fe3d522cab3c281235ae2a53db9" - ], - [ - "libgcrypt", - "wyncpahrpqsmpk4b7nlhg5ekkjzyjdzs", - "2309548c51a17f580f036445b701feb85d2bc552b9c4404418c2f223666cfe3b" - ], - [ - "libgpg-error", - "vhcdd6jkbiday2seg3rlkbzpf6jzfdx7", - "79dd719538d9223d6287c0bba07b981944ab6d3ab11e5060274f1b7c727daf55" - ], - [ - "libksba", - "azcgpgncynoox3dce45hkz46bp2tb5rr", - "15d301f201a5162234261fcfccd579b0ff484131444a0b6f5c0006224bb155d6" - ], - [ - "pinentry", - "e3z5ekbv4jlsie4qooubcfvsk2sb6t7l", - "5fd27b8e47934b06554e84f1374a90a93e71e60a14dbde672a8da414b27b97f4" - ], - [ - "gnupg", - "i5agfvsmzdokuooaqhlh6vro5giwei2t", - "f1bde7a1f0c84c1bbcde5757a96cf7a3e9157c2cfa9907fde799aa8e04c0d51f" - ] - ], - "spec": "gnupg@2.3: %gcc platform=linux target=aarch64" - }, - { - "binaries": [ - [ - "zlib", - "v5rr6ba37tudzfuv2jszwikgcl4wd3cd", - "371ad4b277af7b97c7871b9931f2764c97362620c7990c5ad8fdb5c42a1d30dc" - ], - [ - "libiconv", - "bvcnx2e4bumjcgya4dczdhjb3fhqyass", - "65a00b717b3a4ee1b5ab9f84163722bdfea8eb20a2eecc9cf657c0eaac0227e9" - ], - [ - "npth", - "dkb6ez6a4c3iyrv67llwf5mzmynqdmtj", - "4d77351661d0e0130b1c89fb6c6a944aee41d701ef80d056d3fc0178a7f36075" - ], - [ - "libassuan", - "tuydcxdbb5jfvw3gri7y24b233kgotgd", - "d8775e7c1dd252437c6fa0781675b1d2202cfc0c8190e60d248928b6fca8bc9f" - ], - [ - "libgcrypt", - "kgxmg4eukwx6nn3bdera3j7cf7hxfy6n", - "6046523f10ed54be50b0211c27191b3422886984fc0c00aed1a85d1f121c42e6" - ], - [ - "libgpg-error", - "ewhrwnltlrzkpqyix2vbkf4ruq6b6ea3", - "3f3bbbf1a3cb82d39313e39bcbe3dad94a176130fc0e9a8045417d6223fb4f31" - ], - [ - "libksba", - "onxt5ry2fotgwiognwmhxlgnekuvtviq", - "3a4df13f8b880441d1df4b234a4ca01de7601d84a6627185c2b3191a34445d40" - ], - [ - "pinentry", - "fm3m4rsszzxxakcpssd34jbbe4ihrhac", - "73afa46176a7ec8f02d01a2caad3e400dc18c3c8a53f92b88a9aa9e3653db3e6" - ], - [ - "gnupg", - "gwr65ovh4wbxjgniaoqlbt3yla6rdikj", - "7a3f7afe69ca67797a339c04028ca45a9630933020b57cb56e28453197fe8a57" - ] - ], - "spec": "gnupg@2.3: %gcc platform=linux target=ppc64le" - }, - { - "binaries": [ - [ - "libiconv", - "vec3ac6t4ag3lb7ycvisafthqmpci74b", - "35d184218e525d8aaea60082fd2d0f1e80449ec32746cceda2ea0ca106e9a095" - ], - [ - "npth", - "jx3kmy3ilc66rgg5mqtbed5z6qwt3vrd", - "74c2c1b087667661da3e24ac83bcecf1bc2d10d69e7678d1fd232875fe295135" - ], - [ - "zlib", - "wnpbp4pu7xca24goggcy773d2y4pobbd", - "bcbd5310e8c5e75cbf33d8155448b212486dc543469d6df7e56dcecb6112ee88" - ], - [ - "libassuan", - "ynn33wutdtoo2lbjjoizgslintxst2zl", - "ac3b060690c6da0c64dcf35da047b84cc81793118fb9ff29b993f3fb9efdc258" - ], - [ - "libgcrypt", - "zzofcjer43vsxwj27c3rxapjxhsz4hlx", - "4b1977d815f657c2d6af540ea4b4ce80838cadcf4ada72a8ba142a7441e571ea" - ], - [ - "libgpg-error", - "gzr2ucybgks5jquvf4lv7iprxq5vx5le", - "a12ecb5cfd083a29d042fd309ebb5ab8fd4ace0b68b27f89b857e9a84d75b5be" - ], - [ - "libksba", - "hw4u4pam6mp3henpw476axtqaahfdy64", - "5424caf98a2d48e0ed0b9134353c242328ebeef6d2b31808d58969165e809b47" - ], - [ - "pinentry", - "hffsjitsewdgoijwgzvub6vpjwm33ywr", - "8ed7504b5b2d13ab7e1f4a0e27a882c33c5a6ebfcb43c51269333c0d6d5e1448" - ], - [ - "gnupg", - "lge4h2kjgvssyspnvutq6t3q2xual5oc", - "6080ce00fcc24185e4051a30f6d52982f86f46eee6d8a2dc4d83ab08d8195be8" - ] - ], - "spec": "gnupg@2.3: %gcc platform=linux target=x86_64" - } - ] -} \ No newline at end of file diff --git a/share/spack/bootstrap/github-actions-v0.5/clingo.json b/share/spack/bootstrap/github-actions-v0.5/clingo.json new file mode 100644 index 00000000000000..822875a6123338 --- /dev/null +++ b/share/spack/bootstrap/github-actions-v0.5/clingo.json @@ -0,0 +1,389 @@ +{ + "verified": [ + { + "binaries": [ + [ + "clingo-bootstrap", + "riu2vekwzrloc3fktlf6v7kwv6fja7lp", + "7527bc4d2d75671162fe0db3de04c5d3e1e6ab7991dfd85442c302c698febb45" + ] + ], + "python": "python@3.10.13", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "sgf6pgn4ihfcbxutxhevp36n3orfpdkw", + "958531adcb449094bca7703f8f08d0f55a18f9a4c0f10a175ae4190d20982891" + ] + ], + "python": "python@3.11.5", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "ie4wlhhnb4snroymbnjksajwvoid6omx", + "4af14c3375a211ead3d2b4a31b59683744adcb79b820cc0c6b168ab162a7d983" + ] + ], + "python": "python@3.12.0", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "5ke32podcipzxxwrj6uzm324bxegbwca", + "a4106c42ee68d07c3d954ab73fe305ca4204f44d90b58fd91a8f784d9b96e7e3" + ] + ], + "python": "python@3.6", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "scu4cnnf5axmjgozqc7cccpqnj5nc5tj", + "54de4ca141b92222c8f1729e9e336c8a71dad9efa641e76438fcfb79bb58fc7f" + ] + ], + "python": "python@3.7.17", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "ajbswc25irhmhbc4qibdcr6ohsvpcdku", + "8b9e7af163a4259256eca4b4a1a92b5d95463a5cf467be2a11c64ab536ca5b04" + ] + ], + "python": "python@3.8.18", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "vwkuxa5z4pj7vviwsmrpw2r6kbbqej2p", + "a3f10024ff859e15b79ccd06c970a5f0e6ba11b0eae423f096ec9a35863816d2" + ] + ], + "python": "python@3.9.18", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "attdjmyzpfnhoobadw55pgg4hwkyp7zk", + "f3258af3a648b47f12285dd3f048b685ed652b2b55b53861ac9913926de0f1c3" + ] + ], + "python": "python@3.10", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "w4vnbsxjgkhsmgwozudzcsqlvccjsec4", + "19322c2c951fc80234963ac068c78442df57ac63055325b24a39ab705d27a5b9" + ] + ], + "python": "python@3.11", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "dw7ez2xcx6e5dxo3n4jin7pdbo3ihwtw", + "c368edda4b3c8fd767f5f0f098ea416864b088c767dc43135df49cf5f6ef4c93" + ] + ], + "python": "python@3.12", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "audrlxaw3ny3kyjkf6kqywumhokcxh3p", + "db2f44966ec104ffe57c0911f0b1e0d3d052753f4c46c30c0890dfb26d547b09" + ] + ], + "python": "python@3.6", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "al7brxvvvhih5nlxvtfkavufqc3pe5t2", + "4e09b6d50d42c898e075fd20f7c7eddf91cb80edfd2d1326d26fd779e4d1ffed" + ] + ], + "python": "python@3.7", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "v3ctpkyogl542wjibng6m2h2426spjbb", + "d9ceb4f9ca23ef1dcc33872e5410ccfef6ea0360247d3e8faedf1751fb1ae4ca" + ] + ], + "python": "python@3.8", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "zxo5ih5ac6r7lj6miwyx36ot7s6a4dcw", + "f8f5e124d0e7bada34ff687a05e80b2fe207ce4d26205dab09b144edb148f05e" + ] + ], + "python": "python@3.9", + "spec": "clingo-bootstrap%apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "wki4qcy3wzpoxav3auxt2u7yb4sk3xcc", + "f5b9251eb51c60a71f7a0359c252f48c1a1121c426e1e6f9181808c626cb5fef" + ] + ], + "python": "python@3.10.13", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "gun6hbksmsecau5wjyrmxodq4hxievzx", + "28839ec43db444d6725bde3fcff99adadf61a392d967041fb16f0ffc0afa2f9d" + ] + ], + "python": "python@3.11.5", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "er73owosuqfmmkxvuw3f7sqnvvj6s4xp", + "99264d48c290256bf16e202c155bf3f8c88fdbbe9894d901344d0db7258abce3" + ] + ], + "python": "python@3.12.0", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "kv6l7qttuzk7zxkxi5fhff52qso3pj7m", + "59aa052e89d3c698fdd35e30ac21a896c8e49bbcc2f589a8f777bd5dafff2af7" + ] + ], + "python": "python@3.6", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "uw5o2z753otspa3lmmy2bdodh5munkir", + "7a8b6359ce83463541ff68c221296fe9875adf28ea2b2c1416229750cf4935d2" + ] + ], + "python": "python@3.7.17", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "d63pp2l453bfygh6q7afwdj5mw7lhsns", + "425bef3a8605732b2fbe74cdd77ef6a359cbdb62800490bbd05620a57da35b0c" + ] + ], + "python": "python@3.8.18", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "nap44jiznzwlma6n75uxbpznppazs7av", + "316d940ca9af8c6b3bc50f8fdaadba02b0e955c4f24345a63a1a6715b01a752c" + ] + ], + "python": "python@3.9.18", + "spec": "clingo-bootstrap%gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "qhvnw4yowmk2tofg3u7a4uomisktgzw5", + "d30ec81385377521dd2d1ac091546cc2dec6a852ad31f35c24c65919f94fbf64" + ] + ], + "python": "python@3.10.13", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "b3y37ryfuhjq6ljbkq7piglsafg5stgw", + "3c2f9cca3a6d37685fdf7d7dffb7a0505336c32562715069004631c446e46a7c" + ] + ], + "python": "python@3.11.5", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "dbloojtq5kcfd3pjmj4pislgpzrcvjpn", + "f8aeba80e6c106b769adba164702db94e077255fe1a22d6d265ccc3172b4ab1a" + ] + ], + "python": "python@3.12.0", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "gtlngzdb7iggcjmaottob54qi3b24blt", + "3efc534ba293ee51156971b8c19a597ebcb237b003c98e3c215a49a88064dfd1" + ] + ], + "python": "python@3.6", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "4ab4wobwa7bvhlkrmhdp2dwgtcq5rpzo", + "3dc6539a989701ec1d83d644a79953af912c11fe6046a8d720970faf8e477991" + ] + ], + "python": "python@3.7.17", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "fgout3h4mt4i64xaovqrpcsdy3ly2aml", + "ade67f0623e941b16f2dd531270b4863de8befd56a9a47bd87af85345bc8bed6" + ] + ], + "python": "python@3.8.18", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "5fv2q4agg4b4g53f4zhnymrbv6ogiwpy", + "18047d48538a770f014cce73756258c1a320d4ac143abef3c5d8bc09dd7a03cc" + ] + ], + "python": "python@3.9.18", + "spec": "clingo-bootstrap%gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "smkmkb5xqz4v2f7tl22g4e2ghamglox5", + "a850c80c7a48dab506f807cc936b9e54e6f5640fe96543ff58281c046140f112" + ] + ], + "python": "python@3.10.13", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "55qeu52pkt5shpwd7ulugv7wzt5j7vqd", + "e5e1a10b3b2d543b1555f5caef9ac1a9ccdcddb36a1278d3bf68bf0e9f490626" + ] + ], + "python": "python@3.11.5", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "zcw5ieomfwwpzpzpabetix2plfqzpvwd", + "ed409165109488d13afe8ef12edd3b373ed08967903dc802889523b5d3bccd14" + ] + ], + "python": "python@3.12.0", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "t4yf34cuvquqp5xd66zybmcfyhwbdlsf", + "b14e26e86bcfdac98b3a55109996265683f32910d3452e034ddc0d328bf62d67" + ] + ], + "python": "python@3.6", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "grkrpj76lxsxa753uzndwfmrj3pwvyhp", + "11a535d4a8a9dbb18c2f995e10bc90b27b6ebc61f7ac2090f15db9b4f9be1a64" + ] + ], + "python": "python@3.7.17", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "zowwoarrf3hvo6i3iereolfujr42iyro", + "154d3a725f02c1775644d99a0b74f9e2cdf6736989a264ccfd5d9a8bce77a16b" + ] + ], + "python": "python@3.8.18", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + }, + { + "binaries": [ + [ + "clingo-bootstrap", + "bhqgwuvef354fwuxq7heeighavunpber", + "399dec8cb6b8cd1b03737e68ea32e6ed69030b57e5f05d983e8856024143ea78" + ] + ], + "python": "python@3.9.18", + "spec": "clingo-bootstrap%gcc platform=linux target=x86_64" + } + ] +} \ No newline at end of file diff --git a/share/spack/bootstrap/github-actions-v0.5/gnupg.json b/share/spack/bootstrap/github-actions-v0.5/gnupg.json new file mode 100644 index 00000000000000..25d607b7a8c44e --- /dev/null +++ b/share/spack/bootstrap/github-actions-v0.5/gnupg.json @@ -0,0 +1,254 @@ +{ + "verified": [ + { + "binaries": [ + [ + "libgpg-error", + "stcmj3wdfxrohn2a53ecvsfsxe7rzrn4", + "942b0f0918798f0a5f007de0f104d71273e6988165c7a34a874e0846b1aa8977" + ], + [ + "libassuan", + "z27suzptvelnavipmldx6dcntiwqmguq", + "c703d6b534e89e383893913fb3b71b47322726c5e19f69178e4d1a3a42a76426" + ], + [ + "libgcrypt", + "if4uocx75kk6nc5vwvvuxq4dvaoljxkm", + "a2320f8cfc8201d15c0e9e244b824ce3d76542c148f4f0631648987957759f07" + ], + [ + "libiconv", + "nccvt7adwkq5anilrjspffdzl4hggon5", + "e23aa0184eb6661331bc850292fa22579005fd8ed62efd4c0c7a87489d8acaf6" + ], + [ + "libksba", + "lbfaarmpo2tupbezmqhfjvyspvwepv4r", + "96888ed37642a2425e2262a5904b82a38f9eecfb18a900493e32d4ab742f994b" + ], + [ + "npth", + "yc7h5c7cp7mupstvh5wlujp3xqet3xxq", + "3ac8e284878c5a556e38aab706e4303daf0a4d2bbb9fac2644495f8a362f9988" + ], + [ + "pinentry", + "rlo36pidutbjxxc3atooiwruaptfwmml", + "70114fe6c9e8723daa960f1a3dc36ed8b5a6c6f9cc828d43f79b8f59f7363605" + ], + [ + "zlib-ng", + "hewnrm76ju4qcjaezxole5htrulkij25", + "7babbe4d3d6e58631a944472356c07f0f4ad4a0759eaeefcf8584f33cce51ca6" + ], + [ + "gnupg", + "5cguax2vflgy2cwmt2ikvixtynommlmr", + "23fdd223493f441fa2e5f82d7e02837ecfad831fbfa4c27c175b3e294ed977d1" + ] + ], + "spec": "gnupg@2.3: %apple-clang platform=darwin target=aarch64" + }, + { + "binaries": [ + [ + "libgpg-error", + "7yjoei55i6wxycmzbopyrw7nrquc22ac", + "c29cfe32521a4a1e2108c711233964c27ca74ffc7505eea86cb8c047ace5715b" + ], + [ + "libassuan", + "b4pkkugfhdtitffvlh4o3dexmthr6rmk", + "27ee6fc272f011f9ad4f000dc54961cccd67b34d6f24f316ca7faf26673bf98b" + ], + [ + "libgcrypt", + "uqjmpmpeta3w7c66m4e5jojopngpibvp", + "d73fbb6e9327faec75af450d602b663ed6bb65ac9657bd795034a53f6acd32c8" + ], + [ + "libiconv", + "rfsiwcq6tlw6to42a3uxw7wcmcyk5m6r", + "1f0176395130ed8b919538fa4b1cbda9f0ff8b836e51097258efc8cf5e11f753" + ], + [ + "libksba", + "gsobopcvr2p7d7rpgrbk2ulrnhvrpt6u", + "0e404a8353f91918f385db8cf661f53f91ffd805798fcd83fb1168a1f1758fe8" + ], + [ + "npth", + "gib2edyujm2oymkvu2hllm2yeghttvn3", + "e04e579e514cd965baf71b7f160b063bff8b116e991e6931c6919cd5f3270e59" + ], + [ + "pinentry", + "5ndbckveeaywx77rqmujglfnqwpxu3t6", + "0ec02dca08ad2e8b3dd1c71195ed3fe3bb8856b746726708f5e5d450619e1285" + ], + [ + "zlib-ng", + "fg366ys6nx3hthuiix4xooi6xx4qe5d2", + "cc372a21608885182233c7800355c7c0bbaff47ea16e190827a9618b0c4703e2" + ], + [ + "gnupg", + "2x5ftl46zcnxk6knz5y3nuhyn7zcttk3", + "b9481e122e2cb26f69b70505830d0fcc0d200aadbb6c6572339825f17ad1e52d" + ] + ], + "spec": "gnupg@2.3: %apple-clang platform=darwin target=x86_64" + }, + { + "binaries": [ + [ + "libgpg-error", + "b7o5zrguyniw5362eey3peglzhlmig7l", + "b4373f2b0a2567b3b87e6bfc934135ce7790432aea58c802139bb5352f24b6a9" + ], + [ + "libassuan", + "6k2arop3mjwfhe4cwga6a775ud5m4scp", + "1e5143d35b0938a206ecf1ecb39b77e732629897d2b936cb8274239770055d90" + ], + [ + "libgcrypt", + "eh5h3zisjkupzr2pgqarvgs2fm7pun5r", + "b57eff265b48d0472243babfd1221c7c16189a4e324ea26e65d1a0a8c1391020" + ], + [ + "libiconv", + "vgk2zgjeflpnksj3lywuwdzs2nez63qv", + "d153953c40c630fd2bf271f3de901d7671f80e8161cf746cb54afbf28d934d03" + ], + [ + "libksba", + "au3xdl4oyfbxat6dknp3mldid7gupgt5", + "f1b1a1a02138109bc41b0b2ba54e689b43f35e2828f58b5de74280ce754fac0b" + ], + [ + "npth", + "ja7cauk7yhhyj7msnprlirue7cn3jpnj", + "cf6fd998a8f92ce1cf34c63db09c77b1891bf8f5915deef03c0cae5492bd691b" + ], + [ + "pinentry", + "6yo4flozla2tvw3ojkh2atvnfxuqx6ym", + "e78826a269109b3d67a54b1d01ff0a93be043dddcb4f52d329770ae1f75313f3" + ], + [ + "zlib-ng", + "4cgenrt3rcinueq6peyolxhegnryoeem", + "918a1e48f823806f1562c95569953a4658b2fbc54a2606a09bcd7e259b62f492" + ], + [ + "gnupg", + "lrmigjenpqj5fy4ojcs5jy6doktiu4qz", + "228ccb475932f7f40a64e9d87dec045931cc57f71b1dfd4b4c3926107222d96c" + ] + ], + "spec": "gnupg@2.3: %gcc platform=linux target=aarch64" + }, + { + "binaries": [ + [ + "libgpg-error", + "km6l24czfhnmlya74nu6cxwufgimyhzz", + "23c3b7b487b36b9b03eeebbcc484adc6c8190c1bbcaa458943847148c915c6b2" + ], + [ + "libassuan", + "crkk525xdgsn2k5s4xqdaxkudz6pjqbm", + "ae3048a8059c0709d3efe832de1a8f82594373ba853d4bc2dfa05fb9dbfbc782" + ], + [ + "libgcrypt", + "4s5lkowqilor35fscjwvtmg4wasdknkc", + "62d3d13278d60d0329af1a9649b06591153ff68de4584f57777d13d693c7012e" + ], + [ + "libiconv", + "kbijqx45l3n64dlhenbuwgqpmf434g2d", + "dddf581a14a35b85cb69a8c785dd8e250f41e6de7697e34bb0ab2a942e0c2128" + ], + [ + "libksba", + "jnll3rfuh6xhgqxbwfnpizammcwloxjc", + "6200f2b6150aaf6d0e69771dfd5621582bd99ed0024fe83e7bc777cb66cabb29" + ], + [ + "npth", + "6j6b4hbkhwkb5gfigysqgn5lpu3i4kw5", + "0be0c70f3d9d45c4fe7490d8fdb8d7584de6324c3bfac8d884072409799c9951" + ], + [ + "pinentry", + "cdpcdd4iah6jot4odehm3xmulw3t3e32", + "5b447c770d0f705fbc97564fccdfbb0dfff8b6f8e2b4abbea326a538bc1bff80" + ], + [ + "zlib-ng", + "ogchs3i5tosoqrtsp3czp2azxvm7icig", + "acfa12c4e73560416e1169b37adabfbec5ee9a580a684b23e75d7591d8e39a03" + ], + [ + "gnupg", + "jwpu2wrofbwylpztltmi257benj2wp6z", + "98e2bcb4064ec0830d896938bc1fe5264dac611da71ea546b9ca03349b752041" + ] + ], + "spec": "gnupg@2.3: %gcc platform=linux target=ppc64le" + }, + { + "binaries": [ + [ + "libgpg-error", + "dwcgnnqt364enpf5554dio7kklspmrko", + "bfe9b506ccba0cca619133a3d2e05aa23c929749428bf6eecbff0c6985447009" + ], + [ + "libassuan", + "yl5rfsfuxd6if36h7rap7zbbpbfztkpw", + "4343dabbeed0851885992acd7b63fd74cb9d1acc06501a8af934e7e103801a15" + ], + [ + "libgcrypt", + "ka3t3dq73bkz4bs5ilyz6kymkypgbzxl", + "ec1bcc324e9f9d660395e2c586094431361a02196da43fce91be41cca5da9636" + ], + [ + "libiconv", + "5tog27ephuzc4j6kdxavhjsjm2kd5nu6", + "928fab3c32a1ae09651bb8491ee3855ccaf3c57a146ee72a289a073accd3fc8f" + ], + [ + "libksba", + "4ezfhjkmfc4fr34ozzl5q6b4x6jqqmsw", + "3045841c50c19a41beb0f32b4e8a960901397b95e82af3a73817babf35d4cfca" + ], + [ + "npth", + "bn4zrugdajgpk5dssoeccbl7o2gfgmcp", + "ef90ef85a818456afbff709b4a0757a077d69fd3c07d1b7612e1d461d837c46f" + ], + [ + "pinentry", + "cdwqocmusjomjjavnz6nn764oo54j5xj", + "b251047c1cb4be1bb884a7843d4419fae40fdbe5e1d36904e35f5e3fef5e4ced" + ], + [ + "zlib-ng", + "ozawh46coczjwtlul27msr3swe6pl6l5", + "0a397b53d64ac8191a36de8b32c5ced28a4c7a6dbafe9396dd897c55bcf7a168" + ], + [ + "gnupg", + "jra2dbsvpr5c5gj3ittejusa2mjh2sf5", + "054fac6eaad7c862ea4661461d847fb069876eb114209416b015748266f7d166" + ] + ], + "spec": "gnupg@2.3: %gcc platform=linux target=x86_64" + } + ] +} \ No newline at end of file diff --git a/share/spack/bootstrap/github-actions-v0.3/metadata.yaml b/share/spack/bootstrap/github-actions-v0.5/metadata.yaml similarity index 83% rename from share/spack/bootstrap/github-actions-v0.3/metadata.yaml rename to share/spack/bootstrap/github-actions-v0.5/metadata.yaml index d27e261721ca07..0fd413a618a5fd 100644 --- a/share/spack/bootstrap/github-actions-v0.3/metadata.yaml +++ b/share/spack/bootstrap/github-actions-v0.5/metadata.yaml @@ -3,6 +3,6 @@ description: | Buildcache generated from a public workflow using Github Actions. The sha256 checksum of binaries is checked before installation. info: - url: https://mirror.spack.io/bootstrap/github-actions/v0.3 + url: https://mirror.spack.io/bootstrap/github-actions/v0.5 homepage: https://github.com/spack/spack-bootstrap-mirrors releases: https://github.com/spack/spack-bootstrap-mirrors/releases diff --git a/share/spack/bootstrap/github-actions-v0.3/patchelf.json b/share/spack/bootstrap/github-actions-v0.5/patchelf.json similarity index 56% rename from share/spack/bootstrap/github-actions-v0.3/patchelf.json rename to share/spack/bootstrap/github-actions-v0.5/patchelf.json index 699c51c8abff53..f26fd9ce86f088 100644 --- a/share/spack/bootstrap/github-actions-v0.3/patchelf.json +++ b/share/spack/bootstrap/github-actions-v0.5/patchelf.json @@ -4,8 +4,8 @@ "binaries": [ [ "patchelf", - "cn4gsqzdnnffk7ynvbcai6wrt5ehqqrl", - "8c6a28cbe8133d719be27ded11159f0aa2c97ed1d0881119ae0ebd71f8ccc755" + "4txke6ixd2zg2yzg33l3fqnjyassono7", + "102800775f789cc293e244899f39a22f0b7a19373305ef0497ca3189223123f3" ] ], "spec": "patchelf@0.13: %gcc platform=linux target=aarch64" @@ -14,8 +14,8 @@ "binaries": [ [ "patchelf", - "mgq6n2heyvcx2ebdpchkbknwwn3u63s6", - "1d4ea9167fb8345a178c1352e0377cc37ef2b421935cf2b48fb6fa03a94fca3d" + "tnbgxc22uebqsiwrhchf3nieatuqlsrr", + "91cf0a9d4750c04575c5ed3bcdefc4754e1cf9d1cd1bf197eb1fe20ccaa869f1" ] ], "spec": "patchelf@0.13: %gcc platform=linux target=ppc64le" @@ -24,8 +24,8 @@ "binaries": [ [ "patchelf", - "htk62k7efo2z22kh6kmhaselru7bfkuc", - "833df21b20eaa7999ac4c5779ae26aa90397d9027aebaa686a428589befda693" + "afv7arjarb7nzmlh7c5slkfxykybuqce", + "73f4bde46b843c96521e3f5c31ab94756491404c1ad6429c9f61dbafbbfa6470" ] ], "spec": "patchelf@0.13: %gcc platform=linux target=x86_64" From b3534b4435a4d49ffe35e3aadd60402fbcb63e60 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:04:26 -0700 Subject: [PATCH 143/806] restic: add v0.16.0 (#40439) --- var/spack/repos/builtin/packages/restic/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/restic/package.py b/var/spack/repos/builtin/packages/restic/package.py index c7eb94de479df9..493e0c098331f2 100644 --- a/var/spack/repos/builtin/packages/restic/package.py +++ b/var/spack/repos/builtin/packages/restic/package.py @@ -14,6 +14,7 @@ class Restic(Package): maintainers("alecbcs") + version("0.16.0", sha256="b91f5ef6203a5c50a72943c21aaef336e1344f19a3afd35406c00f065db8a8b9") version("0.15.2", sha256="52aca841486eaf4fe6422b059aa05bbf20db94b957de1d3fca019ed2af8192b7") version("0.15.1", sha256="fce382fdcdac0158a35daa640766d5e8a6e7b342ae2b0b84f2aacdff13990c52") version("0.15.0", sha256="85a6408cfb0798dab52335bcb00ac32066376c32daaa75461d43081499bc7de8") From bc4c887452dbc24697ba1af44667073616244f2e Mon Sep 17 00:00:00 2001 From: Laura Weber Date: Wed, 11 Oct 2023 10:05:37 -0700 Subject: [PATCH 144/806] tecplot: Add version 2023r1 (#40425) --- var/spack/repos/builtin/packages/tecplot/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/tecplot/package.py b/var/spack/repos/builtin/packages/tecplot/package.py index bc4a96392def20..a877c9da76d95f 100644 --- a/var/spack/repos/builtin/packages/tecplot/package.py +++ b/var/spack/repos/builtin/packages/tecplot/package.py @@ -19,6 +19,11 @@ class Tecplot(Package): maintainers("LRWeber") + version( + "2023r1", + sha256="58e7f4de875e65047f4edd684013d0ff538df6246f00c059458989f281be4c93", + expand=False, + ) version( "2022r2", sha256="e30cb7bf894e7cd568a2b24beb4bf667f1781ae27b59bb73410fafe12ddfdcdf", From 8f2e68aeb813a8ba007c51f1dd8a0e74c4cd34c4 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 11 Oct 2023 19:19:58 +0200 Subject: [PATCH 145/806] c-blosc2: add 2.10.5 (#40428) --- var/spack/repos/builtin/packages/c-blosc2/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/c-blosc2/package.py b/var/spack/repos/builtin/packages/c-blosc2/package.py index f2f73245aa7267..8eceeca8952917 100644 --- a/var/spack/repos/builtin/packages/c-blosc2/package.py +++ b/var/spack/repos/builtin/packages/c-blosc2/package.py @@ -17,9 +17,10 @@ class CBlosc2(CMakePackage): maintainers("ax3l", "robert-mijakovic") version("develop", branch="master") - # 2.10.1+ adds Blosc2 CMake CONFIG files + version("2.10.5", sha256="a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d") # 2.10.2+ fixes regressions with external dependencies version("2.10.2", sha256="069785bc14c006c7dab40ea0c620bdf3eb8752663fd55c706d145bceabc2a31d") + # 2.10.1+ adds Blosc2 CMake CONFIG files version("2.10.1", sha256="1dd65be2d76eee205c06e8812cc1360448620eee5e368b25ade4ea310654cd01") version("2.10.0", sha256="cb7f7c0c62af78982140ecff21a2f3ca9ce6a0a1c02e314fcdce1a98da0fe231") version("2.9.3", sha256="1f36b7d79d973505582b9a804803b640dcc0425af3d5e676070847ac4eb38176") @@ -38,7 +39,7 @@ class CBlosc2(CMakePackage): variant("zlib", default=True, description="support for ZLIB") variant("zstd", default=True, description="support for ZSTD") - depends_on("cmake@2.8.10:", type="build") + depends_on("cmake@3.16.3:", type="build") depends_on("lizard", when="+lizard") depends_on("lz4", when="+lz4") depends_on("snappy", when="+snappy") From fe6860e0d769e0303e14b8a0f2316bb86dcd516c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 11 Oct 2023 19:20:49 +0200 Subject: [PATCH 146/806] cmake: add v3.27.7 (#40441) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 796eb4c397045f..44f6b596aa1dd5 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -27,6 +27,7 @@ class Cmake(Package): executables = ["^cmake[0-9]*$"] version("master", branch="master") + version("3.27.7", sha256="08f71a106036bf051f692760ef9558c0577c42ac39e96ba097e7662bd4158d8e") version("3.27.6", sha256="ef3056df528569e0e8956f6cf38806879347ac6de6a4ff7e4105dc4578732cfb") version("3.27.4", sha256="0a905ca8635ca81aa152e123bdde7e54cbe764fdd9a70d62af44cad8b92967af") version("3.27.3", sha256="66afdc0f181461b70b6fedcde9ecc4226c5cd184e7203617c83b7d8e47f49521") From 86d2200523ed793836c02097135cb100bd487c63 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Wed, 11 Oct 2023 10:37:48 -0700 Subject: [PATCH 147/806] krb5: Fix spack install krb5 ^openssl~shared (#40306) --- var/spack/repos/builtin/packages/krb5/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/krb5/package.py b/var/spack/repos/builtin/packages/krb5/package.py index db9218cdff6871..84dc616066e01d 100644 --- a/var/spack/repos/builtin/packages/krb5/package.py +++ b/var/spack/repos/builtin/packages/krb5/package.py @@ -35,6 +35,7 @@ class Krb5(AutotoolsPackage): depends_on("openssl") depends_on("gettext") depends_on("findutils", type="build") + depends_on("pkgconfig", type="build", when="^openssl~shared") variant( "shared", default=True, description="install shared libraries if True, static if false" @@ -80,6 +81,11 @@ def configure_args(self): if "%gcc@10:" in self.spec: args.append("CFLAGS=-fcommon") + if self.spec["openssl"].satisfies("~shared"): + pkgconf = which("pkg-config") + ssllibs = pkgconf("--static", "--libs", "openssl", output=str) + args.append(f"LDFLAGS={ssllibs}") + return args def flag_handler(self, name, flags): From 639ef9e24a7ec27439cbca168fef5328f7a6b5b4 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:43:31 -0700 Subject: [PATCH 148/806] adol-c: use f-strings (#40438) --- var/spack/repos/builtin/packages/adol-c/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index c493a53cbaae48..475edbd088e715 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -83,12 +83,12 @@ def configure_args(self): configure_args = [] if "+boost" in spec: - configure_args.append("--with-boost={0}".format(spec["boost"].prefix)) + configure_args.append(f"--with-boost={spec['boost'].prefix}") else: configure_args.append("--with-boost=no") if "+openmp" in spec: - configure_args.append("--with-openmp-flag={0}".format(self.compiler.openmp_flag)) + configure_args.append(f"--with-openmp-flag={self.compiler.openmp_flag}") configure_args.extend( self.enable_or_disable("advanced-branching", variant="advanced_branching") From 7dbc712fbaefc99623a8b7c6b1d0772c5e6478f2 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:44:57 -0700 Subject: [PATCH 149/806] 3proxy: use f-strings (#40429) --- var/spack/repos/builtin/packages/3proxy/package.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/3proxy/package.py b/var/spack/repos/builtin/packages/3proxy/package.py index 8cae9f900528cc..e9a408698b87ac 100644 --- a/var/spack/repos/builtin/packages/3proxy/package.py +++ b/var/spack/repos/builtin/packages/3proxy/package.py @@ -24,9 +24,7 @@ class _3proxy(MakefilePackage): depends_on("m4", type="build") def build(self, spec, prefix): - make("-f", "Makefile.{0}".format(platform.system())) + make("-f", f"Makefile.{platform.system()}") def install(self, spec, prefix): - make( - "-f", "Makefile.{0}".format(platform.system()), "prefix={0}".format(prefix), "install" - ) + make("-f", f"Makefile.{platform.system()}", f"prefix={prefix}", "install") From 5d582a5e48bfb7a1a13219aec502cae5a827f13b Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:46:23 -0700 Subject: [PATCH 150/806] 7zip: use f-strings (#40430) --- var/spack/repos/builtin/packages/7zip/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/7zip/package.py b/var/spack/repos/builtin/packages/7zip/package.py index 2e9d09bbb9c63b..123e233ab188d2 100644 --- a/var/spack/repos/builtin/packages/7zip/package.py +++ b/var/spack/repos/builtin/packages/7zip/package.py @@ -75,8 +75,8 @@ def is_64bit(self): def build(self, spec, prefix): link_type = "1" if "static" in spec.variants["link_type"].value else "0" nmake_args = [ - "PLATFORM=%s" % self.plat_arch, - "MY_STATIC_LINK=%s" % link_type, + f"PLATFORM={self.plat_arch}", + f"MY_STATIC_LINK={link_type}", "NEW_COMPILER=1", ] # 7zips makefile is configured in such as way that if this value is set From 3923b81d8700cdcb9532d6d8c58e578211773505 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:47:42 -0700 Subject: [PATCH 151/806] adios: use f-strings (#40436) --- var/spack/repos/builtin/packages/adios/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py index 043bf586b2a183..86bc26e89e9046 100644 --- a/var/spack/repos/builtin/packages/adios/package.py +++ b/var/spack/repos/builtin/packages/adios/package.py @@ -119,7 +119,7 @@ def validate(self, spec): def with_or_without_hdf5(self, activated): if activated: - return "--with-phdf5={0}".format(self.spec["hdf5"].prefix) + return f"--with-phdf5={self.spec['hdf5'].prefix}" return "--without-phdf5" @@ -134,7 +134,7 @@ def configure_args(self): extra_args = [ # required, otherwise building its python bindings will fail - "CFLAGS={0}".format(self.compiler.cc_pic_flag) + f"CFLAGS={self.compiler.cc_pic_flag}" ] extra_args += self.enable_or_disable("shared") @@ -148,7 +148,7 @@ def configure_args(self): extra_args += self.with_or_without("infiniband") if "+zlib" in spec: - extra_args.append("--with-zlib={0}".format(spec["zlib-api"].prefix)) + extra_args.append(f"--with-zlib={spec['zlib-api'].prefix}") else: extra_args.append("--without-zlib") From dae746bb963e1d1a3a3c4a0a19370600c007558f Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:48:32 -0700 Subject: [PATCH 152/806] abacus: use f-string (#40431) --- var/spack/repos/builtin/packages/abacus/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/abacus/package.py b/var/spack/repos/builtin/packages/abacus/package.py index 68ee2f4894cc26..ccf89f82b8db66 100644 --- a/var/spack/repos/builtin/packages/abacus/package.py +++ b/var/spack/repos/builtin/packages/abacus/package.py @@ -65,7 +65,7 @@ def edit(self, spec, prefix): spec["fftw"].prefix, spec["elpa"].prefix, inc_var, - "{0}".format(spec["elpa"].version), + f"{spec['elpa'].version}", spec["cereal"].prefix, ) ) From 275a2f35b52f576b666eb5b6fe14afbac84eafac Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:48:39 -0700 Subject: [PATCH 153/806] adiak: use f-strings (#40435) --- var/spack/repos/builtin/packages/adiak/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/adiak/package.py b/var/spack/repos/builtin/packages/adiak/package.py index 5bc8804dea9bac..05f936e3f92c5a 100644 --- a/var/spack/repos/builtin/packages/adiak/package.py +++ b/var/spack/repos/builtin/packages/adiak/package.py @@ -36,8 +36,8 @@ class Adiak(CMakePackage): def cmake_args(self): args = [] if self.spec.satisfies("+mpi"): - args.append("-DMPI_CXX_COMPILER=%s" % self.spec["mpi"].mpicxx) - args.append("-DMPI_C_COMPILER=%s" % self.spec["mpi"].mpicc) + args.append(f"-DMPI_CXX_COMPILER={self.spec['mpi'].mpicxx}") + args.append(f"-DMPI_C_COMPILER={self.spec['mpi'].mpicc}") args.append("-DENABLE_MPI=ON") else: args.append("-DENABLE_MPI=OFF") From e43a09087715478e9064d435b2d2414fede60cc3 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 10:51:26 -0700 Subject: [PATCH 154/806] abduco: use f-string (#40432) --- var/spack/repos/builtin/packages/abduco/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/abduco/package.py b/var/spack/repos/builtin/packages/abduco/package.py index 8287ecc7d94a35..9c3ea0c4487961 100644 --- a/var/spack/repos/builtin/packages/abduco/package.py +++ b/var/spack/repos/builtin/packages/abduco/package.py @@ -21,4 +21,4 @@ class Abduco(MakefilePackage): version("0.4", sha256="bda3729df116ce41f9a087188d71d934da2693ffb1ebcf33b803055eb478bcbb") def install(self, spec, prefix): - make("PREFIX={0}".format(prefix), "install") + make(f"PREFIX={prefix}", "install") From 537ab481670bad654225f488fb4ec92d25f148a8 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 11:03:30 -0700 Subject: [PATCH 155/806] acts: use f-strings (#40434) --- var/spack/repos/builtin/packages/acts/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index b9f3168e4aee8c..9b06fd3d444360 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -336,15 +336,15 @@ def cmake_args(self): def cmake_variant(cmake_label, spack_variant): enabled = spec.satisfies("+" + spack_variant) - return "-DACTS_BUILD_{0}={1}".format(cmake_label, enabled) + return f"-DACTS_BUILD_{cmake_label}={enabled}" def enable_cmake_variant(cmake_label, spack_variant): enabled = spec.satisfies(spack_variant) - return "-DACTS_ENABLE_{0}={1}".format(cmake_label, enabled) + return f"-DACTS_ENABLE_{cmake_label}={enabled}" def example_cmake_variant(cmake_label, spack_variant, type="BUILD"): enabled = spec.satisfies("+examples +" + spack_variant) - return "-DACTS_{0}_EXAMPLES_{1}={2}".format(type, cmake_label, enabled) + return f"-DACTS_{type}_EXAMPLES_{cmake_label}={enabled}" def plugin_label(plugin_name): if spec.satisfies("@0.33:"): @@ -400,7 +400,7 @@ def plugin_cmake_variant(plugin_name, spack_variant): ] log_failure_threshold = spec.variants["log_failure_threshold"].value - args.append("-DACTS_LOG_FAILURE_THRESHOLD={0}".format(log_failure_threshold)) + args.append(f"-DACTS_LOG_FAILURE_THRESHOLD={log_failure_threshold}") if spec.satisfies("@19.4.0:"): args.append("-DACTS_ENABLE_LOG_FAILURE_THRESHOLD=ON") @@ -431,11 +431,11 @@ def plugin_cmake_variant(plugin_name, spack_variant): if "+cuda" in spec: cuda_arch = spec.variants["cuda_arch"].value if cuda_arch != "none": - args.append("-DCUDA_FLAGS=-arch=sm_{0}".format(cuda_arch[0])) + args.append(f"-DCUDA_FLAGS=-arch=sm_{cuda_arch[0]}") if "+python" in spec: python = spec["python"].command.path - args.append("-DPython_EXECUTABLE={0}".format(python)) + args.append(f"-DPython_EXECUTABLE={python}") args.append(self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd")) From a5853ee51a013081c212e34cdbd301e723b95846 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:33:31 -0400 Subject: [PATCH 156/806] update for the tasmanain versions (#40453) --- .../builtin/packages/tasmanian/addons70.patch | 25 ----- .../builtin/packages/tasmanian/package.py | 106 ++++-------------- .../packages/tasmanian/packageconf70.patch | 15 --- 3 files changed, 24 insertions(+), 122 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/tasmanian/addons70.patch delete mode 100644 var/spack/repos/builtin/packages/tasmanian/packageconf70.patch diff --git a/var/spack/repos/builtin/packages/tasmanian/addons70.patch b/var/spack/repos/builtin/packages/tasmanian/addons70.patch deleted file mode 100644 index 8d983c6308b730..00000000000000 --- a/var/spack/repos/builtin/packages/tasmanian/addons70.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/Addons/CMakeLists.txt b/Addons/CMakeLists.txt -index 1279ada..0b6d9be 100644 ---- a/Addons/CMakeLists.txt -+++ b/Addons/CMakeLists.txt -@@ -49,19 +49,7 @@ endif() - - # The Tasmanian MPI capabilities are templated into the Addons - if (Tasmanian_ENABLE_MPI) -- target_link_libraries(Tasmanian_addons INTERFACE ${MPI_CXX_LIBRARIES}) -- -- if (DEFINED MPI_CXX_INCLUDE_PATH) -- target_include_directories(Tasmanian_addons INTERFACE "${MPI_CXX_INCLUDE_PATH}") -- endif() -- -- if(DEFINED MPI_CXX_COMPILE_FLAGS) -- target_compile_options(Tasmanian_addons INTERFACE "${MPI_CXX_COMPILE_FLAGS}") -- endif() -- -- if(DEFINED MPI_CXX_LINK_FLAGS) -- set_target_properties(Tasmanian_addons PROPERTIES INTERFACE_LINK_OPTIONS "${MPI_CXX_LINK_FLAGS}") -- endif() -+ target_link_libraries(Tasmanian_addons INTERFACE MPI::MPI_CXX) - - add_executable(Tasmanian_mpitester testMPI.cpp testMPI.hpp testMPIDream.hpp) - set_target_properties(Tasmanian_mpitester PROPERTIES OUTPUT_NAME "mpitester") diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py index 2a3db2ade34ba3..92aa21833973b0 100644 --- a/var/spack/repos/builtin/packages/tasmanian/package.py +++ b/var/spack/repos/builtin/packages/tasmanian/package.py @@ -12,7 +12,7 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): interpolation as well as parameter calibration.""" homepage = "https://ornl.github.io/TASMANIAN/stable/" - url = "https://github.com/ORNL/TASMANIAN/archive/v7.9.tar.gz" + url = "https://github.com/ORNL/TASMANIAN/archive/v8.0.tar.gz" git = "https://github.com/ORNL/TASMANIAN.git" tags = ["e4s"] @@ -22,38 +22,15 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="master") + version("8.0", sha256="248c941346150bf6cfb386ba86b69bd4697f4fc93bff0e8d5f57e555614fd534") version("7.9", sha256="decba62e6bbccf1bc26c6e773a8d4fd51d7f3e3e534ddd386ec41300694ce5cc") version("7.7", sha256="85fb3a7b302ea21a3b700712767a59a623d9ab93da03308fa47d4413654c3878") version("7.5", sha256="d621bd36dced4db86ef638693ba89b336762e7a3d7fedb3b5bcefb03390712b3") - version("7.3", sha256="5bd1dd89cc5c84506f6900b6569b17e50becd73eb31ec85cfa11d6f1f912c4fa") - # API is very stable since 7.0, but the refactoring made 7.0 and 7.1 rocky + # Tasmanian is backwards compatible, no need to use 7.3 from back in 2020 version( - "7.1", - sha256="9c24a591506a478745b802f1fa5c557da7bc80b12d8070855de6bc7aaca7547a", - deprecated=True, - ) - version( - "7.0", - sha256="4094ba4ee2f1831c575d00368c8471d3038f813398be2e500739cef5c7c4a47b", - deprecated=True, - ) # use for xsdk-0.5.0 - # 5.0, 5.1 and 6.0 use older API from 2018, all users have moved up by now - version( - "6.0", - sha256="ceab842e9fbce2f2de971ba6226967caaf1627b3e5d10799c3bd2e7c3285ba8b", - deprecated=True, - ) # use for xsdk-0.4.0 - version( - "5.1", - sha256="b0c1be505ce5f8041984c63edca9100d81df655733681858f5cc10e8c0c72711", - deprecated=True, - ) - - version( - "5.0", - sha256="2540bb63dea987ab205f7b375aff41f320b1de9bd7f1d1064ef96b22eeda1251", - url="https://tasmanian.ornl.gov/documents/Tasmanian_v5.0.zip", + "7.3", + sha256="5bd1dd89cc5c84506f6900b6569b17e50becd73eb31ec85cfa11d6f1f912c4fa", deprecated=True, ) @@ -73,7 +50,7 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): variant("python", default=False, description="add Python binding for Tasmanian") - variant("fortran", default=False, description="add Fortran 90/95 interface to Tasmanian") + variant("fortran", default=False, description="add Fortran 2003 interface to Tasmanian") variant( "build_type", @@ -82,12 +59,10 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): values=("Debug", "Release"), ) - depends_on("cmake@2.8:", type="build") - depends_on("cmake@3.5:", type="build", when="@6.0:") depends_on("cmake@3.10:", type=("build", "run"), when="@7.0:") - depends_on("cmake@3.22:", type=("build", "run"), when="@develop") + depends_on("cmake@3.22:", type=("build", "run"), when="@8.0:") - depends_on("python@2.7:", when="+python", type=("build", "run")) + depends_on("python@3.0:", when="+python", type=("build", "run")) depends_on("py-numpy", when="+python", type=("build", "run")) extends("python", when="+python", type=("build", "run")) @@ -97,15 +72,14 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): depends_on("blas", when="+blas", type=("build", "run")) # openblas 0.2.18 or newer depends_on("lapack", when="+blas @7.1:", type=("build", "run")) # lapack used since 7.1 - depends_on("cuda@8.0.61:", when="+cuda", type=("build", "run")) - depends_on("cuda@8.0.61:", when="+magma", type=("build", "run")) + depends_on("cuda@10.0:", when="+cuda", type=("build", "run")) + depends_on("cuda@10.0:", when="+magma", type=("build", "run")) - depends_on("hip@3.8:", when="+rocm", type=("build", "run")) - depends_on("rocblas@3.8:", when="+rocm", type=("build", "run")) - depends_on("rocsparse@3.8:", when="+rocm", type=("build", "run")) - depends_on("rocsolver@3.8:", when="+rocm", type=("build", "run")) + depends_on("hip@5.0:", when="+rocm", type=("build", "run")) + depends_on("rocblas@5.0:", when="+rocm", type=("build", "run")) + depends_on("rocsparse@5.0:", when="+rocm", type=("build", "run")) + depends_on("rocsolver@5.0:", when="+rocm", type=("build", "run")) - depends_on("magma@2.4.0:", when="+magma @6.0:", type=("build", "run")) depends_on("magma@2.5.0:", when="+magma @7.0:", type=("build", "run")) # https://github.com/spack/spack/issues/39536#issuecomment-1685161942 @@ -114,16 +88,6 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): conflicts("+magma", when="~cuda~rocm") # currently MAGMA only works with CUDA conflicts("+cuda", when="+rocm") # can pick CUDA or ROCm, not both - # old versions - conflicts("+rocm", when="@:7.3") # ROCm was added in 7.3, tested in 7.5 - conflicts("+magma", when="@:5.1") # magma does not work prior to 6.0 - conflicts("+mpi", when="@:5.1") # MPI is broken prior to 6.0 - conflicts("+xsdkflags", when="@:5.1") # 6.0 is the first version included in xSDK - - # patching some bugs - patch("addons70.patch", when="@7.0") - patch("packageconf70.patch", when="@7.0") - def setup_build_environment(self, env): # needed for the hipcc compiler if "+rocm" in self.spec: @@ -132,29 +96,16 @@ def setup_build_environment(self, env): def cmake_args(self): spec = self.spec - # 7.1 is the last version to use xSDK legacy build options - if "+xsdkflags" in spec and spec.satisfies("@:7.1"): - args = [ - "-DUSE_XSDK_DEFAULTS:BOOL=ON", - self.define_from_variant("XSDK_ENABLE_PYTHON", "python"), - self.define_from_variant("TPL_ENABLE_MPI", "mpi"), - self.define_from_variant("XSDK_ENABLE_OPENMP", "openmp"), - self.define_from_variant("TPL_ENABLE_BLAS", "blas"), - self.define_from_variant("XSDK_ENABLE_CUDA", "cuda"), - self.define_from_variant("TPL_ENABLE_MAGMA", "magma"), - self.define_from_variant("XSDK_ENABLE_FORTRAN", "fortran"), - ] - else: - args = [ - self.define_from_variant("Tasmanian_ENABLE_OPENMP", "openmp"), - self.define_from_variant("Tasmanian_ENABLE_BLAS", "blas"), - self.define_from_variant("Tasmanian_ENABLE_PYTHON", "python"), - self.define_from_variant("Tasmanian_ENABLE_MPI", "mpi"), - self.define_from_variant("Tasmanian_ENABLE_CUDA", "cuda"), - self.define_from_variant("Tasmanian_ENABLE_HIP", "rocm"), - self.define_from_variant("Tasmanian_ENABLE_MAGMA", "magma"), - self.define_from_variant("Tasmanian_ENABLE_FORTRAN", "fortran"), - ] + args = [ + self.define_from_variant("Tasmanian_ENABLE_OPENMP", "openmp"), + self.define_from_variant("Tasmanian_ENABLE_BLAS", "blas"), + self.define_from_variant("Tasmanian_ENABLE_PYTHON", "python"), + self.define_from_variant("Tasmanian_ENABLE_MPI", "mpi"), + self.define_from_variant("Tasmanian_ENABLE_CUDA", "cuda"), + self.define_from_variant("Tasmanian_ENABLE_HIP", "rocm"), + self.define_from_variant("Tasmanian_ENABLE_MAGMA", "magma"), + self.define_from_variant("Tasmanian_ENABLE_FORTRAN", "fortran"), + ] if spec.satisfies("+blas"): args.append("-DBLAS_LIBRARIES={0}".format(spec["blas"].libs.joined(";"))) @@ -165,15 +116,6 @@ def cmake_args(self): "-DPYTHON_EXECUTABLE:FILEPATH={0}".format(self.spec["python"].command.path) ) - # See https://github.com/ROCmSoftwarePlatform/rocFFT/issues/322 - if self.spec.satisfies("+rocm") and self.spec.satisfies("^cmake@3.21:"): - args.append(self.define("__skip_rocmclang", "ON")) - - # _CUBLAS and _CUDA were separate options prior to 6.0 - # skipping _CUBLAS leads to peformance regression - if spec.satisfies("@:5.1"): - args.append(self.define_from_variant("Tasmanian_ENABLE_CUBLAS", "cuda")) - return args @run_after("install") diff --git a/var/spack/repos/builtin/packages/tasmanian/packageconf70.patch b/var/spack/repos/builtin/packages/tasmanian/packageconf70.patch deleted file mode 100644 index c53255687f08b6..00000000000000 --- a/var/spack/repos/builtin/packages/tasmanian/packageconf70.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Config/TasmanianConfig.in.cmake b/Config/TasmanianConfig.in.cmake -index 8912e4c..df54aaf 100644 ---- a/Config/TasmanianConfig.in.cmake -+++ b/Config/TasmanianConfig.in.cmake -@@ -7,6 +7,10 @@ cmake_minimum_required(VERSION 3.10) - # but this doesn't seem to work, not sure if this is a "relocatable package" (low concern) - include("@CMAKE_INSTALL_PREFIX@/lib/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@.cmake") - -+if (@Tasmanian_ENABLE_MPI@) -+ find_package(MPI REQUIRED) -+endif() -+ - add_executable(Tasmanian::tasgrid IMPORTED) - set_property(TARGET Tasmanian::tasgrid PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_PREFIX@/bin/tasgrid${CMAKE_EXECUTABLE_SUFFIX_CXX}") - From 89e34d56a1424966bac7fc0585dd70552138886a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 11 Oct 2023 21:04:09 +0200 Subject: [PATCH 157/806] curl: add v8.4.0, allow r@8.3: to use it (#40442) * curl: 8.4.0 * fix r curl upperbound range --- .../repos/builtin/packages/curl/package.py | 20 ++++++++++++++++--- var/spack/repos/builtin/packages/r/package.py | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index f67a2a55ace16e..46894046df60a4 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -26,11 +26,25 @@ class Curl(NMakePackage, AutotoolsPackage): maintainers("alecbcs") - version("8.1.2", sha256="b54974d32fd610acace92e3df1f643144015ac65847f0a041fdc17db6f43f243") - version("8.0.1", sha256="9b6b1e96b748d04b968786b6bdf407aa5c75ab53a3d37c1c8c81cdb736555ccf") - version("7.88.1", sha256="8224b45cce12abde039c12dc0711b7ea85b104b9ad534d6e4c5b4e188a61c907") + version("8.4.0", sha256="e5250581a9c032b1b6ed3cf2f9c114c811fc41881069e9892d115cc73f9e88c6") # Deprecated versions due to CVEs + # CVE-2023-38545 + version( + "8.1.2", + sha256="b54974d32fd610acace92e3df1f643144015ac65847f0a041fdc17db6f43f243", + deprecated=True, + ) + version( + "8.0.1", + sha256="9b6b1e96b748d04b968786b6bdf407aa5c75ab53a3d37c1c8c81cdb736555ccf", + deprecated=True, + ) + version( + "7.88.1", + sha256="8224b45cce12abde039c12dc0711b7ea85b104b9ad534d6e4c5b4e188a61c907", + deprecated=True, + ) # https://nvd.nist.gov/vuln/detail/CVE-2022-43551 version( "7.87.0", diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index f72c192071bd45..dfe397ca2c0d7c 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -70,9 +70,9 @@ class R(AutotoolsPackage): depends_on("blas", when="+external-lapack") depends_on("lapack", when="+external-lapack") depends_on("bzip2") - # R didn't anticipate the celebratory - # non-breaking major version bump of curl 8. - depends_on("curl+libidn2@:7") + depends_on("curl+libidn2") + # R didn't anticipate the celebratory non-breaking major version bump of curl 8. + depends_on("curl@:7", when="@:4.2") depends_on("icu4c") depends_on("java") depends_on("ncurses") From 7a4b479724baaca474403b8be11ced5918ef3f86 Mon Sep 17 00:00:00 2001 From: Victor Brunini Date: Wed, 11 Oct 2023 14:30:44 -0700 Subject: [PATCH 158/806] cmake: drop CMAKE_STATIC_LINKER_FLAGS (#40423) Because those end up being passed to ar which does not understand linker arguments. This was making ldflags largely unusuable for statically linked cmake packages. --- lib/spack/spack/build_systems/cmake.py | 6 +++--- lib/spack/spack/test/flag_handlers.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index e51dbf922013ca..1859e40fe51d20 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -142,10 +142,10 @@ def flags_to_build_system_args(self, flags): # We specify for each of them. if flags["ldflags"]: ldflags = " ".join(flags["ldflags"]) - ld_string = "-DCMAKE_{0}_LINKER_FLAGS={1}" # cmake has separate linker arguments for types of builds. - for type in ["EXE", "MODULE", "SHARED", "STATIC"]: - self.cmake_flag_args.append(ld_string.format(type, ldflags)) + self.cmake_flag_args.append(f"-DCMAKE_EXE_LINKER_FLAGS={ldflags}") + self.cmake_flag_args.append(f"-DCMAKE_MODULE_LINKER_FLAGS={ldflags}") + self.cmake_flag_args.append(f"-DCMAKE_SHARED_LINKER_FLAGS={ldflags}") # CMake has libs options separated by language. Apply ours to each. if flags["ldlibs"]: diff --git a/lib/spack/spack/test/flag_handlers.py b/lib/spack/spack/test/flag_handlers.py index ae83b05885fa39..3e680c1ab7d037 100644 --- a/lib/spack/spack/test/flag_handlers.py +++ b/lib/spack/spack/test/flag_handlers.py @@ -121,7 +121,6 @@ def test_ld_flags_cmake(self, temp_env): "-DCMAKE_EXE_LINKER_FLAGS=-mthreads", "-DCMAKE_MODULE_LINKER_FLAGS=-mthreads", "-DCMAKE_SHARED_LINKER_FLAGS=-mthreads", - "-DCMAKE_STATIC_LINKER_FLAGS=-mthreads", } def test_ld_libs_cmake(self, temp_env): From df01a11e071d3fb81363877a6b7317a4864ab899 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:38:28 -0700 Subject: [PATCH 159/806] apr-util: Fix spack install apr-util +crypto ^openssl~shared (#40301) --- var/spack/repos/builtin/packages/apr-util/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 5ac152ba479d6d..df1379a0fa0ac1 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -32,6 +32,7 @@ class AprUtil(AutotoolsPackage): depends_on("postgresql", when="+pgsql") depends_on("sqlite", when="+sqlite") depends_on("unixodbc", when="+odbc") + depends_on("pkg-config", type="build", when="+crypto ^openssl~shared") @property def libs(self): @@ -85,6 +86,13 @@ def configure_args(self): else: args.append("--without-odbc") + if spec.satisfies("+crypto ^openssl~shared"): + # Need pkg-config to get zlib and -ldl flags + # (see https://dev.apr.apache.narkive.com/pNnO9F1S/configure-bug-openssl) + pkgconf = which("pkg-config") + ssl_libs = pkgconf("--libs", "--static", "openssl", output=str) + args.append(f"LIBS={ssl_libs}") + return args def check(self): From 01747b50dfc4ffe19950ea8bcf1e1697bb0a49cd Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:43:21 -0400 Subject: [PATCH 160/806] fix ck build for 5.6.1 (#40304) * initial commit to fix ck build for 5.6.1 * disable mlir for miopen-hip * use satisfies for checking specs and add nlohmann-json dependency for 5.4 onwards --- .../repos/builtin/packages/composable-kernel/package.py | 7 ++++++- var/spack/repos/builtin/packages/miopen-hip/package.py | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/composable-kernel/package.py b/var/spack/repos/builtin/packages/composable-kernel/package.py index efa05197f9338c..85b383896a8af9 100644 --- a/var/spack/repos/builtin/packages/composable-kernel/package.py +++ b/var/spack/repos/builtin/packages/composable-kernel/package.py @@ -64,9 +64,14 @@ def cmake_args(self): ] if "auto" not in self.spec.variants["amdgpu_target"]: args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target")) + if self.spec.satisfies("@5.6.1:"): + args.append(self.define("INSTANCES_ONLY", "ON")) return args def build(self, spec, prefix): with working_dir(self.build_directory): # only instances is necessary to build and install - make("instances") + if self.spec.satisfies("@5.6.1:"): + make() + else: + make("instances") diff --git a/var/spack/repos/builtin/packages/miopen-hip/package.py b/var/spack/repos/builtin/packages/miopen-hip/package.py index 4843ae1173440a..6ab2967ac24b23 100644 --- a/var/spack/repos/builtin/packages/miopen-hip/package.py +++ b/var/spack/repos/builtin/packages/miopen-hip/package.py @@ -160,6 +160,7 @@ class MiopenHip(CMakePackage): depends_on("nlohmann-json", type="link") depends_on("composable-kernel@" + ver, when="@" + ver) for ver in ["5.4.0", "5.4.3", "5.5.0"]: + depends_on("nlohmann-json", type="link") depends_on("rocmlir@" + ver, when="@" + ver) def setup_build_environment(self, env): @@ -216,6 +217,7 @@ def cmake_args(self): if self.spec.satisfies("@5.5.1:"): args.append(self.define("MIOPEN_USE_COMPOSABLEKERNEL", "ON")) args.append(self.define("MIOPEN_ENABLE_AI_KERNEL_TUNING", "OFF")) + args.append(self.define("MIOPEN_USE_MLIR", "OFF")) args.append( "-DNLOHMANN_JSON_INCLUDE={0}".format(self.spec["nlohmann-json"].prefix.include) ) From d9cb1a107017ef543cd951283d36aef0c2a3ff28 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Wed, 11 Oct 2023 18:13:57 -0600 Subject: [PATCH 161/806] buildcache: Tell servers not to cache index or hash (#40339) --- lib/spack/spack/binary_distribution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index a9b1d6280b7f27..5559e898203c08 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -913,7 +913,7 @@ def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_di index_json_path, url_util.join(cache_prefix, "index.json"), keep_original=False, - extra_args={"ContentType": "application/json"}, + extra_args={"ContentType": "application/json", "CacheControl": "no-cache"}, ) # Push the hash @@ -921,7 +921,7 @@ def _read_specs_and_push_index(file_list, read_method, cache_prefix, db, temp_di index_hash_path, url_util.join(cache_prefix, "index.json.hash"), keep_original=False, - extra_args={"ContentType": "text/plain"}, + extra_args={"ContentType": "text/plain", "CacheControl": "no-cache"}, ) From deec1b7c2e05abcd224a73c0d53470e90b7df5bf Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 11 Oct 2023 20:08:00 -0700 Subject: [PATCH 162/806] adios2: use f-strings (#40437) --- var/spack/repos/builtin/packages/adios2/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 47affe6f8a2cac..bfb08227e6ff9d 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -109,19 +109,19 @@ class Adios2(CMakePackage, CudaPackage): depends_on("cmake@3.12.0:", type="build") for _platform in ["linux", "darwin", "cray"]: - depends_on("pkgconfig", type="build", when="platform=%s" % _platform) + depends_on("pkgconfig", type="build", when=f"platform={_platform}") variant( "pic", default=False, description="Build pic-enabled static libraries", - when="platform=%s" % _platform, + when=f"platform={_platform}", ) # libffi and libfabric and not currently supported on Windows # see Paraview's superbuild handling of libfabric at # https://gitlab.kitware.com/paraview/paraview-superbuild/-/blob/master/projects/adios2.cmake#L3 - depends_on("libffi", when="+sst platform=%s" % _platform) # optional in DILL + depends_on("libffi", when=f"+sst platform={_platform}") # optional in DILL depends_on( - "libfabric@1.6.0:", when="+sst platform=%s" % _platform + "libfabric@1.6.0:", when=f"+sst platform={_platform}" ) # optional in EVPath and SST # depends_on('bison', when='+sst') # optional in FFS, broken package # depends_on('flex', when='+sst') # optional in FFS, depends on BISON @@ -241,8 +241,8 @@ def cmake_args(self): args.extend(["-DCMAKE_Fortran_SUBMODULE_EXT=.smod", "-DCMAKE_Fortran_SUBMODULE_SEP=."]) if "+python" in spec or self.run_tests: - args.append("-DPYTHON_EXECUTABLE:FILEPATH=%s" % spec["python"].command.path) - args.append("-DPython_EXECUTABLE:FILEPATH=%s" % spec["python"].command.path) + args.append(f"-DPYTHON_EXECUTABLE:FILEPATH={spec['python'].command.path}") + args.append(f"-DPython_EXECUTABLE:FILEPATH={spec['python'].command.path}") return args From 90e73391c2aaa0ec433efb4ad963d908cb3daffb Mon Sep 17 00:00:00 2001 From: Leonhard Reichenbach Date: Thu, 12 Oct 2023 07:29:00 +0200 Subject: [PATCH 163/806] opendatadetector: add version v3.0.0 (#39693) --- var/spack/repos/builtin/packages/opendatadetector/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/opendatadetector/package.py b/var/spack/repos/builtin/packages/opendatadetector/package.py index db8c56dbbd6f7b..d54d3013a905f2 100644 --- a/var/spack/repos/builtin/packages/opendatadetector/package.py +++ b/var/spack/repos/builtin/packages/opendatadetector/package.py @@ -18,6 +18,7 @@ class Opendatadetector(CMakePackage): tags = ["hep"] version("main", branch="main") + version("v3.0.0", tag="v3.0.0", commit="e3b1eceae96fd5dddf10223753964c570ee868c9") version("v2", tag="v2", commit="7041ae086dff4ee4a8d5b65f5d9559acc6dbec47") version("v1", tag="v1", commit="81c43c6511723c13c15327479082d3dcfa1947c7") From 6a12a40208e83272f12b25441d601139fd73e79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Thu, 12 Oct 2023 07:31:46 +0200 Subject: [PATCH 164/806] [add] py-cylc-rose: new recipe (#39980) * [add] py-cylc-rose: new recipe * py-cylc-rose: update recipe --------- Co-authored-by: LydDeb --- .../builtin/packages/py-cylc-rose/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cylc-rose/package.py diff --git a/var/spack/repos/builtin/packages/py-cylc-rose/package.py b/var/spack/repos/builtin/packages/py-cylc-rose/package.py new file mode 100644 index 00000000000000..37805c66d0fe8a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cylc-rose/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 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 PyCylcRose(PythonPackage): + """A Cylc plugin providing support for the Rose rose-suite.conf file.""" + + homepage = "https://cylc.github.io/cylc-doc/latest/html/plugins/cylc-rose.html" + pypi = "cylc-rose/cylc-rose-1.3.0.tar.gz" + + maintainers("LydDeb") + + version("1.3.0", sha256="017072b69d7a50fa6d309a911d2428743b07c095f308529b36b1b787ebe7ab88") + + depends_on("py-setuptools", type="build") + depends_on("py-metomi-rose@2.1", type=("build", "run")) + depends_on("py-cylc-flow@8.2", type=("build", "run")) + depends_on("py-metomi-isodatetime", type=("build", "run")) + depends_on("py-jinja2", type=("build", "run")) From 3e1f2392d44c590e9d2a6c0176b5f397bf6a34a7 Mon Sep 17 00:00:00 2001 From: Tim Haines Date: Thu, 12 Oct 2023 00:34:22 -0500 Subject: [PATCH 165/806] must: add versions 1.8.0 and 1.9.0 (#40141) --- var/spack/repos/builtin/packages/must/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/must/package.py b/var/spack/repos/builtin/packages/must/package.py index 6cca6c9cf278b0..1b3b0b152dc52b 100644 --- a/var/spack/repos/builtin/packages/must/package.py +++ b/var/spack/repos/builtin/packages/must/package.py @@ -19,6 +19,8 @@ class Must(CMakePackage): maintainers("jgalarowicz", "dmont") + version("1.9.0", sha256="24998f4ca6bce718d69347de90798600f2385c21266c2d1dd39a87dd8bd1fba4") + version("1.8.0", sha256="9754fefd2e4c8cba812f8b56a5dd929bc84aa599b2509305e1eb8518be0a8a39") version("1.8.0-rc1", sha256="49fd2487fbd1aa41f4252c7e37efebd3f6ff48218c88e82f34b88d59348fe406") version( "1.8-preview", sha256="67b4b061db7a893e22a6610e2085072716d11738bc6cc3cb3ffd60d6833e8bad" From 30d29d0201ade86a12184f0ebe17ecaa3b9043e4 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 12 Oct 2023 02:30:22 -0700 Subject: [PATCH 166/806] acfl: use f-strings (#40433) --- var/spack/repos/builtin/packages/acfl/package.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py index 4d546e5780200d..2e7790a422a9f4 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/package.py @@ -185,8 +185,7 @@ def get_acfl_prefix(spec): ) else: return join_path( - spec.prefix, - "arm-linux-compiler-{0}_{1}".format(spec.version, get_os(spec.version.string)), + spec.prefix, f"arm-linux-compiler-{spec.version}_{get_os(spec.version.string)}" ) @@ -238,7 +237,7 @@ class Acfl(Package): # Run the installer with the desired install directory def install(self, spec, prefix): exe = Executable( - "./arm-compiler-for-linux_{0}_{1}.sh".format(spec.version, get_os(spec.version.string)) + f"./arm-compiler-for-linux_{spec.version}_{get_os(spec.version.string)}.sh" ) exe("--accept", "--force", "--install-to", prefix) From 0fd2427d9b1c27c02d16075a0cc8fa2626e7ae73 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 12 Oct 2023 12:11:22 +0200 Subject: [PATCH 167/806] clingo: fix build with Python 3.12 (#40154) --- var/spack/repos/builtin/packages/clingo/package.py | 7 +++++++ .../repos/builtin/packages/clingo/setuptools.patch | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/clingo/setuptools.patch diff --git a/var/spack/repos/builtin/packages/clingo/package.py b/var/spack/repos/builtin/packages/clingo/package.py index 73797762b5cc81..ab5fe9a0430da1 100644 --- a/var/spack/repos/builtin/packages/clingo/package.py +++ b/var/spack/repos/builtin/packages/clingo/package.py @@ -42,6 +42,7 @@ class Clingo(CMakePackage): # See https://github.com/potassco/clingo/blob/v5.5.2/INSTALL.md depends_on("cmake@3.1:", type="build") depends_on("cmake@3.18:", type="build", when="@5.5:") + depends_on("py-setuptools", when="@5.6.2:", type="build") depends_on("doxygen", type="build", when="+docs") @@ -68,6 +69,12 @@ class Clingo(CMakePackage): patch("size-t.patch", when="%msvc") patch("vs2022.patch", when="%msvc@19.30:") + # TODO: Simplify this after Spack 0.21 release. The old concretizer has problems with + # py-setuptools ^python@3.6, so we only apply the distutils -> setuptools patch for Python 3.12 + with when("@:5.6.1 ^python@3.12:"): + patch("setuptools.patch") + depends_on("py-setuptools", type="build") + def patch(self): # Doxygen is optional but can't be disabled with a -D, so patch # it out if it's really supposed to be disabled diff --git a/var/spack/repos/builtin/packages/clingo/setuptools.patch b/var/spack/repos/builtin/packages/clingo/setuptools.patch new file mode 100644 index 00000000000000..4a38a7e6d9ad9e --- /dev/null +++ b/var/spack/repos/builtin/packages/clingo/setuptools.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/python-site.py b/cmake/python-site.py +index 1e7fc8ce..95ef827f 100644 +--- a/cmake/python-site.py ++++ b/cmake/python-site.py +@@ -1,4 +1,7 @@ +-from distutils.sysconfig import get_python_lib, get_config_vars ++try: ++ from setuptools.sysconfig import get_python_lib, get_config_vars ++except ImportError: ++ from distutils.sysconfig import get_python_lib, get_config_vars + import sys + if sys.argv[1] == "prefix": + print(get_python_lib(True, False, sys.argv[2] if len(sys.argv) > 2 else None)) + From 3935e047c612f3c20c2fa7f55f762a2ef529a0c0 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 12 Oct 2023 12:12:15 +0200 Subject: [PATCH 168/806] Remove deprecated "extra_instructions" option for containers (#40365) --- lib/spack/docs/containers.rst | 8 +------- lib/spack/spack/container/writers/__init__.py | 7 ------- lib/spack/spack/schema/container.py | 15 --------------- lib/spack/spack/test/container/docker.py | 17 ----------------- share/spack/templates/container/Dockerfile | 7 ------- share/spack/templates/container/singularity.def | 6 ------ 6 files changed, 1 insertion(+), 59 deletions(-) diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst index ec9c02635ceb37..17609d740e9345 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -212,18 +212,12 @@ under the ``container`` attribute of environments: final: - libgomp - # Extra instructions - extra_instructions: - final: | - RUN echo 'export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][gromacs]\[$(tput setaf 2)\]\u\[$(tput sgr0)\]:\w $ "' >> ~/.bashrc - # Labels for the image labels: app: "gromacs" mpi: "mpich" -A detailed description of the options available can be found in the -:ref:`container_config_options` section. +A detailed description of the options available can be found in the :ref:`container_config_options` section. ------------------- Setting Base Images diff --git a/lib/spack/spack/container/writers/__init__.py b/lib/spack/spack/container/writers/__init__.py index 4e15ae6f58d815..dfed52e47e48a1 100644 --- a/lib/spack/spack/container/writers/__init__.py +++ b/lib/spack/spack/container/writers/__init__.py @@ -272,13 +272,6 @@ def _os_pkg_manager(self): raise spack.error.SpackError(msg) return os_pkg_manager - @tengine.context_property - def extra_instructions(self): - Extras = namedtuple("Extra", ["build", "final"]) - extras = self.container_config.get("extra_instructions", {}) - build, final = extras.get("build", None), extras.get("final", None) - return Extras(build=build, final=final) - @tengine.context_property def labels(self): return self.container_config.get("labels", {}) diff --git a/lib/spack/spack/schema/container.py b/lib/spack/spack/schema/container.py index 030b23829092bf..df386c3de4aeb8 100644 --- a/lib/spack/spack/schema/container.py +++ b/lib/spack/spack/schema/container.py @@ -68,12 +68,6 @@ "labels": {"type": "object"}, # Use a custom template to render the recipe "template": {"type": "string", "default": None}, - # Add a custom extra section at the bottom of a stage - "extra_instructions": { - "type": "object", - "additionalProperties": False, - "properties": {"build": {"type": "string"}, "final": {"type": "string"}}, - }, # Reserved for properties that are specific to each format "singularity": { "type": "object", @@ -89,15 +83,6 @@ "docker": {"type": "object", "additionalProperties": False, "default": {}}, "depfile": {"type": "boolean", "default": False}, }, - "deprecatedProperties": { - "properties": ["extra_instructions"], - "message": ( - "container:extra_instructions has been deprecated and will be removed " - "in Spack v0.21. Set container:template appropriately to use custom Jinja2 " - "templates instead." - ), - "error": False, - }, } properties = {"container": container_schema} diff --git a/lib/spack/spack/test/container/docker.py b/lib/spack/spack/test/container/docker.py index d6b6f4488bd687..5e0b8c3d4ea1d2 100644 --- a/lib/spack/spack/test/container/docker.py +++ b/lib/spack/spack/test/container/docker.py @@ -82,23 +82,6 @@ def test_strip_is_set_from_config(minimal_configuration): assert writer.strip is False -def test_extra_instructions_is_set_from_config(minimal_configuration): - writer = writers.create(minimal_configuration) - assert writer.extra_instructions == (None, None) - - test_line = "RUN echo Hello world!" - e = minimal_configuration["spack"]["container"] - e["extra_instructions"] = {} - e["extra_instructions"]["build"] = test_line - writer = writers.create(minimal_configuration) - assert writer.extra_instructions == (test_line, None) - - e["extra_instructions"]["final"] = test_line - del e["extra_instructions"]["build"] - writer = writers.create(minimal_configuration) - assert writer.extra_instructions == (None, test_line) - - def test_custom_base_images(minimal_configuration): """Test setting custom base images from configuration file""" minimal_configuration["spack"]["container"]["images"] = { diff --git a/share/spack/templates/container/Dockerfile b/share/spack/templates/container/Dockerfile index 27c2dbf5cfd4f5..2fad37affb37ed 100644 --- a/share/spack/templates/container/Dockerfile +++ b/share/spack/templates/container/Dockerfile @@ -39,9 +39,6 @@ RUN find -L {{ paths.view }}/* -type f -exec readlink -f '{}' \; | \ RUN cd {{ paths.environment }} && \ spack env activate --sh -d . > activate.sh -{% if extra_instructions.build %} -{{ extra_instructions.build }} -{% endif %} {% endblock build_stage %} {% endif %} @@ -70,10 +67,6 @@ RUN {% if os_package_update %}{{ os_packages_final.update }} \ && {% endif %}{{ os_packages_final.install }} {{ os_packages_final.list | join | replace('\n', ' ') }} \ && {{ os_packages_final.clean }} {% endif %} -{% if extra_instructions.final %} - -{{ extra_instructions.final }} -{% endif %} {% endblock final_stage %} {% for label, value in labels.items() %} LABEL "{{ label }}"="{{ value }}" diff --git a/share/spack/templates/container/singularity.def b/share/spack/templates/container/singularity.def index 4184db92b622e2..3b8f57dfb1b86e 100644 --- a/share/spack/templates/container/singularity.def +++ b/share/spack/templates/container/singularity.def @@ -39,9 +39,6 @@ EOF grep 'x-executable\|x-archive\|x-sharedlib' | \ awk -F: '{print $1}' | xargs strip {% endif %} -{% if extra_instructions.build %} -{{ extra_instructions.build }} -{% endif %} {% endblock build_stage %} {% if apps %} {% for application, help_text in apps.items() %} @@ -80,9 +77,6 @@ Stage: final {% endif %} # Modify the environment without relying on sourcing shell specific files at startup cat {{ paths.environment }}/environment_modifications.sh >> $SINGULARITY_ENVIRONMENT -{% if extra_instructions.final %} -{{ extra_instructions.final }} -{% endif %} {% endblock final_stage %} {% if runscript %} From 995e82e72b9253fb65f80919870a9198c7933901 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 12 Oct 2023 12:40:38 +0200 Subject: [PATCH 169/806] gettext: Add 0.22.3 and fix keyerror: "shared" (#39423) After the merge of #37957 (Add static and pic variants), if a gettext install from a build before that merge is present, building any package using gettext fails with keyerror: "shared" because the use of self.spec.variants["shared"] does not check for the presence of the new variant in the old installation but expects that the new key variants["shared"] exists always. Fix it with a fallback to the default of True and update gettext to v22.3 Co-authored-by: Bernharad Kaindl <43588962+bernhardkaindl@users.noreply.github.com> --- var/spack/repos/builtin/packages/gettext/package.py | 5 ++++- var/spack/repos/builtin/packages/procps/package.py | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index d7cccfb3391106..ee502c07853974 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -19,6 +19,7 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage): executables = [r"^gettext$"] + version("0.22.3", sha256="b838228b3f8823a6c1eddf07297197c4db13f7e1b173b9ef93f3f945a63080b6") version("0.21.1", sha256="50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6") version("0.21", sha256="d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192") version("0.20.2", sha256="b22b818e644c37f6e3d1643a1943c32c3a9bff726d601e53047d2682019ceaba") @@ -127,10 +128,12 @@ def configure_args(self): @property def libs(self): + # Do not fail if the installed gettext did not yet have the shared variant: + shared_variant = self.spec.variants.get("shared") libs = find_libraries( ["libasprintf", "libgettextlib", "libgettextpo", "libgettextsrc", "libintl"], root=self.prefix, recursive=True, - shared=self.spec.variants["shared"].value, + shared=True if not shared_variant else shared_variant.value, ) return libs diff --git a/var/spack/repos/builtin/packages/procps/package.py b/var/spack/repos/builtin/packages/procps/package.py index 238116aeadd004..791625102bc809 100644 --- a/var/spack/repos/builtin/packages/procps/package.py +++ b/var/spack/repos/builtin/packages/procps/package.py @@ -17,6 +17,7 @@ class Procps(AutotoolsPackage): url = "https://gitlab.com/procps-ng/procps/-/archive/v4.0.3/procps-v4.0.3.tar.gz" version("master", branch="master") + version("4.0.4", sha256="3214fab0f817d169f2c117842ba635bafb1cd6090273e311a8b5c6fc393ddb9d") version("4.0.3", sha256="14cc21219c45d196772274ea3f194f6d668b6cc667fbde9ee6d8039121b73fa6") version("4.0.2", sha256="b03e4b55eaa5661e726acb714e689356d80bc056b09965c2284d039ba8dc21e8") version("4.0.1", sha256="1eaff353306aba12816d14881f2b88c7c9d06023825f7224700f0c01f66c65cd") @@ -35,8 +36,11 @@ class Procps(AutotoolsPackage): depends_on("pkgconfig@0.9.0:", type="build") depends_on("dejagnu", type="test") depends_on("iconv") - depends_on("gettext", type="build") - depends_on("gettext", when="+nls") + depends_on("gettext", type="build") # required by autogen.sh + with when("+nls"): + depends_on("gettext") + # msgfmt 0.22 gives parsing errors + depends_on("gettext@:0.21", when="@:4.0.3") depends_on("ncurses") conflicts("platform=darwin", msg="procps is linux-only") From 285a50f862a7c4cbc7844cfa400b2290facba829 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 12 Oct 2023 08:27:03 -0500 Subject: [PATCH 170/806] PyTorch: fix build with Xcode 15 (#40460) --- var/spack/repos/builtin/packages/py-torch/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 30666314eea1f8..b876bf06362b98 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -634,6 +634,10 @@ def enable_or_disable(variant, keyword="USE", var=None, newer=False): # https://github.com/pytorch/pytorch/issues/60332 # env.set("USE_SYSTEM_XNNPACK", "ON") + # https://github.com/pytorch/pytorch/issues/111086 + if self.spec.satisfies("%apple-clang@15:"): + env.append_flags("LDFLAGS", "-Wl,-ld_classic") + @run_before("install") def build_amd(self): if "+rocm" in self.spec: From bfe37435a4bf006ab5d0eb62e5263a74425c80ab Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 12 Oct 2023 06:40:04 -0700 Subject: [PATCH 171/806] go: add v1.21.3 and deprecate previous versions due to CVE-2023-39533 (#40454) --- var/spack/repos/builtin/packages/go/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index a3c0de73911b92..439b7ca90c5197 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -39,10 +39,15 @@ class Go(Package): maintainers("alecbcs") - version("1.20.6", sha256="62ee5bc6fb55b8bae8f705e0cb8df86d6453626b4ecf93279e2867092e0b7f70") - version("1.19.11", sha256="e25c9ab72d811142b7f41ff6da5165fec2d1be5feec3ef2c66bc0bdecb431489") + version("1.21.3", sha256="186f2b6f8c8b704e696821b09ab2041a5c1ee13dcbc3156a13adcf75931ee488") # Deprecated Versions + # https://nvd.nist.gov/vuln/detail/CVE-2023-39533 + version( + "1.20.6", + sha256="62ee5bc6fb55b8bae8f705e0cb8df86d6453626b4ecf93279e2867092e0b7f70", + deprecated=True, + ) # https://nvd.nist.gov/vuln/detail/CVE-2023-29405 version( "1.20.4", @@ -54,6 +59,11 @@ class Go(Package): sha256="e447b498cde50215c4f7619e5124b0fc4e25fb5d16ea47271c47f278e7aa763a", deprecated=True, ) + version( + "1.19.11", + sha256="e25c9ab72d811142b7f41ff6da5165fec2d1be5feec3ef2c66bc0bdecb431489", + deprecated=True, + ) version( "1.19.9", sha256="131190a4697a70c5b1d232df5d3f55a3f9ec0e78e40516196ffb3f09ae6a5744", @@ -64,7 +74,6 @@ class Go(Package): sha256="1d7a67929dccafeaf8a29e55985bc2b789e0499cb1a17100039f084e3238da2f", deprecated=True, ) - # https://nvd.nist.gov/vuln/detail/CVE-2023-24538 version( "1.20.2", @@ -106,7 +115,7 @@ def build(self, spec, prefix): bash = which("bash") with working_dir("src"): - bash("{0}.bash".format("all" if self.run_tests else "make")) + bash(f"{'all' if self.run_tests else 'make'}.bash") def install(self, spec, prefix): install_tree(".", prefix) From aa7dfdb5c77c9a0d290d3486699cc6011b37afbf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:38:33 +0000 Subject: [PATCH 172/806] build(deps): bump python-levenshtein in /lib/spack/docs (#40461) Bumps [python-levenshtein](https://github.com/maxbachmann/python-Levenshtein) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/maxbachmann/python-Levenshtein/releases) - [Changelog](https://github.com/maxbachmann/python-Levenshtein/blob/main/HISTORY.md) - [Commits](https://github.com/maxbachmann/python-Levenshtein/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: python-levenshtein dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 6d95f1d40d1ff2..8b6c32750401e2 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -2,7 +2,7 @@ sphinx==7.2.6 sphinxcontrib-programoutput==0.17 sphinx_design==0.5.0 sphinx-rtd-theme==1.3.0 -python-levenshtein==0.22.0 +python-levenshtein==0.23.0 docutils==0.18.1 pygments==2.16.1 urllib3==2.0.6 From 265432f7b7aaa57b480c6bae4377edeaa8cc8b11 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Thu, 12 Oct 2023 17:15:00 +0200 Subject: [PATCH 173/806] libzmq: Revert "libzmq: make location of libsodium explicit (#34553)" (#40477) and make variants independent of upstream defaults --- var/spack/repos/builtin/packages/libzmq/package.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/libzmq/package.py b/var/spack/repos/builtin/packages/libzmq/package.py index 086b0a6e4afcdc..f8adbfc37b15db 100644 --- a/var/spack/repos/builtin/packages/libzmq/package.py +++ b/var/spack/repos/builtin/packages/libzmq/package.py @@ -105,19 +105,16 @@ def autoreconf(self, spec, prefix): def configure_args(self): config_args = [] + config_args.extend(self.with_or_without("docs")) config_args.extend(self.enable_or_disable("drafts")) config_args.extend(self.enable_or_disable("libbsd")) + config_args.extend(self.with_or_without("libsodium")) config_args.extend(self.enable_or_disable("libunwind")) # the package won't compile with newer compilers because warnings # are converted to errors. Hence, disable such conversion. # this option was only added in version 4.2.3. if self.spec.version >= Version("4.2.3"): config_args.append("--disable-Werror") - - if "+libsodium" in self.spec: - config_args.append("--with-libsodium=" + self.spec["libsodium"].prefix) - if "~docs" in self.spec: - config_args.append("--without-docs") if "clang" in self.compiler.cc: config_args.append("CFLAGS=-Wno-gnu") config_args.append("CXXFLAGS=-Wno-gnu") From 64ef33767fc2fb6afd1d28d4bfc7a77e7f2022ab Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 12 Oct 2023 18:28:16 +0200 Subject: [PATCH 174/806] modules:prefix_inspections: allow empty dict (#40485) Currently ``` modules: prefix_inspections:: {} ``` gives you the builtin defaults instead of no mapping. --- lib/spack/spack/user_environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py index 7ad1d408c79d36..0be11c046cdf07 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py @@ -26,8 +26,8 @@ def prefix_inspections(platform): A dictionary mapping subdirectory names to lists of environment variables to modify with that directory if it exists. """ - inspections = spack.config.get("modules:prefix_inspections", {}) - if inspections: + inspections = spack.config.get("modules:prefix_inspections") + if isinstance(inspections, dict): return inspections inspections = { From 7c354095a94e524023119bd40726cd23c42e79d1 Mon Sep 17 00:00:00 2001 From: Julius Plehn Date: Thu, 12 Oct 2023 19:27:06 +0200 Subject: [PATCH 175/806] Updates Variorum to 0.7.0 (#40488) --- var/spack/repos/builtin/packages/variorum/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/variorum/package.py b/var/spack/repos/builtin/packages/variorum/package.py index 513e68a7868afd..9d4a385d0ed118 100644 --- a/var/spack/repos/builtin/packages/variorum/package.py +++ b/var/spack/repos/builtin/packages/variorum/package.py @@ -17,6 +17,7 @@ class Variorum(CMakePackage): maintainers("slabasan", "rountree") + version("0.7.0", sha256="36ec0219379ea2b7c8f9770b3271335c776ff5a3de71585714c33356345b2f0c") version("0.6.0", sha256="c0928a0e6901808ee50142d1034de15edc2c90d7d1b9fbce43757226e7c04306") version("0.5.0", sha256="de331762e7945ee882d08454ff9c66436e2b6f87f761d2b31c6ab3028723bfed") version("0.4.1", sha256="be7407b856bc2239ecaa27d3df80aee2f541bb721fbfa183612bd9c0ce061f28") From 728eaa515f02f0e6153ed485c8fcf681606ff4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Thu, 12 Oct 2023 23:13:15 +0200 Subject: [PATCH 176/806] ospray: new versions 2.11.0 and 2.12.0 (#40394) * openimagedenoise: checksum 2.0.1 * ospray: new versions 2.11.0 and 2.12.0 - both depend on embree@4 - also update dependency versions for rkcommon, openvkl, openimagedenois and ispc - expose that dependency on openvkl is optional since @2.11 with variant "volumes" * ospray: limit embree to @3 for ospray @:2.10 --- .../packages/openimagedenoise/package.py | 1 + .../repos/builtin/packages/ospray/package.py | 30 +++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/openimagedenoise/package.py b/var/spack/repos/builtin/packages/openimagedenoise/package.py index 90eaa559ca00fc..9ccce30a86c266 100644 --- a/var/spack/repos/builtin/packages/openimagedenoise/package.py +++ b/var/spack/repos/builtin/packages/openimagedenoise/package.py @@ -17,6 +17,7 @@ class Openimagedenoise(CMakePackage): # maintainers("github_user1", "github_user2") + version("2.0.1", sha256="328eeb9809d18e835dca7203224af3748578794784c026940c02eea09c695b90") version("1.4.3", sha256="3276e252297ebad67a999298d8f0c30cfb221e166b166ae5c955d88b94ad062a") version("1.4.2", sha256="e70d27ce24b41364782376c1b3b4f074f77310ccfe5f8ffec4a13a347e48a0ea") version("1.4.1", sha256="9088966685a78adf24b8de075d66e4c0019bd7b2b9d29c6e45aaf35d294e3f6f") diff --git a/var/spack/repos/builtin/packages/ospray/package.py b/var/spack/repos/builtin/packages/ospray/package.py index fcac3239a4d99c..85a79894bbf246 100644 --- a/var/spack/repos/builtin/packages/ospray/package.py +++ b/var/spack/repos/builtin/packages/ospray/package.py @@ -16,6 +16,8 @@ class Ospray(CMakePackage): # maintainers("aumuell") + version("2.12.0", sha256="268b16952b2dd44da2a1e40d2065c960bc2442dd09b63ace8b65d3408f596301") + version("2.11.0", sha256="55974e650d9b78989ee55adb81cffd8c6e39ce5d3cf0a3b3198c522bf36f6e81") version("2.10.0", sha256="bd478284f48d2cb775fc41a2855a9d9f5ea16c861abda0f8dc94e02ea7189cb8") version("2.9.0", sha256="0145e09c3618fb8152a32d5f5cff819eb065d90975ee4e35400d2db9eb9f6398") version("2.8.0", sha256="2dabc75446a0e2e970952d325f930853a51a9b4d1868c8135f05552a4ae04d39") @@ -27,21 +29,35 @@ class Ospray(CMakePackage): variant("denoiser", default=True, description="Enable denoiser image operation") variant("glm", default=False, description="Build ospray_cpp GLM tests/tutorial") variant("mpi", default=True, description="Enable MPI support") + variant("volumes", default=True, description="Enable volumetric rendering with Open VKL") + + conflicts("~volumes", when="@:2.10") depends_on("rkcommon@1.5:") depends_on("rkcommon@1.7:1.9", when="@2.7.0:2.8") depends_on("rkcommon@1.9", when="@2.9.0") depends_on("rkcommon@1.10:", when="@2.10.0:") + depends_on("rkcommon@1.11:", when="@2.11:") depends_on("embree@3.12: +ispc") depends_on("embree@3.13.1:", when="@2.7.0:") - depends_on("openvkl@0.13.0:") - depends_on("openvkl@1.0.1:", when="@2.7.0:") - depends_on("openvkl@1.2.0:", when="@2.9.0:") - depends_on("openvkl@1.3.0:", when="@2.10.0:") - depends_on("openimagedenoise@1.2.3:", when="+denoiser") + depends_on("embree@:3", when="@:2.10") + depends_on("embree@4:", when="@2.11:") + with when("+volumes"): + depends_on("openvkl@0.13.0:") + depends_on("openvkl@1.0.1:", when="@2.7.0:") + depends_on("openvkl@1.2.0:", when="@2.9.0:") + depends_on("openvkl@1.3.0:", when="@2.10.0:") + depends_on("openvkl@1.3.2:", when="@2.11:") + with when("+denoiser"): + depends_on("openimagedenoise@1.2.3:") + depends_on("openimagedenoise@1.3:", when="@2.5:") + depends_on("openimagedenoise@:1", when="@:2.11") + depends_on("openimagedenoise@2:", when="@2.12:") depends_on("ispc@1.14.1:", type=("build")) depends_on("ispc@1.16.0:", when="@2.7.0:", type=("build")) depends_on("ispc@1.18.0:", when="@2.10.0:", type=("build")) + depends_on("ispc@1.19.0:", when="@2.11.0:", type=("build")) + depends_on("ispc@1.20.0:", when="@2.12.0:", type=("build")) depends_on("tbb") depends_on("mpi", when="+mpi") @@ -58,6 +74,10 @@ def cmake_args(self): self.define_from_variant("OSPRAY_APPS_ENABLE_GLM", "glm"), ] + # support for volumetric data + if self.spec.satisfies("@2.11:"): + args.append(self.define_from_variant("OSPRAY_ENABLE_VOLUMES", "volumes")) + # Apps enable_apps_arg = "" if self.spec.satisfies("@2.9:") else "ENABLE_" args.extend( From fb1d0f60d932b29dd419cd964cad076f0b148a93 Mon Sep 17 00:00:00 2001 From: Nils Vu Date: Thu, 12 Oct 2023 19:13:01 -0700 Subject: [PATCH 177/806] catch2: add +pic and +shared options (#40337) Also add latest version --- var/spack/repos/builtin/packages/catch2/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py index bb731a43f1a223..82eb629bb82661 100644 --- a/var/spack/repos/builtin/packages/catch2/package.py +++ b/var/spack/repos/builtin/packages/catch2/package.py @@ -19,6 +19,7 @@ class Catch2(CMakePackage): version("develop", branch="devel") # Releases + version("3.4.0", sha256="122928b814b75717316c71af69bd2b43387643ba076a6ec16e7882bfb2dfacbb") version("3.3.2", sha256="8361907f4d9bff3ae7c1edb027f813659f793053c99b67837a0c0375f065bae2") version("3.3.1", sha256="d90351cdc55421f640c553cfc0875a8c834428679444e8062e9187d05b18aace") version("3.3.0", sha256="fe2f29a54ca775c2dd04bb97ffb79d398e6210e3caa174348b5cd3b7e4ca887d") @@ -104,6 +105,11 @@ class Catch2(CMakePackage): version("1.3.5", sha256="f15730d81b4173fb860ce3561768de7d41bbefb67dc031d7d1f5ae2c07f0a472") version("1.3.0", sha256="245f6ee73e2fea66311afa1da59e5087ddab8b37ce64994ad88506e8af28c6ac") + variant( + "pic", when="@3: ~shared", default=True, description="Build with position-independent code" + ) + variant("shared", when="@3:", default=False, description="Build shared library") + def cmake_args(self): spec = self.spec args = [] @@ -112,6 +118,10 @@ def cmake_args(self): args.append("-DNO_SELFTEST={0}".format("OFF" if self.run_tests else "ON")) elif spec.satisfies("@2.1.1:"): args.append(self.define("BUILD_TESTING", self.run_tests)) + if spec.satisfies("@3:"): + args.append(self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic")) + args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) + return args @when("@:1.6") From 6aa8d76e3213e03a8b404ea84441dd1ffed21960 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 12 Oct 2023 21:32:48 -0500 Subject: [PATCH 178/806] py-cmocean: add v3.0.3 (#40482) --- var/spack/repos/builtin/packages/py-cmocean/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-cmocean/package.py b/var/spack/repos/builtin/packages/py-cmocean/package.py index 032827edba473b..89e9dc22dded35 100644 --- a/var/spack/repos/builtin/packages/py-cmocean/package.py +++ b/var/spack/repos/builtin/packages/py-cmocean/package.py @@ -13,8 +13,11 @@ class PyCmocean(PythonPackage): homepage = "https://matplotlib.org/cmocean/" pypi = "cmocean/cmocean-2.0.tar.gz" + version("3.0.3", sha256="abaf99383c1a60f52970c86052ae6c14eafa84fc16984488040283c02db77c0b") version("2.0", sha256="13eea3c8994d8e303e32a2db0b3e686f6edfb41cb21e7b0e663c2b17eea9b03a") + depends_on("python@3.8:", when="@3:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-matplotlib", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) + depends_on("py-packaging", when="@3:", type=("build", "run")) From 8a0de10f60ead1398419257fc2efa37a9bc24b3c Mon Sep 17 00:00:00 2001 From: Matthew Chan Date: Thu, 12 Oct 2023 23:59:44 -0700 Subject: [PATCH 179/806] containerize: update docs to activate env before using container templates (#40493) --- lib/spack/docs/containers.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst index 17609d740e9345..64ca1df926bbec 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -519,6 +519,13 @@ the example below: COPY data /share/myapp/data {% endblock %} +The Dockerfile is generated by running: + +.. code-block:: console + + $ spack -e /opt/environment containerize + +Note that the environment must be active for spack to read the template. The recipe that gets generated contains the two extra instruction that we added in our template extension: .. code-block:: Dockerfile From 3752fe9e4249e4467c8ab0badab876a81b186619 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 13 Oct 2023 11:18:55 +0200 Subject: [PATCH 180/806] Better error message when wrong platform is used (#40492) fixes #40299 --- lib/spack/spack/solver/concretize.lp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index fd3fb94f498451..da149dd3fa21e6 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -923,7 +923,8 @@ pkg_fact(Package, variant_single_value("dev_path")) %----------------------------------------------------------------------------- % if no platform is set, fall back to the default -:- attr("node_platform", _, Platform), not allowed_platform(Platform). +error(100, "platform '{0}' is not allowed on the current host", Platform) + :- attr("node_platform", _, Platform), not allowed_platform(Platform). attr("node_platform", PackageNode, Platform) :- attr("node", PackageNode), From c9677b24651270d1e9c7c3fe37329d460f5544b9 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 13 Oct 2023 14:59:44 +0200 Subject: [PATCH 181/806] Expand multiple build systems section (#39589) Co-authored-by: Massimiliano Culpo --- lib/spack/docs/packaging_guide.rst | 153 +++++++++++++++++++---------- 1 file changed, 102 insertions(+), 51 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index d25009532ad7a1..acc79ea3424090 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -3635,7 +3635,8 @@ regardless of the build system. The arguments for the phase are: The arguments ``spec`` and ``prefix`` are passed only for convenience, as they always correspond to ``self.spec`` and ``self.spec.prefix`` respectively. -If the ``package.py`` encodes builders explicitly, the signature for a phase changes slightly: +If the ``package.py`` has build instructions in a separate +:ref:`builder class `, the signature for a phase changes slightly: .. code-block:: python @@ -3645,56 +3646,6 @@ If the ``package.py`` encodes builders explicitly, the signature for a phase cha In this case the package is passed as the second argument, and ``self`` is the builder instance. -.. _multiple_build_systems: - -^^^^^^^^^^^^^^^^^^^^^^ -Multiple build systems -^^^^^^^^^^^^^^^^^^^^^^ - -There are cases where a software actively supports two build systems, or changes build systems -as it evolves, or needs different build systems on different platforms. Spack allows dealing with -these cases natively, if a recipe is written using builders explicitly. - -For instance, software that supports two build systems unconditionally should derive from -both ``*Package`` base classes, and declare the possible use of multiple build systems using -a directive: - -.. code-block:: python - - class ArpackNg(CMakePackage, AutotoolsPackage): - - build_system("cmake", "autotools", default="cmake") - -In this case the software can be built with both ``autotools`` and ``cmake``. Since the package -supports multiple build systems, it is necessary to declare which one is the default. The ``package.py`` -will likely contain some overriding of default builder methods: - -.. code-block:: python - - class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): - def cmake_args(self): - pass - - class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): - def configure_args(self): - pass - -In more complex cases it might happen that the build system changes according to certain conditions, -for instance across versions. That can be expressed with conditional variant values: - -.. code-block:: python - - class ArpackNg(CMakePackage, AutotoolsPackage): - - build_system( - conditional("cmake", when="@0.64:"), - conditional("autotools", when="@:0.63"), - default="cmake", - ) - -In the example the directive impose a change from ``Autotools`` to ``CMake`` going -from ``v0.63`` to ``v0.64``. - ^^^^^^^^^^^^^^^^^^ Mixin base classes ^^^^^^^^^^^^^^^^^^ @@ -3741,6 +3692,106 @@ for instance: In the example above ``Cp2k`` inherits all the conflicts and variants that ``CudaPackage`` defines. +.. _multiple_build_systems: + +---------------------- +Multiple build systems +---------------------- + +There are cases where a package actively supports two build systems, or changes build systems +as it evolves, or needs different build systems on different platforms. Spack allows dealing with +these cases by splitting the build instructions into separate builder classes. + +For instance, software that supports two build systems unconditionally should derive from +both ``*Package`` base classes, and declare the possible use of multiple build systems using +a directive: + +.. code-block:: python + + class Example(CMakePackage, AutotoolsPackage): + + variant("my_feature", default=True) + + build_system("cmake", "autotools", default="cmake") + +In this case the software can be built with both ``autotools`` and ``cmake``. Since the package +supports multiple build systems, it is necessary to declare which one is the default. + +Additional build instructions are split into separate builder classes: + +.. code-block:: python + + class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): + def cmake_args(self): + return [ + self.define_from_variant("MY_FEATURE", "my_feature") + ] + + class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): + def configure_args(self): + return self.with_or_without("my-feature", variant="my_feature") + +In this example, ``spack install example +feature build_sytem=cmake`` will +pick the ``CMakeBuilder`` and invoke ``cmake -DMY_FEATURE:BOOL=ON``. + +Similarly, ``spack install example +feature build_system=autotools`` will pick +the ``AutotoolsBuilder`` and invoke ``./configure --with-my-feature``. + +Dependencies are always specified in the package class. When some dependencies +depend on the choice of the build system, it is possible to use when conditions as +usual: + +.. code-block:: python + + class Example(CMakePackage, AutotoolsPackage): + + build_system("cmake", "autotools", default="cmake") + + # Runtime dependencies + depends_on("ncurses") + depends_on("libxml2") + + # Lowerbounds for cmake only apply when using cmake as the build system + with when("build_system=cmake"): + depends_on("cmake@3.18:", when="@2.0:", type="build") + depends_on("cmake@3:", type="build") + + # Specify extra build dependencies used only in the configure script + with when("build_system=autotools"): + depends_on("perl", type="build") + depends_on("pkgconfig", type="build") + +Very often projects switch from one build system to another, or add support +for a new build system from a certain version, which means that the choice +of the build system typically depends on a version range. Those situations can +be handled by using conditional values in the ``build_system`` directive: + +.. code-block:: python + + class Example(CMakePackage, AutotoolsPackage): + + build_system( + conditional("cmake", when="@0.64:"), + conditional("autotools", when="@:0.63"), + default="cmake", + ) + +In the example the directive impose a change from ``Autotools`` to ``CMake`` going +from ``v0.63`` to ``v0.64``. + +The ``build_system`` can be used as an ordinary variant, which also means that it can +be used in ``depends_on`` statements. This can be useful when a package *requires* that +its dependency has a CMake config file, meaning that the dependent can only build when the +dependency is built with CMake, and not Autotools. In that case, you can force the choice +of the build system in the dependent: + +.. code-block:: python + + class Dependent(CMakePackage): + + depends_on("example build_system=cmake") + + .. _install-environment: ----------------------- From 8248e180ca1588300bb51beee0b7a1ee303b81ac Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Fri, 13 Oct 2023 11:48:23 -0400 Subject: [PATCH 182/806] Add gsi-ncdiag v1.1.2 (#40508) --- var/spack/repos/builtin/packages/gsi-ncdiag/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gsi-ncdiag/package.py b/var/spack/repos/builtin/packages/gsi-ncdiag/package.py index add2e4f40a99f8..58dc16499c9a52 100644 --- a/var/spack/repos/builtin/packages/gsi-ncdiag/package.py +++ b/var/spack/repos/builtin/packages/gsi-ncdiag/package.py @@ -14,6 +14,7 @@ class GsiNcdiag(CMakePackage): maintainers("ulmononian") + version("1.1.2", sha256="085884106be1f8fd94a70292102e9351c0efdf1e619a233831fafcd9ed32cd99") version("1.1.1", sha256="26fc10cf448dd62daa1385e38921d338778416342956c478337e6c6d1b20bf8c") version("1.1.0", sha256="9195801301209d6f93890944d58ffee4e24a4e35502ab27560a8c440ee53df4c") version("1.0.0", sha256="7251d6139c2bc1580db5f7f019e10a4c73d188ddd52ccf21ecc9e39d50a6af51") From 02c680ec3a350d09e5a8214f3bb74ca6df6137e3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 13 Oct 2023 11:39:08 -0600 Subject: [PATCH 183/806] texinfo package: fix external detection (#40470) A complete texinfo install includes both `info` and `makeinfo`. Some system installations of texinfo may exclude one or the other. This updates the external finding logic to require both. --- var/spack/repos/builtin/packages/texinfo/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/texinfo/package.py b/var/spack/repos/builtin/packages/texinfo/package.py index a21cf9ec2758ed..052dee4b4db795 100644 --- a/var/spack/repos/builtin/packages/texinfo/package.py +++ b/var/spack/repos/builtin/packages/texinfo/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import re from spack.package import * @@ -69,6 +70,13 @@ def setup_build_environment(self, env): @classmethod def determine_version(cls, exe): + # On CentOS and Ubuntu, the OS package info installs "info", + # which satisfies spack external find, but "makeinfo" comes + # from texinfo and may not be installed (and vice versa). + (texinfo_path, info_exe) = os.path.split(exe) + makeinfo_exe = os.path.join(texinfo_path, "makeinfo") + if not os.path.exists(makeinfo_exe): + return None output = Executable(exe)("--version", output=str, error=str) match = re.search(r"info \(GNU texinfo\)\s+(\S+)", output) return match.group(1) if match else None From edf4aa9f527e12a57d98abf41237b4bd54d38273 Mon Sep 17 00:00:00 2001 From: Gabriel Cretin Date: Fri, 13 Oct 2023 20:30:20 +0200 Subject: [PATCH 184/806] Fpocket: fix installation (#40499) * Fpocket: fix edit() positional args + add install() * Remove comments * Fix line too long * Fix line too long * Remove extension specification in version Co-authored-by: Alec Scott * Use f-strings Co-authored-by: Alec Scott * Fix styling * Use the default MakefilePackage install stage --------- Co-authored-by: Alec Scott --- .../repos/builtin/packages/fpocket/package.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/fpocket/package.py b/var/spack/repos/builtin/packages/fpocket/package.py index 831283a4ef66dd..bf8d64aa9e8e12 100644 --- a/var/spack/repos/builtin/packages/fpocket/package.py +++ b/var/spack/repos/builtin/packages/fpocket/package.py @@ -3,23 +3,27 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) + from spack.package import * class Fpocket(MakefilePackage): - """fpocket is a very fast open source protein pocket detection algorithm - based on Voronoi tessellation.""" + """The fpocket suite of programs is a very fast open source + protein pocket detection algorithm based on Voronoi tessellation.""" homepage = "https://github.com/Discngine/fpocket" - version("master", branch="master", git="https://github.com/Discngine/fpocket.git") + url = "https://github.com/Discngine/fpocket/archive/refs/tags/4.1.tar.gz" + + version("4.1", "1a2af2d3f2df42de67301996db3b93c7eaff0375f866443c0468dcf4b1750688") depends_on("netcdf-c") + depends_on("netcdf-cxx") def setup_build_environment(self, env): if self.compiler.name == "gcc": env.set("CXX", "g++") - def edit(self): + def edit(self, spec, prefix): makefile = FileFilter("makefile") - makefile.filter("BINDIR .*", "BINDIR = %s/bin" % self.prefix) - makefile.filter("MANDIR .*", "MANDIR = %s/man/man8" % self.prefix) + makefile.filter("BINDIR .*", f"BINDIR = {prefix}/bin") + makefile.filter("MANDIR .*", f"MANDIR = {prefix}/man/man8") From a5cb7a9816b65ba0497c3160e5b526e9b1b10ebf Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 13 Oct 2023 21:43:22 +0200 Subject: [PATCH 185/806] spack checksum: improve interactive filtering (#40403) * spack checksum: improve interactive filtering * fix signature of executable * Fix restart when using editor * Don't show [x version(s) are new] when no known versions (e.g. in spack create ) * Test ^D in test_checksum_interactive_quit_from_ask_each * formatting * colorize / skip header on invalid command * show original total, not modified total * use colify for command list * Warn about possible URL changes * show possible URL change as comment * make mypy happy * drop numbers * [o]pen editor -> [e]dit --- lib/spack/spack/cmd/checksum.py | 38 ++++- lib/spack/spack/cmd/create.py | 12 +- lib/spack/spack/stage.py | 213 +++++++++++++++++++++++---- lib/spack/spack/test/cmd/checksum.py | 140 ++++++++++++++++-- lib/spack/spack/url.py | 2 +- lib/spack/spack/util/editor.py | 2 +- 6 files changed, 352 insertions(+), 55 deletions(-) diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index a0d6611d944542..fa969c097995b1 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -7,6 +7,7 @@ import re import sys +import llnl.string import llnl.util.lang from llnl.util import tty @@ -15,6 +16,7 @@ import spack.spec import spack.stage import spack.util.crypto +import spack.util.web as web_util from spack.cmd.common import arguments from spack.package_base import PackageBase, deprecated_version, preferred_version from spack.util.editor import editor @@ -128,18 +130,38 @@ def checksum(parser, args): remote_versions = pkg.fetch_remote_versions(args.jobs) url_dict = remote_versions + # A spidered URL can differ from the package.py *computed* URL, pointing to different tarballs. + # For example, GitHub release pages sometimes have multiple tarballs with different shasum: + # - releases/download/1.0/-1.0.tar.gz (uploaded tarball) + # - archive/refs/tags/1.0.tar.gz (generated tarball) + # We wanna ensure that `spack checksum` and `spack install` ultimately use the same URL, so + # here we check whether the crawled and computed URLs disagree, and if so, prioritize the + # former if that URL exists (just sending a HEAD request that is). + url_changed_for_version = set() + for version, url in url_dict.items(): + possible_urls = pkg.all_urls_for_version(version) + if url not in possible_urls: + for possible_url in possible_urls: + if web_util.url_exists(possible_url): + url_dict[version] = possible_url + break + else: + url_changed_for_version.add(version) + if not url_dict: tty.die(f"Could not find any remote versions for {pkg.name}") - - # print an empty line to create a new output section block - print() + elif len(url_dict) > 1 and not args.batch and sys.stdin.isatty(): + filtered_url_dict = spack.stage.interactive_version_filter( + url_dict, pkg.versions, url_changes=url_changed_for_version + ) + if filtered_url_dict is None: + exit(0) + url_dict = filtered_url_dict + else: + tty.info(f"Found {llnl.string.plural(len(url_dict), 'version')} of {pkg.name}") version_hashes = spack.stage.get_checksums_for_versions( - url_dict, - pkg.name, - keep_stage=args.keep_stage, - batch=(args.batch or len(versions) > 0 or len(url_dict) == 1), - fetch_options=pkg.fetch_options, + url_dict, pkg.name, keep_stage=args.keep_stage, fetch_options=pkg.fetch_options ) if args.verify: diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index e3569d998f8560..474e271d1791f4 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -5,6 +5,7 @@ import os import re +import sys import urllib.parse import llnl.util.tty as tty @@ -823,6 +824,11 @@ def get_versions(args, name): # Find available versions try: url_dict = spack.url.find_versions_of_archive(args.url) + if len(url_dict) > 1 and not args.batch and sys.stdin.isatty(): + url_dict_filtered = spack.stage.interactive_version_filter(url_dict) + if url_dict_filtered is None: + exit(0) + url_dict = url_dict_filtered except UndetectableVersionError: # Use fake versions tty.warn("Couldn't detect version in: {0}".format(args.url)) @@ -834,11 +840,7 @@ def get_versions(args, name): url_dict = {version: args.url} version_hashes = spack.stage.get_checksums_for_versions( - url_dict, - name, - first_stage_function=guesser, - keep_stage=args.keep_stage, - batch=(args.batch or len(url_dict) == 1), + url_dict, name, first_stage_function=guesser, keep_stage=args.keep_stage ) versions = get_version_lines(version_hashes, url_dict) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 73b82c1378d261..c86ed1955bd889 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -7,12 +7,13 @@ import getpass import glob import hashlib +import io import os import shutil import stat import sys import tempfile -from typing import Callable, Dict, Iterable, Optional +from typing import Callable, Dict, Iterable, Optional, Set import llnl.string import llnl.util.lang @@ -27,6 +28,8 @@ partition_path, remove_linked_tree, ) +from llnl.util.tty.colify import colify +from llnl.util.tty.color import colorize import spack.caches import spack.config @@ -35,11 +38,14 @@ import spack.mirror import spack.paths import spack.spec +import spack.stage import spack.util.lock import spack.util.path as sup import spack.util.pattern as pattern import spack.util.url as url_util from spack.util.crypto import bit_length, prefix_bits +from spack.util.editor import editor, executable +from spack.version import StandardVersion, VersionList # The well-known stage source subdirectory name. _source_path_subdir = "spack-src" @@ -860,11 +866,187 @@ def purge(): os.remove(stage_path) +def interactive_version_filter( + url_dict: Dict[StandardVersion, str], + known_versions: Iterable[StandardVersion] = (), + *, + url_changes: Set[StandardVersion] = set(), + input: Callable[..., str] = input, +) -> Optional[Dict[StandardVersion, str]]: + """Interactively filter the list of spidered versions. + + Args: + url_dict: Dictionary of versions to URLs + known_versions: Versions that can be skipped because they are already known + + Returns: + Filtered dictionary of versions to URLs or None if the user wants to quit + """ + # Find length of longest string in the list for padding + sorted_and_filtered = sorted(url_dict.keys(), reverse=True) + version_filter = VersionList([":"]) + max_len = max(len(str(v)) for v in sorted_and_filtered) + orig_url_dict = url_dict # only copy when using editor to modify + print_header = True + VERSION_COLOR = spack.spec.VERSION_COLOR + while True: + if print_header: + has_filter = version_filter != VersionList([":"]) + header = [] + if len(sorted_and_filtered) == len(orig_url_dict): + header.append( + f"Selected {llnl.string.plural(len(sorted_and_filtered), 'version')}" + ) + else: + header.append( + f"Selected {len(sorted_and_filtered)} of {len(orig_url_dict)} versions" + ) + if known_versions: + num_new = sum(1 for v in sorted_and_filtered if v not in known_versions) + header.append(f"{llnl.string.plural(num_new, 'new version')}") + if has_filter: + header.append(colorize(f"Filtered by {VERSION_COLOR}{version_filter}@.")) + + version_with_url = [ + colorize( + f"{VERSION_COLOR}{str(v):{max_len}}@. {url_dict[v]}" + f"{' @K{# NOTE: change of URL}' if v in url_changes else ''}" + ) + for v in sorted_and_filtered + ] + tty.msg(". ".join(header), *llnl.util.lang.elide_list(version_with_url)) + print() + + print_header = True + + print("commands:") + commands = ( + "@*b{[c]}hecksum", + "@*b{[e]}dit", + "@*b{[f]}ilter", + "@*b{[a]}sk each", + "@*b{[n]}ew only", + "@*b{[r]}estart", + "@*b{[q]}uit", + ) + colify(list(map(colorize, commands)), indent=2) + + try: + command = input(colorize("@*g{command>} ")).strip().lower() + except EOFError: + print() + command = "q" + + if command == "c": + break + elif command == "e": + # Create a temporary file in the stage dir with lines of the form + # + # which the user can modify. Once the editor is closed, the file is + # read back in and the versions to url dict is updated. + + # Create a temporary file by hashing its contents. + buffer = io.StringIO() + buffer.write("# Edit this file to change the versions and urls to fetch\n") + for v in sorted_and_filtered: + buffer.write(f"{str(v):{max_len}} {url_dict[v]}\n") + data = buffer.getvalue().encode("utf-8") + + short_hash = hashlib.sha1(data).hexdigest()[:7] + filename = f"{spack.stage.stage_prefix}versions-{short_hash}.txt" + filepath = os.path.join(spack.stage.get_stage_root(), filename) + + # Write contents + with open(filepath, "wb") as f: + f.write(data) + + # Open editor + editor(filepath, exec_fn=executable) + + # Read back in + with open(filepath, "r") as f: + orig_url_dict, url_dict = url_dict, {} + for line in f: + line = line.strip() + # Skip empty lines and comments + if not line or line.startswith("#"): + continue + try: + version, url = line.split(None, 1) + except ValueError: + tty.warn(f"Couldn't parse: {line}") + continue + try: + url_dict[StandardVersion.from_string(version)] = url + except ValueError: + tty.warn(f"Invalid version: {version}") + continue + sorted_and_filtered = sorted(url_dict.keys(), reverse=True) + + os.unlink(filepath) + elif command == "f": + tty.msg( + colorize( + f"Examples filters: {VERSION_COLOR}1.2@. " + f"or {VERSION_COLOR}1.1:1.3@. " + f"or {VERSION_COLOR}=1.2, 1.2.2:@." + ) + ) + try: + # Allow a leading @ version specifier + filter_spec = input(colorize("@*g{filter>} ")).strip().lstrip("@") + except EOFError: + print() + continue + try: + version_filter.intersect(VersionList([filter_spec])) + except ValueError: + tty.warn(f"Invalid version specifier: {filter_spec}") + continue + # Apply filter + sorted_and_filtered = [v for v in sorted_and_filtered if v.satisfies(version_filter)] + elif command == "a": + i = 0 + while i < len(sorted_and_filtered): + v = sorted_and_filtered[i] + try: + answer = input(f" {str(v):{max_len}} {url_dict[v]} [Y/n]? ").strip().lower() + except EOFError: + # If ^D, don't fully exit, but go back to the command prompt, now with possibly + # fewer versions + print() + break + if answer in ("n", "no"): + del sorted_and_filtered[i] + elif answer in ("y", "yes", ""): + i += 1 + else: + # Went over each version, so go to checksumming + break + elif command == "n": + sorted_and_filtered = [v for v in sorted_and_filtered if v not in known_versions] + elif command == "r": + url_dict = orig_url_dict + sorted_and_filtered = sorted(url_dict.keys(), reverse=True) + version_filter = VersionList([":"]) + elif command == "q": + try: + if input("Really quit [y/N]? ").strip().lower() in ("y", "yes"): + return None + except EOFError: + print() + return None + else: + tty.warn(f"Ignoring invalid command: {command}") + print_header = False + continue + return {v: url_dict[v] for v in sorted_and_filtered} + + def get_checksums_for_versions( url_by_version: Dict[str, str], package_name: str, *, - batch: bool = False, first_stage_function: Optional[Callable[[Stage, str], None]] = None, keep_stage: bool = False, concurrency: Optional[int] = None, @@ -890,32 +1072,7 @@ def get_checksums_for_versions( Returns: A dictionary mapping each version to the corresponding checksum """ - sorted_versions = sorted(url_by_version.keys(), reverse=True) - - # Find length of longest string in the list for padding - max_len = max(len(str(v)) for v in sorted_versions) - num_ver = len(sorted_versions) - - tty.msg( - f"Found {llnl.string.plural(num_ver, 'version')} of {package_name}:", - "", - *llnl.util.lang.elide_list( - ["{0:{1}} {2}".format(str(v), max_len, url_by_version[v]) for v in sorted_versions] - ), - ) - print() - - if batch: - archives_to_fetch = len(sorted_versions) - else: - archives_to_fetch = tty.get_number( - "How many would you like to checksum?", default=1, abort="q" - ) - - if not archives_to_fetch: - tty.die("Aborted.") - - versions = sorted_versions[:archives_to_fetch] + versions = sorted(url_by_version.keys(), reverse=True) search_arguments = [(url_by_version[v], v) for v in versions] version_hashes, errors = {}, [] diff --git a/lib/spack/spack/test/cmd/checksum.py b/lib/spack/spack/test/cmd/checksum.py index 323ec2ec02270f..ce7784c7a1d3b1 100644 --- a/lib/spack/spack/test/cmd/checksum.py +++ b/lib/spack/spack/test/cmd/checksum.py @@ -7,12 +7,12 @@ import pytest -import llnl.util.tty as tty - import spack.cmd.checksum import spack.repo import spack.spec from spack.main import SpackCommand +from spack.stage import interactive_version_filter +from spack.version import Version spack_checksum = SpackCommand("checksum") @@ -56,18 +56,134 @@ def test_checksum(arguments, expected, mock_packages, mock_clone_repo, mock_stag assert "version(" in output -@pytest.mark.not_on_windows("Not supported on Windows (yet)") -def test_checksum_interactive(mock_packages, mock_fetch, mock_stage, monkeypatch): - # TODO: mock_fetch doesn't actually work with stage, working around with ignoring - # fail_on_error for now - def _get_number(*args, **kwargs): - return 1 +def input_from_commands(*commands): + """Create a function that returns the next command from a list of inputs for interactive spack + checksum. If None is encountered, this is equivalent to EOF / ^D.""" + commands = iter(commands) + + def _input(prompt): + cmd = next(commands) + if cmd is None: + raise EOFError + assert isinstance(cmd, str) + return cmd + + return _input + + +def test_checksum_interactive_filter(): + # Filter effectively by 1:1.0, then checksum. + input = input_from_commands("f", "@1:", "f", "@:1.0", "c") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0.1"): "https://www.example.com/pkg-1.0.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) == { + Version("1.0.1"): "https://www.example.com/pkg-1.0.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + } + + +def test_checksum_interactive_return_from_filter_prompt(): + # Enter and then exit filter subcommand. + input = input_from_commands("f", None, "c") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0.1"): "https://www.example.com/pkg-1.0.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) == { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0.1"): "https://www.example.com/pkg-1.0.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + } + + +def test_checksum_interactive_quit_returns_none(): + # Quit after filtering something out (y to confirm quit) + input = input_from_commands("f", "@1:", "q", "y") + assert ( + interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) + is None + ) - monkeypatch.setattr(tty, "get_number", _get_number) - output = spack_checksum("preferred-test", fail_on_error=False) - assert "version of preferred-test" in output - assert "version(" in output +def test_checksum_interactive_reset_resets(): + # Filter 1:, then reset, then filter :0, should just given 0.9 (it was filtered out + # before reset) + input = input_from_commands("f", "@1:", "r", "f", ":0", "c") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) == {Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz"} + + +def test_checksum_interactive_ask_each(): + # Ask each should run on the filtered list. First select 1.x, then select only the second + # entry, which is 1.0.1. + input = input_from_commands("f", "@1:", "a", "n", "y", "n") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0.1"): "https://www.example.com/pkg-1.0.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) == {Version("1.0.1"): "https://www.example.com/pkg-1.0.1.tar.gz"} + + +def test_checksum_interactive_quit_from_ask_each(): + # Enter ask each mode, select the second item, then quit from submenu, then checksum, which + # should still include the last item at which ask each stopped. + input = input_from_commands("a", "n", "y", None, "c") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) == { + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + } + + +def test_checksum_interactive_new_only(): + # The 1.0 version is known already, and should be dropped on `n`. + input = input_from_commands("n", "c") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + known_versions=[Version("1.0")], + input=input, + ) == { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + } def test_checksum_versions(mock_packages, mock_clone_repo, mock_fetch, mock_stage): diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index 080c924596188f..460c42a1af2add 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -647,7 +647,7 @@ def find_versions_of_archive( list_urls |= additional_list_urls # Grab some web pages to scrape. - pages, links = spack.util.web.spider(list_urls, depth=list_depth, concurrency=concurrency) + _, links = spack.util.web.spider(list_urls, depth=list_depth, concurrency=concurrency) # Scrape them for archive URLs regexes = [] diff --git a/lib/spack/spack/util/editor.py b/lib/spack/spack/util/editor.py index 50e6b272c2a9a0..eff896f87e0d83 100644 --- a/lib/spack/spack/util/editor.py +++ b/lib/spack/spack/util/editor.py @@ -61,7 +61,7 @@ def executable(exe: str, args: List[str]) -> int: return cmd.returncode -def editor(*args: List[str], exec_fn: Callable[[str, List[str]], int] = os.execv) -> bool: +def editor(*args: str, exec_fn: Callable[[str, List[str]], int] = os.execv) -> bool: """Invoke the user's editor. This will try to execute the following, in order: From a3a29006aab0123efbe5c1d2229539e6f4dfc1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Fri, 13 Oct 2023 21:57:13 +0200 Subject: [PATCH 186/806] wayland: dot is a build dependency (#39854) * wayland: dot is a build dependency otherwise this build failure happens: ../spack-src/doc/meson.build:5:6: ERROR: Program 'dot' not found or not executable * wayland: make building of documentation optional renders several dependencies optional --- .../repos/builtin/packages/wayland/package.py | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/wayland/package.py b/var/spack/repos/builtin/packages/wayland/package.py index 03c276a98090c5..baee2fcc817433 100644 --- a/var/spack/repos/builtin/packages/wayland/package.py +++ b/var/spack/repos/builtin/packages/wayland/package.py @@ -27,6 +27,8 @@ class Wayland(MesonPackage, AutotoolsPackage): default="meson", ) + variant("doc", default=False, description="Build documentation") + version("1.22.0", sha256="bbca9c906a8fb8992409ebf51812f19e2a784b2c169d4b784cdd753b4bb448ef") version("1.21.0", sha256="53b7fa67142e653820030ec049971bcb5e84ac99e05cba5bcb9cb55f43fae4b3") version("1.20.0", sha256="20523cd6f2c18c3c86725467157c6221e19de76fbfad944042a2d494af3c7a92") @@ -45,11 +47,28 @@ class Wayland(MesonPackage, AutotoolsPackage): depends_on("meson@0.56.0:", type="build") depends_on("pkgconfig", type="build") - depends_on("doxygen", type="build") - depends_on("xmlto", type="build") - depends_on("libxslt", type="build") - depends_on("docbook-xsl", type="build") depends_on("libxml2") depends_on("chrpath") depends_on("expat") depends_on("libffi") + + with when("+doc"): + depends_on("docbook-xsl", type="build") + depends_on("doxygen", type="build") + depends_on("xmlto", type="build") + depends_on("libxslt", type="build") + depends_on("graphviz+libgd", type="build") + + @when("build_system=autotools") + def configure_args(self): + args = [] + args.extend(self.enable_or_disable("documentation", variant="doc")) + return args + + @when("build_system=meson") + def meson_args(self): + spec = self.spec + opt_bool = lambda c, o: "-D%s=%s" % (o, str(c).lower()) + args = [] + args.append(opt_bool("+doc" in spec, "documentation")) + return args From a6cfeabc1016e6f58decb9789d52a80e6e2a5284 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:21:43 -0700 Subject: [PATCH 187/806] cairo: add shared and pic variants (#40302) --- var/spack/repos/builtin/packages/cairo/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index 4035728e2e2d40..530b4d49042d2c 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -39,6 +39,8 @@ class Cairo(AutotoolsPackage): variant("fc", default=False, description="Enable cairo's Fontconfig font backend feature") variant("png", default=False, description="Enable cairo's PNG functions feature") variant("svg", default=False, description="Enable cairo's SVN functions feature") + variant("shared", default=True, description="Build shared libraries") + variant("pic", default=True, description="Enable position-independent code (PIC)") depends_on("libx11", when="+X") depends_on("libxext", when="+X") @@ -61,6 +63,7 @@ class Cairo(AutotoolsPackage): conflicts("+png", when="platform=darwin") conflicts("+svg", when="platform=darwin") + conflicts("+shared~pic") # patch from https://gitlab.freedesktop.org/cairo/cairo/issues/346 patch("fontconfig.patch", when="@1.16.0:1.17.2") @@ -84,6 +87,15 @@ def configure_args(self): args.extend(self.enable_or_disable("gobject")) args.extend(self.enable_or_disable("ft")) args.extend(self.enable_or_disable("fc")) + args.extend(self.enable_or_disable("shared")) + args.extend(self.with_or_without("pic")) + + if self.spec.satisfies("+ft ^freetype~shared"): + pkgconf = which("pkg-config") + ldflags = pkgconf("--libs-only-L", "--static", "freetype2", output=str) + libs = pkgconf("--libs-only-l", "--static", "freetype2", output=str) + args.append(f"LDFLAGS={ldflags}") + args.append(f"LIBS={libs}") return args From a6fbfedc0833b24dc35e2f998443d234cef986d8 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:32:25 +0200 Subject: [PATCH 188/806] sqlite: add 3.43.2 (#40520) --- var/spack/repos/builtin/packages/sqlite/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py index 0f331f964096eb..19890314707597 100644 --- a/var/spack/repos/builtin/packages/sqlite/package.py +++ b/var/spack/repos/builtin/packages/sqlite/package.py @@ -17,6 +17,7 @@ class Sqlite(AutotoolsPackage): homepage = "https://www.sqlite.org" + version("3.43.2", sha256="6d422b6f62c4de2ca80d61860e3a3fb693554d2f75bb1aaca743ccc4d6f609f0") version("3.42.0", sha256="7abcfd161c6e2742ca5c6c0895d1f853c940f203304a0b49da4e1eca5d088ca6") version("3.40.1", sha256="2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9") version("3.40.0", sha256="0333552076d2700c75352256e91c78bf5cd62491589ba0c69aed0a81868980e7") From 7d9607766764d117b6ccbc9cc4c23580b00e0d57 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:33:16 +0200 Subject: [PATCH 189/806] glib: add 2.78.0, 2.76.6 (#40517) --- var/spack/repos/builtin/packages/glib/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 4f8d1415f1304b..7ccdf2fd2ad0c7 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -26,6 +26,8 @@ class Glib(MesonPackage, AutotoolsPackage): maintainers("michaelkuhn") + version("2.78.0", sha256="44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30") + version("2.76.6", sha256="1136ae6987dcbb64e0be3197a80190520f7acab81e2bfb937dc85c11c8aa9f04") version("2.76.4", sha256="5a5a191c96836e166a7771f7ea6ca2b0069c603c7da3cba1cd38d1694a395dda") version("2.76.3", sha256="c0be444e403d7c3184d1f394f89f0b644710b5e9331b54fa4e8b5037813ad32a") version("2.76.2", sha256="24f3847857b1d8674cdb0389a36edec0f13c666cd3ce727ecd340eb9da8aca9e") From 86c7d646c3303bd1f8050e4b7f62cbf974e56187 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:33:36 +0200 Subject: [PATCH 190/806] Fix pkgconfig dependencies (#40524) `pkgconfig` is the correct virtual dependency. --- var/spack/repos/builtin/packages/apr-util/package.py | 2 +- var/spack/repos/builtin/packages/libpostal/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index df1379a0fa0ac1..2351c48619f49c 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -32,7 +32,7 @@ class AprUtil(AutotoolsPackage): depends_on("postgresql", when="+pgsql") depends_on("sqlite", when="+sqlite") depends_on("unixodbc", when="+odbc") - depends_on("pkg-config", type="build", when="+crypto ^openssl~shared") + depends_on("pkgconfig", type="build", when="+crypto ^openssl~shared") @property def libs(self): diff --git a/var/spack/repos/builtin/packages/libpostal/package.py b/var/spack/repos/builtin/packages/libpostal/package.py index 449ab126c3d5d6..d04b67e51f3b43 100644 --- a/var/spack/repos/builtin/packages/libpostal/package.py +++ b/var/spack/repos/builtin/packages/libpostal/package.py @@ -28,7 +28,7 @@ class Libpostal(AutotoolsPackage): depends_on("libtool", type="build") depends_on("m4", type="build") depends_on("curl", type="build") - depends_on("pkg-config", type="build") + depends_on("pkgconfig", type="build") def autoreconf(self, spec, prefix): which("sh")("bootstrap.sh") From 794fb9b252431457b32ff4c8c2f8893ad1c16634 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:34:32 +0200 Subject: [PATCH 191/806] rocksdb: add 8.6.7 (#40525) --- var/spack/repos/builtin/packages/rocksdb/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/rocksdb/package.py b/var/spack/repos/builtin/packages/rocksdb/package.py index fa177313026c83..80f4b88b822ea9 100644 --- a/var/spack/repos/builtin/packages/rocksdb/package.py +++ b/var/spack/repos/builtin/packages/rocksdb/package.py @@ -14,6 +14,7 @@ class Rocksdb(MakefilePackage): git = "https://github.com/facebook/rocksdb.git" version("master", git=git, branch="master", submodules=True) + version("8.6.7", sha256="cdb2fc3c6a556f20591f564cb8e023e56828469aa3f76e1d9535c443ba1f0c1a") version("8.1.1", sha256="9102704e169cfb53e7724a30750eeeb3e71307663852f01fa08d5a320e6155a8") version("7.7.3", sha256="b8ac9784a342b2e314c821f6d701148912215666ac5e9bdbccd93cf3767cb611") version("7.2.2", sha256="c4ea6bd2e3ffe3f0f8921c699234d59108c9122d61b0ba2aa78358642a7b614e") From d0f046e788c95e75d64b49d8d095453ea1e6c363 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:35:46 +0200 Subject: [PATCH 192/806] mariadb-c-client: add 3.3.7 (#40521) --- var/spack/repos/builtin/packages/mariadb-c-client/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mariadb-c-client/package.py b/var/spack/repos/builtin/packages/mariadb-c-client/package.py index 047c30b5aa5320..148fc1e81199fa 100644 --- a/var/spack/repos/builtin/packages/mariadb-c-client/package.py +++ b/var/spack/repos/builtin/packages/mariadb-c-client/package.py @@ -22,6 +22,7 @@ class MariadbCClient(CMakePackage): list_url = "https://downloads.mariadb.com/Connectors/c/" list_depth = 1 + version("3.3.7", sha256="975a9a862fed80f84e0206373f7ef05537aada5b65d99b71b36ab892b44240bf") version("3.3.5", sha256="ca72eb26f6db2befa77e48ff966f71bcd3cb44b33bd8bbb810b65e6d011c1e5c") version("3.3.4", sha256="486e5fdf976a8e7fadf583ae912128655e013ac575fa79b2d1af0fb8827a78ed") version("3.3.2", sha256="7e0722e07d30bb906fac9fe10fb582cde1e148e05a83d9ca7b6fcc884b68fbce") From ef11fd7f75d5274a988da162d1541464f9a0b155 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:37:07 +0200 Subject: [PATCH 193/806] libfuse: add 3.16.2 (#40519) --- var/spack/repos/builtin/packages/libfuse/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libfuse/package.py b/var/spack/repos/builtin/packages/libfuse/package.py index ed09c794a57bea..7180fa8181a9f1 100644 --- a/var/spack/repos/builtin/packages/libfuse/package.py +++ b/var/spack/repos/builtin/packages/libfuse/package.py @@ -18,6 +18,7 @@ class Libfuse(MesonPackage): keep_werror = "all" + version("3.16.2", sha256="1bc306be1a1f4f6c8965fbdd79c9ccca021fdc4b277d501483a711cbd7dbcd6c") version("3.11.0", sha256="25a00226d2d449c15b2f08467d6d5ebbb2a428260c4ab773721c32adbc6da072") version("3.10.5", sha256="e73f75e58da59a0e333d337c105093c496c0fd7356ef3a5a540f560697c9c4e6") version("3.10.4", sha256="bfcb2520fd83db29e9fefd57d3abd5285f38ad484739aeee8e03fbec9b2d984a") @@ -67,7 +68,7 @@ def url_for_version(self, version): conflicts("platform=darwin", msg="libfuse does not support OS-X, use macfuse instead") # Drops the install script which does system configuration - patch("0001-Do-not-run-install-script.patch", when="@3: ~system_install") + patch("0001-Do-not-run-install-script.patch", when="@3:3.11 ~system_install") patch( "https://src.fedoraproject.org/rpms/fuse3/raw/0519b7bf17c4dd1b31ee704d49f8ed94aa5ba6ab/f/fuse3-gcc11.patch", sha256="3ad6719d2393b46615b5787e71778917a7a6aaa189ba3c3e0fc16d110a8414ec", @@ -117,6 +118,9 @@ def meson_args(self): if "~system_install" in self.spec: # Fix meson's setup if meson does not have the host system's udev package: args.append("-Dudevrulesdir={0}".format(self.prefix.etc.rules.d)) + + if self.spec.satisfies("@3.12:"): + args.append("-Dinitscriptdir=") else: # Likewise, but with +system_install, it may install to /lib/udev/rules.d: args.append("-Dudevrulesdir={0}".format("/lib/udev/rules.d")) From 87371d58d5a92d0468290cfc91fb279c42509a4b Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 14 Oct 2023 11:38:00 +0200 Subject: [PATCH 194/806] libbson, mongo-c-driver: add 1.24.4 (#40518) --- .../repos/builtin/packages/libbson/package.py | 1 + .../packages/mongo-c-driver/package.py | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/libbson/package.py b/var/spack/repos/builtin/packages/libbson/package.py index f3382fe7128bc1..082c50a6acd258 100644 --- a/var/spack/repos/builtin/packages/libbson/package.py +++ b/var/spack/repos/builtin/packages/libbson/package.py @@ -15,6 +15,7 @@ class Libbson(Package): maintainers("michaelkuhn") + version("1.24.4", sha256="2f4a3e8943bfe3b8672c2053f88cf74acc8494dc98a45445f727901eee141544") version("1.23.4", sha256="209406c91fcf7c63aa633179a0a6b1b36ba237fb77e0470fd81f7299a408e334") version("1.23.3", sha256="c8f951d4f965d455f37ae2e10b72914736fc0f25c4ffc14afc3cbadd1a574ef6") version("1.23.2", sha256="123c358827eea07cd76a31c40281bb1c81b6744f6587c96d0cf217be8b1234e3") diff --git a/var/spack/repos/builtin/packages/mongo-c-driver/package.py b/var/spack/repos/builtin/packages/mongo-c-driver/package.py index d36854c931b551..94c92d9c023a99 100644 --- a/var/spack/repos/builtin/packages/mongo-c-driver/package.py +++ b/var/spack/repos/builtin/packages/mongo-c-driver/package.py @@ -14,6 +14,7 @@ class MongoCDriver(Package): maintainers("michaelkuhn") + version("1.24.4", sha256="2f4a3e8943bfe3b8672c2053f88cf74acc8494dc98a45445f727901eee141544") version("1.23.3", sha256="c8f951d4f965d455f37ae2e10b72914736fc0f25c4ffc14afc3cbadd1a574ef6") version("1.21.0", sha256="840ff79480070f98870743fbb332e2c10dd021b6b9c952d08010efdda4d70ee4") version("1.17.6", sha256="8644deec7ae585e8d12566978f2017181e883f303a028b5b3ccb83c91248b150") @@ -52,14 +53,15 @@ class MongoCDriver(Package): depends_on("pkgconfig", type="build") # When updating mongo-c-driver, libbson has to be kept in sync. - depends_on("libbson@1.23.0:1.23", when="@1.23") - depends_on("libbson@1.21.0:1.21", when="@1.21") - depends_on("libbson@1.17.0:1.17", when="@1.17") - depends_on("libbson@1.16.0:1.16", when="@1.16") - depends_on("libbson@1.9.0:1.9", when="@1.9") - depends_on("libbson@1.8.0:1.8", when="@1.8") - depends_on("libbson@1.7.0:1.7", when="@1.7") - depends_on("libbson@1.6.0:1.6", when="@1.6") + depends_on("libbson@1.24", when="@1.24") + depends_on("libbson@1.23", when="@1.23") + depends_on("libbson@1.21", when="@1.21") + depends_on("libbson@1.17", when="@1.17") + depends_on("libbson@1.16", when="@1.16") + depends_on("libbson@1.9", when="@1.9") + depends_on("libbson@1.8", when="@1.8") + depends_on("libbson@1.7", when="@1.7") + depends_on("libbson@1.6", when="@1.6") depends_on("openssl", when="+ssl") depends_on("snappy", when="+snappy") @@ -69,7 +71,12 @@ class MongoCDriver(Package): def cmake_args(self): spec = self.spec - args = ["-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF", "-DENABLE_BSON=SYSTEM"] + args = ["-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF"] + + if spec.satisfies("@1.24:"): + args.append("-DUSE_SYSTEM_LIBBSON=ON") + else: + args.append("-DENABLE_BSON=SYSTEM") if "+ssl" in spec: args.append("-DENABLE_SSL=OPENSSL") From c0ac5e3f6be6c71bdac5dd853b0b41ddc8ee69c5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 14 Oct 2023 17:28:52 +0200 Subject: [PATCH 195/806] git: add 2.42 (#40528) --- var/spack/repos/builtin/packages/git/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index b63335eabce4bc..23bcb6d4f23675 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -27,6 +27,7 @@ class Git(AutotoolsPackage): # Every new git release comes with a corresponding manpage resource: # https://www.kernel.org/pub/software/scm/git/git-manpages-{version}.tar.gz # https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc + version("2.42.0", sha256="34aedd54210d7216a55d642bbb4cfb22695b7610719a106bf0ddef4c82a8beed") version("2.41.0", sha256="c4a6a3dd1827895a80cbd824e14d94811796ae54037549e0da93f7b84cb45b9f") version("2.40.1", sha256="55511f10f3b1cdf5db4e0e3dea61819dfb67661b0507a5a2b061c70e4f87e14c") version("2.39.3", sha256="2f9aa93c548941cc5aff641cedc24add15b912ad8c9b36ff5a41b1a9dcad783e") @@ -143,6 +144,7 @@ class Git(AutotoolsPackage): ) for _version, _sha256_manpage in { + "2.42.0": "51643c53d70ce15dde83b6da2bad76ba0c7bbcd4f944d7c378f03a15b9f2e1de", "2.41.0": "7b77c646b36d33c5c0f62677a147142011093270d6fd628ca38c42d5301f3888", "2.40.1": "6bbde434121bd0bf8aa574c60fd9a162388383679bd5ddd99921505149ffd4c2", "2.40.0": "fda16047e9c1dd07d9585cc26bbf4002ebf8462ada54cb72b97a0e48135fd435", From 3783032d28539fac1dd316c98278f08513b04c26 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 14 Oct 2023 17:29:55 +0200 Subject: [PATCH 196/806] screen: add v4.9.1 (#40529) --- var/spack/repos/builtin/packages/screen/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/screen/package.py b/var/spack/repos/builtin/packages/screen/package.py index 60a1f11da17ae4..0f9002df7d5f45 100644 --- a/var/spack/repos/builtin/packages/screen/package.py +++ b/var/spack/repos/builtin/packages/screen/package.py @@ -14,6 +14,7 @@ class Screen(AutotoolsPackage, GNUMirrorPackage): homepage = "https://www.gnu.org/software/screen/" gnu_mirror_path = "screen/screen-4.3.1.tar.gz" + version("4.9.1", sha256="26cef3e3c42571c0d484ad6faf110c5c15091fbf872b06fa7aa4766c7405ac69") version("4.9.0", sha256="f9335281bb4d1538ed078df78a20c2f39d3af9a4e91c57d084271e0289c730f4") version("4.8.0", sha256="6e11b13d8489925fde25dfb0935bf6ed71f9eb47eff233a181e078fde5655aa1") version("4.6.2", sha256="1b6922520e6a0ce5e28768d620b0f640a6631397f95ccb043b70b91bb503fa3a") From a027adcaa2e3508204927836a3db0d1cfae47deb Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Sat, 14 Oct 2023 11:31:53 -0400 Subject: [PATCH 197/806] cpr: new package (#40509) * New package: cpr * Support libcpr version 1.9 * Fix build phase for git * Update var/spack/repos/builtin/packages/cpr/package.py Co-authored-by: Alec Scott * [@spackbot] updating style on behalf of sethrj --------- Co-authored-by: Alec Scott --- .../repos/builtin/packages/cpr/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cpr/package.py diff --git a/var/spack/repos/builtin/packages/cpr/package.py b/var/spack/repos/builtin/packages/cpr/package.py new file mode 100644 index 00000000000000..71e32d9960d536 --- /dev/null +++ b/var/spack/repos/builtin/packages/cpr/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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 Cpr(CMakePackage): + """C++ Requests: Curl for People, a spiritual port of Python Requests.""" + + homepage = "https://docs.libcpr.org/" + url = "https://github.com/libcpr/cpr/archive/refs/tags/1.10.4.tar.gz" + + maintainers("sethrj") + + version("1.10.4", sha256="88462d059cd3df22c4d39ae04483ed50dfd2c808b3effddb65ac3b9aa60b542d") + version("1.9.2", sha256="3bfbffb22c51f322780d10d3ca8f79424190d7ac4b5ad6ad896de08dbd06bf31") + + depends_on("curl") + depends_on("git", when="build") + + def cmake_args(self): + _force = "_FORCE" if self.spec.satisfies("@:1.9") else "" + + return [ + self.define("CPR_USE_SYSTEM_GTEST", True), + self.define(f"CPR{_force}_USE_SYSTEM_CURL", True), + self.define("CPR_ENABLE_SSL", True), + ] From bc3cd02776dfba6c9106bddf07ec5300b30cfdc2 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:23:54 +0200 Subject: [PATCH 198/806] py-urllib3: add 2.0.6 (#40207) * py-urllib3: add 2.0.5 * Add py-brotli package * Group brotli dependencies and make limits more specific * Add minimum version limits to variants * Remove python upper limit for py-brotli * Fix restrictions for py-brotli dependency * Fix py-brotli dependency * py-urllib3: add 2.0.6 --- .../builtin/packages/py-brotli/package.py | 17 +++++++++ .../builtin/packages/py-urllib3/package.py | 36 ++++++++++++------- 2 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-brotli/package.py diff --git a/var/spack/repos/builtin/packages/py-brotli/package.py b/var/spack/repos/builtin/packages/py-brotli/package.py new file mode 100644 index 00000000000000..44fcbda75a23b3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-brotli/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 PyBrotli(PythonPackage): + """Python bindings for the Brotli compression library.""" + + homepage = "https://github.com/google/brotli" + pypi = "Brotli/Brotli-1.1.0.tar.gz" + + version("1.1.0", sha256="81de08ac11bcb85841e440c13611c00b67d3bf82698314928d0b676362546724") + + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-urllib3/package.py b/var/spack/repos/builtin/packages/py-urllib3/package.py index 236ae0f14d9036..d4b061fa0be8fa 100644 --- a/var/spack/repos/builtin/packages/py-urllib3/package.py +++ b/var/spack/repos/builtin/packages/py-urllib3/package.py @@ -12,7 +12,10 @@ class PyUrllib3(PythonPackage): homepage = "https://urllib3.readthedocs.io/" pypi = "urllib3/urllib3-1.25.6.tar.gz" + git = "https://github.com/urllib3/urllib3.git" + version("2.0.6", sha256="b19e1a85d206b56d7df1d5e683df4a7725252a964e3993648dd0fb5a1c157564") + version("2.0.5", sha256="13abf37382ea2ce6fb744d4dad67838eec857c9f4f57009891805e0b5e123594") version("1.26.12", sha256="3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e") version("1.26.6", sha256="f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f") version("1.25.9", sha256="3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527") @@ -23,22 +26,29 @@ class PyUrllib3(PythonPackage): version("1.20", sha256="97ef2b6e2878d84c0126b9f4e608e37a951ca7848e4855a7f7f4437d5c34a72f") version("1.14", sha256="dd4fb13a4ce50b18338c7e4d665b21fd38632c5d4b1d9f1a1379276bd3c08d37") - variant("socks", default=False, description="SOCKS and HTTP proxy support") + variant("brotli", default=False, when="@1.25:", description="Add Brotli support") variant("secure", default=False, description="Add SSL/TLS support") - variant("brotli", default=False, description="Add Brotli support") + variant("socks", default=False, when="@1.15:", description="SOCKS and HTTP proxy support") - depends_on("python@2.7:2.8,3.4:", when="@:1.25", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:", when="@1.26.6", type=("build", "run")) - depends_on("python@2.7:2.8,3.6:3", when="@1.26.12:", type=("build", "run")) + depends_on("py-hatchling@1.6:1", when="@2:", type="build") - depends_on("py-setuptools", type="build") + with when("+brotli"): + depends_on("py-brotli@1.0.9:", when="@1.26.9:", type=("build", "run")) - depends_on("py-pyopenssl@0.14:", when="+secure") - depends_on("py-cryptography@1.3.4:", when="+secure") - depends_on("py-idna@2:", when="+secure") - depends_on("py-certifi", when="+secure") - depends_on("py-urllib3-secure-extra", when="+secure @1.26.12:") + # Historical dependencies + depends_on("py-brotlipy@0.6:", when="@:1.26.8", type=("build", "run")) - depends_on("py-pysocks@1.5.6,1.5.8:1", when="+socks") + with when("+secure"): + depends_on("py-pyopenssl@17.1:", when="@2:", type=("build", "run")) + depends_on("py-pyopenssl@0.14:", when="@1", type=("build", "run")) + depends_on("py-cryptography@1.9:", when="@2:", type=("build", "run")) + depends_on("py-cryptography@1.3.4:", when="@1", type=("build", "run")) + depends_on("py-idna@2:", type=("build", "run")) + depends_on("py-certifi", type=("build", "run")) + depends_on("py-urllib3-secure-extra", when="@1.26.12:", type=("build", "run")) - depends_on("py-brotlipy@0.6:", when="+brotli") + depends_on("py-pysocks@1.5.6,1.5.8:1", when="+socks", type=("build", "run")) + + # Historical dependencies + depends_on("py-setuptools", when="@1", type="build") + depends_on("python@3.6:3", when="@1.26.12:1", type=("build", "run")) From b8cb36ce508f61dbf85203265330d8aa10c864da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Sat, 14 Oct 2023 19:25:02 +0200 Subject: [PATCH 199/806] [add] py-graphene-tornado: new recipe, required by py-cylc-uiserver (#39985) * [add] py-graphene-tornado: new recipe, required by py-cylc-uiserver * py-graphene-tornado: Taking reviewing into account * py-graphene-tornado: add type run in dependences py-jinja, py-tornado and py-werkzeug Co-authored-by: Adam J. Stewart --------- Co-authored-by: LydDeb Co-authored-by: Adam J. Stewart --- .../packages/py-graphene-tornado/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-graphene-tornado/package.py diff --git a/var/spack/repos/builtin/packages/py-graphene-tornado/package.py b/var/spack/repos/builtin/packages/py-graphene-tornado/package.py new file mode 100644 index 00000000000000..ba44045b4c6d79 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-graphene-tornado/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 PyGrapheneTornado(PythonPackage): + """Graphene Tornado integration.""" + + homepage = "https://github.com/graphql-python/graphene-tornado" + pypi = "graphene-tornado/graphene-tornado-2.6.1.tar.gz" + + maintainers("LydDeb") + + version("2.6.1", sha256="953bf812267177224ce1ac2a93c669069d85a8fa187a9fac681b76b63dffebc2") + + depends_on("py-setuptools", type="build") + depends_on("py-six@1.10.0:", type=("build", "run")) + depends_on("py-graphene@2.1:2", type=("build", "run")) + depends_on("py-jinja2@2.10.1:", type=("build", "run")) + depends_on("py-tornado@5.1.0:", type=("build", "run")) + depends_on("py-werkzeug@0.12.2", type=("build", "run")) + depends_on("py-pytest", type=("build")) From 655d123785d691a920058ed2682e9924a5166d5e Mon Sep 17 00:00:00 2001 From: Sam Gillingham Date: Sun, 15 Oct 2023 03:28:51 +1000 Subject: [PATCH 200/806] py-python-fmask: update to latest versions (#40378) * tidy and add new version * add comment about dependencies * whitespace --- .../repos/builtin/packages/py-python-fmask/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-python-fmask/package.py b/var/spack/repos/builtin/packages/py-python-fmask/package.py index 2cb0ce8f1a6465..08a32be346a532 100644 --- a/var/spack/repos/builtin/packages/py-python-fmask/package.py +++ b/var/spack/repos/builtin/packages/py-python-fmask/package.py @@ -11,11 +11,16 @@ class PyPythonFmask(PythonPackage): the FMASK algorithm for Landsat and Sentinel-2""" homepage = "https://www.pythonfmask.org/en/latest/" - url = "https://github.com/ubarsc/python-fmask/archive/pythonfmask-0.5.4.tar.gz" + url = "https://github.com/ubarsc/python-fmask/releases/download/pythonfmask-0.5.8/python-fmask-0.5.8.tar.gz" - version("0.5.4", sha256="a216aa3108de837fec182602b2b4708442746be31fc1585906802437784a63fe") + version("0.5.8", sha256="d55f54d3fecde818374017fdbe0ad173c893ef74c79ba2a7bc1890b7ec416c2f") + version("0.5.7", sha256="da9dad1b977a50599d068dedaed007100b20322a79ca5d78f702712647c2c3f3") + version("0.5.6", sha256="a63abd12d36fb4ec010e618bcabd5e2f782a0479ebcbf40aec1bcef943c00c5c") + version("0.5.5", sha256="8257227d2527ea5fbd229f726d06d05986914beafd090acef05772a27dbbf062") + version("0.5.4", sha256="ed20776f6b63615f664da89a9e3951c79437b66c2bf88fe19a93c2cc7dc40c82") + + # Note: Dependencies are listed here: https://github.com/ubarsc/python-fmask/blob/master/doc/source/index.rst#introduction - depends_on("python@2.7:2.8,3.4:", type=("build", "run")) # pip silently replaces distutils with setuptools depends_on("py-setuptools", type="build") depends_on("py-rios", type=("build", "run")) From 3be78717d2e47a455063f0d65a5e05ab8e65800a Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:34:45 +0200 Subject: [PATCH 201/806] py-pyqt6: add 6.5.2 (#40413) --- var/spack/repos/builtin/packages/py-pyqt6/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-pyqt6/package.py b/var/spack/repos/builtin/packages/py-pyqt6/package.py index cdef12633236b4..6791b50ff0e1ea 100644 --- a/var/spack/repos/builtin/packages/py-pyqt6/package.py +++ b/var/spack/repos/builtin/packages/py-pyqt6/package.py @@ -13,6 +13,7 @@ class PyPyqt6(SIPPackage): url = "https://files.pythonhosted.org/packages/source/P/PyQt6/PyQt6-6.5.1.tar.gz" list_url = "https://pypi.org/simple/PyQt6/" + version("6.5.2", sha256="1487ee7350f9ffb66d60ab4176519252c2b371762cbe8f8340fd951f63801280") version("6.5.1", sha256="e166a0568c27bcc8db00271a5043936226690b6a4a74ce0a5caeb408040a97c3") # pyproject.toml From 069389252138e7ac750942fee64b04c26606ebbe Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:40:40 +0200 Subject: [PATCH 202/806] py-bidskit: add 2023.9.7 (#40444) --- var/spack/repos/builtin/packages/py-bidskit/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-bidskit/package.py b/var/spack/repos/builtin/packages/py-bidskit/package.py index d54a2a778eecbd..25e38c5127ef56 100644 --- a/var/spack/repos/builtin/packages/py-bidskit/package.py +++ b/var/spack/repos/builtin/packages/py-bidskit/package.py @@ -12,6 +12,7 @@ class PyBidskit(PythonPackage): homepage = "https://github.com/jmtyszka/bidskit" pypi = "bidskit/bidskit-2022.10.13.tar.gz" + version("2023.9.7", sha256="029d9aecbbcb2df733858ceb3e6d5dd5013c36e431e40fb522a580adc7b667a5") version("2023.2.16", sha256="b2e4e3246d43a6f00af6c0391ec8fecc59405241de1ea9ca68eb4d8128d62c7b") version( "2022.10.13", sha256="576b92cef187032c73f64e2e6a5b0be0c06771442048a33c55e224b3df0aae3a" From 8f2de4663ef67c58bcb8b592a20a11ca8410d261 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:41:34 +0200 Subject: [PATCH 203/806] py-certifi: add 2023.7.22 (#40445) --- var/spack/repos/builtin/packages/py-certifi/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-certifi/package.py b/var/spack/repos/builtin/packages/py-certifi/package.py index bb26b43fbc6b5e..bcf14be2f068f0 100644 --- a/var/spack/repos/builtin/packages/py-certifi/package.py +++ b/var/spack/repos/builtin/packages/py-certifi/package.py @@ -14,6 +14,7 @@ class PyCertifi(PythonPackage): homepage = "https://github.com/certifi/python-certifi" pypi = "certifi/certifi-2020.6.20.tar.gz" + version("2023.7.22", sha256="539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082") version("2023.5.7", sha256="0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7") version("2022.12.7", sha256="35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3") version("2022.9.14", sha256="36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5") From b536260eb5c875447c2c45419e7025b98d19aaf5 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:47:01 +0200 Subject: [PATCH 204/806] py-chardet: add 5.2.0 (#40468) --- var/spack/repos/builtin/packages/py-chardet/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-chardet/package.py b/var/spack/repos/builtin/packages/py-chardet/package.py index 246f00c207f57c..f7a3f5cc621ff0 100644 --- a/var/spack/repos/builtin/packages/py-chardet/package.py +++ b/var/spack/repos/builtin/packages/py-chardet/package.py @@ -12,6 +12,7 @@ class PyChardet(PythonPackage): homepage = "https://github.com/chardet/chardet" pypi = "chardet/chardet-3.0.4.tar.gz" + version("5.2.0", sha256="1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7") version("5.1.0", sha256="0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5") version("5.0.0", sha256="0368df2bfd78b5fc20572bb4e9bb7fb53e2c094f60ae9993339e8671d0afb8aa") version("4.0.0", sha256="0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa") @@ -20,4 +21,6 @@ class PyChardet(PythonPackage): version("2.3.0", sha256="e53e38b3a4afe6d1132de62b7400a4ac363452dc5dfcf8d88e8e0cce663c68aa") depends_on("py-setuptools", type="build") + + # Historical dependencies depends_on("py-pytest-runner", when="@3", type="build") From 0989cb8866b01d2218296280f7f9ae31bf9a4ca0 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:56:14 +0200 Subject: [PATCH 205/806] py-click: add 8.1.7 (#40473) --- var/spack/repos/builtin/packages/py-click/package.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-click/package.py b/var/spack/repos/builtin/packages/py-click/package.py index d5830049ea13fd..e32256b016f780 100644 --- a/var/spack/repos/builtin/packages/py-click/package.py +++ b/var/spack/repos/builtin/packages/py-click/package.py @@ -11,8 +11,9 @@ class PyClick(PythonPackage): homepage = "https://click.palletsprojects.com" pypi = "click/click-7.1.2.tar.gz" - git = "https://github.com/pallets/click/" + git = "https://github.com/pallets/click.git" + version("8.1.7", sha256="ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de") version("8.1.3", sha256="7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e") version("8.0.3", sha256="410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b") version("8.0.1", sha256="8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a") @@ -24,9 +25,6 @@ class PyClick(PythonPackage): ) version("6.6", sha256="cc6a19da8ebff6e7074f731447ef7e112bd23adf3de5c597cf9989f2fd8defe9") - depends_on("python@3.7:", when="@8.1:", type=("build", "run")) - depends_on("python@3.6:", when="@8:", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-importlib-metadata", when="@8: ^python@:3.7", type=("build", "run")) From fa5aadbbc03d0890f1b985cbfeb9ba1cd5ef369b Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:56:59 +0200 Subject: [PATCH 206/806] py-charset-normalizer: add 3.3.0 (#40471) --- .../repos/builtin/packages/py-charset-normalizer/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-charset-normalizer/package.py b/var/spack/repos/builtin/packages/py-charset-normalizer/package.py index eab217431524cd..706c49c9884606 100644 --- a/var/spack/repos/builtin/packages/py-charset-normalizer/package.py +++ b/var/spack/repos/builtin/packages/py-charset-normalizer/package.py @@ -13,6 +13,7 @@ class PyCharsetNormalizer(PythonPackage): homepage = "https://github.com/ousret/charset_normalizer" pypi = "charset-normalizer/charset-normalizer-2.0.7.tar.gz" + version("3.3.0", sha256="63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6") version("3.1.0", sha256="34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5") version("2.1.1", sha256="5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845") version("2.0.12", sha256="2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597") From 8dde74854a33e9248c79df4a744e7adeb0d0a3eb Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:03:43 +0200 Subject: [PATCH 207/806] py-cfgv: add 3.4.0 (#40465) --- var/spack/repos/builtin/packages/py-cfgv/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-cfgv/package.py b/var/spack/repos/builtin/packages/py-cfgv/package.py index df26dcae22e23e..9158f42762f5b6 100644 --- a/var/spack/repos/builtin/packages/py-cfgv/package.py +++ b/var/spack/repos/builtin/packages/py-cfgv/package.py @@ -12,10 +12,13 @@ class PyCfgv(PythonPackage): homepage = "https://github.com/asottile/cfgv/" pypi = "cfgv/cfgv-2.0.1.tar.gz" + version("3.4.0", sha256="e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560") version("3.3.1", sha256="f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736") version("2.0.1", sha256="edb387943b665bf9c434f717bf630fa78aecd53d5900d2e05da6ad6048553144") + depends_on("python@3.8:", when="@3.4:", type=("build", "run")) depends_on("python@3.6.1:", when="@3.1:", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:", type=("build", "run")) depends_on("py-setuptools", type="build") + + # Historical dependencies depends_on("py-six", when="@:2", type=("build", "run")) From 2ad947067045b4cd1f72ded00a4d82020258e69c Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:05:36 +0200 Subject: [PATCH 208/806] py-pybids: add 0.16.3 (#40486) --- var/spack/repos/builtin/packages/py-pybids/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pybids/package.py b/var/spack/repos/builtin/packages/py-pybids/package.py index 7155b92c5248e4..8a77813ad6a05d 100644 --- a/var/spack/repos/builtin/packages/py-pybids/package.py +++ b/var/spack/repos/builtin/packages/py-pybids/package.py @@ -12,6 +12,7 @@ class PyPybids(PythonPackage): homepage = "https://github.com/bids-standard/pybids" pypi = "pybids/pybids-0.13.1.tar.gz" + version("0.16.3", sha256="10e279350c8d14ca602c0d4469a5e4bf7ff393e8643c831a546ae735b6b82cc3") version("0.16.1", sha256="1a6ab06d375f3b783e738826e6d220b2f4145419b4b02f4edbcc8cb7c9b2208a") version("0.15.3", sha256="4d99c979bc4bc209cff70a02d1da309c9bf8c6b0338e2a0b66ebea77c7f3c461") version("0.15.1", sha256="0253507a04dbfea43eb1f75a1f71aab04be21076bfe96c004888000b802e38f2") @@ -22,7 +23,6 @@ class PyPybids(PythonPackage): version("0.8.0", sha256="fe60fa7d1e171e75a38a04220ed992f1b062531a7452fcb7ce5ba81bb6abfdbc") depends_on("python@3.8:", when="@0.16:", type=("build", "run")) - depends_on("python@3.7:", when="@0.15:", type=("build", "run")) depends_on("py-setuptools", when="@0.15.6:", type="build") depends_on("py-setuptools@30.3:60,61.0.1:", when="@:0.15.5", type="build") depends_on("py-versioneer+toml", when="@0.15.6:", type="build") From 3604f6238dbdd6268d25b01202b0a122dfaad4fd Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:06:51 +0200 Subject: [PATCH 209/806] py-pydicom: add 2.4.3 (#40487) --- var/spack/repos/builtin/packages/py-pydicom/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pydicom/package.py b/var/spack/repos/builtin/packages/py-pydicom/package.py index 1001e3ddd47ec8..e2d1fadcecb614 100644 --- a/var/spack/repos/builtin/packages/py-pydicom/package.py +++ b/var/spack/repos/builtin/packages/py-pydicom/package.py @@ -15,15 +15,15 @@ class PyPydicom(PythonPackage): homepage = "https://github.com/pydicom/pydicom" pypi = "pydicom/pydicom-2.1.2.tar.gz" + version("2.4.3", sha256="51906e0b9fb6e184a0f56298cb43ed716b7cf7edc00f6b71d5c769bc1f982402") version("2.4.1", sha256="6cb210dbe5586841036e8eeb2d4feb4df22a48f39161ba7ee0bf3c89faaba946") version("2.3.0", sha256="dbfa081c9ad9ac8ff8a8efbd71784104db9eecf02fd775f7d7773f2183f89386") version("2.1.2", sha256="65f36820c5fec24b4e7ca45b7dae93e054ed269d55f92681863d39d30459e2fd") variant("numpy", default=False, description="Use NumPy for Pixel data") - depends_on("python@3.7:", when="@2.4:", type=("build", "run")) - depends_on("python@3.6.1:", type=("build", "run")) - depends_on("py-flit-core@3.2:3", when="@2.4:", type=("build", "run")) + depends_on("py-flit-core@3.2:3", when="@2.4:", type="build") + depends_on("py-numpy", when="+numpy", type="run") # Historical dependencies From 149d1946eef8611513f5abd15a07e80ebedf0639 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Sat, 14 Oct 2023 11:09:24 -0700 Subject: [PATCH 210/806] Add static support for proj (#40322) * Add static-only option for proj * Update proj * update proj * Update package.py * [@spackbot] updating style on behalf of AlexanderRichert-NOAA * Update package.py * proj: Add pic and static variant support for cmake --- var/spack/repos/builtin/packages/proj/package.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index 065703c64fdded..a49adf19b8cb62 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -56,6 +56,8 @@ class Proj(CMakePackage, AutotoolsPackage): variant("tiff", default=True, description="Enable TIFF support") variant("curl", default=True, description="Enable curl support") + variant("shared", default=True, description="Enable shared libraries") + variant("pic", default=False, description="Enable position-independent code (PIC)") # https://github.com/OSGeo/PROJ#distribution-files-and-format # https://github.com/OSGeo/PROJ-data @@ -130,6 +132,8 @@ def cmake_args(self): args = [ self.define_from_variant("ENABLE_TIFF", "tiff"), self.define_from_variant("ENABLE_CURL", "curl"), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), ] if self.spec.satisfies("@6:") and self.pkg.run_tests: args.append(self.define("USE_EXTERNAL_GTEST", True)) @@ -144,14 +148,18 @@ def configure_args(self): args.append("--with-external-gtest") if self.spec.satisfies("@7:"): - if "+tiff" in self.spec: - args.append("--enable-tiff") - else: - args.append("--disable-tiff") + args.extend(self.enable_or_disable("tiff")) if "+curl" in self.spec: args.append("--with-curl=" + self.spec["curl"].prefix.bin.join("curl-config")) else: args.append("--without-curl") + args.extend(self.enable_or_disable("shared")) + args.extend(self.with_or_without("pic")) + + if self.spec.satisfies("^libtiff+jpeg~shared"): + args.append("LDFLAGS=%s" % self.spec["jpeg"].libs.ld_flags) + args.append("LIBS=%s" % self.spec["jpeg"].libs.link_flags) + return args From 26e063177dc7b7be7c1bb65e826d5e1ad83bb49a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sat, 14 Oct 2023 15:02:41 -0600 Subject: [PATCH 211/806] Bug fixes in py-awscrt to fix build errors reported in #40386 (#40469) * Bug fix in var/spack/repos/builtin/packages/py-awscrt/package.py: on Linux, tell aws-crt-python to use libcrypto from spack (openssl) * Bug fix in var/spack/repos/builtin/packages/py-awscrt/package.py: add missing build dependencies cmake (for all), openssl (for linux) * Update var/spack/repos/builtin/packages/py-awscrt/package.py Co-authored-by: Adam J. Stewart --------- Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/py-awscrt/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-awscrt/package.py b/var/spack/repos/builtin/packages/py-awscrt/package.py index 652e7164a6f445..81428d4d4f63c0 100644 --- a/var/spack/repos/builtin/packages/py-awscrt/package.py +++ b/var/spack/repos/builtin/packages/py-awscrt/package.py @@ -16,4 +16,11 @@ class PyAwscrt(PythonPackage): version("0.16.16", sha256="13075df2c1d7942fe22327b6483274517ee0f6ae765c4e6b6ae9ef5b4c43a827") + depends_on("cmake@3.1:", type=("build")) + depends_on("openssl", type=("build"), when="platform=linux") depends_on("py-setuptools", type=("build")) + + # On Linux, tell aws-crt-python to use libcrypto from spack (openssl) + def setup_build_environment(self, env): + with when("platform=linux"): + env.set("AWS_CRT_BUILD_USE_SYSTEM_LIBCRYPTO", 1) From 39d2baec8aef6f4c9b830e4b9b0e75aec204c8c4 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Sun, 15 Oct 2023 00:55:01 -0400 Subject: [PATCH 212/806] heffte: fix rocm deps (#40514) --- var/spack/repos/builtin/packages/heffte/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index a9908bb2de6af3..32d7e18cc6f848 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -84,6 +84,8 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): depends_on("rocfft@5.2.3:", when="@develop+rocm", type=("build", "run")) depends_on("magma@2.5.3:", when="+cuda+magma", type=("build", "run")) depends_on("magma+rocm@2.6.1:", when="+magma+rocm @2.1:", type=("build", "run")) + depends_on("rocblas@3.8:", when="+magma+rocm", type=("build", "run")) + depends_on("rocsparse@3.8:", when="+magma+rocm", type=("build", "run")) depends_on("hipblas@3.8:", when="+magma+rocm", type=("build", "run")) depends_on("hipsparse@3.8:", when="+magma+rocm", type=("build", "run")) From 8a311d7746f606c4127eb695fa2e59e7e7cd8f06 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Sat, 14 Oct 2023 22:01:53 -0700 Subject: [PATCH 213/806] mfem: add a patch for v4.6 for gcc 13, see mfem PR 3903 (#40495) --- var/spack/repos/builtin/packages/mfem/mfem-4.6.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/mfem/package.py | 1 + 2 files changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mfem/mfem-4.6.patch diff --git a/var/spack/repos/builtin/packages/mfem/mfem-4.6.patch b/var/spack/repos/builtin/packages/mfem/mfem-4.6.patch new file mode 100644 index 00000000000000..94f1f863f8d267 --- /dev/null +++ b/var/spack/repos/builtin/packages/mfem/mfem-4.6.patch @@ -0,0 +1,12 @@ +diff --git a/general/kdtree.hpp b/general/kdtree.hpp +index eebbdaa27..b35a33ea4 100644 +--- a/general/kdtree.hpp ++++ b/general/kdtree.hpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + + namespace mfem diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index eb869fc255b9e4..b4c66447a16139 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -468,6 +468,7 @@ class Mfem(Package, CudaPackage, ROCmPackage): # upstream. patch("mfem-4.0.0-makefile-syntax-fix.patch", when="@4.0.0") patch("mfem-4.5.patch", when="@4.5.0") + patch("mfem-4.6.patch", when="@4.6.0") phases = ["configure", "build", "install"] From b960d476e33c86a3fd15f352a54d4841efc43c6e Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Sun, 15 Oct 2023 01:07:15 -0400 Subject: [PATCH 214/806] tasmanian: patch for clang17 (#40515) --- .../builtin/packages/tasmanian/package.py | 3 + .../packages/tasmanian/tas80_clang17.patch | 101 ++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 var/spack/repos/builtin/packages/tasmanian/tas80_clang17.patch diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py index 92aa21833973b0..b4d4ead7bf3842 100644 --- a/var/spack/repos/builtin/packages/tasmanian/package.py +++ b/var/spack/repos/builtin/packages/tasmanian/package.py @@ -88,6 +88,9 @@ class Tasmanian(CMakePackage, CudaPackage, ROCmPackage): conflicts("+magma", when="~cuda~rocm") # currently MAGMA only works with CUDA conflicts("+cuda", when="+rocm") # can pick CUDA or ROCm, not both + # patching a bug in the interpretation of the C++ standard + patch("tas80_clang17.patch", when="@8.0") + def setup_build_environment(self, env): # needed for the hipcc compiler if "+rocm" in self.spec: diff --git a/var/spack/repos/builtin/packages/tasmanian/tas80_clang17.patch b/var/spack/repos/builtin/packages/tasmanian/tas80_clang17.patch new file mode 100644 index 00000000000000..241789cddd4939 --- /dev/null +++ b/var/spack/repos/builtin/packages/tasmanian/tas80_clang17.patch @@ -0,0 +1,101 @@ +diff --git a/SparseGrids/tsgGridFourier.cpp b/SparseGrids/tsgGridFourier.cpp +index 31e75a87..438b0631 100644 +--- a/SparseGrids/tsgGridFourier.cpp ++++ b/SparseGrids/tsgGridFourier.cpp +@@ -961,7 +961,7 @@ std::vector GridFourier::getCandidateConstructionPoints(std::functionaddTensor(new_tensors.getIndex(i), [&](int l)->int{ return wrapper.getNumPoints(l); }, tweights[i]); + +- return MultiIndexManipulations::indexesToNodes(dynamic_values->getNodesIndexes(), wrapper); ++ return MultiIndexManipulations::getIndexesToNodes(dynamic_values->getNodesIndexes(), wrapper); + } + std::vector GridFourier::getMultiIndex(const double x[]){ + std::vector p(num_dimensions); +diff --git a/SparseGrids/tsgGridGlobal.cpp b/SparseGrids/tsgGridGlobal.cpp +index dd81ace0..01aa4fa3 100644 +--- a/SparseGrids/tsgGridGlobal.cpp ++++ b/SparseGrids/tsgGridGlobal.cpp +@@ -473,7 +473,7 @@ std::vector GridGlobal::getCandidateConstructionPoints(std::functionaddTensor(new_tensors.getIndex(i), [&](int l)->int{ return wrapper.getNumPoints(l); }, tweights[i]); + +- return MultiIndexManipulations::indexesToNodes(dynamic_values->getNodesIndexes(), wrapper); ++ return MultiIndexManipulations::getIndexesToNodes(dynamic_values->getNodesIndexes(), wrapper); + } + std::vector GridGlobal::getMultiIndex(const double x[]){ + std::vector p(num_dimensions); +diff --git a/SparseGrids/tsgGridLocalPolynomial.cpp b/SparseGrids/tsgGridLocalPolynomial.cpp +index f2cf6809..176736c3 100644 +--- a/SparseGrids/tsgGridLocalPolynomial.cpp ++++ b/SparseGrids/tsgGridLocalPolynomial.cpp +@@ -576,7 +576,7 @@ void GridLocalPolynomial::expandGrid(const std::vector &point, const std::v + surpluses = Data2D(num_outputs, 1, std::vector(value)); // one value is its own surplus + }else{ // merge with existing points + // compute the surplus for the point +- std::vector xnode = MultiIndexManipulations::indexesToNodes(point, *rule); ++ std::vector xnode = MultiIndexManipulations::getIndexesToNodes(point, *rule); + std::vector approximation(num_outputs), surp(num_outputs); + evaluate(xnode.data(), approximation.data()); + std::transform(approximation.begin(), approximation.end(), value.begin(), surp.begin(), [&](double e, double v)->double{ return v - e; }); +@@ -755,7 +755,7 @@ void GridLocalPolynomial::updateSurpluses(MultiIndexSet const &work, int max_lev + for(int s=0; s x = MultiIndexManipulations::indexesToNodes(work.getIndex(i), num_dimensions, *rule); ++ std::vector x = MultiIndexManipulations::getIndexesToNodes(work.getIndex(i), num_dimensions, *rule); + double *surpi = surpluses.getStrip(i); + + std::vector monkey_count(max_level + 1); +@@ -818,7 +818,7 @@ void GridLocalPolynomial::applyTransformationTransposed(double weights[], const + for(int l=active_top_level; l>0; l--){ + for(size_t i=0; i node = MultiIndexManipulations::indexesToNodes(work.getIndex(active_points[i]), num_dimensions, *rule); ++ std::vector node = MultiIndexManipulations::getIndexesToNodes(work.getIndex(active_points[i]), num_dimensions, *rule); + + std::fill(used.begin(), used.end(), false); + +@@ -1071,7 +1071,7 @@ void GridLocalPolynomial::getQuadratureWeights(double *weights) const{ + for(int l=top_level; l>0; l--){ + for(int i=0; i node = MultiIndexManipulations::indexesToNodes(work.getIndex(i), num_dimensions, *rule); ++ std::vector node = MultiIndexManipulations::getIndexesToNodes(work.getIndex(i), num_dimensions, *rule); + + std::vector used(work.getNumIndexes(), false); + +diff --git a/SparseGrids/tsgGridWavelet.cpp b/SparseGrids/tsgGridWavelet.cpp +index b043d077..d2f8115c 100644 +--- a/SparseGrids/tsgGridWavelet.cpp ++++ b/SparseGrids/tsgGridWavelet.cpp +@@ -415,7 +415,7 @@ void GridWavelet::buildInterpolationMatrix() const{ + for(int b=0; b xi = MultiIndexManipulations::indexesToNodes(work.getIndex(i), (size_t) num_dimensions, rule1D); ++ std::vector xi = MultiIndexManipulations::getIndexesToNodes(work.getIndex(i), (size_t) num_dimensions, rule1D); + + // loop over the basis functions to see if supported + int numpntr = 0; +diff --git a/SparseGrids/tsgIndexManipulator.hpp b/SparseGrids/tsgIndexManipulator.hpp +index 16a1321f..0c27a4cd 100644 +--- a/SparseGrids/tsgIndexManipulator.hpp ++++ b/SparseGrids/tsgIndexManipulator.hpp +@@ -562,7 +562,7 @@ OutputIteratorLike indexesToNodes(IteratorLike ibegin, size_t num_entries, RuleL + * \brief Overload that returns the result in a vector. + */ + template +-std::vector indexesToNodes(IndexList const &list, RuleLike const &rule){ ++std::vector getIndexesToNodes(IndexList const &list, RuleLike const &rule){ + std::vector result(std::distance(list.begin(), list.end())); + indexesToNodes(list, rule, result.begin()); + return result; +@@ -573,7 +573,7 @@ std::vector indexesToNodes(IndexList const &list, RuleLike const &rule){ + * \brief Overload that returns the result in a vector. + */ + template +-std::vector indexesToNodes(IteratorLike ibegin, size_t num_entries, RuleLike const &rule){ ++std::vector getIndexesToNodes(IteratorLike ibegin, size_t num_entries, RuleLike const &rule){ + std::vector result(num_entries); + indexesToNodes(ibegin, num_entries, rule, result.begin()); + return result; From 76bac6d4bfa0c3104b761af5c52342b13e5f99c2 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 15 Oct 2023 02:28:08 -0700 Subject: [PATCH 215/806] Add matrix space link and badge to README (#40532) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cf4b413af8b9e0..ecbaf1ae71bb42 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![Read the Docs](https://readthedocs.org/projects/spack/badge/?version=latest)](https://spack.readthedocs.io) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Slack](https://slack.spack.io/badge.svg)](https://slack.spack.io) +[![Matrix](https://img.shields.io/matrix/spack-space%3Amatrix.org?label=Matrix)](https://matrix.to/#/#spack-space:matrix.org) Spack is a multi-platform package manager that builds and installs multiple versions and configurations of software. It works on Linux, @@ -62,6 +63,7 @@ Resources: * **Slack workspace**: [spackpm.slack.com](https://spackpm.slack.com). To get an invitation, visit [slack.spack.io](https://slack.spack.io). +* **Matrix space**: [#spack-space:matrix.org](https://matrix.to/#/#spack-space:matrix.org). * [**Github Discussions**](https://github.com/spack/spack/discussions): not just for discussions, also Q&A. * **Mailing list**: [groups.google.com/d/forum/spack](https://groups.google.com/d/forum/spack) * **Twitter**: [@spackpm](https://twitter.com/spackpm). Be sure to From 2015d3d2bc93c904cbbb2b7b853dbfd02c40abd8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 15 Oct 2023 12:16:51 -0500 Subject: [PATCH 216/806] py-click: fix Python 3.6 support (#40535) --- var/spack/repos/builtin/packages/py-click/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-click/package.py b/var/spack/repos/builtin/packages/py-click/package.py index e32256b016f780..16585406035fb4 100644 --- a/var/spack/repos/builtin/packages/py-click/package.py +++ b/var/spack/repos/builtin/packages/py-click/package.py @@ -25,6 +25,8 @@ class PyClick(PythonPackage): ) version("6.6", sha256="cc6a19da8ebff6e7074f731447ef7e112bd23adf3de5c597cf9989f2fd8defe9") + # Needed to ensure that Spack can bootstrap black with Python 3.6 + depends_on("python@3.7:", when="@8.1:", type=("build", "run")) depends_on("py-setuptools", type="build") depends_on("py-importlib-metadata", when="@8: ^python@:3.7", type=("build", "run")) From ef55c7c916e1e024ca9850dd512049b2c19301d4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 15 Oct 2023 12:18:04 -0500 Subject: [PATCH 217/806] Python: allow OneAPI 2024 when it's released (#40536) --- var/spack/repos/builtin/packages/python/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index b6c78adbe319c4..59306d8f2377ca 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -318,7 +318,7 @@ class Python(Package): # See https://github.com/python/cpython/issues/106424 # datetime.now(timezone.utc) segfaults - conflicts("@3.9:", when="%oneapi@2022.2.1:") + conflicts("@3.9:", when="%oneapi@2022.2.1:2023") # Used to cache various attributes that are expensive to compute _config_vars: Dict[str, Dict[str, str]] = {} From dbf3bed380e160afe24d3bbcf515b1a56aa3c0cf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 15 Oct 2023 15:22:49 -0500 Subject: [PATCH 218/806] py-torchdata: version rename (#40522) --- var/spack/repos/builtin/packages/py-torchdata/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py index 51b95c1cca7758..fd9367f31d0179 100644 --- a/var/spack/repos/builtin/packages/py-torchdata/package.py +++ b/var/spack/repos/builtin/packages/py-torchdata/package.py @@ -16,7 +16,7 @@ class PyTorchdata(PythonPackage): maintainers("adamjstewart") version("main", branch="main") - version("0.7.0-rc1", sha256="9d48e1a5bc0fa4e50976b89aea38d028dcb7e580dba594755d266e19c369b747") + version("0.7.0", sha256="0b444719c3abc67201ed0fea92ea9c4100e7f36551ba0d19a09446cc11154eb3") version("0.6.1", sha256="c596db251c5e6550db3f00e4308ee7112585cca4d6a1c82a433478fd86693257") version("0.6.0", sha256="048dea12ee96c0ea1525097959fee811d7b38c2ed05f44a90f35f8961895fb5b") version("0.5.1", sha256="69d80bd33ce8f08e7cfeeb71cefddfc29cede25a85881e33dbae47576b96ed29") From 718aa8b82f0533f65fc7afbf79eda793125bb260 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Sun, 15 Oct 2023 22:53:03 +0100 Subject: [PATCH 219/806] Version update and simplify dependencies (#40543) --- var/spack/repos/builtin/packages/py-nanobind/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-nanobind/package.py b/var/spack/repos/builtin/packages/py-nanobind/package.py index 493d6394affa36..19c3d915f98843 100644 --- a/var/spack/repos/builtin/packages/py-nanobind/package.py +++ b/var/spack/repos/builtin/packages/py-nanobind/package.py @@ -23,6 +23,9 @@ class PyNanobind(PythonPackage): maintainers("chrisrichardson", "garth-wells", "ma595") version("master", branch="master", submodules=True) + version( + "1.6.2", tag="v1.6.2", commit="cc5ac7e61def198db2a8b65c6d630343987a9f1d", submodules=True + ) version( "1.5.2", tag="v1.5.2", commit="b0e24d5b0ab0d518317d6b263a257ae72d4d29a2", submodules=True ) @@ -43,8 +46,8 @@ class PyNanobind(PythonPackage): depends_on("py-setuptools@42:", type="build") depends_on("py-scikit-build", type="build") - depends_on("py-cmake@3.17:", type="build") - depends_on("py-ninja", type="build") + depends_on("cmake@3.17:", type="build") + depends_on("ninja", type="build") @property def cmake_prefix_paths(self): From a9cfa32c34b6dbe4f41f0d7ecb809752090a56b9 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 16 Oct 2023 00:08:11 +0200 Subject: [PATCH 220/806] spack checksum: handle all versions dropped better (#40530) * spack checksum: fix error when all versions are dropped * add test --- lib/spack/spack/cmd/checksum.py | 2 +- lib/spack/spack/stage.py | 6 ++++-- lib/spack/spack/test/cmd/checksum.py | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index fa969c097995b1..efa4a268c16b5b 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -154,7 +154,7 @@ def checksum(parser, args): filtered_url_dict = spack.stage.interactive_version_filter( url_dict, pkg.versions, url_changes=url_changed_for_version ) - if filtered_url_dict is None: + if not filtered_url_dict: exit(0) url_dict = filtered_url_dict else: diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index c86ed1955bd889..90fb193a63573c 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -893,7 +893,9 @@ def interactive_version_filter( if print_header: has_filter = version_filter != VersionList([":"]) header = [] - if len(sorted_and_filtered) == len(orig_url_dict): + if not sorted_and_filtered: + header.append("No versions selected") + elif len(sorted_and_filtered) == len(orig_url_dict): header.append( f"Selected {llnl.string.plural(len(sorted_and_filtered), 'version')}" ) @@ -901,7 +903,7 @@ def interactive_version_filter( header.append( f"Selected {len(sorted_and_filtered)} of {len(orig_url_dict)} versions" ) - if known_versions: + if sorted_and_filtered and known_versions: num_new = sum(1 for v in sorted_and_filtered if v not in known_versions) header.append(f"{llnl.string.plural(num_new, 'new version')}") if has_filter: diff --git a/lib/spack/spack/test/cmd/checksum.py b/lib/spack/spack/test/cmd/checksum.py index ce7784c7a1d3b1..8001334e3e2142 100644 --- a/lib/spack/spack/test/cmd/checksum.py +++ b/lib/spack/spack/test/cmd/checksum.py @@ -169,6 +169,22 @@ def test_checksum_interactive_quit_from_ask_each(): } +def test_checksum_interactive_nothing_left(): + """If nothing is left after interactive filtering, return an empty dict.""" + input = input_from_commands("f", "@2", "c") + assert ( + interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) + == {} + ) + + def test_checksum_interactive_new_only(): # The 1.0 version is known already, and should be dropped on `n`. input = input_from_commands("n", "c") From 7adeee09801659fc769479282213ed53baee5bc9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 15 Oct 2023 15:48:05 -0700 Subject: [PATCH 221/806] README.md: tweak matrix description to indicate bridging (#40540) This tweaks the matrix description to indicate that it's bridged with Slack. So people don't think they're missing out (even though the icon says there are only 3 users on Matrix). --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ecbaf1ae71bb42..c4c784cd1a6aba 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,10 @@ Resources: * **Slack workspace**: [spackpm.slack.com](https://spackpm.slack.com). To get an invitation, visit [slack.spack.io](https://slack.spack.io). -* **Matrix space**: [#spack-space:matrix.org](https://matrix.to/#/#spack-space:matrix.org). -* [**Github Discussions**](https://github.com/spack/spack/discussions): not just for discussions, also Q&A. +* **Matrix space**: [#spack-space:matrix.org](https://matrix.to/#/#spack-space:matrix.org): + [bridged](https://github.com/matrix-org/matrix-appservice-slack#matrix-appservice-slack) to Slack. +* [**Github Discussions**](https://github.com/spack/spack/discussions): + not just for discussions, also Q&A. * **Mailing list**: [groups.google.com/d/forum/spack](https://groups.google.com/d/forum/spack) * **Twitter**: [@spackpm](https://twitter.com/spackpm). Be sure to `@mention` us! From 10999c02836fa6a510871d24ad6548d12d2b72ae Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Sun, 15 Oct 2023 17:43:10 -0600 Subject: [PATCH 222/806] fix: flux-core needs libarchive with +iconv (#40541) Signed-off-by: vsoch Co-authored-by: vsoch --- var/spack/repos/builtin/packages/flux-core/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index 70d8cc9873c24c..09d5b2e4999da3 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -125,7 +125,7 @@ class FluxCore(AutotoolsPackage): conflicts("platform=darwin", msg="flux-core does not support MacOS based platforms.") conflicts("platform=windows", msg="flux-core does not support Windows based platforms.") - depends_on("libarchive", when="@0.38.0:") + depends_on("libarchive+iconv", when="@0.38.0:") depends_on("ncurses@6.2:", when="@0.32.0:") depends_on("libzmq@4.0.4:") depends_on("czmq@3.0.1:") From e22117304e2768ac203d7c5a1a476ae723486ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Mon, 16 Oct 2023 13:51:11 +0200 Subject: [PATCH 223/806] [add] py-cylc-uiserver: new recipe (#39983) * [add] py-cylc-uiserver: new recipe * py-cylc-uiserver: remove version constraint on the dependence python * [fix] py-cylc-uiserver: add forgotten dependence py-graphql-core --------- Co-authored-by: LydDeb --- .../packages/py-cylc-uiserver/package.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cylc-uiserver/package.py diff --git a/var/spack/repos/builtin/packages/py-cylc-uiserver/package.py b/var/spack/repos/builtin/packages/py-cylc-uiserver/package.py new file mode 100644 index 00000000000000..57345f8a11257f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cylc-uiserver/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 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 PyCylcUiserver(PythonPackage): + """Cylc UI Server.""" + + homepage = "https://github.com/cylc/cylc-uiserver/" + pypi = "cylc-uiserver/cylc-uiserver-1.3.0.tar.gz" + + maintainers("LydDeb") + + version("1.3.0", sha256="f3526e470c7ac2b61bf69e9b8d17fc7a513392219d28baed9b1166dcc7033d7a") + + depends_on("py-wheel", type="build") + depends_on("py-setuptools@40.9.0:", type="build") + depends_on("py-cylc-flow@8.2", type=("build", "run")) + depends_on("py-ansimarkup@1.0.0:", type=("build", "run")) + depends_on("py-graphene", type=("build", "run")) + depends_on("py-graphene-tornado@2.6", type=("build", "run")) + depends_on("py-graphql-ws@0.4.4", type=("build", "run")) + depends_on("py-jupyter-server@1.10.2:1", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-tornado@6.1.0:", type=("build", "run")) + depends_on("py-traitlets@5.2.1:", type=("build", "run")) + depends_on("py-pyzmq", type=("build", "run")) + depends_on("py-graphql-core", type=("build", "run")) + depends_on("py-rx@:1", type=("build", "run")) From 1106f6b9f21b8948c6996d4accac4efe63049ad5 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 12:52:59 +0100 Subject: [PATCH 224/806] py-fenics-ufl: update version and add test (#40534) * Update py-ufl vesion * Syntax fix * Syntax fix * Add test * Updates following comments --- .../builtin/packages/py-fenics-ufl/package.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-fenics-ufl/package.py b/var/spack/repos/builtin/packages/py-fenics-ufl/package.py index 7439e2c76ba7fb..890b1934649b07 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ufl/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ufl/package.py @@ -19,6 +19,7 @@ class PyFenicsUfl(PythonPackage): maintainers("chrisrichardson", "garth-wells", "jhale") version("main", branch="main") + version("2023.2.0", sha256="d1d3209e8ebd4bd70513c26890f51823bac90edc956233c47bd8e686e064436e") version( "2023.1.1.post0", sha256="9e6e87f1447635029cec42604f62a76bba84899beb4b8822af10389d1f93a9b6" ) @@ -36,7 +37,17 @@ class PyFenicsUfl(PythonPackage): ) version("2016.2.0", tag="ufl-2016.2.0", commit="962d56f65821fb9c50ca4a5a858882c472243431") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-setuptools@58:", type=("build", "run"), when="@2022.1.0:") - depends_on("py-setuptools@40:", type=("build", "run")) - depends_on("py-numpy@1.21:", type=("build", "run")) + depends_on("python@3.8:", when="@2023.2.0:", type=("build", "run")) + + depends_on("py-setuptools@62:", when="@2023.2.0:", type="build") + depends_on("py-setuptools@58:", when="@2022.1.0:2023.1.1.post0", type="build") + depends_on("py-setuptools@40:", when="@2016.2.0:2021.1.0", type="build") + depends_on("py-numpy", type=("build", "run")) + + depends_on("py-pytest", type="test") + + @run_after("install") + @on_package_attributes(run_tests=True) + def check_build(self): + with working_dir("test"): + Executable("py.test")() From 8347ae3766ea1ad18eccd78a9860d91097c82802 Mon Sep 17 00:00:00 2001 From: Stephen Sachs Date: Mon, 16 Oct 2023 16:24:21 +0200 Subject: [PATCH 225/806] intel-oneapi-compilers: ifx uses --gcc-name & --gxx-name (#40557) `ifx` uses the older syntax instead of `--gcc-toolchain`. Tested up to version 2023.2.0. --- .../repos/builtin/packages/intel-oneapi-compilers/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 72c56471c27e1b..84c560c2409825 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -276,12 +276,12 @@ def extend_config_flags(self): llvm_flags.append("-Wno-unused-command-line-argument") self.write_config_file( - common_flags + llvm_flags, self.component_prefix.linux.bin, ["icx", "icpx", "ifx"] + common_flags + llvm_flags, self.component_prefix.linux.bin, ["icx", "icpx"] ) self.write_config_file( common_flags + classic_flags, self.component_prefix.linux.bin.intel64, - ["icc", "icpc", "ifort"], + ["icc", "icpc", "ifort", "ifx"], ) def _ld_library_path(self): From 363b9d3c7b7f8d76e82edc9f7888d75f68850aa9 Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Mon, 16 Oct 2023 15:53:02 +0100 Subject: [PATCH 226/806] fenics-basix: update for v0.7 (#40440) * Uodate for Basix 0.7 * Version fix for nanobind dependency * Simplification * Version update and simplify dependencies * Add comment on location of pyproject.toml * Update var/spack/repos/builtin/packages/py-fenics-basix/package.py Co-authored-by: Adam J. Stewart --------- Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/fenics-basix/package.py | 1 + .../builtin/packages/py-fenics-basix/package.py | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/fenics-basix/package.py b/var/spack/repos/builtin/packages/fenics-basix/package.py index e4a3833bc05b9a..0de31ae59ff624 100644 --- a/var/spack/repos/builtin/packages/fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/fenics-basix/package.py @@ -15,6 +15,7 @@ class FenicsBasix(CMakePackage): maintainers("mscroggs", "chrisrichardson", "garth-wells", "jhale") version("main", branch="main") + version("0.7.0", sha256="9bee81b396ee452eec8d9735f278cb44cb6994c6bc30aec8ed9bb4b12d83fa7f") version("0.6.0", sha256="687ae53153c98facac4080dcdc7081701db1dcea8c5e7ae3feb72aec17f83304") version("0.5.1", sha256="69133476ac35f0bd0deccb480676030378c341d7dfb2adaca22cd16b7e1dc1cb") version("0.4.2", sha256="a54f5e442b7cbf3dbb6319c682f9161272557bd7f42e2b8b8ccef88bc1b7a22f") diff --git a/var/spack/repos/builtin/packages/py-fenics-basix/package.py b/var/spack/repos/builtin/packages/py-fenics-basix/package.py index 9e6d5b44b7a925..6d3ffa6cae3754 100644 --- a/var/spack/repos/builtin/packages/py-fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-basix/package.py @@ -15,22 +15,26 @@ class PyFenicsBasix(PythonPackage): maintainers("chrisrichardson", "mscroggs", "garth-wells", "jhale") version("main", branch="main") + version("0.7.0", sha256="9bee81b396ee452eec8d9735f278cb44cb6994c6bc30aec8ed9bb4b12d83fa7f") version("0.6.0", sha256="687ae53153c98facac4080dcdc7081701db1dcea8c5e7ae3feb72aec17f83304") version("0.5.1", sha256="69133476ac35f0bd0deccb480676030378c341d7dfb2adaca22cd16b7e1dc1cb") version("0.4.2", sha256="a54f5e442b7cbf3dbb6319c682f9161272557bd7f42e2b8b8ccef88bc1b7a22f") depends_on("fenics-basix@main", type=("build", "run"), when="@main") + depends_on("fenics-basix@0.7.0", type=("build", "run"), when="@0.7.0") depends_on("fenics-basix@0.6.0", type=("build", "run"), when="@0.6.0") depends_on("fenics-basix@0.5.1", type=("build", "run"), when="@0.5.1") depends_on("fenics-basix@0.4.2", type=("build", "run"), when="@0.4.2") + # See python/CMakeLists.txt + depends_on("cmake@3.16:", type="build") + + # See python/pyproject.toml + depends_on("python@3.8:", when="@0.7.0:", type=("build", "run")) depends_on("py-setuptools@42:", type="build") - depends_on("py-setuptools@40:", type="build") depends_on("py-numpy@1.21:", type=("build", "run")) - depends_on("cmake@3.19:", type="build") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-pybind11@2.9.1:", type="build") - depends_on("py-pybind11@2.2.4:", type="build") + depends_on("py-pybind11@2.9.1:", when="@:0.7", type="build") + depends_on("py-nanobind@1.5.1:", when="@0.8:", type="build") depends_on("xtensor@0.23.10:", type="build", when="@:0.4") From 14d935bd6cc0b307acc261d3ed3062f8a8905232 Mon Sep 17 00:00:00 2001 From: Diego Alvarez S Date: Mon, 16 Oct 2023 18:06:36 +0200 Subject: [PATCH 227/806] Add nextflow 23.10.0 (#40547) --- var/spack/repos/builtin/packages/nextflow/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/nextflow/package.py b/var/spack/repos/builtin/packages/nextflow/package.py index 71f1e84323abe8..379a3c9ba3307a 100644 --- a/var/spack/repos/builtin/packages/nextflow/package.py +++ b/var/spack/repos/builtin/packages/nextflow/package.py @@ -14,6 +14,11 @@ class Nextflow(Package): maintainers("dialvarezs", "marcodelapierre") + version( + "23.10.0", + sha256="4b7fba61ecc6d53a6850390bb435455a54ae4d0c3108199f88b16b49e555afdd", + expand=False, + ) version( "23.04.3", sha256="258714c0772db3cab567267e8441c5b72102381f6bd58fc6957c2972235be7e0", From 22405fbb68449c2a51705aa824784c0e28cad93c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 16 Oct 2023 10:28:38 -0600 Subject: [PATCH 228/806] Fix version incompatibilities of py-pandas and py-openpyxl (#40472) * Fix version incompatibilities of py-pandas and py-openpyxl * Add variant excel for py-pandas * Add package py-pyxlsb * Add versios for py-xlsxwriter * Define excel dependencies for py-pandas 1.4, 1.5, 2.0, 2.1 * Fix variant excel in py-pandas * Add package py-odfpy, which is also a dependency for py-pandas@2.0: * Rearrange excel dependencies for py-pandas * Change url to pypi * Add missing newline to fix style in py-odfpy --- .../builtin/packages/py-odfpy/package.py | 18 ++++++++++++++++++ .../builtin/packages/py-pandas/package.py | 16 ++++++++++++++++ .../builtin/packages/py-pyxlsb/package.py | 19 +++++++++++++++++++ .../builtin/packages/py-xlsxwriter/package.py | 4 ++++ 4 files changed, 57 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-odfpy/package.py create mode 100644 var/spack/repos/builtin/packages/py-pyxlsb/package.py diff --git a/var/spack/repos/builtin/packages/py-odfpy/package.py b/var/spack/repos/builtin/packages/py-odfpy/package.py new file mode 100644 index 00000000000000..338fb3beab4bd3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-odfpy/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 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 PyOdfpy(PythonPackage): + """Odfpy is a library to read and write OpenDocument v. 1.2 files.""" + + homepage = "https://github.com/eea/odfpy" + pypi = "odfpy/odfpy-1.4.1.tar.gz" + + version("1.4.1", sha256="db766a6e59c5103212f3cc92ec8dd50a0f3a02790233ed0b52148b70d3c438ec") + + depends_on("py-setuptools", type="build") + depends_on("py-defusedxml", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index e7ed9e7e60da4c..f3d531f3bc382f 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -17,6 +17,8 @@ class PyPandas(PythonPackage): maintainers("adamjstewart") + variant("excel", when="@1.4:", default=False, description="Build with support for Excel") + version("2.1.1", sha256="fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b") version("2.1.0", sha256="62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918") version("2.0.3", sha256="c02f372a88e0d17f36d3093a644c73cfc1788e876a7c4bcb4020a77512e2043c") @@ -129,6 +131,20 @@ class PyPandas(PythonPackage): # Optional dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#optional-dependencies + # Excel dependencies for 1.4+ (not coded up for earlier versions) + depends_on("py-odfpy@1.4.1:", type=("run"), when="@2.0: +excel") + depends_on("py-openpyxl@3.0.10:", type=("run"), when="@2.1: +excel") + depends_on("py-openpyxl@3.0.7:", type=("run"), when="@1.5: +excel") + depends_on("py-openpyxl@3.0.3:", type=("run"), when="@1.4: +excel") + depends_on("py-pyxlsb@1.0.9:", type=("run"), when="@2.1: +excel") + depends_on("py-pyxlsb@1.0.8:", type=("run"), when="@1.5: +excel") + depends_on("py-pyxlsb@1.0.6:", type=("run"), when="@1.4: +excel") + depends_on("py-xlrd@2.0.1:", type=("run"), when="@1.4: +excel") + depends_on("py-xlwt@1.3.0:", type=("run"), when="@1.4:1.5 +excel") + depends_on("py-xlsxwriter@3.0.3:", type=("run"), when="@2.1: +excel") + depends_on("py-xlsxwriter@1.4.3:", type=("run"), when="@1.5: +excel") + depends_on("py-xlsxwriter@1.2.2:", type=("run"), when="@1.4: +excel") + # Historical dependencies depends_on("py-setuptools@61:", when="@2.0", type="build") depends_on("py-setuptools@51:", when="@1.3.2:1", type="build") diff --git a/var/spack/repos/builtin/packages/py-pyxlsb/package.py b/var/spack/repos/builtin/packages/py-pyxlsb/package.py new file mode 100644 index 00000000000000..d873e0b68b0533 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyxlsb/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyPyxlsb(PythonPackage): + """Excel 2007-2010 Binary Workbook (xlsb) parser""" + + pypi = "pyxlsb/pyxlsb-1.0.10.tar.gz" + + version("1.0.10", sha256="8062d1ea8626d3f1980e8b1cfe91a4483747449242ecb61013bc2df85435f685") + version("1.0.8", sha256="dcf26d6494b45d8852d68571f828c2361b74711a2e19ba03eee77f96b9210464") + version("1.0.6", sha256="47e8230582de15ad9824a456d1d4cb36a6535f4ad5e5eb2464d31f0445b9db46") + + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-xlsxwriter/package.py b/var/spack/repos/builtin/packages/py-xlsxwriter/package.py index af333f03c08615..09c2285311cd76 100644 --- a/var/spack/repos/builtin/packages/py-xlsxwriter/package.py +++ b/var/spack/repos/builtin/packages/py-xlsxwriter/package.py @@ -12,6 +12,10 @@ class PyXlsxwriter(PythonPackage): pypi = "XlsxWriter/XlsxWriter-1.0.2.tar.gz" + version("3.1.7", sha256="353042efb0f8551ce72baa087e98228f3394fcb380e8b96313edf1eec8d50823") + version("3.0.3", sha256="e89f4a1d2fa2c9ea15cde77de95cd3fd8b0345d0efb3964623f395c8c4988b7f") + version("1.4.3", sha256="641db6e7b4f4982fd407a3f372f45b878766098250d26963e95e50121168cbe2") + version("1.2.2", sha256="5a5e2195a4672d17db79839bbdf1006a521adb57eaceea1c335ae4b3d19f088f") version("1.0.2", sha256="a26bbbafff88abffce592ffd5dfaa4c9f08dc44ef4afbf45c70d3e270325f856") depends_on("py-setuptools", type="build") From 74bbb1ef1bd44283194dc1eea065a066f2387b59 Mon Sep 17 00:00:00 2001 From: renjithravindrankannath <94420380+renjithravindrankannath@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:25:10 -0700 Subject: [PATCH 229/806] Updating patch to enable flag mcode-object-version=none (#40367) * Updating patch to add flag mcode-object-version=none when device libs is buils as part of llvm-amdgpu * Limiting patch to +rocm-device-libs variant and adding appropriate comment for the patch * Updating llvmpatch as per the mailine code Updating hsa-rocr patch as per the latest code Updating the if elif condition for the hip test src path * Updating flags for 5.5 relases and above * Updating build flags and patches --- .../repos/builtin/packages/hip/package.py | 9 ++-- .../0002-Remove-explicit-RPATH-again.patch | 16 +++--- .../builtin/packages/hsa-rocr-dev/package.py | 2 +- .../builtin/packages/hsakmt-roct/package.py | 7 ++- .../builtin/packages/llvm-amdgpu/package.py | 11 ++++- .../llvm-amdgpu/patch-llvm-5.5.0.patch | 49 ++++++++++++++----- 6 files changed, 64 insertions(+), 30 deletions(-) diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 5e1d6744cb65f4..1200cfdd2cb72d 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -715,11 +715,10 @@ def cache_test_sources(self): install test subdirectory for use during `spack test run`.""" if self.spec.satisfies("@:5.1.0"): return - else: - if "@:5.5" in self.spec: - self.test_src_dir = "samples" - else: - self.test_src_dir = "hip-tests/samples" + elif self.spec.satisfies("@5.1:5.5"): + self.test_src_dir = "samples" + elif self.spec.satisfies("@5.6:"): + self.test_src_dir = "hip-tests/samples" self.cache_extra_test_sources([self.test_src_dir]) def test_samples(self): diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch b/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch index 58fd1e8cd94900..7d3150e40c3f29 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/0002-Remove-explicit-RPATH-again.patch @@ -1,17 +1,17 @@ -From b5a49e6de81e7a6cba86694ee5ba2486cd999976 Mon Sep 17 00:00:00 2001 -From: Harmen Stoppels -Date: Fri, 28 Aug 2020 18:26:54 +0200 -Subject: [PATCH] Remove explicit RPATH again +From fb6bc54d50ec511118557bfad7f1b892adcc1a1d Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Tue, 10 Oct 2023 01:15:08 +0000 +Subject: [PATCH] Updating patch for the latest code --- src/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 9de7842..66c6880 100644 +index 8fb02b1..b40c972 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -134,9 +134,6 @@ target_include_directories( ${CORE_RUNTIME_TARGET} +@@ -122,9 +122,6 @@ target_include_directories( ${CORE_RUNTIME_TARGET} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libamdhsacode ) @@ -19,8 +19,8 @@ index 9de7842..66c6880 100644 -set_property(TARGET ${CORE_RUNTIME_TARGET} PROPERTY INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64" ) - ## ------------------------- Linux Compiler and Linker options ------------------------- - set ( HSA_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=missing-braces -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function ) + set ( HSA_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=missing-braces -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function ) -- -2.25.1 +2.31.1 diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index 8a240502260ae7..d6e42a83fcd640 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -162,7 +162,7 @@ class HsaRocrDev(CMakePackage): # Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways patch("0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch", when="@3.5.0") - patch("0002-Remove-explicit-RPATH-again.patch", when="@3.7.0:5.5") + patch("0002-Remove-explicit-RPATH-again.patch", when="@3.7.0:5.6") root_cmakelists_dir = "src" diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py index 0bebaae6bf3df5..571cffd6577ee1 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -132,8 +132,11 @@ def install_targets(self): else: return ["install"] - def cmake_args(self): - args = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")] + args = [] + if self.spec.satisfies("@:5.4.3"): + args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) + else: + args.append(self.define("BUILD_SHARED_LIBS", False)) if self.spec.satisfies("@5.4.3:"): args.append("-DCMAKE_INSTALL_LIBDIR=lib") return args diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index d69575d9338105..905cfe1f831fff 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -162,13 +162,17 @@ class LlvmAmdgpu(CMakePackage): # as per 5.2.0 llvm code. It used to be llvm/bin/../lib/libdevice. # Below patch is to look in the old path. patch("adjust-openmp-bitcode-directory-for-llvm-link.patch", when="@5.2.0:") - patch("patch-llvm-5.5.0.patch", when="@5.5:") + + # Below patch is to set the flag -mcode-object-version=none until + # the below fix is available in device-libs release code. + # https://github.com/RadeonOpenCompute/ROCm-Device-Libs/commit/f0356159dbdc93ea9e545f9b61a7842f9c881fdf + patch("patch-llvm-5.5.0.patch", when="@5.5: +rocm-device-libs") # i1 muls can sometimes happen after SCEV. # They resulted in ISel failures because we were missing the patterns for them. # This fix is targeting 6.1 rocm release. # Need patch until https://github.com/llvm/llvm-project/pull/67291 is merged. - patch("001-Add-i1-mul-patterns.patch", when="@5.6:") + patch("001-Add-i1-mul-patterns.patch", when="@5.6") conflicts("^cmake@3.19.0") @@ -285,6 +289,9 @@ def cmake_args(self): args.append(self.define("GCC_INSTALL_PREFIX", self.compiler.prefix)) if self.spec.satisfies("@5.4.3:"): args.append("-DCMAKE_INSTALL_LIBDIR=lib") + if self.spec.satisfies("@5.5.0:"): + args.append("-DCLANG_DEFAULT_RTLIB=compiler-rt") + args.append("-DCLANG_DEFAULT_UNWINDLIB=libgcc") return args @run_after("install") diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/patch-llvm-5.5.0.patch b/var/spack/repos/builtin/packages/llvm-amdgpu/patch-llvm-5.5.0.patch index 30e18a7da569b2..1495b6d3a39ac1 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/patch-llvm-5.5.0.patch +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/patch-llvm-5.5.0.patch @@ -1,13 +1,38 @@ -diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td -index bb4374b..36e7f7b 100644 ---- a/clang/include/clang/Driver/Options.td -+++ b/clang/include/clang/Driver/Options.td -@@ -3739,7 +3739,7 @@ def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group, - NormalizedValuesScope<"TargetOptions">, - NormalizedValues<["COV_None", "COV_2", "COV_3", "COV_4", "COV_5"]>, -- MarshallingInfoEnum, "COV_5">; -+ MarshallingInfoEnum, "COV_4">; +From 7010d5da727825321d31863ceb9e2fe9eb22b5b9 Mon Sep 17 00:00:00 2001 +From: Renjith Ravindran +Date: Tue, 10 Oct 2023 05:16:47 +0000 +Subject: [PATCH] Condition check for enabling the flag + -mcode-object-version=none is failing in spack when device-libsis built with + llvm-amdgpu. The flag is required here as well as standalon build. + +--- + rocm-device-libs/cmake/OCL.cmake | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/rocm-device-libs/cmake/OCL.cmake b/rocm-device-libs/cmake/OCL.cmake +index 773c6f62e..30f60030b 100644 +--- a/rocm-device-libs/cmake/OCL.cmake ++++ b/rocm-device-libs/cmake/OCL.cmake +@@ -30,17 +30,8 @@ if (WIN32) + set(CLANG_OCL_FLAGS ${CLANG_OCL_FLAGS} -fshort-wchar) + endif() - defm code_object_v3_legacy : SimpleMFlag<"code-object-v3", - "Legacy option to specify code object ABI V3", +-# Disable code object version module flag if available. +-file(WRITE ${CMAKE_BINARY_DIR}/tmp.cl "") +-execute_process ( +- COMMAND ${LLVM_TOOLS_BINARY_DIR}/clang${EXE_SUFFIX} ${CLANG_OCL_FLAGS} -Xclang -mcode-object-version=none ${CMAKE_BINARY_DIR}/tmp.cl +- RESULT_VARIABLE TEST_CODE_OBJECT_VERSION_NONE_RESULT +- ERROR_QUIET +-) +-file(REMOVE ${CMAKE_BINARY_DIR}/tmp.cl) +-if (NOT TEST_CODE_OBJECT_VERSION_NONE_RESULT) +- set(CLANG_OCL_FLAGS ${CLANG_OCL_FLAGS} -Xclang -mcode-object-version=none) +-endif() ++# Disable code object version module flag. ++set(CLANG_OCL_FLAGS ${CLANG_OCL_FLAGS} -Xclang -mcode-object-version=none) + + set (BC_EXT .bc) + set (LIB_SUFFIX ".lib${BC_EXT}") +-- +2.31.1 + From 3e3b2877616c2adcfc77008a3fa16757cae10553 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 16 Oct 2023 14:14:46 -0500 Subject: [PATCH 230/806] py-lightning: add v2.1.0 (#40496) --- .../builtin/packages/py-lightning/package.py | 101 ++++++++++-------- 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-lightning/package.py b/var/spack/repos/builtin/packages/py-lightning/package.py index 2dc383b1b416ec..f5131ec0715265 100644 --- a/var/spack/repos/builtin/packages/py-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-lightning/package.py @@ -7,15 +7,15 @@ class PyLightning(PythonPackage): - """Use Lightning Apps to build everything from production-ready, - multi-cloud ML systems to simple research demos. - """ + """The Deep Learning framework to train, deploy, and ship AI products Lightning fast.""" homepage = "https://github.com/Lightning-AI/lightning" pypi = "lightning/lightning-2.0.0.tar.gz" + skip_modules = ["lightning.app", "lightning.data", "lightning.store"] maintainers("adamjstewart") + version("2.1.0", sha256="1f78f5995ae7dcffa1edf34320db136902b73a0d1b304404c48ec8be165b3a93") version("2.0.9", sha256="2395ece6e29e12064718ff16b8edec5685df7f7095d4fee78edb0a654f5cd7eb") version("2.0.8", sha256="db914e211b5c3b079a821be6e4344e72d0a729163676a65c4e00aae98390ae7b") version("2.0.7", sha256="f05acd4ba846505d40125b4f9f0bda0804b2b0356e2ad2fd4e4bf7d1c61c8cc6") @@ -33,55 +33,64 @@ class PyLightning(PythonPackage): depends_on("py-setuptools", type="build") # src/lightning.egg-info/requires.txt - depends_on("py-jinja2@:4", type=("build", "run")) depends_on("py-pyyaml@5.4:7", type=("build", "run")) - depends_on("py-arrow@1.2:2", type=("build", "run")) - depends_on("py-backoff@2.2.1:3", when="@2.0.5:", type=("build", "run")) - depends_on("py-beautifulsoup4@4.8:5", type=("build", "run")) - depends_on("py-click@:9", type=("build", "run")) - depends_on("py-croniter@1.3:1.4", when="@2.0.5:", type=("build", "run")) - depends_on("py-croniter@1.3", when="@:2.0.4", type=("build", "run")) - depends_on("py-dateutils@:1", type=("build", "run")) - depends_on("py-deepdiff@5.7:7", type=("build", "run")) - depends_on("py-fastapi@0.92:1", when="@2.0.4:", type=("build", "run")) - depends_on("py-fastapi@0.69:0.88", when="@2.0.3", type=("build", "run")) - depends_on("py-fastapi@:0.88", when="@:2.0.2", type=("build", "run")) - depends_on("py-fsspec@2022.5:2024+http", when="@2.0.5:", type=("build", "run")) + depends_on("py-fsspec@2021.6.1:2024+http", when="@2.1:", type=("build", "run")) + depends_on("py-fsspec@2022.5:2024+http", when="@2.0.5:2.0", type=("build", "run")) depends_on("py-fsspec@2022.5:2023+http", when="@:2.0.4", type=("build", "run")) - depends_on("py-inquirer@2.10:4", type=("build", "run")) - depends_on("py-lightning-cloud@0.5.38:", when="@2.0.9:", type=("build", "run")) - depends_on("py-lightning-cloud@0.5.37:", when="@2.0.5:", type=("build", "run")) - depends_on("py-lightning-cloud@0.5.34:", when="@2.0.3:", type=("build", "run")) - depends_on("py-lightning-cloud@0.5.31:", when="@2:", type=("build", "run")) - depends_on("py-lightning-cloud@0.5.27:", when="@:1", type=("build", "run")) - depends_on("py-lightning-utilities@0.7:1", when="@2:", type=("build", "run")) + depends_on("py-lightning-utilities@0.8:1", when="@2.1:", type=("build", "run")) + depends_on("py-lightning-utilities@0.7:1", when="@2.0", type=("build", "run")) depends_on("py-lightning-utilities@0.6.0.post0:1", when="@:1", type=("build", "run")) depends_on("py-numpy@1.17.2:2", type=("build", "run")) - depends_on("py-packaging@17.1:24", type=("build", "run")) - depends_on("py-psutil@:6", type=("build", "run")) - depends_on("py-pydantic@1.7.4:2.1", when="@2.0.7:", type=("build", "run")) - depends_on("py-pydantic@1.7.4:2.0", when="@2.0.6", type=("build", "run")) - depends_on("py-pydantic@1.7.4:1", when="@2.0.5", type=("build", "run")) - depends_on("py-pydantic@1.7.4:3", when="@2.0.3:2.0.4", type=("build", "run")) - depends_on("py-pydantic@:2", when="@:2.0.2", type=("build", "run")) - depends_on("py-python-multipart@0.0.5:1", type=("build", "run")) - depends_on("py-requests@:3", type=("build", "run")) - depends_on("py-rich@12.3:14", when="@2:", type=("build", "run")) - depends_on("py-rich@:14", when="@:1", type=("build", "run")) - depends_on("py-starlette", when="@2.0.3:", type=("build", "run")) - depends_on("py-starlette@:1", when="@:2.0.2", type=("build", "run")) - depends_on("py-starsessions@1.2.1:1", type=("build", "run")) - depends_on("py-torch@1.11:3", when="@2:", type=("build", "run")) + depends_on("py-packaging@20:24", when="@2.1:", type=("build", "run")) + depends_on("py-packaging@17.1:24", when="@:2.0", type=("build", "run")) + depends_on("py-torch@1.12:3", when="@2.1:", type=("build", "run")) + depends_on("py-torch@1.11:3", when="@2.0", type=("build", "run")) depends_on("py-torch@1.10:3", when="@:1", type=("build", "run")) depends_on("py-torchmetrics@0.7:2", when="@2.0.9:", type=("build", "run")) depends_on("py-torchmetrics@0.7:1", when="@:2.0.8", type=("build", "run")) depends_on("py-tqdm@4.57:5", type=("build", "run")) - depends_on("py-traitlets@5.3:6", type=("build", "run")) depends_on("py-typing-extensions@4:5", type=("build", "run")) - depends_on("py-urllib3@:3", when="@2.0.4:", type=("build", "run")) - depends_on("py-urllib3@:2", when="@:2.0.3", type=("build", "run")) - depends_on("py-uvicorn@:1", type=("build", "run")) - depends_on("py-websocket-client@:2", type=("build", "run")) - depends_on("py-websockets@:12", when="@2.0.5:", type=("build", "run")) - depends_on("py-websockets@:11", when="@:2.0.4", type=("build", "run")) - depends_on("py-pytorch-lightning", when="@2:", type=("build", "run")) + + # Only an alias, not actually used by the library + # depends_on("py-pytorch-lightning", when="@2:", type=("build", "run")) + + # Historical requirements + with when("@:2.0"): + depends_on("py-jinja2@:4", type=("build", "run")) + depends_on("py-arrow@1.2:2", type=("build", "run")) + depends_on("py-backoff@2.2.1:3", when="@2.0.5:", type=("build", "run")) + depends_on("py-beautifulsoup4@4.8:5", type=("build", "run")) + depends_on("py-click@:9", type=("build", "run")) + depends_on("py-croniter@1.3:1.4", when="@2.0.5:", type=("build", "run")) + depends_on("py-croniter@1.3", when="@:2.0.4", type=("build", "run")) + depends_on("py-dateutils@:1", type=("build", "run")) + depends_on("py-deepdiff@5.7:7", type=("build", "run")) + depends_on("py-fastapi@0.92:1", when="@2.0.4:", type=("build", "run")) + depends_on("py-fastapi@0.69:0.88", when="@2.0.3", type=("build", "run")) + depends_on("py-fastapi@:0.88", when="@:2.0.2", type=("build", "run")) + depends_on("py-inquirer@2.10:4", type=("build", "run")) + depends_on("py-lightning-cloud@0.5.38:", when="@2.0.9:", type=("build", "run")) + depends_on("py-lightning-cloud@0.5.37:", when="@2.0.5:", type=("build", "run")) + depends_on("py-lightning-cloud@0.5.34:", when="@2.0.3:", type=("build", "run")) + depends_on("py-lightning-cloud@0.5.31:", when="@2:", type=("build", "run")) + depends_on("py-lightning-cloud@0.5.27:", when="@:1", type=("build", "run")) + depends_on("py-psutil@:6", type=("build", "run")) + depends_on("py-pydantic@1.7.4:2.1", when="@2.0.7:", type=("build", "run")) + depends_on("py-pydantic@1.7.4:2.0", when="@2.0.6", type=("build", "run")) + depends_on("py-pydantic@1.7.4:1", when="@2.0.5", type=("build", "run")) + depends_on("py-pydantic@1.7.4:3", when="@2.0.3:2.0.4", type=("build", "run")) + depends_on("py-pydantic@:2", when="@:2.0.2", type=("build", "run")) + depends_on("py-python-multipart@0.0.5:1", type=("build", "run")) + depends_on("py-requests@:3", type=("build", "run")) + depends_on("py-rich@12.3:14", when="@2:", type=("build", "run")) + depends_on("py-rich@:14", when="@:1", type=("build", "run")) + depends_on("py-starlette", when="@2.0.3:", type=("build", "run")) + depends_on("py-starlette@:1", when="@:2.0.2", type=("build", "run")) + depends_on("py-starsessions@1.2.1:1", type=("build", "run")) + depends_on("py-traitlets@5.3:6", type=("build", "run")) + depends_on("py-urllib3@:3", when="@2.0.4:", type=("build", "run")) + depends_on("py-urllib3@:2", when="@:2.0.3", type=("build", "run")) + depends_on("py-uvicorn@:1", type=("build", "run")) + depends_on("py-websocket-client@:2", type=("build", "run")) + depends_on("py-websockets@:12", when="@2.0.5:", type=("build", "run")) + depends_on("py-websockets@:11", when="@:2.0.4", type=("build", "run")) From 2bc4bfa877ec3c744b2e9a73e06a1e8573871199 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 16 Oct 2023 15:33:32 -0500 Subject: [PATCH 231/806] py-grpcio: cython 3 still not supported (#40537) --- var/spack/repos/builtin/packages/py-grpcio/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-grpcio/package.py b/var/spack/repos/builtin/packages/py-grpcio/package.py index 6b798b792eed3a..8a185d480265f0 100644 --- a/var/spack/repos/builtin/packages/py-grpcio/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio/package.py @@ -37,7 +37,7 @@ class PyGrpcio(PythonPackage): depends_on("py-setuptools", type="build") depends_on("py-six@1.5.2:", when="@:1.48", type=("build", "run")) - depends_on("py-cython@0.23:", type="build") + depends_on("py-cython@0.23:2", type="build") depends_on("openssl") depends_on("zlib-api") depends_on("c-ares") From 348493abcd335a59e98bf975ea6a5719e6468e12 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 16 Oct 2023 15:33:56 -0500 Subject: [PATCH 232/806] py-shapely: add v2.0.2 (#40523) --- var/spack/repos/builtin/packages/py-shapely/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-shapely/package.py b/var/spack/repos/builtin/packages/py-shapely/package.py index cec0aa4911a999..fa12d498e5f20b 100644 --- a/var/spack/repos/builtin/packages/py-shapely/package.py +++ b/var/spack/repos/builtin/packages/py-shapely/package.py @@ -19,6 +19,7 @@ class PyShapely(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("2.0.2", sha256="1713cc04c171baffc5b259ba8531c58acc2a301707b7f021d88a15ed090649e7") version("2.0.1", sha256="66a6b1a3e72ece97fc85536a281476f9b7794de2e646ca8a4517e2e3c1446893") version("2.0.0", sha256="11f1b1231a6c04213fb1226c6968d1b1b3b369ec42d1e9655066af87631860ea") version("1.8.5", sha256="e82b6d60ecfb124120c88fe106a478596bbeab142116d7e7f64a364dac902a92") @@ -32,7 +33,8 @@ class PyShapely(PythonPackage): version("1.6.4", sha256="b10bc4199cfefcf1c0e5d932eac89369550320ca4bdf40559328d85f1ca4f655") # pyproject.toml - depends_on("py-cython@0.29:0", when="@2:", type="build") + depends_on("py-cython", when="@2.0.2:", type="build") + depends_on("py-cython@0.29:0", when="@2.0.0:2.0.1", type="build") depends_on("py-cython@0.29.24:2", when="@:1", type="build") depends_on("py-setuptools@61:", when="@2:", type="build") depends_on("py-setuptools@:63", when="@:1", type="build") From 1e44f33163d8d75632f0c9d67738d3fffb308cdb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 16 Oct 2023 15:34:13 -0500 Subject: [PATCH 233/806] py-fiona: add v1.9.5 (#40497) --- .../builtin/packages/py-fiona/package.py | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-fiona/package.py b/var/spack/repos/builtin/packages/py-fiona/package.py index 37da11dd4cba8b..917a20ab09099d 100644 --- a/var/spack/repos/builtin/packages/py-fiona/package.py +++ b/var/spack/repos/builtin/packages/py-fiona/package.py @@ -10,12 +10,13 @@ class PyFiona(PythonPackage): """Fiona reads and writes spatial data files.""" homepage = "https://github.com/Toblerity/Fiona" - pypi = "Fiona/Fiona-1.8.18.tar.gz" + pypi = "fiona/fiona-1.9.5.tar.gz" git = "https://github.com/Toblerity/Fiona.git" maintainers("adamjstewart") version("master", branch="master") + version("1.9.5", sha256="99e2604332caa7692855c2ae6ed91e1fffdf9b59449aa8032dd18e070e59a2f7") version("1.9.4", sha256="49f18cbcd3b1f97128c1bb038c3451b2e1be25baa52f02ce906c25cf75af95b6") version("1.9.3", sha256="60f3789ad9633c3a26acf7cbe39e82e3c7a12562c59af1d599fc3e4e8f7f8f25") version("1.9.2", sha256="f9263c5f97206bf2eb2c010d52e8ffc54e96886b0e698badde25ff109b32952a") @@ -27,11 +28,13 @@ class PyFiona(PythonPackage): version("1.8.18", sha256="b732ece0ff8886a29c439723a3e1fc382718804bb057519d537a81308854967a") # pyproject.toml - depends_on("python@3.7:", when="@1.9:", type=("build", "link", "run")) - depends_on("python@2.6:", when="@1.8.22:1.8", type=("build", "link", "run")) - depends_on("python@2.6:3.10", when="@1.8.21", type=("build", "link", "run")) - depends_on("python@2.6:3.9", when="@:1.8.20", type=("build", "link", "run")) - depends_on("py-cython@0.29.29:0.29", when="@1.9:", type="build") + depends_on("python@:3.10", when="@1.8.21", type=("build", "link", "run")) + depends_on("python@:3.9", when="@:1.8.20", type=("build", "link", "run")) + depends_on("py-cython", type="build") + # Overly strict version requirements + # depends_on("py-cython@3.0.2:3", when="@1.9.5:", type="build") + # depends_on("py-cython@0.29.29:0.29", when="@1.9.0:1.9.4", type="build") + depends_on("py-setuptools@67.8:", when="@1.9.5:", type="build") depends_on("py-setuptools@61:", when="@1.9:", type="build") depends_on("py-attrs@19.2:", when="@1.9:", type=("build", "run")) depends_on("py-attrs@17:", type=("build", "run")) @@ -43,12 +46,20 @@ class PyFiona(PythonPackage): depends_on("py-importlib-metadata", when="@1.9.2: ^python@:3.9", type=("build", "run")) depends_on("py-six", when="@1.9.4:", type=("build", "run")) depends_on("py-six@1.7:", when="@:1.8", type=("build", "run")) + depends_on("py-setuptools", when="@:1.9.1,1.9.5:", type="run") # setup.py or release notes depends_on("gdal@3.1:", when="@1.9:", type=("build", "link", "run")) depends_on("gdal@1.8:", type=("build", "link", "run")) # Historical dependencies - depends_on("py-setuptools", when="@:1.9.1", type=("build", "run")) depends_on("py-munch@2.3.2:", when="@1.9.0:1.9.3", type=("build", "run")) depends_on("py-munch", when="@:1.8", type=("build", "run")) + + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/source/{0}/{0}iona/{0}iona-{1}.tar.gz" + if version >= Version("1.9.5"): + letter = "f" + else: + letter = "F" + return url.format(letter, version) From 4a96d29e694ee207fd591546363f0d7dd9dc2cc7 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 16 Oct 2023 22:36:22 +0200 Subject: [PATCH 234/806] Use string representation of deptypes for concrete specs (#40566) --- lib/spack/spack/solver/asp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index ce0ae2ca7f4cd4..af0ddd67ae0138 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1883,7 +1883,11 @@ class Body: continue # skip build dependencies of already-installed specs if concrete_build_deps or dtype != dt.BUILD: - clauses.append(fn.attr("depends_on", spec.name, dep.name, dtype)) + clauses.append( + fn.attr( + "depends_on", spec.name, dep.name, dt.flag_to_string(dtype) + ) + ) for virtual_name in dspec.virtuals: clauses.append( fn.attr("virtual_on_edge", spec.name, dep.name, virtual_name) From ae185087e743c7e63e49242ad3dc1c0a4484d97b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 16 Oct 2023 15:37:50 -0500 Subject: [PATCH 235/806] py-grayskull: add new package (#40293) * py-grayskull: add new package * [@spackbot] updating style on behalf of adamjstewart --------- Co-authored-by: adamjstewart --- .../packages/py-conda-souschef/package.py | 21 +++++++++++ .../builtin/packages/py-grayskull/package.py | 35 +++++++++++++++++++ .../builtin/packages/py-rapidfuzz/package.py | 10 ++++-- .../packages/py-ruamel-yaml-jinja2/package.py | 20 +++++++++++ .../packages/py-scikit-build/package.py | 31 ++++++++++++---- .../builtin/packages/py-semver/package.py | 2 ++ 6 files changed, 111 insertions(+), 8 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-conda-souschef/package.py create mode 100644 var/spack/repos/builtin/packages/py-grayskull/package.py create mode 100644 var/spack/repos/builtin/packages/py-ruamel-yaml-jinja2/package.py diff --git a/var/spack/repos/builtin/packages/py-conda-souschef/package.py b/var/spack/repos/builtin/packages/py-conda-souschef/package.py new file mode 100644 index 00000000000000..5c4ddc7d937e41 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-conda-souschef/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 PyCondaSouschef(PythonPackage): + """Project to handle conda recipes.""" + + homepage = "https://github.com/marcelotrevisani/souschef" + pypi = "conda-souschef/conda-souschef-2.2.3.tar.gz" + + version("2.2.3", sha256="9bf3dba0676bc97616636b80ad4a75cd90582252d11c86ed9d3456afb939c0c3") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools@30.3:", type="build") + depends_on("py-setuptools-scm", type="build") + depends_on("py-ruamel-yaml@0.15.3:", type=("build", "run")) + depends_on("py-ruamel-yaml-jinja2", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-grayskull/package.py b/var/spack/repos/builtin/packages/py-grayskull/package.py new file mode 100644 index 00000000000000..f1375aa4567062 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-grayskull/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2023 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 PyGrayskull(PythonPackage): + """Project to generate recipes for conda packages.""" + + homepage = "https://github.com/conda/grayskull" + pypi = "grayskull/grayskull-2.5.0.tar.gz" + + version("2.5.0", sha256="b021138655be550fd1b93b8db08b9c66169fac9cba6bcdad1411263e12fc703f") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools@61:", type="build") + depends_on("py-setuptools-scm@6.2:+toml", type="build") + depends_on("py-beautifulsoup4", type=("build", "run")) + depends_on("py-colorama", type=("build", "run")) + depends_on("py-conda-souschef@2.2.3:", type=("build", "run")) + depends_on("py-packaging@21.3:", type=("build", "run")) + depends_on("py-pip", type=("build", "run")) + depends_on("py-pkginfo", type=("build", "run")) + depends_on("py-progressbar2@3.53:", type=("build", "run")) + depends_on("py-rapidfuzz@3:", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-ruamel-yaml@0.16.10:", type=("build", "run")) + depends_on("py-ruamel-yaml-jinja2", type=("build", "run")) + depends_on("py-setuptools@30.3:", type=("build", "run")) + depends_on("py-semver@3.0", type=("build", "run")) + depends_on("py-stdlib-list", type=("build", "run")) + depends_on("py-tomli", type=("build", "run")) + depends_on("py-tomli-w", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-rapidfuzz/package.py b/var/spack/repos/builtin/packages/py-rapidfuzz/package.py index e5b4c9ae34a141..5bfd1563b5bb78 100644 --- a/var/spack/repos/builtin/packages/py-rapidfuzz/package.py +++ b/var/spack/repos/builtin/packages/py-rapidfuzz/package.py @@ -12,8 +12,14 @@ class PyRapidfuzz(PythonPackage): homepage = "https://github.com/maxbachmann/rapidfuzz" pypi = "rapidfuzz/rapidfuzz-1.8.2.tar.gz" + version("3.3.1", sha256="6783b3852f15ed7567688e2e358757a7b4f38683a915ba5edc6c64f1a3f0b450") version("1.8.2", sha256="d6efbb2b6b18b3a67d7bdfbcd9bb72732f55736852bbef823bdf210f9e0c6c90") - depends_on("python@2.7:", type=("build", "link", "run")) + depends_on("python", type=("build", "link", "run")) + depends_on("py-setuptools@42:", when="@3:", type="build") depends_on("py-setuptools", type="build") - depends_on("py-numpy", type=("build", "run")) + depends_on("py-scikit-build@0.17", when="@3:", type="build") + + # CMakeLists.txt + depends_on("cmake@3.12:", type="build") + depends_on("ninja", type="build") diff --git a/var/spack/repos/builtin/packages/py-ruamel-yaml-jinja2/package.py b/var/spack/repos/builtin/packages/py-ruamel-yaml-jinja2/package.py new file mode 100644 index 00000000000000..0958c65b9ddbcc --- /dev/null +++ b/var/spack/repos/builtin/packages/py-ruamel-yaml-jinja2/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 PyRuamelYamlJinja2(PythonPackage): + """jinja2 pre and post-processor to update with YAML.""" + + homepage = "https://sourceforge.net/p/ruamel-yaml-jinja2/code/ci/default/tree" + pypi = "ruamel.yaml.jinja2/ruamel.yaml.jinja2-0.2.7.tar.gz" + + version("0.2.7", sha256="8449be29d9a157fa92d1648adc161d718e469f0d38a6b21e0eabb76fd5b3e663") + + depends_on("py-setuptools", type="build") + + # __init__.py + depends_on("py-ruamel-yaml@0.16.1:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-scikit-build/package.py b/var/spack/repos/builtin/packages/py-scikit-build/package.py index bfca8b7c77e7dc..a83a084fc179b9 100644 --- a/var/spack/repos/builtin/packages/py-scikit-build/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-build/package.py @@ -16,18 +16,37 @@ class PyScikitBuild(PythonPackage): the setuptools Python module and CMake.""" homepage = "https://scikit-build.readthedocs.io/en/latest/" - pypi = "scikit-build/scikit-build-0.15.0.tar.gz" + pypi = "scikit-build/scikit_build-0.17.6.tar.gz" maintainers("coreyjadams") + version("0.17.6", sha256="b51a51a36b37c42650994b5047912f59b22e3210b23e321f287611f9ef6e5c9d") version("0.15.0", sha256="e723cd0f3489a042370b9ea988bbb9cfd7725e8b25b20ca1c7981821fcf65fb9") version("0.12.0", sha256="f851382c469bcd9a8c98b1878bcfdd13b68556279d2fd9a329be41956ae5a7fe") version("0.11.1", sha256="da40dfd69b2456fad1349a894b90180b43712152b8a85d2a00f4ae2ce8ac9a5c") version("0.10.0", sha256="7342017cc82dd6178e3b19377389b8a8d1f8b429d9cdb315cfb1094e34a0f526") - depends_on("py-setuptools@28.0.0:", type=("build", "run")) - depends_on("py-setuptools@42.0.0:", when="@0.15.0:", type=("build", "run")) - depends_on("py-setuptools-scm+toml", when="@0.15.0:", type="build") - depends_on("py-packaging", type=("build", "run")) - depends_on("py-wheel@0.29.0:", type=("build", "run")) + depends_on("py-hatchling", when="@0.17:", type="build") + depends_on("py-hatch-fancy-pypi-readme", when="@0.17:", type="build") + depends_on("py-hatch-vcs", when="@0.17:", type="build") depends_on("py-distro", when="@0.11:", type=("build", "run")) + depends_on("py-packaging", type=("build", "run")) + depends_on("py-setuptools@42:", when="@0.15:", type=("build", "run")) + depends_on("py-setuptools@28:", type=("build", "run")) + depends_on("py-tomli", when="@0.17: ^python@:3.10", type=("build", "run")) + depends_on("py-typing-extensions@3.7:", when="@0.17: ^python@:3.7", type=("build", "run")) + depends_on("py-wheel@0.32:", when="@0.17:", type=("build", "run")) + depends_on("py-wheel@0.29:", type=("build", "run")) + + # Historical dependencies + depends_on("py-setuptools-scm+toml", when="@0.15", type="build") + + def url_for_version(self, version): + url = ( + "https://files.pythonhosted.org/packages/source/s/scikit-build/scikit{}build-{}.tar.gz" + ) + if version >= Version("0.17"): + separator = "_" + else: + separator = "-" + return url.format(separator, version) diff --git a/var/spack/repos/builtin/packages/py-semver/package.py b/var/spack/repos/builtin/packages/py-semver/package.py index d3201097def6b0..59b05d9b64cca6 100644 --- a/var/spack/repos/builtin/packages/py-semver/package.py +++ b/var/spack/repos/builtin/packages/py-semver/package.py @@ -13,6 +13,8 @@ class PySemver(PythonPackage): homepage = "https://semver.org/" pypi = "semver/semver-2.8.1.tar.gz" + version("3.0.1", sha256="9ec78c5447883c67b97f98c3b6212796708191d22e4ad30f4570f840171cbce1") version("2.8.1", sha256="5b09010a66d9a3837211bb7ae5a20d10ba88f8cb49e92cb139a69ef90d5060d8") depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", when="@3:", type="build") From 9d5615620ad80448fa3df349fd7d628d6503dd64 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Mon, 16 Oct 2023 17:10:31 -0400 Subject: [PATCH 236/806] py-furo: new version (#40559) --- var/spack/repos/builtin/packages/py-furo/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-furo/package.py b/var/spack/repos/builtin/packages/py-furo/package.py index c26ababcb0b7ff..a4ca3e1ce4d2d7 100644 --- a/var/spack/repos/builtin/packages/py-furo/package.py +++ b/var/spack/repos/builtin/packages/py-furo/package.py @@ -12,6 +12,7 @@ class PyFuro(PythonPackage): homepage = "https://github.com/pradyunsg/furo" pypi = "furo/furo-2023.5.20.tar.gz" + version("2023.9.10", sha256="5707530a476d2a63b8cad83b4f961f3739a69f4b058bcf38a03a39fa537195b2") version("2023.5.20", sha256="40e09fa17c6f4b22419d122e933089226dcdb59747b5b6c79363089827dea16f") depends_on("py-sphinx-theme-builder@0.2.0a10:", type="build") From 361a185ddb233b78b2de54e163d20ae21adbc8ab Mon Sep 17 00:00:00 2001 From: Stephen Sachs Date: Tue, 17 Oct 2023 04:23:46 +0200 Subject: [PATCH 237/806] intel-oneapi-compilers: ifx is located in bin not bin/intel64 (#40561) This is a fix on top of https://github.com/spack/spack/pull/40557 . Tagging @rscohn2 for review. --- .../repos/builtin/packages/intel-oneapi-compilers/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 84c560c2409825..be6f4d109b3c81 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -278,10 +278,13 @@ def extend_config_flags(self): self.write_config_file( common_flags + llvm_flags, self.component_prefix.linux.bin, ["icx", "icpx"] ) + self.write_config_file( + common_flags + classic_flags, self.component_prefix.linux.bin, ["ifx"] + ) self.write_config_file( common_flags + classic_flags, self.component_prefix.linux.bin.intel64, - ["icc", "icpc", "ifort", "ifx"], + ["icc", "icpc", "ifort"], ) def _ld_library_path(self): From 2913cd936afe9cd9b5c108088d1604b2b131b0b9 Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Mon, 16 Oct 2023 22:28:51 -0400 Subject: [PATCH 238/806] Add latest versions of rlwrap (#40563) * Add latest versions of rlwrap * rlwrap: fix URL for v0.46.1 --- var/spack/repos/builtin/packages/rlwrap/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/rlwrap/package.py b/var/spack/repos/builtin/packages/rlwrap/package.py index 2df72bfa2b3f0b..8203856915270c 100644 --- a/var/spack/repos/builtin/packages/rlwrap/package.py +++ b/var/spack/repos/builtin/packages/rlwrap/package.py @@ -13,6 +13,17 @@ class Rlwrap(AutotoolsPackage): homepage = "https://github.com/hanslub42/rlwrap" url = "https://github.com/hanslub42/rlwrap/releases/download/v0.43/rlwrap-0.43.tar.gz" + version("0.46.1", sha256="2711986a1248f6ac59e2aecf5586205835970040d300a42b4bf8014397e73e37") + version("0.46", sha256="b4bd79fda824426dae65236e338ba7daf3f0d0acad7c1561d4d5e6dadcfd539d") + version("0.45.2", sha256="9f8870deb46e473d21b5db89d709b6497f4ef9fa06d44eebc5f821daa00c8eca") + version("0.44", sha256="cd7ff50cde66e443cbea0049b4abf1cca64a74948371fa4f1b5d9a5bbce1e13c") version("0.43", sha256="8e86d0b7882d9b8a73d229897a90edc207b1ae7fa0899dca8ee01c31a93feb2f") depends_on("readline@4.2:") + + def url_for_version(self, version): + if version < Version("0.46.1"): + return super().url_for_version(version) + # The latest release (0.46.1) removed the "v" prefix. + url_fmt = "https://github.com/hanslub42/rlwrap/releases/download/{0}/rlwrap-{0}.tar.gz" + return url_fmt.format(version) From 7cc17f208c2b2a10491c6cbe23e7b65fd2482447 Mon Sep 17 00:00:00 2001 From: Patrick Bridges Date: Mon, 16 Oct 2023 21:13:31 -0600 Subject: [PATCH 239/806] Creation of Beatnik package and associated updates to silo and cabana spack package (#40382) * Added initial package for building Beatnik with spack * Fixed github ID for Jason as a maintainer. * Major revision of beatnik spack package to properly support GPU spack builds with CUDA (and ROCm, though that it untested) * Marked that beatnik 1.0 will require cabana 0.6.0. We will wait for the cabana 0.6.0 release before we release beatnik * Update to beatnik package spec to compile with hipcc when +rocm * Updated spack package for cabana for version 0.6.0 and appropriate heffte dependency * Updated beatnik package to require cabana 0.6.0 * More updates to cabana and beatnik to build with cabana 0.6.0 * Finish removing BLT dependence from beatnik * More updates to beatnik package for compiling on cray systems * Updated beatnik package for new cabana package * Changes to silo package for new silo version * Fixed version specs for heffte to be able to concretize and build * Fixed spack style issues for beatnik and silo packages * More spack formatting fixes to beatnik and silo * Patrick adopting silo package as maintainer for now * Should address final style changes to beatnik package spec * Yet more style fixes. * Perhaps this is the final style fixes? :) * Minor fix to cabana package on required versions --- .../repos/builtin/packages/beatnik/package.py | 90 +++++++++++++++++++ .../repos/builtin/packages/cabana/package.py | 25 +++++- .../repos/builtin/packages/silo/package.py | 24 +++-- 3 files changed, 129 insertions(+), 10 deletions(-) create mode 100644 var/spack/repos/builtin/packages/beatnik/package.py diff --git a/var/spack/repos/builtin/packages/beatnik/package.py b/var/spack/repos/builtin/packages/beatnik/package.py new file mode 100644 index 00000000000000..aa39194494bbee --- /dev/null +++ b/var/spack/repos/builtin/packages/beatnik/package.py @@ -0,0 +1,90 @@ +# Copyright 2013-2023 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 Beatnik(CMakePackage, CudaPackage, ROCmPackage): + """Fluid interface model solver based on Pandya and Shkoller's Z-Model formulation.""" + + homepage = "https://github.com/CUP-ECS/beatnik" + git = "https://github.com/CUP-ECS/beatnik.git" + + maintainers("patrickb314", "JStewart28") + + # Add proper versions and checksums here. Will add 1.0 when a proper SHA is available + # version("1.0", sha256="XXX") + version("develop", branch="develop") + version("main", branch="main") + + # Variants are primarily backends to build on GPU systems and pass the right + # informtion to the packages we depend on + variant("cuda", default=False, description="Use CUDA support from subpackages") + variant("openmp", default=False, description="Use OpenMP support from subpackages") + + # Dependencies for all Beatnik versions + depends_on("mpi") + depends_on("mpi +cuda", when="+cuda") + depends_on("mpi +rocm", when="+rocm") + + # Kokkos dependencies + depends_on("kokkos @4:") + depends_on("kokkos +cuda +cuda_lambda +cuda_constexpr", when="+cuda") + depends_on("kokkos +rocm", when="+rocm") + depends_on("kokkos +wrapper", when="%gcc+cuda") + + # Cabana dependencies + depends_on("cabana @0.6.0 +grid +heffte +silo +hdf5 +mpi") + depends_on("cabana +cuda", when="+cuda") + depends_on("cabana +rocm", when="+rocm") + + # Silo dependencies + depends_on("silo @4.11:") + depends_on("silo @4.11.1:", when="%cce") # Eariler silo versions have trouble cce + + # Heffte dependencies - We always require FFTW so that there's a host + # backend even when we're compiling for GPUs + depends_on("heffte +fftw") + depends_on("heffte +cuda", when="+cuda") + depends_on("heffte +rocm", when="+rocm") + + # If we're using CUDA or ROCM, require MPIs be GPU-aware + conflicts("mpich ~cuda", when="+cuda") + conflicts("mpich ~rocm", when="+rocm") + conflicts("openmpi ~cuda", when="+cuda") + conflicts("^intel-mpi") # Heffte won't build with intel MPI because of needed C++ MPI support + + # Propagate CUDA and AMD GPU targets to cabana + for cuda_arch in CudaPackage.cuda_arch_values: + depends_on("cabana cuda_arch=%s" % cuda_arch, when="+cuda cuda_arch=%s" % cuda_arch) + for amdgpu_value in ROCmPackage.amdgpu_targets: + depends_on( + "cabana +rocm amdgpu_target=%s" % amdgpu_value, + when="+rocm amdgpu_target=%s" % amdgpu_value, + ) + + # CMake specific build functions + def cmake_args(self): + args = [] + + # Use hipcc as the c compiler if we are compiling for rocm. Doing it this way + # keeps the wrapper insted of changeing CMAKE_CXX_COMPILER keeps the spack wrapper + # and the rpaths it sets for us from the underlying spec. + if "+rocm" in self.spec: + env["SPACK_CXX"] = self.spec["hip"].hipcc + + # If we're building with cray mpich, we need to make sure we get the GTL library for + # gpu-aware MPI, since cabana and beatnik require it + if self.spec.satisfies("+rocm ^cray-mpich"): + gtl_dir = join_path(self.spec["cray-mpich"].prefix, "..", "..", "..", "gtl", "lib") + args.append( + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath={0} -L{0} -lmpi_gtl_hsa".format(gtl_dir) + ) + elif self.spec.satisfies("+cuda ^cray-mpich"): + gtl_dir = join_path(self.spec["cray-mpich"].prefix, "..", "..", "..", "gtl", "lib") + args.append( + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath={0} -L{0} -lmpi_gtl_cuda".format(gtl_dir) + ) + return args diff --git a/var/spack/repos/builtin/packages/cabana/package.py b/var/spack/repos/builtin/packages/cabana/package.py index 6b6289b981adeb..ae4d4e9fca35aa 100644 --- a/var/spack/repos/builtin/packages/cabana/package.py +++ b/var/spack/repos/builtin/packages/cabana/package.py @@ -12,7 +12,7 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/ECP-copa/Cabana" git = "https://github.com/ECP-copa/Cabana.git" - url = "https://github.com/ECP-copa/Cabana/archive/0.5.0.tar.gz" + url = "https://github.com/ECP-copa/Cabana/archive/0.6.0.tar.gz" maintainers("junghans", "streeve", "sslattery") @@ -47,6 +47,7 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.9:", type="build", when="@:0.4.0") depends_on("cmake@3.16:", type="build", when="@0.5.0:") + depends_on("googletest", type="test", when="+testing") _versions = {":0.2": "-legacy", "0.3:": "@3.1:", "0.4:": "@3.2:", "0.6:": "@3.7:"} for _version in _versions: @@ -63,34 +64,50 @@ class Cabana(CMakePackage, CudaPackage, ROCmPackage): _kk_spec = "kokkos{0}+{1}".format(_kk_version, _backend) depends_on(_kk_spec, when="@{0}+{1}".format(_version, _backend)) + # Propagate cuda architectures down to Kokkos and optional submodules for arch in CudaPackage.cuda_arch_values: cuda_dep = "+cuda cuda_arch={0}".format(arch) depends_on("kokkos {0}".format(cuda_dep), when=cuda_dep) + depends_on("heffte {0}".format(cuda_dep), when="+heffte {0}".format(cuda_dep)) + depends_on("arborx {0}".format(cuda_dep), when="+arborx {0}".format(cuda_dep)) + depends_on("hypre {0}".format(cuda_dep), when="+hypre {0}".format(cuda_dep)) for arch in ROCmPackage.amdgpu_targets: rocm_dep = "+rocm amdgpu_target={0}".format(arch) depends_on("kokkos {0}".format(rocm_dep), when=rocm_dep) + depends_on("heffte {0}".format(rocm_dep), when="+heffte {0}".format(rocm_dep)) + depends_on("arborx {0}".format(rocm_dep), when="+arborx {0}".format(rocm_dep)) + depends_on("hypre {0}".format(rocm_dep), when="+hypre {0}".format(rocm_dep)) conflicts("+cuda", when="cuda_arch=none") + conflicts("+rocm", when="amdgpu_target=none") + depends_on("kokkos+cuda_lambda", when="+cuda") + # Dependencies for subpackages depends_on("arborx", when="@0.3.0:+arborx") depends_on("hypre-cmake@2.22.0:", when="@0.4.0:+hypre") depends_on("hypre-cmake@2.22.1:", when="@0.5.0:+hypre") - # Previous heFFTe pinned at 2.x.0 because its cmakefiles can't roll forward - # compatibilty to later minor versions. depends_on("heffte@2.0.0", when="@0.4.0+heffte") - depends_on("heffte@2.1.0", when="@0.5.0:+heffte") + depends_on("heffte@2.1.0", when="@0.5.0+heffte") depends_on("heffte@2.3.0:", when="@0.6.0:+heffte") depends_on("silo", when="@0.5.0:+silo") depends_on("hdf5", when="@0.6.0:+hdf5") depends_on("mpi", when="+mpi") + # Cabana automatically builds HDF5 support with newer cmake versions + # in version 0.6.0. This is fixed post-0.6 + conflicts("~hdf5", when="@0.6.0 ^cmake@:3.26") + + # Cajita support requires MPI conflicts("+cajita ~mpi") conflicts("+grid ~mpi") + # Conflict variants only available in newer versions of cabana conflicts("+rocm", when="@:0.2.0") conflicts("+sycl", when="@:0.3.0") + conflicts("+silo", when="@:0.3.0") + conflicts("+hdf5", when="@:0.5.0") def cmake_args(self): options = [self.define_from_variant("BUILD_SHARED_LIBS", "shared")] diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 6c75493faa2adc..4b4a0194e867ea 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -12,8 +12,21 @@ class Silo(AutotoolsPackage): data to binary, disk files.""" homepage = "https://wci.llnl.gov/simulation/computer-codes/silo" + git = "https://github.com/LLNL/Silo.git" url = "https://wci.llnl.gov/sites/wci/files/2021-01/silo-4.10.2.tgz" + maintainers("patrickb314") + version( + "4.11.1", + preferred=True, + sha256="49eddc00304aa4a19074b099559edbdcaa3532c98df32f99aa62b9ec3ea7cee2", + url="https://github.com/LLNL/Silo/releases/download/4.11.1/silo-4.11.1.tar.xz", + ) + version( + "4.11.1-bsd", + sha256="51ccfdf3c09dfc98c7858a0a6f08cc3b2a07ee3c4142ee6482ba7b24e314c2aa", + url="https://github.com/LLNL/Silo/releases/download/4.11.1/silo-4.11.1-bsd.tar.xz", + ) version( "4.11", sha256="ab936c1f4fc158d9fdc4415965f7d9def7f4abeca596fe5a25bd8485654898ac", @@ -68,19 +81,18 @@ class Silo(AutotoolsPackage): patch("H5FD_class_t-terminate.patch", when="@:4.10.2-bsd") # H5EPR_SEMI_COLON.patch was fixed in current dev - # patch("H5EPR_SEMI_COLON.patch", when="@:4.11-bsd") - patch("H5EPR_SEMI_COLON.patch") + patch("H5EPR_SEMI_COLON.patch", when="@:4.11-bsd") # Fix missing F77 init, fixed in 4.9 patch("48-configure-f77.patch", when="@:4.8") # The previously used AX_CHECK_COMPILER_FLAGS macro was dropped from # autoconf-archive in 2011 - patch("configure-AX_CHECK_COMPILE_FLAG.patch") + patch("configure-AX_CHECK_COMPILE_FLAG.patch", when="@:4.11-bsd") # API changes in hdf5-1.13 cause breakage # See https://github.com/LLNL/Silo/pull/260 - patch("hdf5-113.patch", when="@4.11: +hdf5 ^hdf5@1.13:") + patch("hdf5-113.patch", when="@4.11:4.11-bsd +hdf5 ^hdf5@1.13:") conflicts("^hdf5@1.13:", when="@:4.10.2-bsd") # hzip and fpzip are not available in the BSD releases @@ -88,10 +100,10 @@ class Silo(AutotoolsPackage): conflicts("+fpzip", when="@4.10.2-bsd,4.11-bsd") # zfp include missing - patch("zfp_error.patch", when="@4.11 +hdf5") + patch("zfp_error.patch", when="@4.11:4.11-bsd +hdf5") # use /usr/bin/env perl for portability - patch("mkinc-usr-bin-env-perl.patch") + patch("mkinc-usr-bin-env-perl.patch", when="@:4.11-bsd") def flag_handler(self, name, flags): spec = self.spec From 348e5cb522eb6041f8556ed5823fb63aa23305c7 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 17 Oct 2023 08:38:06 +0200 Subject: [PATCH 240/806] packages: use "requires" to allow only selected compilers (#40567) A few packages have encoded an idiom that pre-dates the introduction of the 'requires' directive, and they cycle over all compilers to conflict with the ones that are not supported. Here instead we reverse the logic, and require the ones that are supported. --- .../repos/builtin/packages/blaspp/package.py | 10 +---- .../packages/clingo-bootstrap/package.py | 37 +++++++++---------- .../builtin/packages/exciting/package.py | 20 ++-------- .../builtin/packages/gaussian-src/package.py | 6 +-- .../intel-oneapi-compilers/package.py | 7 +--- .../repos/builtin/packages/knem/package.py | 7 +--- .../builtin/packages/lapackpp/package.py | 10 +---- .../repos/builtin/packages/lbann/package.py | 4 +- .../repos/builtin/packages/nvhpc/package.py | 6 +-- .../repos/builtin/packages/slate/package.py | 10 +---- .../builtin/packages/trilinos/package.py | 12 +++--- .../repos/builtin/packages/xpmem/package.py | 8 +--- 12 files changed, 34 insertions(+), 103 deletions(-) diff --git a/var/spack/repos/builtin/packages/blaspp/package.py b/var/spack/repos/builtin/packages/blaspp/package.py index f6f52d2756dcb5..d43ab4de6bb269 100644 --- a/var/spack/repos/builtin/packages/blaspp/package.py +++ b/var/spack/repos/builtin/packages/blaspp/package.py @@ -72,15 +72,7 @@ class Blaspp(CMakePackage, CudaPackage, ROCmPackage): conflicts("+cuda", when="+sycl", msg=backend_msg) conflicts("+sycl", when="@:2023.06.00", msg="SYCL support requires BLAS++ version 2023.08.25") - # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. - # For now, add conflicts for other compilers instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "oneapi": - conflicts( - "%{0}".format(__compiler), - when="+sycl", - msg="blaspp+sycl must be compiled with %oneapi", - ) + requires("%oneapi", when="+sycl", msg="blaspp+sycl must be compiled with %oneapi") def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py index e3aed932a911ea..7fb34446a11ada 100644 --- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py @@ -5,7 +5,6 @@ import glob import os -import spack.compilers import spack.paths import spack.user_environment from spack.package import * @@ -53,28 +52,26 @@ class ClingoBootstrap(Clingo): depends_on("cmake@3.16.0:", type="build") # On Linux we bootstrap with GCC or clang - for compiler_spec in [ - c for c in spack.compilers.supported_compilers() if c not in ("gcc", "clang") - ]: - conflicts( - "%{0}".format(compiler_spec), - when="platform=linux", - msg="GCC or clang are required to bootstrap clingo on Linux", - ) - conflicts( - "%{0}".format(compiler_spec), - when="platform=cray", - msg="GCC or clang are required to bootstrap clingo on Cray", - ) + requires( + "%gcc", + "%clang", + when="platform=linux", + msg="GCC or clang are required to bootstrap clingo on Linux", + ) + requires( + "%gcc", + "%clang", + when="platform=cray", + msg="GCC or clang are required to bootstrap clingo on Cray", + ) conflicts("%gcc@:5", msg="C++14 support is required to bootstrap clingo") # On Darwin we bootstrap with Apple Clang - for compiler_spec in [c for c in spack.compilers.supported_compilers() if c != "apple-clang"]: - conflicts( - "%{0}".format(compiler_spec), - when="platform=darwin", - msg="Apple-clang is required to bootstrap clingo on MacOS", - ) + requires( + "%apple-clang", + when="platform=darwin", + msg="Apple-clang is required to bootstrap clingo on MacOS", + ) # Clingo needs the Python module to be usable by Spack conflicts("~python", msg="Python support is required to bootstrap Spack") diff --git a/var/spack/repos/builtin/packages/exciting/package.py b/var/spack/repos/builtin/packages/exciting/package.py index 215b6de5f52a3b..c74da1013c1ebf 100644 --- a/var/spack/repos/builtin/packages/exciting/package.py +++ b/var/spack/repos/builtin/packages/exciting/package.py @@ -39,23 +39,9 @@ class Exciting(MakefilePackage): depends_on("scalapack", when="+scalapack") # conflicts('%gcc@10:', msg='exciting cannot be built with GCC 10') - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "intel": - conflicts( - "%{0}".format(__compiler), - when="^mkl", - msg="Intel MKL only works with the Intel compiler", - ) - conflicts( - "%{0}".format(__compiler), - when="^intel-mkl", - msg="Intel MKL only works with the Intel compiler", - ) - conflicts( - "%{0}".format(__compiler), - when="^intel-mpi", - msg="Intel MPI only works with the Intel compiler", - ) + requires("%intel", when="^mkl", msg="Intel MKL only works with the Intel compiler") + requires("%intel", when="^intel-mkl", msg="Intel MKL only works with the Intel compiler") + requires("%intel", when="^intel-mpi", msg="Intel MPI only works with the Intel compiler") def patch(self): """Fix bad logic in m_makespectrum.f90 for the Oxygen release""" diff --git a/var/spack/repos/builtin/packages/gaussian-src/package.py b/var/spack/repos/builtin/packages/gaussian-src/package.py index d31ee97800d022..5cd0cf9e27e661 100644 --- a/var/spack/repos/builtin/packages/gaussian-src/package.py +++ b/var/spack/repos/builtin/packages/gaussian-src/package.py @@ -28,11 +28,7 @@ class GaussianSrc(Package): depends_on("tcsh", type="build") # All compilers except for pgi are in conflict: - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "pgi": - conflicts( - "%{0}".format(__compiler), msg="Gaussian can only be built with the PGI compiler" - ) + requires("%pgi", msg="Gaussian can only be built with the PGI compiler") patch("16-C.01-replace-deprecated-pgf77-with-pgfortran.patch", when="@16-C.01") patch("16-C.01-fix-building-c-code-with-pgcc.patch", when="@16-C.01") diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index be6f4d109b3c81..5545053cc8d368 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import spack.compilers from spack.build_environment import dso_suffix from spack.package import * @@ -171,11 +170,7 @@ class IntelOneapiCompilers(IntelOneApiPackage): # TODO: effectively gcc is a direct dependency of intel-oneapi-compilers, but we # cannot express that properly. For now, add conflicts for non-gcc compilers # instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "gcc": - conflicts( - "%{0}".format(__compiler), msg="intel-oneapi-compilers must be installed with %gcc" - ) + requires("%gcc", msg="intel-oneapi-compilers must be installed with %gcc") for v in versions: version(v["version"], expand=False, **v["cpp"]) diff --git a/var/spack/repos/builtin/packages/knem/package.py b/var/spack/repos/builtin/packages/knem/package.py index 85f1c8d1d6259b..2b229c93d28755 100644 --- a/var/spack/repos/builtin/packages/knem/package.py +++ b/var/spack/repos/builtin/packages/knem/package.py @@ -49,12 +49,7 @@ class Knem(AutotoolsPackage): # Ideally, we should list all non-Linux-based platforms here: conflicts("platform=darwin") - # All compilers except for gcc are in conflict: - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "gcc": - conflicts( - "%{0}".format(__compiler), msg="Linux kernel module must be compiled with gcc" - ) + requires("%gcc", msg="Linux kernel module must be compiled with gcc") @run_before("build") def override_kernel_compiler(self): diff --git a/var/spack/repos/builtin/packages/lapackpp/package.py b/var/spack/repos/builtin/packages/lapackpp/package.py index 1532d87843048a..a69e4e7bdffe16 100644 --- a/var/spack/repos/builtin/packages/lapackpp/package.py +++ b/var/spack/repos/builtin/packages/lapackpp/package.py @@ -85,15 +85,7 @@ class Lapackpp(CMakePackage, CudaPackage, ROCmPackage): conflicts("+cuda", when="+sycl", msg=backend_msg) conflicts("+sycl", when="@:2023.06.00", msg="+sycl requires LAPACK++ version 2023.08.25") - # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. - # For now, add conflicts for other compilers instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "oneapi": - conflicts( - "%{0}".format(__compiler), - when="+sycl", - msg="lapackpp+sycl must be compiled with %oneapi", - ) + requires("%oneapi", when="+sycl", msg="lapackpp+sycl must be compiled with %oneapi") def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index bc407d9ea442f4..b5ed6df831503f 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -179,9 +179,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): conflicts("~python", when="@0.91:0.101") conflicts("~pfe", when="@0.91:0.101") - for comp in spack.compilers.supported_compilers(): - if comp != "clang": - conflicts("+lld", when="%" + comp) + requires("%clang", when="+lld") conflicts("+lld", when="+gold") conflicts("+gold", when="platform=darwin", msg="gold does not work on Darwin") diff --git a/var/spack/repos/builtin/packages/nvhpc/package.py b/var/spack/repos/builtin/packages/nvhpc/package.py index 2cabbfa056f90d..578813f80668cb 100644 --- a/var/spack/repos/builtin/packages/nvhpc/package.py +++ b/var/spack/repos/builtin/packages/nvhpc/package.py @@ -377,11 +377,7 @@ class Nvhpc(Package): provides("lapack", when="+lapack") provides("mpi", when="+mpi") - # TODO: effectively gcc is a direct dependency of nvhpc, but we cannot express that - # properly. For now, add conflicts for non-gcc compilers instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "gcc": - conflicts("%{0}".format(__compiler), msg="nvhpc must be installed with %gcc") + requires("%gcc", msg="nvhpc must be installed with %gcc") def _version_prefix(self): return join_path(self.prefix, "Linux_%s" % self.spec.target.family, self.version) diff --git a/var/spack/repos/builtin/packages/slate/package.py b/var/spack/repos/builtin/packages/slate/package.py index 95b4e895801ffa..778beda83ae1d4 100644 --- a/var/spack/repos/builtin/packages/slate/package.py +++ b/var/spack/repos/builtin/packages/slate/package.py @@ -84,15 +84,7 @@ class Slate(CMakePackage, CudaPackage, ROCmPackage): depends_on("scalapack", type="test") depends_on("hipify-clang", when="@:2021.05.02 +rocm ^hip@5:") - # TODO: +sycl requires use of the intel-oneapi compiler, but we cannot express that directly. - # For now, add conflicts for other compilers instead. - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "oneapi": - conflicts( - "%{0}".format(__compiler), - when="+sycl", - msg="slate+sycl must be compiled with %oneapi", - ) + requires("%oneapi", when="+sycl", msg="slate+sycl must be compiled with %oneapi") cpp_17_msg = "Requires C++17 compiler support" conflicts("%gcc@:5", msg=cpp_17_msg) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b6ee39282e44c8..9af8ab14dcdd73 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -344,13 +344,11 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): conflicts("gotype=all", when="@12.15:") # CUDA without wrapper requires clang - for _compiler in spack.compilers.supported_compilers(): - if _compiler != "clang": - conflicts( - "+cuda", - when="~wrapper %" + _compiler, - msg="trilinos~wrapper+cuda can only be built with the " "Clang compiler", - ) + requires( + "%clang", + when="+cuda~wrapper", + msg="trilinos~wrapper+cuda can only be built with the Clang compiler", + ) conflicts("+cuda_rdc", when="~cuda") conflicts("+rocm_rdc", when="~rocm") conflicts("+wrapper", when="~cuda") diff --git a/var/spack/repos/builtin/packages/xpmem/package.py b/var/spack/repos/builtin/packages/xpmem/package.py index 9fb7600fda4e66..c8091478d49b37 100644 --- a/var/spack/repos/builtin/packages/xpmem/package.py +++ b/var/spack/repos/builtin/packages/xpmem/package.py @@ -64,13 +64,7 @@ class Xpmem(AutotoolsPackage): conflicts("+kernel-module", when="platform=darwin") # All compilers except for gcc are in conflict with +kernel-module: - for __compiler in spack.compilers.supported_compilers(): - if __compiler != "gcc": - conflicts( - "+kernel-module", - when="%{0}".format(__compiler), - msg="Linux kernel module must be compiled with gcc", - ) + requires("%gcc", when="+kernel-module", msg="Linux kernel module must be compiled with gcc") def autoreconf(self, spec, prefix): Executable("./autogen.sh")() From bd165ebc4dbd0001d4e125e1caeb9fe09064c632 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 17 Oct 2023 15:40:48 +0200 Subject: [PATCH 241/806] Support `spack env activate --with-view ` (#40549) Currently `spack env activate --with-view` exists, but is a no-op. So, it is not too much of a breaking change to make this redundant flag accept a value `spack env activate --with-view ` which activates a particular view by name. The view name is stored in `SPACK_ENV_VIEW`. This also fixes an issue where deactivating a view that was activated with `--without-view` possibly removes entries from PATH, since now we keep track of whether the default view was "enabled" or not. --- lib/spack/spack/cmd/env.py | 33 ++++++----- lib/spack/spack/environment/__init__.py | 2 + lib/spack/spack/environment/environment.py | 64 +++++++++++----------- lib/spack/spack/environment/shell.py | 55 ++++++++++++------- lib/spack/spack/test/cmd/env.py | 29 ++++++++-- share/spack/spack-completion.bash | 2 +- share/spack/spack-completion.fish | 10 ++-- 7 files changed, 120 insertions(+), 75 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 6c22e70a5d834f..cf5671aafae796 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -8,6 +8,7 @@ import shutil import sys import tempfile +from typing import Optional import llnl.string as string import llnl.util.filesystem as fs @@ -96,22 +97,16 @@ def env_activate_setup_parser(subparser): view_options = subparser.add_mutually_exclusive_group() view_options.add_argument( - "-v", "--with-view", - action="store_const", - dest="with_view", - const=True, - default=True, - help="update PATH, etc., with associated view", + "-v", + metavar="name", + help="set runtime environment variables for specific view", ) view_options.add_argument( - "-V", "--without-view", - action="store_const", - dest="with_view", - const=False, - default=True, - help="do not update PATH, etc., with associated view", + "-V", + action="store_true", + help="do not set runtime environment variables for any view", ) subparser.add_argument( @@ -197,10 +192,20 @@ def env_activate(args): # Activate new environment active_env = ev.Environment(env_path) + + # Check if runtime environment variables are requested, and if so, for what view. + view: Optional[str] = None + if args.with_view: + view = args.with_view + if not active_env.has_view(view): + tty.die(f"The environment does not have a view named '{view}'") + elif not args.without_view and active_env.has_view(ev.default_view_name): + view = ev.default_view_name + cmds += spack.environment.shell.activate_header( - env=active_env, shell=args.shell, prompt=env_prompt if args.prompt else None + env=active_env, shell=args.shell, prompt=env_prompt if args.prompt else None, view=view ) - env_mods.extend(spack.environment.shell.activate(env=active_env, add_view=args.with_view)) + env_mods.extend(spack.environment.shell.activate(env=active_env, view=view)) cmds += env_mods.shell_modifications(args.shell) sys.stdout.write(cmds) diff --git a/lib/spack/spack/environment/__init__.py b/lib/spack/spack/environment/__init__.py index 227b48670cafed..ac598e8421d2ad 100644 --- a/lib/spack/spack/environment/__init__.py +++ b/lib/spack/spack/environment/__init__.py @@ -365,6 +365,7 @@ read, root, spack_env_var, + spack_env_view_var, update_yaml, ) @@ -397,5 +398,6 @@ "read", "root", "spack_env_var", + "spack_env_view_var", "update_yaml", ] diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 496a8b332a7525..ee48955ac54038 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -64,6 +64,8 @@ #: environment variable used to indicate the active environment spack_env_var = "SPACK_ENV" +#: environment variable used to indicate the active environment view +spack_env_view_var = "SPACK_ENV_VIEW" #: currently activated environment _active_environment: Optional["Environment"] = None @@ -1595,16 +1597,14 @@ def concretize_and_add(self, user_spec, concrete_spec=None, tests=False): @property def default_view(self): - if not self.views: - raise SpackEnvironmentError("{0} does not have a view enabled".format(self.name)) - - if default_view_name not in self.views: - raise SpackEnvironmentError( - "{0} does not have a default view enabled".format(self.name) - ) + if not self.has_view(default_view_name): + raise SpackEnvironmentError(f"{self.name} does not have a default view enabled") return self.views[default_view_name] + def has_view(self, view_name: str) -> bool: + return view_name in self.views + def update_default_view(self, path_or_bool: Union[str, bool]) -> None: """Updates the path of the default view. @@ -1690,14 +1690,14 @@ def check_views(self): "Loading the environment view will require reconcretization." % self.name ) - def _env_modifications_for_default_view(self, reverse=False): + def _env_modifications_for_view(self, view: ViewDescriptor, reverse: bool = False): all_mods = spack.util.environment.EnvironmentModifications() visited = set() errors = [] for root_spec in self.concrete_roots(): - if root_spec in self.default_view and root_spec.installed and root_spec.package: + if root_spec in view and root_spec.installed and root_spec.package: for spec in root_spec.traverse(deptype="run", root=True): if spec.name in visited: # It is expected that only one instance of the package @@ -1714,7 +1714,7 @@ def _env_modifications_for_default_view(self, reverse=False): visited.add(spec.name) try: - mods = uenv.environment_modifications_for_spec(spec, self.default_view) + mods = uenv.environment_modifications_for_spec(spec, view) except Exception as e: msg = "couldn't get environment settings for %s" % spec.format( "{name}@{version} /{hash:7}" @@ -1726,22 +1726,22 @@ def _env_modifications_for_default_view(self, reverse=False): return all_mods, errors - def add_default_view_to_env(self, env_mod): - """ - Collect the environment modifications to activate an environment using the - default view. Removes duplicate paths. + def add_view_to_env( + self, env_mod: spack.util.environment.EnvironmentModifications, view: str + ) -> spack.util.environment.EnvironmentModifications: + """Collect the environment modifications to activate an environment using the provided + view. Removes duplicate paths. Args: - env_mod (spack.util.environment.EnvironmentModifications): the environment - modifications object that is modified. - """ - if default_view_name not in self.views: - # No default view to add to shell + env_mod: the environment modifications object that is modified. + view: the name of the view to activate.""" + descriptor = self.views.get(view) + if not descriptor: return env_mod - env_mod.extend(uenv.unconditional_environment_modifications(self.default_view)) + env_mod.extend(uenv.unconditional_environment_modifications(descriptor)) - mods, errors = self._env_modifications_for_default_view() + mods, errors = self._env_modifications_for_view(descriptor) env_mod.extend(mods) if errors: for err in errors: @@ -1753,22 +1753,22 @@ def add_default_view_to_env(self, env_mod): return env_mod - def rm_default_view_from_env(self, env_mod): - """ - Collect the environment modifications to deactivate an environment using the - default view. Reverses the action of ``add_default_view_to_env``. + def rm_view_from_env( + self, env_mod: spack.util.environment.EnvironmentModifications, view: str + ) -> spack.util.environment.EnvironmentModifications: + """Collect the environment modifications to deactivate an environment using the provided + view. Reverses the action of ``add_view_to_env``. Args: - env_mod (spack.util.environment.EnvironmentModifications): the environment - modifications object that is modified. - """ - if default_view_name not in self.views: - # No default view to add to shell + env_mod: the environment modifications object that is modified. + view: the name of the view to deactivate.""" + descriptor = self.views.get(view) + if not descriptor: return env_mod - env_mod.extend(uenv.unconditional_environment_modifications(self.default_view).reversed()) + env_mod.extend(uenv.unconditional_environment_modifications(descriptor).reversed()) - mods, _ = self._env_modifications_for_default_view(reverse=True) + mods, _ = self._env_modifications_for_view(descriptor, reverse=True) env_mod.extend(mods) return env_mod diff --git a/lib/spack/spack/environment/shell.py b/lib/spack/spack/environment/shell.py index 380e49fa0f9059..a4f9634a8da051 100644 --- a/lib/spack/spack/environment/shell.py +++ b/lib/spack/spack/environment/shell.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +from typing import Optional import llnl.util.tty as tty from llnl.util.tty.color import colorize @@ -13,12 +14,14 @@ from spack.util.environment import EnvironmentModifications -def activate_header(env, shell, prompt=None): +def activate_header(env, shell, prompt=None, view: Optional[str] = None): # Construct the commands to run cmds = "" if shell == "csh": # TODO: figure out how to make color work for csh cmds += "setenv SPACK_ENV %s;\n" % env.path + if view: + cmds += "setenv SPACK_ENV_VIEW %s;\n" % view cmds += 'alias despacktivate "spack env deactivate";\n' if prompt: cmds += "if (! $?SPACK_OLD_PROMPT ) " @@ -29,6 +32,8 @@ def activate_header(env, shell, prompt=None): prompt = colorize("@G{%s} " % prompt, color=True) cmds += "set -gx SPACK_ENV %s;\n" % env.path + if view: + cmds += "set -gx SPACK_ENV_VIEW %s;\n" % view cmds += "function despacktivate;\n" cmds += " spack env deactivate;\n" cmds += "end;\n" @@ -40,15 +45,21 @@ def activate_header(env, shell, prompt=None): elif shell == "bat": # TODO: Color cmds += 'set "SPACK_ENV=%s"\n' % env.path + if view: + cmds += 'set "SPACK_ENV_VIEW=%s"\n' % view # TODO: despacktivate # TODO: prompt elif shell == "pwsh": cmds += "$Env:SPACK_ENV='%s'\n" % env.path + if view: + cmds += "$Env:SPACK_ENV_VIEW='%s'\n" % view else: if "color" in os.getenv("TERM", "") and prompt: prompt = colorize("@G{%s}" % prompt, color=True, enclose=True) cmds += "export SPACK_ENV=%s;\n" % env.path + if view: + cmds += "export SPACK_ENV_VIEW=%s;\n" % view cmds += "alias despacktivate='spack env deactivate';\n" if prompt: cmds += "if [ -z ${SPACK_OLD_PS1+x} ]; then\n" @@ -66,12 +77,14 @@ def deactivate_header(shell): cmds = "" if shell == "csh": cmds += "unsetenv SPACK_ENV;\n" + cmds += "unsetenv SPACK_ENV_VIEW;\n" cmds += "if ( $?SPACK_OLD_PROMPT ) " cmds += ' eval \'set prompt="$SPACK_OLD_PROMPT" &&' cmds += " unsetenv SPACK_OLD_PROMPT';\n" cmds += "unalias despacktivate;\n" elif shell == "fish": cmds += "set -e SPACK_ENV;\n" + cmds += "set -e SPACK_ENV_VIEW;\n" cmds += "functions -e despacktivate;\n" # # NOTE: Not changing fish_prompt (above) => no need to restore it here. @@ -79,14 +92,19 @@ def deactivate_header(shell): elif shell == "bat": # TODO: Color cmds += 'set "SPACK_ENV="\n' + cmds += 'set "SPACK_ENV_VIEW="\n' # TODO: despacktivate # TODO: prompt elif shell == "pwsh": cmds += "Set-Item -Path Env:SPACK_ENV\n" + cmds += "Set-Item -Path Env:SPACK_ENV_VIEW\n" else: cmds += "if [ ! -z ${SPACK_ENV+x} ]; then\n" cmds += "unset SPACK_ENV; export SPACK_ENV;\n" cmds += "fi;\n" + cmds += "if [ ! -z ${SPACK_ENV_VIEW+x} ]; then\n" + cmds += "unset SPACK_ENV_VIEW; export SPACK_ENV_VIEW;\n" + cmds += "fi;\n" cmds += "alias despacktivate > /dev/null 2>&1 && unalias despacktivate;\n" cmds += "if [ ! -z ${SPACK_OLD_PS1+x} ]; then\n" cmds += " if [ \"$SPACK_OLD_PS1\" = '$$$$' ]; then\n" @@ -100,24 +118,23 @@ def deactivate_header(shell): return cmds -def activate(env, use_env_repo=False, add_view=True): - """ - Activate an environment and append environment modifications +def activate( + env: ev.Environment, use_env_repo=False, view: Optional[str] = "default" +) -> EnvironmentModifications: + """Activate an environment and append environment modifications To activate an environment, we add its configuration scope to the existing Spack configuration, and we set active to the current environment. Arguments: - env (spack.environment.Environment): the environment to activate - use_env_repo (bool): use the packages exactly as they appear in the - environment's repository - add_view (bool): generate commands to add view to path variables + env: the environment to activate + use_env_repo: use the packages exactly as they appear in the environment's repository + view: generate commands to add runtime environment variables for named view Returns: spack.util.environment.EnvironmentModifications: Environment variables - modifications to activate environment. - """ + modifications to activate environment.""" ev.activate(env, use_env_repo=use_env_repo) env_mods = EnvironmentModifications() @@ -129,9 +146,9 @@ def activate(env, use_env_repo=False, add_view=True): # become PATH variables. # try: - if add_view and ev.default_view_name in env.views: + if view and env.has_view(view): with spack.store.STORE.db.read_transaction(): - env.add_default_view_to_env(env_mods) + env.add_view_to_env(env_mods, view) except (spack.repo.UnknownPackageError, spack.repo.UnknownNamespaceError) as e: tty.error(e) tty.die( @@ -145,17 +162,15 @@ def activate(env, use_env_repo=False, add_view=True): return env_mods -def deactivate(): - """ - Deactivate an environment and collect corresponding environment modifications. +def deactivate() -> EnvironmentModifications: + """Deactivate an environment and collect corresponding environment modifications. Note: unloads the environment in its current state, not in the state it was loaded in, meaning that specs that were removed from the spack environment after activation are not unloaded. Returns: - spack.util.environment.EnvironmentModifications: Environment variables - modifications to activate environment. + Environment variables modifications to activate environment. """ env_mods = EnvironmentModifications() active = ev.active_environment() @@ -163,10 +178,12 @@ def deactivate(): if active is None: return env_mods - if ev.default_view_name in active.views: + active_view = os.getenv(ev.spack_env_view_var) + + if active_view and active.has_view(active_view): try: with spack.store.STORE.db.read_transaction(): - active.rm_default_view_from_env(env_mods) + active.rm_view_from_env(env_mods, active_view) except (spack.repo.UnknownPackageError, spack.repo.UnknownNamespaceError) as e: tty.warn(e) tty.warn( diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index cef5ccbcd5a744..4845d122060ea6 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -663,7 +663,7 @@ def test_env_view_external_prefix(tmp_path, mutable_database, mock_packages): e.write() env_mod = spack.util.environment.EnvironmentModifications() - e.add_default_view_to_env(env_mod) + e.add_view_to_env(env_mod, "default") env_variables = {} env_mod.apply_modifications(env_variables) assert str(fake_bin) in env_variables["PATH"] @@ -2356,7 +2356,7 @@ def test_env_activate_sh_prints_shell_output(tmpdir, mock_stage, mock_fetch, ins This is a cursory check; ``share/spack/qa/setup-env-test.sh`` checks for correctness. """ - env("create", "test", add_view=True) + env("create", "test") out = env("activate", "--sh", "test") assert "export SPACK_ENV=" in out @@ -2371,7 +2371,7 @@ def test_env_activate_sh_prints_shell_output(tmpdir, mock_stage, mock_fetch, ins def test_env_activate_csh_prints_shell_output(tmpdir, mock_stage, mock_fetch, install_mockery): """Check the shell commands output by ``spack env activate --csh``.""" - env("create", "test", add_view=True) + env("create", "test") out = env("activate", "--csh", "test") assert "setenv SPACK_ENV" in out @@ -2388,7 +2388,7 @@ def test_env_activate_csh_prints_shell_output(tmpdir, mock_stage, mock_fetch, in def test_env_activate_default_view_root_unconditional(mutable_mock_env_path): """Check that the root of the default view in the environment is added to the shell unconditionally.""" - env("create", "test", add_view=True) + env("create", "test") with ev.read("test") as e: viewdir = e.default_view.root @@ -2403,6 +2403,27 @@ def test_env_activate_default_view_root_unconditional(mutable_mock_env_path): ) +def test_env_activate_custom_view(tmp_path: pathlib.Path, mock_packages): + """Check that an environment can be activated with a non-default view.""" + env_template = tmp_path / "spack.yaml" + default_dir = tmp_path / "defaultdir" + nondefaultdir = tmp_path / "nondefaultdir" + with open(env_template, "w") as f: + f.write( + f"""\ +spack: + specs: [a] + view: + default: + root: {default_dir} + nondefault: + root: {nondefaultdir}""" + ) + env("create", "test", str(env_template)) + shell = env("activate", "--sh", "--with-view", "nondefault", "test") + assert os.path.join(nondefaultdir, "bin") in shell + + def test_concretize_user_specs_together(): e = ev.create("coconcretization") e.unify = True diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index b9521b8f0cfaad..0280524536cfbc 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1016,7 +1016,7 @@ _spack_env() { _spack_env_activate() { if $list_options then - SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh -v --with-view -V --without-view -p --prompt --temp -d --dir" + SPACK_COMPREPLY="-h --help --sh --csh --fish --bat --pwsh --with-view -v --without-view -V -p --prompt --temp -d --dir" else _environments fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index f4ac310adacdb4..e37b3448d5fcfc 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1427,7 +1427,7 @@ complete -c spack -n '__fish_spack_using_command env' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command env' -s h -l help -d 'show this help message and exit' # spack env activate -set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view V/without-view p/prompt temp d/dir= +set -g __fish_spack_optspecs_spack_env_activate h/help sh csh fish bat pwsh v/with-view= V/without-view p/prompt temp d/dir= complete -c spack -n '__fish_spack_using_command_pos 0 env activate' -f -a '(__fish_spack_environments)' complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command env activate' -s h -l help -d 'show this help message and exit' @@ -1441,10 +1441,10 @@ complete -c spack -n '__fish_spack_using_command env activate' -l bat -f -a shel complete -c spack -n '__fish_spack_using_command env activate' -l bat -d 'print bat commands to activate the environment' complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -f -a shell complete -c spack -n '__fish_spack_using_command env activate' -l pwsh -d 'print powershell commands to activate environment' -complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -f -a with_view -complete -c spack -n '__fish_spack_using_command env activate' -s v -l with-view -d 'update PATH, etc., with associated view' -complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -f -a with_view -complete -c spack -n '__fish_spack_using_command env activate' -s V -l without-view -d 'do not update PATH, etc., with associated view' +complete -c spack -n '__fish_spack_using_command env activate' -l with-view -s v -r -f -a with_view +complete -c spack -n '__fish_spack_using_command env activate' -l with-view -s v -r -d 'set runtime environment variables for specific view' +complete -c spack -n '__fish_spack_using_command env activate' -l without-view -s V -f -a without_view +complete -c spack -n '__fish_spack_using_command env activate' -l without-view -s V -d 'do not set runtime environment variables for any view' complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -f -a prompt complete -c spack -n '__fish_spack_using_command env activate' -s p -l prompt -d 'decorate the command line prompt when activating' complete -c spack -n '__fish_spack_using_command env activate' -l temp -f -a temp From 8c257d55b49857179c10234d2b04782ce1f5c1ff Mon Sep 17 00:00:00 2001 From: wspear Date: Tue, 17 Oct 2023 10:23:15 -0700 Subject: [PATCH 242/806] Support apple-clang in pdt (#40582) --- var/spack/repos/builtin/packages/pdt/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py index 4f3ccac0c40e73..c8665aaac27758 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -54,12 +54,12 @@ def configure(self, spec, prefix): options.append("-pgCC") elif self.compiler.name == "gcc": options.append("-GNU") - elif self.compiler.name == "clang": + elif self.compiler.name == "clang" or self.compiler.name == "apple-clang": options.append("-clang") elif self.compiler.name == "cce": options.append("-CC") else: - raise InstallError("Unknown/unsupported compiler family") + raise InstallError("Unknown/unsupported compiler family: " + self.compiler.name) if "+pic" in spec: options.append("-useropt=" + self.compiler.cxx_pic_flag) From a4ad365de0ac6e8a8a9d1df54620d5accc427e34 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 17 Oct 2023 20:12:09 +0200 Subject: [PATCH 243/806] patchelf: fix compilation with GCC 7 (#40581) --- .../repos/builtin/packages/patchelf/513.patch | 25 +++++++++++++++++++ .../builtin/packages/patchelf/package.py | 3 +++ 2 files changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/patchelf/513.patch diff --git a/var/spack/repos/builtin/packages/patchelf/513.patch b/var/spack/repos/builtin/packages/patchelf/513.patch new file mode 100644 index 00000000000000..e5e8dd7174c33c --- /dev/null +++ b/var/spack/repos/builtin/packages/patchelf/513.patch @@ -0,0 +1,25 @@ +From 5fb5d82637c1b547b800b5994a1f5342b3224da4 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sat, 12 Aug 2023 11:46:14 -0700 +Subject: [PATCH] fix compilation with GCC7 + +CTAD is not working here. + +Signed-off-by: Rosen Penev +--- + src/patchelf.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/patchelf.cc b/src/patchelf.cc +index 82b4b46c..d6000160 100644 +--- a/src/patchelf.cc ++++ b/src/patchelf.cc +@@ -2069,7 +2069,7 @@ void ElfFile::rebuildGnuHashTable(span strTab, span> tmp(dst.begin(), dst.end()); + for (size_t i = 0; i < tmp.size(); ++i) + dst[old2new[i]] = tmp[i]; + }; diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py index d5992b8e644407..2630085d4eeaf7 100644 --- a/var/spack/repos/builtin/packages/patchelf/package.py +++ b/var/spack/repos/builtin/packages/patchelf/package.py @@ -39,6 +39,9 @@ class Patchelf(AutotoolsPackage): conflicts("%gcc@:6", when="@0.14:", msg="Requires C++17 support") conflicts("%clang@:3", when="@0.14:", msg="Requires C++17 support") + # GCC 7.5 doesn't have __cpp_deduction_guides >= 201606 + patch("513.patch", when="@0.18: %gcc@:7") + def url_for_version(self, version): if version < Version("0.12"): return "https://nixos.org/releases/patchelf/patchelf-{0}/patchelf-{1}.tar.gz".format( From b1eef4c82dc4c2daa66bde0c04b23551b1d05b50 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Tue, 17 Oct 2023 14:14:17 -0400 Subject: [PATCH 244/806] hiop: 1.0.1 release (#40580) --- var/spack/repos/builtin/packages/hiop/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index 0ee82f9c32a0e8..ff62c7da56c0ee 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -22,6 +22,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): maintainers("ryandanehy", "cameronrutherford", "pelesh") # Most recent tagged snapshot is the preferred version when profiling. + version("1.0.1", commit="c5e156c6f27d046f590dc35114980e3f9c573ca6", submodules=True) version("1.0.0", commit="10b7d3ee0a15cb4949ccee8c905d447b9528794f", submodules=True) version("0.7.2", commit="d0f57c880d4202a72c62dd1f5c92e3bc8acb9788", submodules=True) version("0.7.1", commit="8064ef6b2249ad2feca92a9d1e90060bad3eebc7", submodules=True) From d317ddfebe10dce77cbbcd5e50670c4c60834632 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 17 Oct 2023 13:25:18 -0500 Subject: [PATCH 245/806] py-rtree: add v1.1.0 (#40575) --- var/spack/repos/builtin/packages/py-rtree/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-rtree/package.py b/var/spack/repos/builtin/packages/py-rtree/package.py index 7cfa444072f451..7caa6d4f78bb82 100644 --- a/var/spack/repos/builtin/packages/py-rtree/package.py +++ b/var/spack/repos/builtin/packages/py-rtree/package.py @@ -14,13 +14,14 @@ class PyRtree(PythonPackage): maintainers("adamjstewart", "hobu") + version("1.1.0", sha256="6f8ee504dde5d005b25b08aaf5be0b3404af3ad5fece6e1ddcde35908a798a95") version("1.0.1", sha256="222121699c303a64065d849bf7038b1ecabc37b65c7fa340bedb38ef0e805429") version("1.0.0", sha256="d0483482121346b093b9a42518d40f921adf445915b7aea307eb26768c839682") version("0.9.7", sha256="be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e") version("0.8.3", sha256="6cb9cf3000963ea6a3db777a597baee2bc55c4fc891e4f1967f262cc96148649") - depends_on("python@3.7:", when="@1:", type=("build", "run")) - depends_on("python@3:", when="@0.9.4:", type=("build", "run")) + depends_on("python@3.8:", when="@1.1:", type=("build", "run")) + depends_on("py-setuptools@61:", when="@1.1:", type="build") depends_on("py-setuptools@39.2:", when="@1:", type="build") depends_on("py-setuptools", type="build") depends_on("py-typing-extensions@3.7:", when="@1: ^python@:3.7", type=("build", "run")) From 49ea0a8e2ece302528ecd2b141298eb27114fb1e Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Tue, 17 Oct 2023 20:33:13 +0200 Subject: [PATCH 246/806] Add mpi_f08 variant to CP2K (#40574) * add mpi_f08 variant * add conflict * add conflict with released versions of cp2k and +mpi_f08 --- var/spack/repos/builtin/packages/cp2k/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index a493b906cbb5f6..94dfbfec400418 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -103,6 +103,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): ) variant("pytorch", default=False, description="Enable libtorch support") variant("quip", default=False, description="Enable quip support") + variant("mpi_f08", default=False, description="Use MPI F08 module") variant( "enable_regtests", @@ -203,6 +204,9 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): depends_on("mpi@2:") depends_on("mpi@3:", when="@2023.1:") depends_on("scalapack") + depends_on("mpich+fortran", when="^mpich") + + conflicts("~mpi_f08", when="^mpich@4.1:") with when("+cosma"): depends_on("cosma+scalapack") @@ -277,6 +281,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): depends_on("dbcsr+openmp", when="+openmp") depends_on("dbcsr+cuda", when="+cuda") depends_on("dbcsr+rocm", when="+rocm") + conflicts("+mpi_f08", when="@:2023.2") # CP2K needs compiler specific compilation flags, e.g. optflags conflicts("%apple-clang") @@ -540,6 +545,9 @@ def edit(self, spec, prefix): libs.extend(mpi) libs.extend(self.compiler.stdcxx_libs) + if "+mpi_f08" in spec: + cppflags.append("-D__MPI_F08") + if "wannier90" in spec: cppflags.append("-D__WANNIER90") wannier = join_path(spec["wannier90"].libs.directories[0], "libwannier.a") @@ -947,6 +955,7 @@ def cmake_args(self): self.define_from_variant("CP2K_USE_VORI", "libvori"), self.define_from_variant("CP2K_USE_SPLA", "spla"), self.define_from_variant("CP2K_USE_QUIP", "quip"), + self.define_from_variant("CP2K_USE_MPI_F08", "mpi_f08"), ] # we force the use elpa openmp threading support. might need to be revisited though From 9cde25b39e8ca20e262dca2d8f145770db284b73 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 17 Oct 2023 11:33:59 -0700 Subject: [PATCH 247/806] Allow / in GitVersion (#39398) This commit allows version specifiers to refer to git branches that contain forward slashes. For example, the following is valid syntax now: pkg@git.releases/1.0 It also adds a new method `Spec.format_path(fmt)` which is like `Spec.format`, but also maps unsafe characters to `_` after interpolation. The difference is as follows: >>> Spec("pkg@git.releases/1.0").format("{name}/{version}") 'pkg/git.releases/1.0' >>> Spec("pkg@git.releases/1.0").format_path("{name}/{version}") 'pkg/git.releases_1.0' The `format_path` method is used in all projections. Notice that this method also maps `=` to `_` >>> Spec("pkg@git.main=1.0").format_path("{name}/{version}") 'pkg/git.main_1.0' which should avoid syntax issues when `Spec.prefix` is literally copied into a Makefile as sometimes happens in AutotoolsPackage or MakefilePackage --- lib/spack/llnl/util/filesystem.py | 31 ++++++++++ lib/spack/spack/binary_distribution.py | 12 ++-- lib/spack/spack/cmd/ci.py | 4 +- lib/spack/spack/cmd/install.py | 3 +- lib/spack/spack/directory_layout.py | 2 +- lib/spack/spack/filesystem_view.py | 6 +- lib/spack/spack/install_test.py | 2 +- lib/spack/spack/modules/common.py | 2 +- lib/spack/spack/modules/lmod.py | 9 ++- lib/spack/spack/package_base.py | 7 ++- lib/spack/spack/parser.py | 13 +++-- lib/spack/spack/spec.py | 41 +++++++++++++ lib/spack/spack/stage.py | 2 +- lib/spack/spack/test/spec_semantics.py | 80 ++++++++++++++++++++++++++ lib/spack/spack/test/spec_syntax.py | 8 +++ lib/spack/spack/test/versions.py | 19 ++++++ 16 files changed, 214 insertions(+), 27 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 8f4217049dd55a..47c66248b53aee 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -156,6 +156,37 @@ def lookup(name): shutil.copystat = copystat +def polite_path(components: Iterable[str]): + """ + Given a list of strings which are intended to be path components, + generate a path, and format each component to avoid generating extra + path entries. + + For example all "/", "\", and ":" characters will be replaced with + "_". Other characters like "=" will also be replaced. + """ + return os.path.join(*[polite_filename(x) for x in components]) + + +@memoized +def _polite_antipattern(): + # A regex of all the characters we don't want in a filename + return re.compile(r"[^A-Za-z0-9_.-]") + + +def polite_filename(filename: str) -> str: + """ + Replace generally problematic filename characters with underscores. + + This differs from sanitize_filename in that it is more aggressive in + changing characters in the name. For example it removes "=" which can + confuse path parsing in external tools. + """ + # This character set applies for both Windows and Linux. It does not + # account for reserved filenames in Windows. + return _polite_antipattern().sub("_", filename) + + def getuid(): if sys.platform == "win32": import ctypes diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 5559e898203c08..7484fee09793c2 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -797,11 +797,7 @@ def tarball_directory_name(spec): Return name of the tarball directory according to the convention -//-/ """ - return os.path.join( - str(spec.architecture), - f"{spec.compiler.name}-{spec.compiler.version}", - f"{spec.name}-{spec.version}", - ) + return spec.format_path("{architecture}/{compiler.name}-{compiler.version}/{name}-{version}") def tarball_name(spec, ext): @@ -809,10 +805,10 @@ def tarball_name(spec, ext): Return the name of the tarfile according to the convention --- """ - return ( - f"{spec.architecture}-{spec.compiler.name}-{spec.compiler.version}-" - f"{spec.name}-{spec.version}-{spec.dag_hash()}{ext}" + spec_formatted = spec.format_path( + "{architecture}-{compiler.name}-{compiler.version}-{name}-{version}-{hash}" ) + return f"{spec_formatted}{ext}" def tarball_path_name(spec, ext): diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index b30483218a4a1f..cf2ee11c044b40 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -579,7 +579,9 @@ def ci_rebuild(args): "SPACK_COLOR=always", "SPACK_INSTALL_FLAGS={}".format(args_to_string(deps_install_args)), "-j$(nproc)", - "install-deps/{}".format(job_spec.format("{name}-{version}-{hash}")), + "install-deps/{}".format( + ev.depfile.MakefileSpec(job_spec).safe_format("{name}-{version}-{hash}") + ), ], spack_cmd + ["install"] + root_install_args, ] diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index 2f497320948ee8..b74f982755115b 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -240,8 +240,7 @@ def default_log_file(spec): """Computes the default filename for the log file and creates the corresponding directory if not present """ - fmt = "test-{x.name}-{x.version}-{hash}.xml" - basename = fmt.format(x=spec, hash=spec.dag_hash()) + basename = spec.format_path("test-{name}-{version}-{hash}.xml") dirname = fs.os.path.join(spack.paths.reports_path, "junit") fs.mkdirp(dirname) return fs.os.path.join(dirname, basename) diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index 46bb6c855743a0..c0741a037c0a03 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -104,7 +104,7 @@ def relative_path_for_spec(self, spec): _check_concrete(spec) projection = spack.projections.get_projection(self.projections, spec) - path = spec.format(projection) + path = spec.format_path(projection) return str(Path(path)) def write_spec(self, spec, path): diff --git a/lib/spack/spack/filesystem_view.py b/lib/spack/spack/filesystem_view.py index f0e79afd7d352f..e6631fecbf66a4 100644 --- a/lib/spack/spack/filesystem_view.py +++ b/lib/spack/spack/filesystem_view.py @@ -500,7 +500,7 @@ def get_projection_for_spec(self, spec): proj = spack.projections.get_projection(self.projections, locator_spec) if proj: - return os.path.join(self._root, locator_spec.format(proj)) + return os.path.join(self._root, locator_spec.format_path(proj)) return self._root def get_all_specs(self): @@ -776,7 +776,7 @@ def get_relative_projection_for_spec(self, spec): spec = spec.package.extendee_spec p = spack.projections.get_projection(self.projections, spec) - return spec.format(p) if p else "" + return spec.format_path(p) if p else "" def get_projection_for_spec(self, spec): """ @@ -791,7 +791,7 @@ def get_projection_for_spec(self, spec): proj = spack.projections.get_projection(self.projections, spec) if proj: - return os.path.join(self._root, spec.format(proj)) + return os.path.join(self._root, spec.format_path(proj)) return self._root diff --git a/lib/spack/spack/install_test.py b/lib/spack/spack/install_test.py index 0d8fa782b6165a..662a1536c4b827 100644 --- a/lib/spack/spack/install_test.py +++ b/lib/spack/spack/install_test.py @@ -1039,7 +1039,7 @@ def test_pkg_id(cls, spec): Returns: str: the install test package identifier """ - return spec.format("{name}-{version}-{hash:7}") + return spec.format_path("{name}-{version}-{hash:7}") @classmethod def test_log_name(cls, spec): diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 4a3485c8647959..4b60f52bf43d18 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -586,7 +586,7 @@ def use_name(self): if not projection: projection = self.conf.default_projections["all"] - name = self.spec.format(projection) + name = self.spec.format_path(projection) # Not everybody is working on linux... parts = name.split("/") name = os.path.join(*parts) diff --git a/lib/spack/spack/modules/lmod.py b/lib/spack/spack/modules/lmod.py index 5c001c9ead2898..d81e07e0bf9449 100644 --- a/lib/spack/spack/modules/lmod.py +++ b/lib/spack/spack/modules/lmod.py @@ -9,6 +9,7 @@ import posixpath from typing import Any, Dict, List +import llnl.util.filesystem as fs import llnl.util.lang as lang import spack.compilers @@ -283,8 +284,10 @@ def token_to_path(self, name, value): Returns: str: part of the path associated with the service """ + # General format for the path part - path_part_fmt = os.path.join("{token.name}", "{token.version}") + def path_part_fmt(token): + return fs.polite_path([f"{token.name}", f"{token.version}"]) # If we are dealing with a core compiler, return 'Core' core_compilers = self.conf.core_compilers @@ -296,13 +299,13 @@ def token_to_path(self, name, value): # CompilerSpec does not have a hash, as we are not allowed to # use different flavors of the same compiler if name == "compiler": - return path_part_fmt.format(token=value) + return path_part_fmt(token=value) # In case the hierarchy token refers to a virtual provider # we need to append a hash to the version to distinguish # among flavors of the same library (e.g. openblas~openmp vs. # openblas+openmp) - path = path_part_fmt.format(token=value) + path = path_part_fmt(token=value) path = "-".join([path, value.dag_hash(length=7)]) return path diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 940c12c11ab92d..81cc9b8d61d823 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -991,13 +991,14 @@ def find_valid_url_for_version(self, version): return None def _make_resource_stage(self, root_stage, resource): + pretty_resource_name = fsys.polite_filename(f"{resource.name}-{self.version}") return ResourceStage( resource.fetcher, root=root_stage, resource=resource, name=self._resource_stage(resource), mirror_paths=spack.mirror.mirror_archive_paths( - resource.fetcher, os.path.join(self.name, f"{resource.name}-{self.version}") + resource.fetcher, os.path.join(self.name, pretty_resource_name) ), path=self.path, ) @@ -1008,8 +1009,10 @@ def _download_search(self): def _make_root_stage(self, fetcher): # Construct a mirror path (TODO: get this out of package.py) + format_string = "{name}-{version}" + pretty_name = self.spec.format_path(format_string) mirror_paths = spack.mirror.mirror_archive_paths( - fetcher, os.path.join(self.name, f"{self.name}-{self.version}"), self.spec + fetcher, os.path.join(self.name, pretty_name), self.spec ) # Construct a path where the stage should build.. s = self.spec diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py index 5e46ddb1b17f7b..7e3532e9488ea2 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -76,7 +76,9 @@ IDENTIFIER = r"(?:[a-zA-Z_0-9][a-zA-Z_0-9\-]*)" DOTTED_IDENTIFIER = rf"(?:{IDENTIFIER}(?:\.{IDENTIFIER})+)" GIT_HASH = r"(?:[A-Fa-f0-9]{40})" -GIT_VERSION = rf"(?:(?:git\.(?:{DOTTED_IDENTIFIER}|{IDENTIFIER}))|(?:{GIT_HASH}))" +#: Git refs include branch names, and can contain "." and "/" +GIT_REF = r"(?:[a-zA-Z_0-9][a-zA-Z_0-9./\-]*)" +GIT_VERSION_PATTERN = rf"(?:(?:git\.(?:{GIT_REF}))|(?:{GIT_HASH}))" NAME = r"[a-zA-Z_0-9][a-zA-Z_0-9\-.]*" @@ -127,7 +129,8 @@ class TokenType(TokenBase): # Dependency DEPENDENCY = r"(?:\^)" # Version - VERSION_HASH_PAIR = rf"(?:@(?:{GIT_VERSION})=(?:{VERSION}))" + VERSION_HASH_PAIR = rf"(?:@(?:{GIT_VERSION_PATTERN})=(?:{VERSION}))" + GIT_VERSION = rf"@(?:{GIT_VERSION_PATTERN})" VERSION = rf"(?:@\s*(?:{VERSION_LIST}))" # Variants PROPAGATED_BOOL_VARIANT = rf"(?:(?:\+\+|~~|--)\s*{NAME})" @@ -358,8 +361,10 @@ def parse(self, initial_spec: Optional[spack.spec.Spec] = None) -> Optional[spac compiler_name.strip(), compiler_version ) self.has_compiler = True - elif self.ctx.accept(TokenType.VERSION) or self.ctx.accept( - TokenType.VERSION_HASH_PAIR + elif ( + self.ctx.accept(TokenType.VERSION_HASH_PAIR) + or self.ctx.accept(TokenType.GIT_VERSION) + or self.ctx.accept(TokenType.VERSION) ): if self.has_version: raise spack.spec.MultipleVersionError( diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 08576419f0d416..07b3e56c7d608a 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -54,6 +54,7 @@ import io import itertools import os +import pathlib import platform import re import socket @@ -4453,6 +4454,42 @@ def cformat(self, *args, **kwargs): kwargs.setdefault("color", None) return self.format(*args, **kwargs) + def format_path( + # self, format_string: str, _path_ctor: Optional[pathlib.PurePath] = None + self, + format_string: str, + _path_ctor: Optional[Callable[[Any], pathlib.PurePath]] = None, + ) -> str: + """Given a `format_string` that is intended as a path, generate a string + like from `Spec.format`, but eliminate extra path separators introduced by + formatting of Spec properties. + + Path separators explicitly added to the string are preserved, so for example + "{name}/{version}" would generate a directory based on the Spec's name, and + a subdirectory based on its version; this function guarantees though that + the resulting string would only have two directories (i.e. that if under + normal circumstances that `str(Spec.version)` would contain a path + separator, it would not in this case). + """ + format_component_with_sep = r"\{[^}]*[/\\][^}]*}" + if re.search(format_component_with_sep, format_string): + raise SpecFormatPathError( + f"Invalid path format string: cannot contain {{/...}}\n\t{format_string}" + ) + + path_ctor = _path_ctor or pathlib.PurePath + format_string_as_path = path_ctor(format_string) + if format_string_as_path.is_absolute(): + output_path_components = [format_string_as_path.parts[0]] + input_path_components = list(format_string_as_path.parts[1:]) + else: + output_path_components = [] + input_path_components = list(format_string_as_path.parts) + output_path_components += [ + fs.polite_filename(self.format(x)) for x in input_path_components + ] + return str(path_ctor(*output_path_components)) + def __str__(self): sorted_nodes = [self] + sorted( self.traverse(root=False), key=lambda x: x.name or x.abstract_hash @@ -5379,6 +5416,10 @@ class SpecFormatStringError(spack.error.SpecError): """Called for errors in Spec format strings.""" +class SpecFormatPathError(spack.error.SpecError): + """Called for errors in Spec path-format strings.""" + + class SpecFormatSigilError(SpecFormatStringError): """Called for mismatched sigils and attributes in format strings""" diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 90fb193a63573c..d53ec5fee8995a 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -58,7 +58,7 @@ def compute_stage_name(spec): """Determine stage name given a spec""" default_stage_structure = stage_prefix + "{name}-{version}-{hash}" stage_name_structure = spack.config.get("config:stage_name", default=default_stage_structure) - return spec.format(format_string=stage_name_structure) + return spec.format_path(format_string=stage_name_structure) def create_stage_root(path: str) -> None: diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 662ea5ef0e0b65..579ba4486c8a36 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pathlib + import pytest import spack.directives @@ -1005,6 +1007,84 @@ def test_spec_override(self): assert new_spec.compiler_flags["cxxflags"] == ["-O1"] +@pytest.mark.parametrize( + "spec_str,format_str,expected", + [ + ("zlib@git.foo/bar", "{name}-{version}", str(pathlib.Path("zlib-git.foo_bar"))), + ("zlib@git.foo/bar", "{name}-{version}-{/hash}", None), + ("zlib@git.foo/bar", "{name}/{version}", str(pathlib.Path("zlib", "git.foo_bar"))), + ( + "zlib@{0}=1.0%gcc".format("a" * 40), + "{name}/{version}/{compiler}", + str(pathlib.Path("zlib", "{0}_1.0".format("a" * 40), "gcc")), + ), + ( + "zlib@git.foo/bar=1.0%gcc", + "{name}/{version}/{compiler}", + str(pathlib.Path("zlib", "git.foo_bar_1.0", "gcc")), + ), + ], +) +def test_spec_format_path(spec_str, format_str, expected): + _check_spec_format_path(spec_str, format_str, expected) + + +def _check_spec_format_path(spec_str, format_str, expected, path_ctor=None): + spec = Spec(spec_str) + if not expected: + with pytest.raises((spack.spec.SpecFormatPathError, spack.spec.SpecFormatStringError)): + spec.format_path(format_str, _path_ctor=path_ctor) + else: + formatted = spec.format_path(format_str, _path_ctor=path_ctor) + assert formatted == expected + + +@pytest.mark.parametrize( + "spec_str,format_str,expected", + [ + ( + "zlib@git.foo/bar", + r"C:\\installroot\{name}\{version}", + r"C:\installroot\zlib\git.foo_bar", + ), + ( + "zlib@git.foo/bar", + r"\\hostname\sharename\{name}\{version}", + r"\\hostname\sharename\zlib\git.foo_bar", + ), + # Windows doesn't attribute any significance to a leading + # "/" so it is discarded + ("zlib@git.foo/bar", r"/installroot/{name}/{version}", r"installroot\zlib\git.foo_bar"), + ], +) +def test_spec_format_path_windows(spec_str, format_str, expected): + _check_spec_format_path(spec_str, format_str, expected, path_ctor=pathlib.PureWindowsPath) + + +@pytest.mark.parametrize( + "spec_str,format_str,expected", + [ + ("zlib@git.foo/bar", r"/installroot/{name}/{version}", "/installroot/zlib/git.foo_bar"), + ("zlib@git.foo/bar", r"//installroot/{name}/{version}", "//installroot/zlib/git.foo_bar"), + # This is likely unintentional on Linux: Firstly, "\" is not a + # path separator for POSIX, so this is treated as a single path + # component (containing literal "\" characters); secondly, + # Spec.format treats "\" as an escape character, so is + # discarded (unless directly following another "\") + ( + "zlib@git.foo/bar", + r"C:\\installroot\package-{name}-{version}", + r"C__installrootpackage-zlib-git.foo_bar", + ), + # "\" is not a POSIX separator, and Spec.format treats "\{" as a literal + # "{", which means that the resulting format string is invalid + ("zlib@git.foo/bar", r"package\{name}\{version}", None), + ], +) +def test_spec_format_path_posix(spec_str, format_str, expected): + _check_spec_format_path(spec_str, format_str, expected, path_ctor=pathlib.PurePosixPath) + + @pytest.mark.regression("3887") @pytest.mark.parametrize("spec_str", ["py-extension2", "extension1", "perl-extension"]) def test_is_extension_after_round_trip_to_dict(config, mock_packages, spec_str): diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index b79b829f96a68e..d731fcd31c1ac5 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -517,6 +517,14 @@ def _specfile_for(spec_str, filename): [Token(TokenType.VERSION, value="@:0.4"), Token(TokenType.COMPILER, value="% nvhpc")], "@:0.4%nvhpc", ), + ( + "zlib@git.foo/bar", + [ + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, "zlib"), + Token(TokenType.GIT_VERSION, "@git.foo/bar"), + ], + "zlib@git.foo/bar", + ), ], ) def test_parse_single_spec(spec_str, tokens, expected_roundtrip): diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index 1dcf28cd711040..50fcc197986353 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -675,6 +675,25 @@ def test_git_ref_comparisons(mock_git_version_info, install_mockery, mock_packag assert str(spec_branch.version) == "git.1.x=1.2" +def test_git_branch_with_slash(): + class MockLookup(object): + def get(self, ref): + assert ref == "feature/bar" + return "1.2", 0 + + v = spack.version.from_string("git.feature/bar") + assert isinstance(v, GitVersion) + v.attach_lookup(MockLookup()) + + # Create a version range + test_number_version = spack.version.from_string("1.2") + v.satisfies(test_number_version) + + serialized = VersionList([v]).to_dict() + v_deserialized = VersionList.from_dict(serialized) + assert v_deserialized[0].ref == "feature/bar" + + @pytest.mark.parametrize( "string,git", [ From b7cbcfdcab6377dd02e18faf2043c4299c83557d Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 17 Oct 2023 20:35:55 +0200 Subject: [PATCH 248/806] Add tracy 0.10 (#40573) --- var/spack/repos/builtin/packages/tracy-client/package.py | 1 + var/spack/repos/builtin/packages/tracy/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/tracy-client/package.py b/var/spack/repos/builtin/packages/tracy-client/package.py index 0d3e3e9fe5f343..dd219f31ee039a 100644 --- a/var/spack/repos/builtin/packages/tracy-client/package.py +++ b/var/spack/repos/builtin/packages/tracy-client/package.py @@ -15,6 +15,7 @@ class TracyClient(CMakePackage): maintainers("msimberg") version("master", git="https://github.com/wolfpld/tracy.git", branch="master") + version("0.10", sha256="a76017d928f3f2727540fb950edd3b736caa97b12dbb4e5edce66542cbea6600") version("0.9", sha256="93a91544e3d88f3bc4c405bad3dbc916ba951cdaadd5fcec1139af6fa56e6bfc") version("0.8.2", sha256="4784eddd89c17a5fa030d408392992b3da3c503c872800e9d3746d985cfcc92a") version("0.8.1", sha256="004992012b2dc879a9f6d143cbf94d7ea30e88135db3ef08951605d214892891") diff --git a/var/spack/repos/builtin/packages/tracy/package.py b/var/spack/repos/builtin/packages/tracy/package.py index 572e5d879b11a7..111b4a86534600 100644 --- a/var/spack/repos/builtin/packages/tracy/package.py +++ b/var/spack/repos/builtin/packages/tracy/package.py @@ -15,6 +15,7 @@ class Tracy(MakefilePackage): maintainers("msimberg") version("master", git="https://github.com/wolfpld/tracy.git", branch="master") + version("0.10", sha256="a76017d928f3f2727540fb950edd3b736caa97b12dbb4e5edce66542cbea6600") version("0.9", sha256="93a91544e3d88f3bc4c405bad3dbc916ba951cdaadd5fcec1139af6fa56e6bfc") version("0.8.2", sha256="4784eddd89c17a5fa030d408392992b3da3c503c872800e9d3746d985cfcc92a") version("0.8.1", sha256="004992012b2dc879a9f6d143cbf94d7ea30e88135db3ef08951605d214892891") From e2bb2595b37455a704027119d303f84b6b28ad83 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Tue, 17 Oct 2023 20:58:46 +0200 Subject: [PATCH 249/806] xmlto: add more dependencies (#40578) `xmllint` is called by `xmlto` during generation of `libzmq`'s docs, so adding `libxml2`. The docbook deps and the patches are taken from https://src.fedoraproject.org/rpms/xmlto/blob/rawhide/f/xmlto.spec There are still many more dependencies missing, but this is out of scope of this patch (which is only concerned about the use case of `libzmq`). --- var/spack/repos/builtin/packages/xmlto/package.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py index 1a018bfa877ccc..ca5748188176fd 100644 --- a/var/spack/repos/builtin/packages/xmlto/package.py +++ b/var/spack/repos/builtin/packages/xmlto/package.py @@ -18,5 +18,18 @@ class Xmlto(AutotoolsPackage): version("0.0.28", sha256="2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3") # FIXME: missing a lot of dependencies - depends_on("libxslt") + depends_on("docbook-xsl", type=("build", "run")) + depends_on("libxml2", type=("build", "run")) # xmllint + depends_on("libxslt", type=("build", "run")) # xsltconf depends_on("util-linux", type=("build", "run")) # getopt with support for longopts + + depends_on("docbook-xml", type="run") + + patch( + "https://src.fedoraproject.org/rpms/xmlto/raw/rawhide/f/xmlto-c99-1.patch", + sha256="056c8bebc25d8d1488cc6a3724e2bcafc0e5e0df5c50080559cdef99bd377839", + ) + patch( + "https://src.fedoraproject.org/rpms/xmlto/raw/rawhide/f/xmlto-c99-2.patch", + sha256="50e39b1810bbf22a1d67944086c5681bcd58b8c325dfb251d56ac15d088fc17a", + ) From da0813b049b016b2bcd021abcf2e520ac8bb41ea Mon Sep 17 00:00:00 2001 From: jfavre Date: Tue, 17 Oct 2023 21:03:41 +0200 Subject: [PATCH 250/806] paraview: add variant for NVIDIA IndeX (#40577) * add variant for NVIDIA IndeX * remove whitespaces --- var/spack/repos/builtin/packages/paraview/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 9b43d5e92c8756..5760a9d68da7de 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -72,6 +72,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): variant("kits", default=True, description="Use module kits") variant("pagosa", default=False, description="Build the pagosa adaptor") variant("eyedomelighting", default=False, description="Enable Eye Dome Lighting feature") + variant("nvindex", default=False, description="Enable the pvNVIDIAIndeX plugin") variant("tbb", default=False, description="Enable multi-threaded parallelism with TBB") variant("adios2", default=False, description="Enable ADIOS2 support", when="@5.8:") variant("visitbridge", default=False, description="Enable VisItBridge support") @@ -609,6 +610,9 @@ def nvariant_bool(feature): if "+tbb" in spec: cmake_args.append("-DVTK_SMP_IMPLEMENTATION_TYPE=TBB") + if "+nvindex" in spec: + cmake_args.append("-DPARAVIEW_PLUGIN_ENABLE_pvNVIDIAIndeX:BOOL=ON") + # Hide git from Paraview so it will not use `git describe` # to find its own version number if spec.satisfies("@5.4.0:5.4.1"): From 37bafce38476e0b3043bb32b965c647cde07a887 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 18 Oct 2023 05:22:55 -0400 Subject: [PATCH 251/806] abi.py: fix typo, add type-hints (#38216) Co-authored-by: Massimiliano Culpo --- lib/spack/spack/abi.py | 31 +++++++++++++++++++------------ lib/spack/spack/concretize.py | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py index c8111048dd9d95..dd12d6dbafe484 100644 --- a/lib/spack/spack/abi.py +++ b/lib/spack/spack/abi.py @@ -8,8 +8,8 @@ from llnl.util.lang import memoized import spack.spec +import spack.version from spack.compilers.clang import Clang -from spack.spec import CompilerSpec from spack.util.executable import Executable, ProcessError @@ -17,7 +17,9 @@ class ABI: """This class provides methods to test ABI compatibility between specs. The current implementation is rather rough and could be improved.""" - def architecture_compatible(self, target, constraint): + def architecture_compatible( + self, target: spack.spec.Spec, constraint: spack.spec.Spec + ) -> bool: """Return true if architecture of target spec is ABI compatible to the architecture of constraint spec. If either the target or constraint specs have no architecture, target is also defined @@ -34,7 +36,7 @@ def _gcc_get_libstdcxx_version(self, version): a compiler's libstdc++ or libgcc_s""" from spack.build_environment import dso_suffix - spec = CompilerSpec("gcc", version) + spec = spack.spec.CompilerSpec("gcc", version) compilers = spack.compilers.compilers_for_spec(spec) if not compilers: return None @@ -77,16 +79,20 @@ def _gcc_compiler_compare(self, pversion, cversion): return False return plib == clib - def _intel_compiler_compare(self, pversion, cversion): + def _intel_compiler_compare( + self, pversion: spack.version.ClosedOpenRange, cversion: spack.version.ClosedOpenRange + ) -> bool: """Returns true iff the intel version pversion and cversion are ABI compatible""" # Test major and minor versions. Ignore build version. - if len(pversion.version) < 2 or len(cversion.version) < 2: - return False - return pversion.version[:2] == cversion.version[:2] + pv = pversion.lo + cv = cversion.lo + return pv.up_to(2) == cv.up_to(2) - def compiler_compatible(self, parent, child, **kwargs): + def compiler_compatible( + self, parent: spack.spec.Spec, child: spack.spec.Spec, loose: bool = False + ) -> bool: """Return true if compilers for parent and child are ABI compatible.""" if not parent.compiler or not child.compiler: return True @@ -95,7 +101,7 @@ def compiler_compatible(self, parent, child, **kwargs): # Different compiler families are assumed ABI incompatible return False - if kwargs.get("loose", False): + if loose: return True # TODO: Can we move the specialized ABI matching stuff @@ -116,9 +122,10 @@ def compiler_compatible(self, parent, child, **kwargs): return True return False - def compatible(self, target, constraint, **kwargs): + def compatible( + self, target: spack.spec.Spec, constraint: spack.spec.Spec, loose: bool = False + ) -> bool: """Returns true if target spec is ABI compatible to constraint spec""" - loosematch = kwargs.get("loose", False) return self.architecture_compatible(target, constraint) and self.compiler_compatible( - target, constraint, loose=loosematch + target, constraint, loose=loose ) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index e4acef401e44a7..6e85d66b154f51 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -155,7 +155,7 @@ def _valid_virtuals_and_externals(self, spec): ), ) - def choose_virtual_or_external(self, spec): + def choose_virtual_or_external(self, spec: spack.spec.Spec): """Given a list of candidate virtual and external packages, try to find one that is most ABI compatible. """ From 2802013dc669c503041931f3f9d8a5a251d5e12e Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Wed, 18 Oct 2023 03:58:19 -0700 Subject: [PATCH 252/806] Add license directive (#39346) This patch adds in a license directive to get the ball rolling on adding in license information about packages to spack. I'm primarily interested in just adding license into spack, but this would also help with other efforts that people are interested in such as adding license information to the ASP solve for concretization to make sure licenses are compatible. Usage: Specifying the specific license that a package is released under in a project's `package.py` is good practice. To specify a license, find the SPDX identifier for a project and then add it using the license directive: ```python license("") ``` For example, for Apache 2.0, you might write: ```python license("Apache-2.0") ``` Note that specifying a license without a when clause makes it apply to all versions and variants of the package, which might not actually be the case. For example, a project might have switched licenses at some point or have certain build configurations that include files that are licensed differently. To account for this, you can specify when licenses should be applied. For example, to specify that a specific license identifier should only apply to versionup to and including 1.5, you could write the following directive: ```python license("MIT", when="@:1.5") ``` --- lib/spack/docs/packaging_guide.rst | 27 ++++++++++++ lib/spack/spack/cmd/create.py | 3 ++ lib/spack/spack/cmd/info.py | 21 +++++++++ lib/spack/spack/directives.py | 43 +++++++++++++++++++ lib/spack/spack/test/cmd/create.py | 1 + lib/spack/spack/test/cmd/info.py | 1 + lib/spack/spack/test/directives.py | 38 ++++++++++++++++ .../packages/licenses-1/package.py | 18 ++++++++ .../repos/builtin/packages/zlib/package.py | 2 + 9 files changed, 154 insertions(+) create mode 100644 var/spack/repos/builtin.mock/packages/licenses-1/package.py diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index acc79ea3424090..ae6be5b4a6eb3e 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -6799,3 +6799,30 @@ To achieve backward compatibility with the single-class format Spack creates in Overall the role of the adapter is to route access to attributes of methods first through the ``*Package`` hierarchy, and then back to the base class builder. This is schematically shown in the diagram above, where the adapter role is to "emulate" a method resolution order like the one represented by the red arrows. + +------------------------------ +Specifying License Information +------------------------------ + +A significant portion of software that Spack packages is open source. Most open +source software is released under one or more common open source licenses. +Specifying the specific license that a package is released under in a project's +`package.py` is good practice. To specify a license, find the SPDX identifier for +a project and then add it using the license directive: + +.. code-block:: python + + license("") + +Note that specifying a license without a when clause makes it apply to all +versions and variants of the package, which might not actually be the case. +For example, a project might have switched licenses at some point or have +certain build configurations that include files that are licensed differently. +To account for this, you can specify when licenses should be applied. For +example, to specify that a specific license identifier should only apply +to versionup to and including 1.5, you could write the following directive: + +.. code-block:: python + + license("...", when="@:1.5") + diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 474e271d1791f4..32c6ed13e174b7 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -63,6 +63,9 @@ class {class_name}({base_class_name}): # notify when the package is updated. # maintainers("github_user1", "github_user2") + # FIXME: Add the SPDX identifier of the project's license below. + license("UNKNOWN") + {versions} {dependencies} diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index f0850d5dcf3200..5e667f487686e1 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -72,6 +72,10 @@ def variant(s): return spack.spec.ENABLED_VARIANT_COLOR + s + plain_format +def license(s): + return spack.spec.VERSION_COLOR + s + plain_format + + class VariantFormatter: def __init__(self, variants): self.variants = variants @@ -348,6 +352,22 @@ def print_virtuals(pkg): color.cprint(" None") +def print_licenses(pkg): + """Output the licenses of the project.""" + + color.cprint("") + color.cprint(section_title("Licenses: ")) + + if len(pkg.licenses) == 0: + color.cprint(" None") + else: + pad = padder(pkg.licenses, 4) + for when_spec in pkg.licenses: + license_identifier = pkg.licenses[when_spec] + line = license(" {0}".format(pad(license_identifier))) + color.cescape(when_spec) + color.cprint(line) + + def info(parser, args): spec = spack.spec.Spec(args.package) pkg_cls = spack.repo.PATH.get_pkg_class(spec.name) @@ -377,6 +397,7 @@ def info(parser, args): (args.all or not args.no_dependencies, print_dependencies), (args.all or args.virtuals, print_virtuals), (args.all or args.tests, print_tests), + (args.all or True, print_licenses), ] for print_it, func in sections: if print_it: diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 9ac992b2098bcb..7ebf68e54885f7 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -64,6 +64,7 @@ class OpenMpi(Package): "depends_on", "extends", "maintainers", + "license", "provides", "patch", "variant", @@ -862,6 +863,44 @@ def _execute_maintainer(pkg): return _execute_maintainer +def _execute_license(pkg, license_identifier: str, when): + # If when is not specified the license always holds + when_spec = make_when_spec(when) + if not when_spec: + return + + for other_when_spec in pkg.licenses: + if when_spec.intersects(other_when_spec): + when_message = "" + if when_spec != make_when_spec(None): + when_message = f"when {when_spec}" + other_when_message = "" + if other_when_spec != make_when_spec(None): + other_when_message = f"when {other_when_spec}" + err_msg = ( + f"{pkg.name} is specified as being licensed as {license_identifier} " + f"{when_message}, but it is also specified as being licensed under " + f"{pkg.licenses[other_when_spec]} {other_when_message}, which conflict." + ) + raise OverlappingLicenseError(err_msg) + + pkg.licenses[when_spec] = license_identifier + + +@directive("licenses") +def license(license_identifier: str, when=None): + """Add a new license directive, to specify the SPDX identifier the software is + distributed under. + + Args: + license_identifiers: A list of SPDX identifiers specifying the licenses + the software is distributed under. + when: A spec specifying when the license applies. + """ + + return lambda pkg: _execute_license(pkg, license_identifier, when) + + @directive("requirements") def requires(*requirement_specs, policy="one_of", when=None, msg=None): """Allows a package to request a configuration to be present in all valid solutions. @@ -920,3 +959,7 @@ class DependencyPatchError(DirectiveError): class UnsupportedPackageDirective(DirectiveError): """Raised when an invalid or unsupported package directive is specified.""" + + +class OverlappingLicenseError(DirectiveError): + """Raised when two licenses are declared that apply on overlapping specs.""" diff --git a/lib/spack/spack/test/cmd/create.py b/lib/spack/spack/test/cmd/create.py index b99d221d02ae61..089dc8b0c52440 100644 --- a/lib/spack/spack/test/cmd/create.py +++ b/lib/spack/spack/test/cmd/create.py @@ -27,6 +27,7 @@ [r"TestNamedPackage(Package)", r"def install(self"], ), (["file://example.tar.gz"], "example", [r"Example(Package)", r"def install(self"]), + (["-n", "test-license"], "test-license", [r'license("UNKNOWN")']), # Template-specific cases ( ["-t", "autoreconf", "/test-autoreconf"], diff --git a/lib/spack/spack/test/cmd/info.py b/lib/spack/spack/test/cmd/info.py index 4b2f5d2b3980ac..c4528f9852e284 100644 --- a/lib/spack/spack/test/cmd/info.py +++ b/lib/spack/spack/test/cmd/info.py @@ -88,6 +88,7 @@ def test_info_fields(pkg_query, parser, print_buffer): "Installation Phases:", "Virtual Packages:", "Tags:", + "Licenses:", ) args = parser.parse_args(["--all", pkg_query]) diff --git a/lib/spack/spack/test/directives.py b/lib/spack/spack/test/directives.py index e32ec6ac086976..677eb043a9e6ed 100644 --- a/lib/spack/spack/test/directives.py +++ b/lib/spack/spack/test/directives.py @@ -89,6 +89,44 @@ def test_maintainer_directive(config, mock_packages, package_name, expected_main assert pkg_cls.maintainers == expected_maintainers +@pytest.mark.parametrize( + "package_name,expected_licenses", [("licenses-1", [("MIT", "+foo"), ("Apache-2.0", "~foo")])] +) +def test_license_directive(config, mock_packages, package_name, expected_licenses): + pkg_cls = spack.repo.PATH.get_pkg_class(package_name) + for license in expected_licenses: + assert spack.spec.Spec(license[1]) in pkg_cls.licenses + assert license[0] == pkg_cls.licenses[spack.spec.Spec(license[1])] + + +def test_duplicate_exact_range_license(): + package = namedtuple("package", ["licenses", "name"]) + package.licenses = {spack.directives.make_when_spec("+foo"): "Apache-2.0"} + package.name = "test_package" + + msg = ( + r"test_package is specified as being licensed as MIT when \+foo, but it is also " + r"specified as being licensed under Apache-2.0 when \+foo, which conflict." + ) + + with pytest.raises(spack.directives.OverlappingLicenseError, match=msg): + spack.directives._execute_license(package, "MIT", "+foo") + + +def test_overlapping_duplicate_licenses(): + package = namedtuple("package", ["licenses", "name"]) + package.licenses = {spack.directives.make_when_spec("+foo"): "Apache-2.0"} + package.name = "test_package" + + msg = ( + r"test_package is specified as being licensed as MIT when \+bar, but it is also " + r"specified as being licensed under Apache-2.0 when \+foo, which conflict." + ) + + with pytest.raises(spack.directives.OverlappingLicenseError, match=msg): + spack.directives._execute_license(package, "MIT", "+bar") + + def test_version_type_validation(): # A version should be a string or an int, not a float, because it leads to subtle issues # such as 3.10 being interpreted as 3.1. diff --git a/var/spack/repos/builtin.mock/packages/licenses-1/package.py b/var/spack/repos/builtin.mock/packages/licenses-1/package.py new file mode 100644 index 00000000000000..d5c67830c98f2e --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/licenses-1/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 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 Licenses1(Package): + """Package with a licenses field.""" + + homepage = "https://www.example.com" + url = "https://www.example.com/license" + + license("MIT", when="+foo") + license("Apache-2.0", when="~foo") + + version("1.0", md5="0123456789abcdef0123456789abcdef") diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index a4edbea4a03869..144e3b0ec610bf 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -60,6 +60,8 @@ class Zlib(MakefilePackage, Package): provides("zlib-api") + license("Zlib") + @property def libs(self): shared = "+shared" in self.spec From db5d0ac6ac592073f21095c26d031e17cdeabc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Wed, 18 Oct 2023 13:04:21 +0200 Subject: [PATCH 253/806] [fix] py-werkzeug: add constraint in python dependence (#40590) py-werkzeug@:0.12 does not work with python@3.10: Test with py-werkzeug 0.12.2 and python 3.10: ``` $ python3.10 -c 'import werkzeug' py-werkzeug-0.12.2/lib/python3.11/site-packages/werkzeug/datastructures.py", line 16, in from collections import Container, Iterable, MutableSet ImportError: cannot import name 'Container' from 'collections' ``` Test with py-werkzeug 0.12.2 and python 3.9: ``` python3.9 -c "from collections import Container" :1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working ``` --- var/spack/repos/builtin/packages/py-werkzeug/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-werkzeug/package.py b/var/spack/repos/builtin/packages/py-werkzeug/package.py index f0e7ca3f551a2a..e4099e015156c5 100644 --- a/var/spack/repos/builtin/packages/py-werkzeug/package.py +++ b/var/spack/repos/builtin/packages/py-werkzeug/package.py @@ -31,6 +31,7 @@ class PyWerkzeug(PythonPackage): version("0.11.11", sha256="e72c46bc14405cba7a26bd2ce28df734471bc9016bc8b4cb69466c2c14c2f7e5") depends_on("python@3.8:", when="@2.3:", type=("build", "run")) + depends_on("python@:3.9", when="@:0.12", type=("build", "run")) depends_on("py-flit-core@:3", when="@2.3.7:", type="build") depends_on("py-markupsafe@2.1.1:", when="@2.2:", type=("build", "run")) From dc071a3995fa32006dd4abdd3a47248c748ff454 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 18 Oct 2023 13:44:26 +0200 Subject: [PATCH 254/806] Fix dev-build keep_stage behavior (#40576) `spack dev-build` would incorrectly set `keep_stage=True` for the entire DAG, including for non-dev specs, even though the dev specs have a DIYStage which never deletes sources. --- lib/spack/spack/package_base.py | 9 +--- lib/spack/spack/test/cmd/dev_build.py | 72 +++++++++++---------------- 2 files changed, 29 insertions(+), 52 deletions(-) diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 81cc9b8d61d823..37a08e074b4300 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -1808,14 +1808,7 @@ def do_install(self, **kwargs): verbose (bool): Display verbose build output (by default, suppresses it) """ - # Non-transitive dev specs need to keep the dev stage and be built from - # source every time. Transitive ones just need to be built from source. - dev_path_var = self.spec.variants.get("dev_path", None) - if dev_path_var: - kwargs["keep_stage"] = True - - builder = PackageInstaller([(self, kwargs)]) - builder.install() + PackageInstaller([(self, kwargs)]).install() # TODO (post-34236): Update tests and all packages that use this as a # TODO (post-34236): package method to the routine made available to diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py index 4b4636b3c30b1e..71ab195b649c8e 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -9,8 +9,10 @@ import llnl.util.filesystem as fs +import spack.build_environment import spack.environment as ev import spack.spec +import spack.store from spack.main import SpackCommand dev_build = SpackCommand("dev-build") @@ -20,9 +22,8 @@ pytestmark = pytest.mark.not_on_windows("does not run on windows") -def test_dev_build_basics(tmpdir, mock_packages, install_mockery): - spec = spack.spec.Spec("dev-build-test-install@0.0.0 dev_path=%s" % tmpdir) - spec.concretize() +def test_dev_build_basics(tmpdir, install_mockery): + spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={tmpdir}").concretized() assert "dev_path" in spec.variants @@ -39,9 +40,8 @@ def test_dev_build_basics(tmpdir, mock_packages, install_mockery): assert os.path.exists(str(tmpdir)) -def test_dev_build_before(tmpdir, mock_packages, install_mockery): - spec = spack.spec.Spec("dev-build-test-install@0.0.0 dev_path=%s" % tmpdir) - spec.concretize() +def test_dev_build_before(tmpdir, install_mockery): + spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={tmpdir}").concretized() with tmpdir.as_cwd(): with open(spec.package.filename, "w") as f: @@ -56,9 +56,8 @@ def test_dev_build_before(tmpdir, mock_packages, install_mockery): assert not os.path.exists(spec.prefix) -def test_dev_build_until(tmpdir, mock_packages, install_mockery): - spec = spack.spec.Spec("dev-build-test-install@0.0.0 dev_path=%s" % tmpdir) - spec.concretize() +def test_dev_build_until(tmpdir, install_mockery): + spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={tmpdir}").concretized() with tmpdir.as_cwd(): with open(spec.package.filename, "w") as f: @@ -74,10 +73,9 @@ def test_dev_build_until(tmpdir, mock_packages, install_mockery): assert not spack.store.STORE.db.query(spec, installed=True) -def test_dev_build_until_last_phase(tmpdir, mock_packages, install_mockery): +def test_dev_build_until_last_phase(tmpdir, install_mockery): # Test that we ignore the last_phase argument if it is already last - spec = spack.spec.Spec("dev-build-test-install@0.0.0 dev_path=%s" % tmpdir) - spec.concretize() + spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={tmpdir}").concretized() with tmpdir.as_cwd(): with open(spec.package.filename, "w") as f: @@ -94,9 +92,8 @@ def test_dev_build_until_last_phase(tmpdir, mock_packages, install_mockery): assert os.path.exists(str(tmpdir)) -def test_dev_build_before_until(tmpdir, mock_packages, install_mockery, capsys): - spec = spack.spec.Spec("dev-build-test-install@0.0.0 dev_path=%s" % tmpdir) - spec.concretize() +def test_dev_build_before_until(tmpdir, install_mockery, capsys): + spec = spack.spec.Spec(f"dev-build-test-install@0.0.0 dev_path={tmpdir}").concretized() with tmpdir.as_cwd(): with open(spec.package.filename, "w") as f: @@ -134,7 +131,6 @@ def mock_module_noop(*args): def test_dev_build_drop_in(tmpdir, mock_packages, monkeypatch, install_mockery, working_env): monkeypatch.setattr(os, "execvp", print_spack_cc) - monkeypatch.setattr(spack.build_environment, "module", mock_module_noop) with tmpdir.as_cwd(): @@ -142,7 +138,7 @@ def test_dev_build_drop_in(tmpdir, mock_packages, monkeypatch, install_mockery, assert "lib/spack/env" in output -def test_dev_build_fails_already_installed(tmpdir, mock_packages, install_mockery): +def test_dev_build_fails_already_installed(tmpdir, install_mockery): spec = spack.spec.Spec("dev-build-test-install@0.0.0 dev_path=%s" % tmpdir) spec.concretize() @@ -175,7 +171,7 @@ def test_dev_build_fails_no_version(mock_packages): assert "dev-build spec must have a single, concrete version" in output -def test_dev_build_env(tmpdir, mock_packages, install_mockery, mutable_mock_env_path): +def test_dev_build_env(tmpdir, install_mockery, mutable_mock_env_path): """Test Spack does dev builds for packages in develop section of env.""" # setup dev-build-test-install package for dev build build_dir = tmpdir.mkdir("build") @@ -191,7 +187,7 @@ def test_dev_build_env(tmpdir, mock_packages, install_mockery, mutable_mock_env_ with envdir.as_cwd(): with open("spack.yaml", "w") as f: f.write( - """\ + f"""\ spack: specs: - dev-build-test-install@0.0.0 @@ -199,11 +195,9 @@ def test_dev_build_env(tmpdir, mock_packages, install_mockery, mutable_mock_env_ develop: dev-build-test-install: spec: dev-build-test-install@0.0.0 - path: %s + path: {os.path.relpath(str(build_dir), start=str(envdir))} """ - % os.path.relpath(str(build_dir), start=str(envdir)) ) - env("create", "test", "./spack.yaml") with ev.read("test"): install() @@ -213,9 +207,7 @@ def test_dev_build_env(tmpdir, mock_packages, install_mockery, mutable_mock_env_ assert f.read() == spec.package.replacement_string -def test_dev_build_env_version_mismatch( - tmpdir, mock_packages, install_mockery, mutable_mock_env_path -): +def test_dev_build_env_version_mismatch(tmpdir, install_mockery, mutable_mock_env_path): """Test Spack constraints concretization by develop specs.""" # setup dev-build-test-install package for dev build build_dir = tmpdir.mkdir("build") @@ -231,7 +223,7 @@ def test_dev_build_env_version_mismatch( with envdir.as_cwd(): with open("spack.yaml", "w") as f: f.write( - """\ + f"""\ spack: specs: - dev-build-test-install@0.0.0 @@ -239,9 +231,8 @@ def test_dev_build_env_version_mismatch( develop: dev-build-test-install: spec: dev-build-test-install@1.1.1 - path: %s + path: {build_dir} """ - % build_dir ) env("create", "test", "./spack.yaml") @@ -250,9 +241,7 @@ def test_dev_build_env_version_mismatch( install() -def test_dev_build_multiple( - tmpdir, mock_packages, install_mockery, mutable_mock_env_path, mock_fetch -): +def test_dev_build_multiple(tmpdir, install_mockery, mutable_mock_env_path, mock_fetch): """Test spack install with multiple developer builds Test that only the root needs to be specified in the environment @@ -284,20 +273,19 @@ def test_dev_build_multiple( with envdir.as_cwd(): with open("spack.yaml", "w") as f: f.write( - """\ + f"""\ spack: specs: - dev-build-test-dependent@0.0.0 develop: dev-build-test-install: - path: %s + path: {leaf_dir} spec: dev-build-test-install@=1.0.0 dev-build-test-dependent: spec: dev-build-test-dependent@0.0.0 - path: %s + path: {root_dir} """ - % (leaf_dir, root_dir) ) env("create", "test", "./spack.yaml") @@ -316,9 +304,7 @@ def test_dev_build_multiple( assert f.read() == spec.package.replacement_string -def test_dev_build_env_dependency( - tmpdir, mock_packages, install_mockery, mock_fetch, mutable_mock_env_path -): +def test_dev_build_env_dependency(tmpdir, install_mockery, mock_fetch, mutable_mock_env_path): """ Test non-root specs in an environment are properly marked for dev builds. """ @@ -337,7 +323,7 @@ def test_dev_build_env_dependency( with envdir.as_cwd(): with open("spack.yaml", "w") as f: f.write( - """\ + f"""\ spack: specs: - dependent-of-dev-build@0.0.0 @@ -345,11 +331,9 @@ def test_dev_build_env_dependency( develop: dev-build-test-install: spec: dev-build-test-install@0.0.0 - path: %s + path: {os.path.relpath(str(build_dir), start=str(envdir))} """ - % os.path.relpath(str(build_dir), start=str(envdir)) ) - env("create", "test", "./spack.yaml") with ev.read("test"): # concretize in the environment to get the dev build info @@ -371,7 +355,7 @@ def test_dev_build_env_dependency( @pytest.mark.parametrize("test_spec", ["dev-build-test-install", "dependent-of-dev-build"]) def test_dev_build_rebuild_on_source_changes( - test_spec, tmpdir, mock_packages, install_mockery, mutable_mock_env_path, mock_fetch + test_spec, tmpdir, install_mockery, mutable_mock_env_path, mock_fetch ): """Test dev builds rebuild on changes to source code. @@ -416,4 +400,4 @@ def reset_string(): fs.touch(os.path.join(str(build_dir), "test")) output = install() - assert "Installing %s" % test_spec in output + assert f"Installing {test_spec}" in output From 55198c49e5ca73f140d1fa348893f3e8b8217b0f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 18 Oct 2023 19:04:49 +0200 Subject: [PATCH 255/806] llvm: fix ncurses+termlib linking in lldb (#40594) --- var/spack/repos/builtin/packages/llvm/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index df0e762fc54329..b7a78c6fdd9fda 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -562,6 +562,16 @@ class Llvm(CMakePackage, CudaPackage): patch("add-include-for-libelf-llvm-12-14.patch", when="@12:14") patch("add-include-for-libelf-llvm-15.patch", when="@15") + @when("@14:17") + def patch(self): + # https://github.com/llvm/llvm-project/pull/69458 + filter_file( + r"${TERMINFO_LIB}", + r"${Terminfo_LIBRARIES}", + "lldb/source/Core/CMakeLists.txt", + string=True, + ) + # The functions and attributes below implement external package # detection for LLVM. See: # From 294e659ae895c45a8ada51ea5cc0db2e5a004e1d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 18 Oct 2023 19:56:54 +0200 Subject: [PATCH 256/806] AutotoolsPackage / MakefilePackage: add gmake build dependency (#40380) --- .../docs/tables/system_prerequisites.csv | 1 - lib/spack/spack/build_systems/autotools.py | 1 + lib/spack/spack/build_systems/makefile.py | 8 +++-- lib/spack/spack/test/architecture.py | 28 ++++++--------- lib/spack/spack/test/cmd/ci.py | 21 +++++------ lib/spack/spack/test/installer.py | 14 ++++---- share/spack/qa/setup-env-test.fish | 36 +++++++++---------- share/spack/qa/setup-env-test.sh | 36 +++++++++---------- .../builder.test/packages/gmake/package.py | 18 ++++++++++ .../builtin.mock/packages/gmake/package.py | 3 ++ .../builtin.mock/packages/shell-a/package.py | 17 +++++++++ .../builtin.mock/packages/shell-b/package.py | 16 +++++++++ .../repos/builtin/packages/gmake/package.py | 20 +++++------ 13 files changed, 133 insertions(+), 86 deletions(-) create mode 100644 var/spack/repos/builder.test/packages/gmake/package.py create mode 100644 var/spack/repos/builtin.mock/packages/shell-a/package.py create mode 100644 var/spack/repos/builtin.mock/packages/shell-b/package.py diff --git a/lib/spack/docs/tables/system_prerequisites.csv b/lib/spack/docs/tables/system_prerequisites.csv index f275bcef5be291..7a72078cdd6a10 100644 --- a/lib/spack/docs/tables/system_prerequisites.csv +++ b/lib/spack/docs/tables/system_prerequisites.csv @@ -1,7 +1,6 @@ Name, Supported Versions, Notes, Requirement Reason Python, 3.6--3.12, , Interpreter for Spack C/C++ Compilers, , , Building software -make, , , Build software patch, , , Build software tar, , , Extract/create archives gzip, , , Compress/Decompress archives diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index e78b87bee4f12c..760faf307bbc65 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -46,6 +46,7 @@ class AutotoolsPackage(spack.package_base.PackageBase): depends_on("gnuconfig", type="build", when="target=ppc64le:") depends_on("gnuconfig", type="build", when="target=aarch64:") depends_on("gnuconfig", type="build", when="target=riscv64:") + depends_on("gmake", type="build") conflicts("platform=windows") def flags_to_build_system_args(self, flags): diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py index feb6d37f24325b..25eec07095b176 100644 --- a/lib/spack/spack/build_systems/makefile.py +++ b/lib/spack/spack/build_systems/makefile.py @@ -9,7 +9,8 @@ import spack.builder import spack.package_base -from spack.directives import build_system, conflicts +from spack.directives import build_system, conflicts, depends_on +from spack.multimethod import when from ._checks import ( BaseBuilder, @@ -29,7 +30,10 @@ class MakefilePackage(spack.package_base.PackageBase): legacy_buildsystem = "makefile" build_system("makefile") - conflicts("platform=windows", when="build_system=makefile") + + with when("build_system=makefile"): + conflicts("platform=windows") + depends_on("gmake", type="build") @spack.builder.builder("makefile") diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index a5d7a0083d0239..7bea7a1d86a47f 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -13,8 +13,8 @@ import spack.concretize import spack.operating_systems import spack.platforms -import spack.spec import spack.target +from spack.spec import ArchSpec, CompilerSpec, Spec @pytest.fixture(scope="module") @@ -64,7 +64,7 @@ def test_user_input_combination(config, target_str, os_str): the operating system match. """ spec_str = "libelf os={} target={}".format(os_str, target_str) - spec = spack.spec.Spec(spec_str) + spec = Spec(spec_str) assert spec.architecture.os == str(TEST_PLATFORM.operating_system(os_str)) assert spec.architecture.target == TEST_PLATFORM.target(target_str) @@ -114,7 +114,7 @@ def test_target_container_semantic(cpu_flag, target_name): ], ) def test_arch_spec_container_semantic(item, architecture_str): - architecture = spack.spec.ArchSpec(architecture_str) + architecture = ArchSpec(architecture_str) assert item in architecture @@ -141,24 +141,24 @@ def test_optimization_flags(compiler_spec, target_name, expected_flags, config): @pytest.mark.parametrize( "compiler,real_version,target_str,expected_flags", [ - (spack.spec.CompilerSpec("gcc@=9.2.0"), None, "haswell", "-march=haswell -mtune=haswell"), + (CompilerSpec("gcc@=9.2.0"), None, "haswell", "-march=haswell -mtune=haswell"), # Check that custom string versions are accepted ( - spack.spec.CompilerSpec("gcc@=10foo"), + CompilerSpec("gcc@=10foo"), "9.2.0", "icelake", "-march=icelake-client -mtune=icelake-client", ), # Check that we run version detection (4.4.0 doesn't support icelake) ( - spack.spec.CompilerSpec("gcc@=4.4.0-special"), + CompilerSpec("gcc@=4.4.0-special"), "9.2.0", "icelake", "-march=icelake-client -mtune=icelake-client", ), # Check that the special case for Apple's clang is treated correctly # i.e. it won't try to detect the version again - (spack.spec.CompilerSpec("apple-clang@=9.1.0"), None, "x86_64", "-march=x86-64"), + (CompilerSpec("apple-clang@=9.1.0"), None, "x86_64", "-march=x86-64"), ], ) def test_optimization_flags_with_custom_versions( @@ -180,8 +180,8 @@ def test_optimization_flags_with_custom_versions( ], ) def test_satisfy_strict_constraint_when_not_concrete(architecture_tuple, constraint_tuple): - architecture = spack.spec.ArchSpec(architecture_tuple) - constraint = spack.spec.ArchSpec(constraint_tuple) + architecture = ArchSpec(architecture_tuple) + constraint = ArchSpec(constraint_tuple) assert not architecture.satisfies(constraint) @@ -204,16 +204,10 @@ def test_satisfy_strict_constraint_when_not_concrete(architecture_tuple, constra def test_concretize_target_ranges(root_target_range, dep_target_range, result, monkeypatch): # Monkeypatch so that all concretization is done as if the machine is core2 monkeypatch.setattr(spack.platforms.test.Test, "default", "core2") - - spec_str = "a %%gcc@10 foobar=bar target=%s ^b target=%s" % ( - root_target_range, - dep_target_range, - ) - spec = spack.spec.Spec(spec_str) + spec = Spec(f"a %gcc@10 foobar=bar target={root_target_range} ^b target={dep_target_range}") with spack.concretize.disable_compiler_existence_check(): spec.concretize() - - assert str(spec).count("arch=test-debian6-%s" % result) == 2 + assert spec.target == spec["b"].target == result @pytest.mark.parametrize( diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index a0de63517af1e8..d02e1caa2dec74 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -1080,14 +1080,17 @@ def test_push_mirror_contents( ci.import_signing_key(_signing_key()) - spack_yaml_contents = """ + with tmpdir.as_cwd(): + with open("spack.yaml", "w") as f: + f.write( + f"""\ spack: definitions: - packages: [patchelf] specs: - $packages mirrors: - test-mirror: {0} + test-mirror: {mirror_url} ci: enable-artifacts-buildcache: True pipeline-gen: @@ -1107,15 +1110,8 @@ def test_push_mirror_contents( - nonbuildtag image: basicimage custom_attribute: custom! -""".format( - mirror_url - ) - - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write(spack_yaml_contents) - - with tmpdir.as_cwd(): +""" + ) env_cmd("create", "test", "./spack.yaml") with ev.read("test"): concrete_spec = Spec("patchelf").concretized() @@ -1126,7 +1122,8 @@ def test_push_mirror_contents( install_cmd("--add", "--keep-stage", json_path) - ci.push_mirror_contents(concrete_spec, mirror_url, True) + for s in concrete_spec.traverse(): + ci.push_mirror_contents(s, mirror_url, True) buildcache_path = os.path.join(mirror_dir.strpath, "build_cache") diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py index 6b42e591eb9dbe..d28d3f44c387bd 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -719,13 +719,12 @@ def test_check_deps_status_external(install_mockery, monkeypatch): installer = create_installer(const_arg) request = installer.build_requests[0] - # Mock the known dependent, b, as external so assumed to be installed + # Mock the dependencies as external so assumed to be installed monkeypatch.setattr(spack.spec.Spec, "external", True) installer._check_deps_status(request) - # exotic architectures will add dependencies on gnuconfig, which we want to ignore - installed = [x for x in installer.installed if not x.startswith("gnuconfig")] - assert installed[0].startswith("b") + for dep in request.spec.traverse(root=False): + assert inst.package_id(dep.package) in installer.installed def test_check_deps_status_upstream(install_mockery, monkeypatch): @@ -733,13 +732,12 @@ def test_check_deps_status_upstream(install_mockery, monkeypatch): installer = create_installer(const_arg) request = installer.build_requests[0] - # Mock the known dependent, b, as installed upstream + # Mock the known dependencies as installed upstream monkeypatch.setattr(spack.spec.Spec, "installed_upstream", True) installer._check_deps_status(request) - # exotic architectures will add dependencies on gnuconfig, which we want to ignore - installed = [x for x in installer.installed if not x.startswith("gnuconfig")] - assert installed[0].startswith("b") + for dep in request.spec.traverse(root=False): + assert inst.package_id(dep.package) in installer.installed def test_add_bootstrap_compilers(install_mockery, monkeypatch): diff --git a/share/spack/qa/setup-env-test.fish b/share/spack/qa/setup-env-test.fish index 87158840b1f5a4..86563b4b08ce3a 100755 --- a/share/spack/qa/setup-env-test.fish +++ b/share/spack/qa/setup-env-test.fish @@ -285,7 +285,7 @@ spt_succeeds which spack # create a fake mock package install and store its location for later title "Setup" echo "Creating a mock package installation" -spack -m install --fake a +spack -m install --fake shell-a # create a test environment for testing environment commands echo "Creating a mock environment" @@ -300,7 +300,7 @@ function spt_cleanup -p %self title "Cleanup" echo "Removing test packages before exiting." - spack -m uninstall -yf b a + spack -m uninstall -yf shell-b shell-a echo echo "$__spt_success tests succeeded." @@ -322,7 +322,7 @@ spt_contains "usage: spack " spack help --all title 'Testing `spack cd`' spt_contains "usage: spack cd " spack cd -h spt_contains "usage: spack cd " spack cd --help -spt_contains "cd $b_install" spack cd -i b +spt_contains "cd $b_install" spack cd -i shell-b title 'Testing `spack module`' spt_contains "usage: spack module " spack -m module -h @@ -330,34 +330,34 @@ spt_contains "usage: spack module " spack -m module --help spt_contains "usage: spack module " spack -m module title 'Testing `spack load`' -set _b_loc (spack -m location -i b) +set _b_loc (spack -m location -i shell-b) set _b_bin $_b_loc"/bin" -set _a_loc (spack -m location -i a) +set _a_loc (spack -m location -i shell-a) set _a_bin $_a_loc"/bin" -spt_contains "set -gx PATH $_b_bin" spack -m load --only package --fish b -spt_succeeds spack -m load b -set LIST_CONTENT (spack -m load b; spack load --list) -spt_contains "b@" echo $LIST_CONTENT -spt_does_not_contain "a@" echo $LIST_CONTENT +spt_contains "set -gx PATH $_b_bin" spack -m load --only package --fish shell-b +spt_succeeds spack -m load shell-b +set LIST_CONTENT (spack -m load shell-b; spack load --list) +spt_contains "shell-b@" echo $LIST_CONTENT +spt_does_not_contain "shell-a@" echo $LIST_CONTENT # test a variable MacOS clears and one it doesn't for recursive loads -spt_contains "set -gx PATH $_a_bin:$_b_bin" spack -m load --fish a -spt_succeeds spack -m load --only dependencies a -spt_succeeds spack -m load --only package a +spt_contains "set -gx PATH $_a_bin:$_b_bin" spack -m load --fish shell-a +spt_succeeds spack -m load --only dependencies shell-a +spt_succeeds spack -m load --only package shell-a spt_fails spack -m load d spt_contains "usage: spack load " spack -m load -h spt_contains "usage: spack load " spack -m load -h d spt_contains "usage: spack load " spack -m load --help title 'Testing `spack unload`' -spack -m load b a # setup -# spt_contains "module unload $b_module" spack -m unload b -spt_succeeds spack -m unload b +spack -m load shell-b shell-a # setup +# spt_contains "module unload $b_module" spack -m unload shell-b +spt_succeeds spack -m unload shell-b spt_succeeds spack -m unload --all spack -m unload --all # cleanup spt_fails spack -m unload -l -# spt_contains "module unload -l --arg $b_module" spack -m unload -l --arg b -spt_fails spack -m unload d +# spt_contains "module unload -l --arg $b_module" spack -m unload -l --arg shell-b +spt_fails spack -m unload shell-d spt_contains "usage: spack unload " spack -m unload -h spt_contains "usage: spack unload " spack -m unload -h d spt_contains "usage: spack unload " spack -m unload --help diff --git a/share/spack/qa/setup-env-test.sh b/share/spack/qa/setup-env-test.sh index 94589e5bcb7818..58feca69ea0487 100755 --- a/share/spack/qa/setup-env-test.sh +++ b/share/spack/qa/setup-env-test.sh @@ -60,12 +60,12 @@ cd() { # Create a fake mock package install and store its location for later title "Setup" echo "Creating a mock package installation" -spack -m install --fake a -a_install=$(spack location -i a) -a_module=$(spack -m module tcl find a) +spack -m install --fake shell-a +a_install=$(spack location -i shell-a) +a_module=$(spack -m module tcl find shell-a) -b_install=$(spack location -i b) -b_module=$(spack -m module tcl find b) +b_install=$(spack location -i shell-b) +b_module=$(spack -m module tcl find shell-b) # Create a test environment for testing environment commands echo "Creating a mock environment" @@ -80,7 +80,7 @@ cleanup() { title "Cleanup" echo "Removing test packages before exiting." - spack -m uninstall -yf b a + spack -m uninstall -yf shell-b shell-a } # ----------------------------------------------------------------------- @@ -96,7 +96,7 @@ contains "usage: spack " spack help --all title 'Testing `spack cd`' contains "usage: spack cd " spack cd -h contains "usage: spack cd " spack cd --help -contains "cd $b_install" spack cd -i b +contains "cd $b_install" spack cd -i shell-b title 'Testing `spack module`' contains "usage: spack module " spack -m module -h @@ -104,25 +104,25 @@ contains "usage: spack module " spack -m module --help contains "usage: spack module " spack -m module title 'Testing `spack load`' -contains "export PATH=$(spack -m location -i b)/bin" spack -m load --only package --sh b -succeeds spack -m load b -LIST_CONTENT=`spack -m load b; spack load --list` -contains "b@" echo $LIST_CONTENT -does_not_contain "a@" echo $LIST_CONTENT +contains "export PATH=$(spack -m location -i shell-b)/bin" spack -m load --only package --sh shell-b +succeeds spack -m load shell-b +LIST_CONTENT=`spack -m load shell-b; spack load --list` +contains "shell-b@" echo $LIST_CONTENT +does_not_contain "shell-a@" echo $LIST_CONTENT fails spack -m load -l # test a variable MacOS clears and one it doesn't for recursive loads -contains "export PATH=$(spack -m location -i a)/bin" spack -m load --sh a -contains "export PATH=$(spack -m location -i b)/bin" spack -m load --sh b -succeeds spack -m load --only dependencies a -succeeds spack -m load --only package a +contains "export PATH=$(spack -m location -i shell-a)/bin" spack -m load --sh shell-a +contains "export PATH=$(spack -m location -i shell-b)/bin" spack -m load --sh shell-b +succeeds spack -m load --only dependencies shell-a +succeeds spack -m load --only package shell-a fails spack -m load d contains "usage: spack load " spack -m load -h contains "usage: spack load " spack -m load -h d contains "usage: spack load " spack -m load --help title 'Testing `spack unload`' -spack -m load b a # setup -succeeds spack -m unload b +spack -m load shell-b shell-a # setup +succeeds spack -m unload shell-b succeeds spack -m unload --all spack -m unload --all # cleanup fails spack -m unload -l diff --git a/var/spack/repos/builder.test/packages/gmake/package.py b/var/spack/repos/builder.test/packages/gmake/package.py new file mode 100644 index 00000000000000..b3d5c50086e291 --- /dev/null +++ b/var/spack/repos/builder.test/packages/gmake/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 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 Gmake(Package): + """Dummy GMake Package""" + + homepage = "https://www.gnu.org/software/make" + url = "https://ftpmirror.gnu.org/make/make-4.4.tar.gz" + + version("4.4", sha256="ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed") + + def do_stage(self): + mkdirp(self.stage.source_path) diff --git a/var/spack/repos/builtin.mock/packages/gmake/package.py b/var/spack/repos/builtin.mock/packages/gmake/package.py index aa5dd8452bf27e..b3d5c50086e291 100644 --- a/var/spack/repos/builtin.mock/packages/gmake/package.py +++ b/var/spack/repos/builtin.mock/packages/gmake/package.py @@ -13,3 +13,6 @@ class Gmake(Package): url = "https://ftpmirror.gnu.org/make/make-4.4.tar.gz" version("4.4", sha256="ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed") + + def do_stage(self): + mkdirp(self.stage.source_path) diff --git a/var/spack/repos/builtin.mock/packages/shell-a/package.py b/var/spack/repos/builtin.mock/packages/shell-a/package.py new file mode 100644 index 00000000000000..3ff34102bfd628 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/shell-a/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 ShellA(Package): + """Simple package with one dependency for shell tests""" + + homepage = "http://www.example.com" + url = "http://www.example.com/shell-a-1.0.tar.gz" + + version("1.0", md5="0123456789abcdef0123456789abcdef") + version("2.0", md5="abcdef0123456789abcdef0123456789") + + depends_on("shell-b") diff --git a/var/spack/repos/builtin.mock/packages/shell-b/package.py b/var/spack/repos/builtin.mock/packages/shell-b/package.py new file mode 100644 index 00000000000000..3db70f12189bcc --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/shell-b/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2023 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 ShellB(Package): + """Simple package with no dependencies for shell tests""" + + homepage = "http://www.example.com" + url = "http://www.example.com/shell-b-1.0.tar.gz" + + version("1.0", md5="0123456789abcdef0123456789abcdef") + version("0.9", md5="abcd456789abcdef0123456789abcdef") diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py index 3f795ad637c228..0cfbccb80e6739 100644 --- a/var/spack/repos/builtin/packages/gmake/package.py +++ b/var/spack/repos/builtin/packages/gmake/package.py @@ -9,7 +9,7 @@ from spack.package import * -class Gmake(AutotoolsPackage, GNUMirrorPackage): +class Gmake(Package, GNUMirrorPackage): """GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.""" @@ -64,17 +64,17 @@ def determine_version(cls, exe): return match.group(1) if match else None def configure_args(self): - args = [] - args.extend(self.with_or_without("guile")) - args.append("--disable-nls") - return args - - def build(self, spec, prefix): - with working_dir(self.build_directory): - Executable(os.path.join(self.stage.source_path, "build.sh"))() + return [ + "--with-guile" if self.spec.satisfies("+guile") else "--without-guile", + "--disable-nls", + ] def install(self, spec, prefix): - with working_dir(self.build_directory): + configure = Executable(join_path(self.stage.source_path, "configure")) + build_sh = Executable(join_path(self.stage.source_path, "build.sh")) + with working_dir(self.build_directory, create=True): + configure(f"--prefix={prefix}", *self.configure_args()) + build_sh() os.mkdir(prefix.bin) install("make", prefix.bin) os.symlink("make", prefix.bin.gmake) From a42eb0d2bd6dcf3be33e67cbca57f2146d0f863b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 18 Oct 2023 23:16:05 +0200 Subject: [PATCH 257/806] unparse: also support generic type aliases (#40328) --- lib/spack/spack/util/unparse/unparser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/util/unparse/unparser.py b/lib/spack/spack/util/unparse/unparser.py index 932ab8d0205b03..8ca4cd57a3eaa8 100644 --- a/lib/spack/spack/util/unparse/unparser.py +++ b/lib/spack/spack/util/unparse/unparser.py @@ -1083,6 +1083,10 @@ def visit_MatchOr(self, node): def visit_TypeAlias(self, node): self.fill("type ") self.dispatch(node.name) + if node.type_params: + self.write("[") + interleave(lambda: self.write(", "), self.dispatch, node.type_params) + self.write("]") self.write(" = ") self.dispatch(node.value) From 67b8dd09130f77a9e9469e651fbec310a1d0a4ee Mon Sep 17 00:00:00 2001 From: Annop Wongwathanarat Date: Thu, 19 Oct 2023 01:07:40 +0100 Subject: [PATCH 258/806] acfl: add version 23.10 (#40510) --- .../repos/builtin/packages/acfl/package.py | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py index 2e7790a422a9f4..bbe476a0198770 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/package.py @@ -37,6 +37,40 @@ } _versions = { + "23.10": { + "RHEL-7": ( + "c3bd4df3e5f6c97369237b0067e0a421dceb9c167d73f22f3da87f5025258314", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_RHEL-7_aarch64.tar", + ), + "RHEL-8": ( + "2aea8890a0c0f60bbcc5ddb043d13bd7cd10501218b04cbeb19129449e7d7053", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_RHEL-8_aarch64.tar", + ), + "RHEL-9": ( + "6c5c63c701875da7e87c6362be189bcbfaad678c08b81ec91e1e0252a321fae7", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_RHEL-9_aarch64.tar", + ), + "SLES-15": ( + "e1e62544210bae495cd2503ef280a748fda637c373f1eb76f5ff30c9ec92c4c1", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_SLES-15_aarch64.tar", + ), + "Ubuntu-20.04": ( + "83dce8ea03de3b9b937ecfc611961a8e4d15eba4c267a4e47e22a876e403da96", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_Ubuntu-20.04_aarch64.tar", + ), + "Ubuntu-22.04": ( + "3354f0ab73856a8a5cd99364cbec7a6b22621701790cb36c3e5f756b363e6d43", + "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", + ), + "AmazonLinux-2": ( + "ee4fa47246f16323d05d91135ef70a8c355ff60209307754b8532b5744d9cfe9", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_AmazonLinux-2_aarch64.tar", + ), + "AmazonLinux-2023": ( + "640487dfc7ab6eca48b448264013c9aa972b84af9f0c6fc8734fa5e8dc008e43", + "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_AmazonLinux-2023_aarch64.tar", + ), + }, "23.04.1": { "RHEL-7": ( "5e84daaf0510f73c235723112f9241bbd744ed89eb4f70f089bac05cf2aad2c4", @@ -200,7 +234,7 @@ class Acfl(Package): """ 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-04-1/arm-compiler-for-linux_23.04.1_Ubuntu-22.04_aarch64.tar" + 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("annop-w") From 5bbf8454d0ef4817daa2f15d0216c26aa9e555f5 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 19 Oct 2023 09:09:45 +0200 Subject: [PATCH 259/806] julia: Fix build for @1.9 (#39045) julia@1.9 tries to download ittapi, which requires cmake. Disable it explicitly. --- var/spack/repos/builtin/packages/julia/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 1730f1960baafc..99e71f0b9a63f3 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -318,6 +318,8 @@ def edit(self, spec, prefix): "JULIA_PRECOMPILE:={0}".format("1" if spec.variants["precompile"].value else "0"), # we want to use `patchelf --add-rpath` instead of `patchelf --set-rpath` "override PATCHELF_SET_RPATH_ARG:=--add-rpath", # @1.9: + # Otherwise, Julia tries to download and build ittapi + "USE_INTEL_JITEVENTS:=0", # @1.9: ] options.append("USEGCC:={}".format("1" if "%gcc" in spec else "0")) From e417ca54a0b69f604af4c1cf4af73680e4489d68 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 19 Oct 2023 00:55:06 -0700 Subject: [PATCH 260/806] busybox: respect compiler choice (#39239) --- var/spack/repos/builtin/packages/busybox/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/busybox/package.py b/var/spack/repos/builtin/packages/busybox/package.py index 4b74b34611d5a1..a71e28907fae8b 100644 --- a/var/spack/repos/builtin/packages/busybox/package.py +++ b/var/spack/repos/builtin/packages/busybox/package.py @@ -22,8 +22,8 @@ class Busybox(MakefilePackage): def build(self, spec, prefix): make("defconfig") - make() + make("CC={0}".format(spack_cc)) def install(self, spec, prefix): - make("install") + make("install", "CC={0}".format(spack_cc)) install_tree(".", prefix) From b68a620fc282c6a466ace08ceb274a7408980a87 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 19 Oct 2023 00:55:57 -0700 Subject: [PATCH 261/806] bioawk: respect compiler choice (#39241) --- var/spack/repos/builtin/packages/bioawk/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/bioawk/package.py b/var/spack/repos/builtin/packages/bioawk/package.py index 57d0c629eb40c7..6754a660b1c036 100644 --- a/var/spack/repos/builtin/packages/bioawk/package.py +++ b/var/spack/repos/builtin/packages/bioawk/package.py @@ -22,6 +22,9 @@ class Bioawk(MakefilePackage): parallel = False + def build(self, spec, prefix): + make("CC={0}".format(spack_cc)) + def install(self, spec, prefix): mkdirp(prefix.bin) install("bioawk", prefix.bin) From cc47b06756c0dbbf0c34f49305351c8e77342231 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 19 Oct 2023 00:58:58 -0700 Subject: [PATCH 262/806] connect-proxy: respect compiler choice (#39243) --- var/spack/repos/builtin/packages/connect-proxy/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/connect-proxy/package.py b/var/spack/repos/builtin/packages/connect-proxy/package.py index 2ddcffb8b22a9d..e1fbb1391b78e5 100644 --- a/var/spack/repos/builtin/packages/connect-proxy/package.py +++ b/var/spack/repos/builtin/packages/connect-proxy/package.py @@ -17,6 +17,9 @@ class ConnectProxy(MakefilePackage): version("1.105", sha256="07366026b1f81044ecd8da9b5b5b51321327ecdf6ba23576271a311bbd69d403") + def build(self, spec, prefix): + make("CC={0}".format(spack_cc)) + def install(self, spec, prefix): mkdir(prefix.bin) install("connect", prefix.bin) From fb584853ddc691c7015846d0d0d11b3d1c882419 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 19 Oct 2023 01:20:34 -0700 Subject: [PATCH 263/806] byte-unixbench: respect compiler choice (#39242) Co-authored-by: Harmen Stoppels --- var/spack/repos/builtin/packages/byte-unixbench/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/byte-unixbench/package.py b/var/spack/repos/builtin/packages/byte-unixbench/package.py index cb90ea5611676c..6cd3ec223bd6ec 100644 --- a/var/spack/repos/builtin/packages/byte-unixbench/package.py +++ b/var/spack/repos/builtin/packages/byte-unixbench/package.py @@ -16,6 +16,10 @@ class ByteUnixbench(MakefilePackage): build_directory = "UnixBench" + @property + def build_targets(self): + return [f"CC={spack_cc}"] + def install(self, spec, prefix): with working_dir(self.build_directory): install_tree(".", prefix) From 4f49f7b9df1cc60a8bb5b4279362175546209772 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Thu, 19 Oct 2023 05:03:54 -0700 Subject: [PATCH 264/806] Stand-alone test feature deprecation postponed to v0.22 (#40600) --- lib/spack/spack/package_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index 37a08e074b4300..416b16cefc0621 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -1157,7 +1157,7 @@ def install_test_root(self): """Return the install test root directory.""" tty.warn( "The 'pkg.install_test_root' property is deprecated with removal " - "expected v0.21. Use 'install_test_root(pkg)' instead." + "expected v0.22. Use 'install_test_root(pkg)' instead." ) return install_test_root(self) @@ -1829,7 +1829,7 @@ def cache_extra_test_sources(self, srcs): """ msg = ( "'pkg.cache_extra_test_sources(srcs) is deprecated with removal " - "expected in v0.21. Use 'cache_extra_test_sources(pkg, srcs)' " + "expected in v0.22. Use 'cache_extra_test_sources(pkg, srcs)' " "instead." ) warnings.warn(msg) From a1ca1a944aa27849704c525e912947a7699aab39 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 19 Oct 2023 16:00:45 +0200 Subject: [PATCH 265/806] ASP-based solver: single Spec instance per dag hash (#39590) Reused specs used to be referenced directly into the built spec. This might cause issues like in issue 39570 where two objects in memory represent the same node, because two reused specs were loaded from different sources but referred to the same spec by DAG hash. The issue is solved by copying concrete specs to a dictionary keyed by dag hash. --- lib/spack/spack/solver/asp.py | 114 ++++++++++++++++++++++------- lib/spack/spack/test/concretize.py | 45 +++++++++++- 2 files changed, 127 insertions(+), 32 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index af0ddd67ae0138..eba1d8a3eb9fc9 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -13,7 +13,7 @@ import re import types import warnings -from typing import List, NamedTuple, Optional, Sequence, Tuple, Union +from typing import Dict, List, NamedTuple, Optional, Sequence, Tuple, Union import archspec.cpu @@ -971,6 +971,70 @@ def _model_has_cycles(self, models): return cycle_result.unsatisfiable +class ConcreteSpecsByHash(collections.abc.Mapping): + """Mapping containing concrete specs keyed by DAG hash. + + The mapping is ensured to be consistent, i.e. if a spec in the mapping has a dependency with + hash X, it is ensured to be the same object in memory as the spec keyed by X. + """ + + def __init__(self) -> None: + self.data: Dict[str, spack.spec.Spec] = {} + + def __getitem__(self, dag_hash: str) -> spack.spec.Spec: + return self.data[dag_hash] + + def add(self, spec: spack.spec.Spec) -> bool: + """Adds a new concrete spec to the mapping. Returns True if the spec was just added, + False if the spec was already in the mapping. + + Args: + spec: spec to be added + + Raises: + ValueError: if the spec is not concrete + """ + if not spec.concrete: + msg = ( + f"trying to store the non-concrete spec '{spec}' in a container " + f"that only accepts concrete" + ) + raise ValueError(msg) + + dag_hash = spec.dag_hash() + if dag_hash in self.data: + return False + + # Here we need to iterate on the input and rewire the copy. + self.data[spec.dag_hash()] = spec.copy(deps=False) + nodes_to_reconstruct = [spec] + + while nodes_to_reconstruct: + input_parent = nodes_to_reconstruct.pop() + container_parent = self.data[input_parent.dag_hash()] + + for edge in input_parent.edges_to_dependencies(): + input_child = edge.spec + container_child = self.data.get(input_child.dag_hash()) + # Copy children that don't exist yet + if container_child is None: + container_child = input_child.copy(deps=False) + self.data[input_child.dag_hash()] = container_child + nodes_to_reconstruct.append(input_child) + + # Rewire edges + container_parent.add_dependency_edge( + dependency_spec=container_child, depflag=edge.depflag, virtuals=edge.virtuals + ) + return True + + def __len__(self) -> int: + return len(self.data) + + def __iter__(self): + return iter(self.data) + + class SpackSolverSetup: """Class to set up and run a Spack concretization solve.""" @@ -994,9 +1058,7 @@ def __init__(self, tests=False): # (ID, CompilerSpec) -> dictionary of attributes self.compiler_info = collections.defaultdict(dict) - # hashes we've already added facts for - self.seen_hashes = set() - self.reusable_and_possible = {} + self.reusable_and_possible = ConcreteSpecsByHash() # id for dummy variables self._condition_id_counter = itertools.count() @@ -2318,25 +2380,29 @@ def define_variant_values(self): for pkg, variant, value in self.variant_values_from_specs: self.gen.fact(fn.pkg_fact(pkg, fn.variant_possible_value(variant, value))) - def _facts_from_concrete_spec(self, spec, possible): + def register_concrete_spec(self, spec, possible): # tell the solver about any installed packages that could # be dependencies (don't tell it about the others) - h = spec.dag_hash() - if spec.name in possible and h not in self.seen_hashes: - self.reusable_and_possible[h] = spec - try: - # Only consider installed packages for repo we know - spack.repo.PATH.get(spec) - except (spack.repo.UnknownNamespaceError, spack.repo.UnknownPackageError): - return + if spec.name not in possible: + return + + try: + # Only consider installed packages for repo we know + spack.repo.PATH.get(spec) + except (spack.repo.UnknownNamespaceError, spack.repo.UnknownPackageError) as e: + tty.debug(f"[REUSE] Issues when trying to reuse {spec.short_spec}: {str(e)}") + return + + self.reusable_and_possible.add(spec) + def concrete_specs(self): + """Emit facts for reusable specs""" + for h, spec in self.reusable_and_possible.items(): # this indicates that there is a spec like this installed self.gen.fact(fn.installed_hash(spec.name, h)) - # this describes what constraints it imposes on the solve self.impose(h, spec, body=True) self.gen.newline() - # Declare as possible parts of specs that are not in package.py # - Add versions to possible versions # - Add OS to possible OS's @@ -2347,15 +2413,12 @@ def _facts_from_concrete_spec(self, spec, possible): ) self.possible_oses.add(dep.os) - # add the hash to the one seen so far - self.seen_hashes.add(h) - def define_concrete_input_specs(self, specs, possible): # any concrete specs in the input spec list for input_spec in specs: for spec in input_spec.traverse(): if spec.concrete: - self._facts_from_concrete_spec(spec, possible) + self.register_concrete_spec(spec, possible) def setup( self, @@ -2422,14 +2485,13 @@ def setup( # get possible compilers self.possible_compilers = self.generate_possible_compilers(specs) - self.gen.h1("Concrete input spec definitions") + self.gen.h1("Reusable concrete specs") self.define_concrete_input_specs(specs, self.pkgs) - if reuse: - self.gen.h1("Reusable specs") self.gen.fact(fn.optimize_for_reuse()) for reusable_spec in reuse: - self._facts_from_concrete_spec(reusable_spec, self.pkgs) + self.register_concrete_spec(reusable_spec, self.pkgs) + self.concrete_specs() self.gen.h1("Generic statements on possible packages") node_counter.possible_packages_facts(self.gen, fn) @@ -2620,7 +2682,6 @@ def __init__(self, specs, hash_lookup=None): self._specs = {} self._result = None self._command_line_specs = specs - self._hash_specs = [] self._flag_sources = collections.defaultdict(lambda: set()) self._flag_compiler_defaults = set() @@ -2631,7 +2692,6 @@ def __init__(self, specs, hash_lookup=None): def hash(self, node, h): if node not in self._specs: self._specs[node] = self._hash_lookup[h] - self._hash_specs.append(node) def node(self, node): if node not in self._specs: @@ -2869,12 +2929,10 @@ def build_specs(self, function_tuples): # fix flags after all specs are constructed self.reorder_flags() - # cycle detection - roots = [spec.root for spec in self._specs.values() if not spec.root.installed] - # inject patches -- note that we' can't use set() to unique the # roots here, because the specs aren't complete, and the hash # function will loop forever. + roots = [spec.root for spec in self._specs.values() if not spec.root.installed] roots = dict((id(r), r) for r in roots) for root in roots.values(): spack.spec.Spec.inject_patches_variant(root) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 53f9c64d5e8e48..48334e70a169e1 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -1170,7 +1170,7 @@ def test_external_package_versions(self, spec_str, is_external, expected): ) @pytest.mark.parametrize("mock_db", [True, False]) def test_reuse_does_not_overwrite_dev_specs( - self, dev_first, spec, mock_db, tmpdir, monkeypatch + self, dev_first, spec, mock_db, tmpdir, temporary_store, monkeypatch ): """Test that reuse does not mix dev specs with non-dev specs. @@ -1182,8 +1182,7 @@ def test_reuse_does_not_overwrite_dev_specs( # dev and non-dev specs that are otherwise identical spec = Spec(spec) dev_spec = spec.copy() - dev_constraint = "dev_path=%s" % tmpdir.strpath - dev_spec["dev-build-test-install"].constrain(dev_constraint) + dev_spec["dev-build-test-install"].constrain(f"dev_path={tmpdir.strpath}") # run the test in both orders first_spec = dev_spec if dev_first else spec @@ -1196,7 +1195,7 @@ def mock_fn(*args, **kwargs): return [first_spec] if mock_db: - monkeypatch.setattr(spack.store.STORE.db, "query", mock_fn) + temporary_store.db.add(first_spec, None) else: monkeypatch.setattr(spack.binary_distribution, "update_cache_and_get_specs", mock_fn) @@ -2112,6 +2111,24 @@ def test_dont_define_new_version_from_input_if_checksum_required(self, working_e # when checksums are required Spec("a@=3.0").concretized() + @pytest.mark.regression("39570") + @pytest.mark.db + def test_reuse_python_from_cli_and_extension_from_db(self, mutable_database): + """Tests that reusing python with and explicit request on the command line, when the spec + also reuses a python extension from the DB, doesn't fail. + """ + s = Spec("py-extension1").concretized() + python_hash = s["python"].dag_hash() + s.package.do_install(fake=True, explicit=True) + + with spack.config.override("concretizer:reuse", True): + with_reuse = Spec(f"py-extension2 ^/{python_hash}").concretized() + + with spack.config.override("concretizer:reuse", False): + without_reuse = Spec("py-extension2").concretized() + + assert with_reuse.dag_hash() == without_reuse.dag_hash() + @pytest.fixture() def duplicates_test_repository(): @@ -2246,3 +2263,23 @@ def test_pure_build_virtual_dependency(self, strategy): def test_drop_moving_targets(v_str, v_opts, checksummed): v = Version(v_str) assert spack.solver.asp._is_checksummed_version((v, v_opts)) == checksummed + + +class TestConcreteSpecsByHash: + """Tests the container of concrete specs""" + + @pytest.mark.parametrize("input_specs", [["a"], ["a foobar=bar", "b"], ["a foobar=baz", "b"]]) + def test_adding_specs(self, input_specs, default_mock_concretization): + """Tests that concrete specs in the container are equivalent, but stored as different + objects in memory. + """ + container = spack.solver.asp.ConcreteSpecsByHash() + input_specs = [Spec(s).concretized() for s in input_specs] + for s in input_specs: + container.add(s) + + for root in input_specs: + for node in root.traverse(root=True): + assert node == container[node.dag_hash()] + assert node.dag_hash() in container + assert node is not container[node.dag_hash()] From 681639985ab047d34f9ceae1e0dccfdb22af449c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 19 Oct 2023 16:11:42 +0200 Subject: [PATCH 266/806] ci: remove incorrect compilers.yaml (#40610) --- .../configs/darwin/aarch64/compilers.yaml | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 share/spack/gitlab/cloud_pipelines/configs/darwin/aarch64/compilers.yaml diff --git a/share/spack/gitlab/cloud_pipelines/configs/darwin/aarch64/compilers.yaml b/share/spack/gitlab/cloud_pipelines/configs/darwin/aarch64/compilers.yaml deleted file mode 100644 index d5a0130341e246..00000000000000 --- a/share/spack/gitlab/cloud_pipelines/configs/darwin/aarch64/compilers.yaml +++ /dev/null @@ -1,27 +0,0 @@ -compilers: -- compiler: - spec: apple-clang@14.0.0 - paths: - cc: /usr/bin/clang - cxx: /usr/bin/clang++ - f77: /opt/homebrew/bin/gfortran - fc: /opt/homebrew/bin/gfortran - flags: {} - operating_system: ventura - target: aarch64 - modules: [] - environment: {} - extra_rpaths: [] -- compiler: - spec: gcc@12.2.0 - paths: - cc: /opt/homebrew/bin/gcc-12 - cxx: /opt/homebrew/bin/g++-12 - f77: /opt/homebrew/bin/gfortran-12 - fc: /opt/homebrew/bin/gfortran-12 - flags: {} - operating_system: ventura - target: aarch64 - modules: [] - environment: {} - extra_rpaths: [] From b2d3e01fe60bdcbac03e657da58bb41f3a6c5624 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 19 Oct 2023 09:31:02 -0500 Subject: [PATCH 267/806] petsc: add variant +sycl (#40562) * petsc: add variant +sycl * petsc: add in gmake as dependency - so that consistent make gets used between petsc and slepc builds [that can have different env for each of the builds] --- .../repos/builtin/packages/petsc/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 9d0d3a9016aa59..2f258edc17a183 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -87,6 +87,7 @@ class Petsc(Package, CudaPackage, ROCmPackage): variant("double", default=True, description="Switches between single and double precision") variant("complex", default=False, description="Build with complex numbers") variant("debug", default=False, description="Compile in debug mode") + variant("sycl", default=False, description="Enable sycl build") variant("metis", default=True, description="Activates support for metis and parmetis") variant( @@ -207,6 +208,8 @@ def check_fortran_compiler(self): patch("revert-3.18.0-ver-format-for-dealii.patch", when="@3.18.0") depends_on("diffutils", type="build") + # not listed as a "build" dependency - so that slepc build gets the same dependency + depends_on("gmake") # Virtual dependencies # Git repository needs sowing to build Fortran interface @@ -338,6 +341,9 @@ def check_fortran_compiler(self): when="+kokkos +rocm amdgpu_target=%s" % rocm_arch, ) + conflicts("~kokkos", when="+sycl", msg="+sycl requires +kokkos") + depends_on("kokkos+sycl", when="+sycl +kokkos") + phases = ["configure", "build", "install"] # Using the following tarballs @@ -434,6 +440,16 @@ def configure_options(self): else: options.append("--with-x=0") + if "+sycl" in spec: + sycl_compatible_compilers = ["icpx"] + if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers): + raise InstallError("PETSc's SYCL GPU Backend requires oneAPI CXX (icpx) compiler.") + options.append("--with-sycl=1") + options.append("--with-syclc=" + self.compiler.cxx) + options.append("SYCLPPFLAGS=-Wno-tautological-constant-compare") + else: + options.append("--with-sycl=0") + if "trilinos" in spec: if spec.satisfies("^trilinos+boost"): options.append("--with-boost=1") From 46c1a8e4c65d72c0ba68b6131c3b6a4d2fa3f9ff Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Thu, 19 Oct 2023 10:04:59 -0600 Subject: [PATCH 268/806] gitlab ci: Rework how mirrors are configured (#39939) Improve how mirrors are used in gitlab ci, where we have until now thought of them as only a string. By configuring ci mirrors ahead of time using the proposed mirror templates, and by taking advantage of the expressiveness that spack now has for mirrors, this PR will allow us to easily switch the protocol/url we use for fetching binary dependencies. This change also deprecates some gitlab functionality and marks it for removal in Spack 0.23: - arguments to "spack ci generate": * --buildcache-destination * --copy-to - gitlab configuration options: * enable-artifacts-buildcache * temporary-storage-url-prefix --- lib/spack/docs/pipelines.rst | 10 ++ lib/spack/spack/ci.py | 126 ++++++++++++------ lib/spack/spack/cmd/ci.py | 74 +++++++--- lib/spack/spack/schema/ci.py | 2 + lib/spack/spack/test/ci.py | 6 +- lib/spack/spack/test/cmd/ci.py | 47 +++++++ .../gitlab/cloud_pipelines/.gitlab-ci.yml | 41 +++--- .../gitlab/cloud_pipelines/configs/ci.yaml | 20 +-- .../copy-only-protected-mirrors.yaml.in | 11 ++ .../configs/multi-src-mirrors.yaml.in | 16 +++ .../configs/single-src-pr-mirrors.yaml.in | 6 + .../single-src-protected-mirrors.yaml.in | 6 + .../stacks/aws-isc-aarch64/spack.yaml | 3 - .../cloud_pipelines/stacks/aws-isc/spack.yaml | 3 - .../stacks/aws-pcluster-icelake/spack.yaml | 2 - .../aws-pcluster-neoverse_n1/spack.yaml | 3 - .../aws-pcluster-neoverse_v1/spack.yaml | 3 - .../stacks/aws-pcluster-skylake/spack.yaml | 2 - .../stacks/build_systems/spack.yaml | 2 - .../stacks/data-vis-sdk/spack.yaml | 2 - .../stacks/e4s-cray-rhel/spack.yaml | 2 - .../stacks/e4s-cray-sles/spack.yaml | 2 - .../stacks/e4s-neoverse_v1/spack.yaml | 2 - .../stacks/e4s-oneapi/spack.yaml | 2 - .../stacks/e4s-power/spack.yaml | 2 - .../stacks/e4s-rocm-external/spack.yaml | 2 - .../cloud_pipelines/stacks/e4s/spack.yaml | 2 - .../stacks/gpu-tests/spack.yaml | 2 - .../stacks/ml-darwin-aarch64-mps/spack.yaml | 2 - .../stacks/ml-linux-x86_64-cpu/spack.yaml | 3 - .../stacks/ml-linux-x86_64-cuda/spack.yaml | 3 - .../stacks/ml-linux-x86_64-rocm/spack.yaml | 3 - .../stacks/radiuss-aws-aarch64/spack.yaml | 2 - .../stacks/radiuss-aws/spack.yaml | 4 +- .../cloud_pipelines/stacks/radiuss/spack.yaml | 3 - .../stacks/tutorial/spack.yaml | 2 - 36 files changed, 273 insertions(+), 150 deletions(-) create mode 100644 share/spack/gitlab/cloud_pipelines/configs/copy-only-protected-mirrors.yaml.in create mode 100644 share/spack/gitlab/cloud_pipelines/configs/multi-src-mirrors.yaml.in create mode 100644 share/spack/gitlab/cloud_pipelines/configs/single-src-pr-mirrors.yaml.in create mode 100644 share/spack/gitlab/cloud_pipelines/configs/single-src-protected-mirrors.yaml.in diff --git a/lib/spack/docs/pipelines.rst b/lib/spack/docs/pipelines.rst index d594879aab51dd..4ebe90fb0b6de4 100644 --- a/lib/spack/docs/pipelines.rst +++ b/lib/spack/docs/pipelines.rst @@ -213,6 +213,16 @@ pipeline jobs. ``spack ci generate`` ^^^^^^^^^^^^^^^^^^^^^ +Throughout this documentation, references to the "mirror" mean the target +mirror which is checked for the presence of up-to-date specs, and where +any scheduled jobs should push built binary packages. In the past, this +defaulted to the mirror at index 0 in the mirror configs, and could be +overridden using the ``--buildcache-destination`` argument. Starting with +Spack 0.23, ``spack ci generate`` will require you to identify this mirror +by the name "buildcache-destination". While you can configure any number +of mirrors as sources for your pipelines, you will need to identify the +destination mirror by name. + Concretizes the specs in the active environment, stages them (as described in :ref:`staging_algorithm`), and writes the resulting ``.gitlab-ci.yml`` to disk. During concretization of the environment, ``spack ci generate`` also writes a diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index bf5aaa79a3fba6..fca28362540623 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -49,6 +49,7 @@ TEMP_STORAGE_MIRROR_NAME = "ci_temporary_mirror" SPACK_RESERVED_TAGS = ["public", "protected", "notary"] +# TODO: Remove this in Spack 0.23 SHARED_PR_MIRROR_URL = "s3://spack-binaries-prs/shared_pr_mirror" JOB_NAME_FORMAT = ( "{name}{@version} {/hash:7} {%compiler.name}{@compiler.version}{arch=architecture}" @@ -678,7 +679,7 @@ def generate_gitlab_ci_yaml( remote_mirror_override (str): Typically only needed when one spack.yaml is used to populate several mirrors with binaries, based on some criteria. Spack protected pipelines populate different mirrors based - on branch name, facilitated by this option. + on branch name, facilitated by this option. DEPRECATED """ with spack.concretize.disable_compiler_existence_check(): with env.write_transaction(): @@ -775,17 +776,39 @@ def generate_gitlab_ci_yaml( "instead.", ) - if "mirrors" not in yaml_root or len(yaml_root["mirrors"].values()) < 1: - tty.die("spack ci generate requires an env containing a mirror") + pipeline_mirrors = spack.mirror.MirrorCollection(binary=True) + deprecated_mirror_config = False + buildcache_destination = None + if "buildcache-destination" in pipeline_mirrors: + if remote_mirror_override: + tty.die( + "Using the deprecated --buildcache-destination cli option and " + "having a mirror named 'buildcache-destination' at the same time " + "is not allowed" + ) + buildcache_destination = pipeline_mirrors["buildcache-destination"] + else: + deprecated_mirror_config = True + # TODO: This will be an error in Spack 0.23 - ci_mirrors = yaml_root["mirrors"] - mirror_urls = [url for url in ci_mirrors.values()] - remote_mirror_url = mirror_urls[0] + # TODO: Remove this block in spack 0.23 + remote_mirror_url = None + if deprecated_mirror_config: + if "mirrors" not in yaml_root or len(yaml_root["mirrors"].values()) < 1: + tty.die("spack ci generate requires an env containing a mirror") + + ci_mirrors = yaml_root["mirrors"] + mirror_urls = [url for url in ci_mirrors.values()] + remote_mirror_url = mirror_urls[0] spack_buildcache_copy = os.environ.get("SPACK_COPY_BUILDCACHE", None) if spack_buildcache_copy: buildcache_copies = {} - buildcache_copy_src_prefix = remote_mirror_override or remote_mirror_url + buildcache_copy_src_prefix = ( + buildcache_destination.fetch_url + if buildcache_destination + else remote_mirror_override or remote_mirror_url + ) buildcache_copy_dest_prefix = spack_buildcache_copy # Check for a list of "known broken" specs that we should not bother @@ -797,6 +820,7 @@ def generate_gitlab_ci_yaml( enable_artifacts_buildcache = False if "enable-artifacts-buildcache" in ci_config: + tty.warn("Support for enable-artifacts-buildcache will be removed in Spack 0.23") enable_artifacts_buildcache = ci_config["enable-artifacts-buildcache"] rebuild_index_enabled = True @@ -805,13 +829,15 @@ def generate_gitlab_ci_yaml( temp_storage_url_prefix = None if "temporary-storage-url-prefix" in ci_config: + tty.warn("Support for temporary-storage-url-prefix will be removed in Spack 0.23") temp_storage_url_prefix = ci_config["temporary-storage-url-prefix"] # If a remote mirror override (alternate buildcache destination) was # specified, add it here in case it has already built hashes we might # generate. + # TODO: Remove this block in Spack 0.23 mirrors_to_check = None - if remote_mirror_override: + if deprecated_mirror_config and remote_mirror_override: if spack_pipeline_type == "spack_protected_branch": # Overriding the main mirror in this case might result # in skipping jobs on a release pipeline because specs are @@ -831,8 +857,9 @@ def generate_gitlab_ci_yaml( cfg.default_modify_scope(), ) + # TODO: Remove this block in Spack 0.23 shared_pr_mirror = None - if spack_pipeline_type == "spack_pull_request": + if deprecated_mirror_config and spack_pipeline_type == "spack_pull_request": stack_name = os.environ.get("SPACK_CI_STACK_NAME", "") shared_pr_mirror = url_util.join(SHARED_PR_MIRROR_URL, stack_name) spack.mirror.add( @@ -884,6 +911,7 @@ def generate_gitlab_ci_yaml( job_log_dir = os.path.join(pipeline_artifacts_dir, "logs") job_repro_dir = os.path.join(pipeline_artifacts_dir, "reproduction") job_test_dir = os.path.join(pipeline_artifacts_dir, "tests") + # TODO: Remove this line in Spack 0.23 local_mirror_dir = os.path.join(pipeline_artifacts_dir, "mirror") user_artifacts_dir = os.path.join(pipeline_artifacts_dir, "user_data") @@ -898,11 +926,11 @@ def generate_gitlab_ci_yaml( rel_job_log_dir = os.path.relpath(job_log_dir, ci_project_dir) rel_job_repro_dir = os.path.relpath(job_repro_dir, ci_project_dir) rel_job_test_dir = os.path.relpath(job_test_dir, ci_project_dir) + # TODO: Remove this line in Spack 0.23 rel_local_mirror_dir = os.path.join(local_mirror_dir, ci_project_dir) rel_user_artifacts_dir = os.path.relpath(user_artifacts_dir, ci_project_dir) # Speed up staging by first fetching binary indices from all mirrors - # (including the override mirror we may have just added above). try: bindist.binary_index.update() except bindist.FetchCacheError as e: @@ -1113,6 +1141,7 @@ def main_script_replacements(cmd): }, ) + # TODO: Remove this block in Spack 0.23 if enable_artifacts_buildcache: bc_root = os.path.join(local_mirror_dir, "build_cache") job_object["artifacts"]["paths"].extend( @@ -1142,10 +1171,12 @@ def main_script_replacements(cmd): _print_staging_summary(spec_labels, stages, mirrors_to_check, rebuild_decisions) # Clean up remote mirror override if enabled - if remote_mirror_override: - spack.mirror.remove("ci_pr_mirror", cfg.default_modify_scope()) - if spack_pipeline_type == "spack_pull_request": - spack.mirror.remove("ci_shared_pr_mirror", cfg.default_modify_scope()) + # TODO: Remove this block in Spack 0.23 + if deprecated_mirror_config: + if remote_mirror_override: + spack.mirror.remove("ci_pr_mirror", cfg.default_modify_scope()) + if spack_pipeline_type == "spack_pull_request": + spack.mirror.remove("ci_shared_pr_mirror", cfg.default_modify_scope()) tty.debug("{0} build jobs generated in {1} stages".format(job_id, stage_id)) @@ -1176,10 +1207,28 @@ def main_script_replacements(cmd): sync_job["needs"] = [ {"job": generate_job_name, "pipeline": "{0}".format(parent_pipeline_id)} ] + + if "variables" not in sync_job: + sync_job["variables"] = {} + + sync_job["variables"]["SPACK_COPY_ONLY_DESTINATION"] = ( + buildcache_destination.fetch_url + if buildcache_destination + else remote_mirror_override or remote_mirror_url + ) + + if "buildcache-source" in pipeline_mirrors: + buildcache_source = pipeline_mirrors["buildcache-source"].fetch_url + else: + # TODO: Remove this condition in Spack 0.23 + buildcache_source = os.environ.get("SPACK_SOURCE_MIRROR", None) + sync_job["variables"]["SPACK_BUILDCACHE_SOURCE"] = buildcache_source + output_object["copy"] = sync_job job_id += 1 if job_id > 0: + # TODO: Remove this block in Spack 0.23 if temp_storage_url_prefix: # There were some rebuild jobs scheduled, so we will need to # schedule a job to clean up the temporary storage location @@ -1213,6 +1262,13 @@ def main_script_replacements(cmd): signing_job["when"] = "always" signing_job["retry"] = {"max": 2, "when": ["always"]} signing_job["interruptible"] = True + if "variables" not in signing_job: + signing_job["variables"] = {} + signing_job["variables"]["SPACK_BUILDCACHE_DESTINATION"] = ( + buildcache_destination.push_url # need the s3 url for aws s3 sync + if buildcache_destination + else remote_mirror_override or remote_mirror_url + ) output_object["sign-pkgs"] = signing_job @@ -1221,13 +1277,13 @@ def main_script_replacements(cmd): stage_names.append("stage-rebuild-index") final_job = spack_ci_ir["jobs"]["reindex"]["attributes"] - index_target_mirror = mirror_urls[0] - if remote_mirror_override: - index_target_mirror = remote_mirror_override final_job["stage"] = "stage-rebuild-index" + target_mirror = remote_mirror_override or remote_mirror_url + if buildcache_destination: + target_mirror = buildcache_destination.push_url final_job["script"] = _unpack_script( final_job["script"], - op=lambda cmd: cmd.replace("{index_target_mirror}", index_target_mirror), + op=lambda cmd: cmd.replace("{index_target_mirror}", target_mirror), ) final_job["when"] = "always" @@ -1249,20 +1305,24 @@ def main_script_replacements(cmd): "SPACK_CONCRETE_ENV_DIR": rel_concrete_env_dir, "SPACK_VERSION": spack_version, "SPACK_CHECKOUT_VERSION": version_to_clone, + # TODO: Remove this line in Spack 0.23 "SPACK_REMOTE_MIRROR_URL": remote_mirror_url, "SPACK_JOB_LOG_DIR": rel_job_log_dir, "SPACK_JOB_REPRO_DIR": rel_job_repro_dir, "SPACK_JOB_TEST_DIR": rel_job_test_dir, + # TODO: Remove this line in Spack 0.23 "SPACK_LOCAL_MIRROR_DIR": rel_local_mirror_dir, "SPACK_PIPELINE_TYPE": str(spack_pipeline_type), "SPACK_CI_STACK_NAME": os.environ.get("SPACK_CI_STACK_NAME", "None"), + # TODO: Remove this line in Spack 0.23 "SPACK_CI_SHARED_PR_MIRROR_URL": shared_pr_mirror or "None", "SPACK_REBUILD_CHECK_UP_TO_DATE": str(prune_dag), "SPACK_REBUILD_EVERYTHING": str(rebuild_everything), "SPACK_REQUIRE_SIGNING": os.environ.get("SPACK_REQUIRE_SIGNING", "False"), } - if remote_mirror_override: + # TODO: Remove this block in Spack 0.23 + if deprecated_mirror_config and remote_mirror_override: (output_object["variables"]["SPACK_REMOTE_MIRROR_OVERRIDE"]) = remote_mirror_override spack_stack_name = os.environ.get("SPACK_CI_STACK_NAME", None) @@ -2002,43 +2062,23 @@ def process_command(name, commands, repro_dir, run=True, exit_on_failure=True): def create_buildcache( - input_spec: spack.spec.Spec, - *, - pipeline_mirror_url: Optional[str] = None, - buildcache_mirror_url: Optional[str] = None, - sign_binaries: bool = False, + input_spec: spack.spec.Spec, *, destination_mirror_urls: List[str], sign_binaries: bool = False ) -> List[PushResult]: """Create the buildcache at the provided mirror(s). Arguments: input_spec: Installed spec to package and push - buildcache_mirror_url: URL for the buildcache mirror - pipeline_mirror_url: URL for the pipeline mirror + destination_mirror_urls: List of urls to push to sign_binaries: Whether or not to sign buildcache entry Returns: A list of PushResults, indicating success or failure. """ results = [] - # Create buildcache in either the main remote mirror, or in the - # per-PR mirror, if this is a PR pipeline - if buildcache_mirror_url: - results.append( - PushResult( - success=push_mirror_contents(input_spec, buildcache_mirror_url, sign_binaries), - url=buildcache_mirror_url, - ) - ) - - # Create another copy of that buildcache in the per-pipeline - # temporary storage mirror (this is only done if either - # artifacts buildcache is enabled or a temporary storage url - # prefix is set) - if pipeline_mirror_url: + for mirror_url in destination_mirror_urls: results.append( PushResult( - success=push_mirror_contents(input_spec, pipeline_mirror_url, sign_binaries), - url=pipeline_mirror_url, + success=push_mirror_contents(input_spec, mirror_url, sign_binaries), url=mirror_url ) ) diff --git a/lib/spack/spack/cmd/ci.py b/lib/spack/spack/cmd/ci.py index cf2ee11c044b40..6c573193026fbf 100644 --- a/lib/spack/spack/cmd/ci.py +++ b/lib/spack/spack/cmd/ci.py @@ -191,6 +191,14 @@ def ci_generate(args): """ env = spack.cmd.require_active_env(cmd_name="ci generate") + if args.copy_to: + tty.warn("The flag --copy-to is deprecated and will be removed in Spack 0.23") + + if args.buildcache_destination: + tty.warn( + "The flag --buildcache-destination is deprecated and will be removed in Spack 0.23" + ) + output_file = args.output_file copy_yaml_to = args.copy_to run_optimizer = args.optimize @@ -264,12 +272,6 @@ def ci_rebuild(args): if not ci_config: tty.die("spack ci rebuild requires an env containing ci cfg") - tty.msg( - "SPACK_BUILDCACHE_DESTINATION={0}".format( - os.environ.get("SPACK_BUILDCACHE_DESTINATION", None) - ) - ) - # Grab the environment variables we need. These either come from the # pipeline generation step ("spack ci generate"), where they were written # out as variables, or else provided by GitLab itself. @@ -277,6 +279,7 @@ def ci_rebuild(args): job_log_dir = os.environ.get("SPACK_JOB_LOG_DIR") job_test_dir = os.environ.get("SPACK_JOB_TEST_DIR") repro_dir = os.environ.get("SPACK_JOB_REPRO_DIR") + # TODO: Remove this in Spack 0.23 local_mirror_dir = os.environ.get("SPACK_LOCAL_MIRROR_DIR") concrete_env_dir = os.environ.get("SPACK_CONCRETE_ENV_DIR") ci_pipeline_id = os.environ.get("CI_PIPELINE_ID") @@ -285,9 +288,12 @@ def ci_rebuild(args): job_spec_pkg_name = os.environ.get("SPACK_JOB_SPEC_PKG_NAME") job_spec_dag_hash = os.environ.get("SPACK_JOB_SPEC_DAG_HASH") spack_pipeline_type = os.environ.get("SPACK_PIPELINE_TYPE") + # TODO: Remove this in Spack 0.23 remote_mirror_override = os.environ.get("SPACK_REMOTE_MIRROR_OVERRIDE") + # TODO: Remove this in Spack 0.23 remote_mirror_url = os.environ.get("SPACK_REMOTE_MIRROR_URL") spack_ci_stack_name = os.environ.get("SPACK_CI_STACK_NAME") + # TODO: Remove this in Spack 0.23 shared_pr_mirror_url = os.environ.get("SPACK_CI_SHARED_PR_MIRROR_URL") rebuild_everything = os.environ.get("SPACK_REBUILD_EVERYTHING") require_signing = os.environ.get("SPACK_REQUIRE_SIGNING") @@ -344,21 +350,36 @@ def ci_rebuild(args): full_rebuild = True if rebuild_everything and rebuild_everything.lower() == "true" else False + pipeline_mirrors = spack.mirror.MirrorCollection(binary=True) + deprecated_mirror_config = False + buildcache_destination = None + if "buildcache-destination" in pipeline_mirrors: + buildcache_destination = pipeline_mirrors["buildcache-destination"] + else: + deprecated_mirror_config = True + # TODO: This will be an error in Spack 0.23 + # If no override url exists, then just push binary package to the # normal remote mirror url. + # TODO: Remove in Spack 0.23 buildcache_mirror_url = remote_mirror_override or remote_mirror_url + if buildcache_destination: + buildcache_mirror_url = buildcache_destination.push_url # Figure out what is our temporary storage mirror: Is it artifacts # buildcache? Or temporary-storage-url-prefix? In some cases we need to # force something or pipelines might not have a way to propagate build # artifacts from upstream to downstream jobs. + # TODO: Remove this in Spack 0.23 pipeline_mirror_url = None + # TODO: Remove this in Spack 0.23 temp_storage_url_prefix = None if "temporary-storage-url-prefix" in ci_config: temp_storage_url_prefix = ci_config["temporary-storage-url-prefix"] pipeline_mirror_url = url_util.join(temp_storage_url_prefix, ci_pipeline_id) + # TODO: Remove this in Spack 0.23 enable_artifacts_mirror = False if "enable-artifacts-buildcache" in ci_config: enable_artifacts_mirror = ci_config["enable-artifacts-buildcache"] @@ -454,12 +475,14 @@ def ci_rebuild(args): # If we decided there should be a temporary storage mechanism, add that # mirror now so it's used when we check for a hash match already # built for this spec. + # TODO: Remove this block in Spack 0.23 if pipeline_mirror_url: mirror = spack.mirror.Mirror(pipeline_mirror_url, name=spack_ci.TEMP_STORAGE_MIRROR_NAME) spack.mirror.add(mirror, cfg.default_modify_scope()) pipeline_mirrors.append(pipeline_mirror_url) # Check configured mirrors for a built spec with a matching hash + # TODO: Remove this block in Spack 0.23 mirrors_to_check = None if remote_mirror_override: if spack_pipeline_type == "spack_protected_branch": @@ -477,7 +500,8 @@ def ci_rebuild(args): ) pipeline_mirrors.append(remote_mirror_override) - if spack_pipeline_type == "spack_pull_request": + # TODO: Remove this in Spack 0.23 + if deprecated_mirror_config and spack_pipeline_type == "spack_pull_request": if shared_pr_mirror_url != "None": pipeline_mirrors.append(shared_pr_mirror_url) @@ -499,6 +523,7 @@ def ci_rebuild(args): tty.msg("No need to rebuild {0}, found hash match at: ".format(job_spec_pkg_name)) for match in matches: tty.msg(" {0}".format(match["mirror_url"])) + # TODO: Remove this block in Spack 0.23 if enable_artifacts_mirror: matching_mirror = matches[0]["mirror_url"] build_cache_dir = os.path.join(local_mirror_dir, "build_cache") @@ -513,7 +538,8 @@ def ci_rebuild(args): # only want to keep the mirror being used by the current pipeline as it's binary # package destination. This ensures that the when we rebuild everything, we only # consume binary dependencies built in this pipeline. - if full_rebuild: + # TODO: Remove this in Spack 0.23 + if deprecated_mirror_config and full_rebuild: spack_ci.remove_other_mirrors(pipeline_mirrors, cfg.default_modify_scope()) # No hash match anywhere means we need to rebuild spec @@ -678,21 +704,25 @@ def ci_rebuild(args): # print out some instructions on how to reproduce this build failure # outside of the pipeline environment. if install_exit_code == 0: - if buildcache_mirror_url or pipeline_mirror_url: - for result in spack_ci.create_buildcache( - input_spec=job_spec, - buildcache_mirror_url=buildcache_mirror_url, - pipeline_mirror_url=pipeline_mirror_url, - sign_binaries=spack_ci.can_sign_binaries(), - ): - msg = tty.msg if result.success else tty.warn - msg( - "{} {} to {}".format( - "Pushed" if result.success else "Failed to push", - job_spec.format("{name}{@version}{/hash:7}", color=clr.get_color_when()), - result.url, - ) + mirror_urls = [buildcache_mirror_url] + + # TODO: Remove this block in Spack 0.23 + if pipeline_mirror_url: + mirror_urls.append(pipeline_mirror_url) + + for result in spack_ci.create_buildcache( + input_spec=job_spec, + destination_mirror_urls=mirror_urls, + sign_binaries=spack_ci.can_sign_binaries(), + ): + msg = tty.msg if result.success else tty.warn + msg( + "{} {} to {}".format( + "Pushed" if result.success else "Failed to push", + job_spec.format("{name}{@version}{/hash:7}", color=clr.get_color_when()), + result.url, ) + ) # If this is a develop pipeline, check if the spec that we just built is # on the broken-specs list. If so, remove it. diff --git a/lib/spack/spack/schema/ci.py b/lib/spack/spack/schema/ci.py index 92edf2f13968bc..9ba65b26820830 100644 --- a/lib/spack/spack/schema/ci.py +++ b/lib/spack/spack/schema/ci.py @@ -141,6 +141,7 @@ } ) +# TODO: Remove in Spack 0.23 ci_properties = { "anyOf": [ { @@ -166,6 +167,7 @@ properties = { "ci": { "oneOf": [ + # TODO: Replace with core-shared-properties in Spack 0.23 ci_properties, # Allow legacy format under `ci` for `config update ci` spack.schema.gitlab_ci.gitlab_ci_properties, diff --git a/lib/spack/spack/test/ci.py b/lib/spack/spack/test/ci.py index 1b9833894e20af..53ed8382520745 100644 --- a/lib/spack/spack/test/ci.py +++ b/lib/spack/spack/test/ci.py @@ -451,9 +451,7 @@ def test_ci_create_buildcache(tmpdir, working_env, config, mock_packages, monkey monkeypatch.setattr(spack.ci, "push_mirror_contents", lambda a, b, c: True) results = ci.create_buildcache( - None, - buildcache_mirror_url="file:///fake-url-one", - pipeline_mirror_url="file:///fake-url-two", + None, destination_mirror_urls=["file:///fake-url-one", "file:///fake-url-two"] ) assert len(results) == 2 @@ -463,7 +461,7 @@ def test_ci_create_buildcache(tmpdir, working_env, config, mock_packages, monkey assert result2.success assert result2.url == "file:///fake-url-two" - results = ci.create_buildcache(None, buildcache_mirror_url="file:///fake-url-one") + results = ci.create_buildcache(None, destination_mirror_urls=["file:///fake-url-one"]) assert len(results) == 1 assert results[0].success diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py index d02e1caa2dec74..84e9e66bf05576 100644 --- a/lib/spack/spack/test/cmd/ci.py +++ b/lib/spack/spack/test/cmd/ci.py @@ -2209,3 +2209,50 @@ def test_gitlab_config_scopes( assert all([t in rebuild_tags for t in ["spack", "service"]]) expected_vars = ["CI_JOB_SIZE", "KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST"] assert all([v in rebuild_vars for v in expected_vars]) + + +def test_ci_generate_mirror_config( + tmpdir, + mutable_mock_env_path, + install_mockery, + mock_packages, + monkeypatch, + ci_base_environment, + mock_binary_index, +): + """Make sure the correct mirror gets used as the buildcache destination""" + filename = str(tmpdir.join("spack.yaml")) + with open(filename, "w") as f: + f.write( + """\ +spack: + specs: + - archive-files + mirrors: + some-mirror: file:///this/is/a/source/mirror + buildcache-destination: file:///push/binaries/here + ci: + pipeline-gen: + - submapping: + - match: + - archive-files + build-job: + tags: + - donotcare + image: donotcare +""" + ) + + with tmpdir.as_cwd(): + env_cmd("create", "test", "./spack.yaml") + outputfile = str(tmpdir.join(".gitlab-ci.yml")) + + with ev.read("test"): + ci_cmd("generate", "--output-file", outputfile) + with open(outputfile) as of: + pipeline_doc = syaml.load(of.read()) + assert "rebuild-index" in pipeline_doc + reindex_job = pipeline_doc["rebuild-index"] + assert "script" in reindex_job + reindex_step = reindex_job["script"][0] + assert "file:///push/binaries/here" in reindex_step diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index b5e57e3e8429a6..905901ff295e5d 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -3,6 +3,12 @@ stages: [ "generate", "build", "publish" ] variables: SPACK_DISABLE_LOCAL_CONFIG: "1" SPACK_USER_CACHE_PATH: "${CI_PROJECT_DIR}/tmp/_user_cache/" + # PR_MIRROR_FETCH_DOMAIN: "https://binaries-prs.spack.io" + PR_MIRROR_FETCH_DOMAIN: "s3://spack-binaries-prs" + PR_MIRROR_PUSH_DOMAIN: "s3://spack-binaries-prs" + # PROTECTED_MIRROR_FETCH_DOMAIN: "https://binaries.spack.io" + PROTECTED_MIRROR_FETCH_DOMAIN: "s3://spack-binaries" + PROTECTED_MIRROR_PUSH_DOMAIN: "s3://spack-binaries" default: image: { "name": "ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18", "entrypoint": [""] } @@ -68,7 +74,9 @@ default: ######################################## .base-job: variables: - SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}" + PIPELINE_MIRROR_TEMPLATE: "single-src-protected-mirrors.yaml.in" + # TODO: We can remove this when we drop the "deprecated" stack + PUSH_BUILDCACHE_DEPRECATED: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}" rules: - if: $CI_COMMIT_REF_NAME == "develop" @@ -76,7 +84,7 @@ default: when: always variables: SPACK_PIPELINE_TYPE: "spack_protected_branch" - SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}" + SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}" SPACK_REQUIRE_SIGNING: "True" AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY} @@ -86,7 +94,7 @@ default: when: always variables: SPACK_PIPELINE_TYPE: "spack_protected_branch" - SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}" + SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}" SPACK_PRUNE_UNTOUCHED: "False" SPACK_PRUNE_UP_TO_DATE: "False" SPACK_REQUIRE_SIGNING: "True" @@ -98,8 +106,8 @@ default: when: always variables: SPACK_PIPELINE_TYPE: "spack_copy_only" - SPACK_SOURCE_MIRROR: "s3://spack-binaries/SPACK_REPLACE_VERSION/${SPACK_CI_STACK_NAME}" - SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}" + SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}" + PIPELINE_MIRROR_TEMPLATE: "copy-only-protected-mirrors.yaml.in" AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY} OIDC_TOKEN_AUDIENCE: "protected_binary_mirror" @@ -108,9 +116,16 @@ default: when: always variables: SPACK_PIPELINE_TYPE: "spack_pull_request" - SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries-prs/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}" + # TODO: We can remove this when we drop the "deprecated" stack + PUSH_BUILDCACHE_DEPRECATED: "${PR_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}" SPACK_PRUNE_UNTOUCHED: "True" SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH: "1" + # TODO: Change sync script to include target in branch name. Then we could + # TODO: have multiple types of "PR" pipeline here. It would be better if we could + # TODO: keep just this one and use a regex to capture the target branch, but so + # TODO: far gitlab doesn't support that. + PR_TARGET_REF_NAME: "develop" + PIPELINE_MIRROR_TEMPLATE: "multi-src-mirrors.yaml.in" AWS_ACCESS_KEY_ID: ${PR_MIRRORS_AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${PR_MIRRORS_AWS_SECRET_ACCESS_KEY} OIDC_TOKEN_AUDIENCE: "pr_binary_mirror" @@ -126,13 +141,15 @@ default: - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME} - spack env activate --without-view . - export SPACK_CI_CONFIG_ROOT="${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/configs" + - spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))" + < "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" + - spack config add -f "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" - spack --config-scope "${SPACK_CI_CONFIG_ROOT}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" ${CI_STACK_CONFIG_SCOPES} ci generate --check-index-only - --buildcache-destination "${SPACK_BUILDCACHE_DESTINATION}" --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir" --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml" after_script: @@ -182,7 +199,7 @@ default: - spack env activate --without-view . - spack ci generate --check-index-only - --buildcache-destination "${SPACK_BUILDCACHE_DESTINATION}" + --buildcache-destination "${PUSH_BUILDCACHE_DEPRECATED}" --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir" --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml" after_script: @@ -219,8 +236,7 @@ protected-publish: max: 2 when: ["runner_system_failure", "stuck_or_timeout_failure"] variables: - SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}" - SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}" + SPACK_COPY_BUILDCACHE: "${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}" SPACK_PIPELINE_TYPE: "spack_protected_branch" AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY} @@ -253,11 +269,6 @@ protected-publish: # you should inlclude your custom definitions at the end of the of the # extends list. # -# Also note that if extending .base-job, the mirror url given in your -# spack.yaml should take the form: -# -# s3://spack-binaries/develop/${SPACK_CI_STACK_NAME} -# ######################################## # My Super Cool Pipeline ######################################## diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index 5f7e904ba58bb3..9aad850b5df065 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -21,7 +21,8 @@ ci: - k=$CI_GPG_KEY_ROOT/intermediate_ci_signing_key.gpg; [[ -r $k ]] && spack gpg trust $k - k=$CI_GPG_KEY_ROOT/spack_public_key.gpg; [[ -r $k ]] && spack gpg trust $k script:: - - - spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) + - - spack config blame mirrors + - spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2) - - spack python ${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py --prefix /home/software/spack:${CI_PROJECT_DIR} --log install_times.json @@ -40,10 +41,10 @@ ci: image: { "name": "ghcr.io/spack/notary:latest", "entrypoint": [""] } tags: ["aws"] script: - - - aws s3 sync --exclude "*" --include "*spec.json*" ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache /tmp + - - aws s3 sync --exclude "*" --include "*spec.json*" ${SPACK_BUILDCACHE_DESTINATION}/build_cache /tmp - /sign.sh - - aws s3 sync --exclude "*" --include "*spec.json.sig*" /tmp ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache - - aws s3 cp /tmp/public_keys ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/_pgp --recursive --exclude "*" --include "*.pub" + - aws s3 sync --exclude "*" --include "*spec.json.sig*" /tmp ${SPACK_BUILDCACHE_DESTINATION}/build_cache + - aws s3 cp /tmp/public_keys ${SPACK_BUILDCACHE_DESTINATION}/build_cache/_pgp --recursive --exclude "*" --include "*.pub" id_tokens: GITLAB_OIDC_TOKEN: aud: "${OIDC_TOKEN_AUDIENCE}" @@ -54,14 +55,14 @@ ci: before_script: - - if [[ $CI_COMMIT_TAG == "v"* ]]; then export SPACK_REPLACE_VERSION=$(echo "$CI_COMMIT_TAG" | sed 's/\(v[[:digit:]]\+\.[[:digit:]]\+\).*/releases\/\1/'); fi - if [[ $CI_COMMIT_TAG == "develop-"* ]]; then export SPACK_REPLACE_VERSION=develop; fi - - export SPACK_BUILDCACHE_SOURCE=${SPACK_SOURCE_MIRROR//SPACK_REPLACE_VERSION/${SPACK_REPLACE_VERSION}} + - export SPACK_COPY_ONLY_SOURCE=${SPACK_BUILDCACHE_SOURCE//SPACK_REPLACE_VERSION/${SPACK_REPLACE_VERSION}} script: - - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR} - - echo Copying environment specs from ${SRC_MIRROR} to ${SPACK_BUILDCACHE_DESTINATION} - - spack buildcache sync "${SPACK_BUILDCACHE_SOURCE}" "${SPACK_BUILDCACHE_DESTINATION}" + - echo Copying environment specs from ${SPACK_COPY_ONLY_SOURCE} to ${SPACK_COPY_ONLY_DESTINATION} + - spack buildcache sync "${SPACK_COPY_ONLY_SOURCE}" "${SPACK_COPY_ONLY_DESTINATION}" - curl -fLsS https://spack.github.io/keys/spack-public-binary-key.pub -o /tmp/spack-public-binary-key.pub - - aws s3 cp /tmp/spack-public-binary-key.pub "${SPACK_BUILDCACHE_DESTINATION}/build_cache/_pgp/spack-public-binary-key.pub" - - spack buildcache update-index --keys "${SPACK_BUILDCACHE_DESTINATION}" + - aws s3 cp /tmp/spack-public-binary-key.pub "${SPACK_COPY_ONLY_DESTINATION}/build_cache/_pgp/spack-public-binary-key.pub" + - spack buildcache update-index --keys "${SPACK_COPY_ONLY_DESTINATION}" when: "always" retry: max: 2 @@ -89,6 +90,7 @@ ci: GITLAB_OIDC_TOKEN: aud: "${OIDC_TOKEN_AUDIENCE}" + # TODO: Remove this block in Spack 0.23 - cleanup-job: tags: ["service"] variables: diff --git a/share/spack/gitlab/cloud_pipelines/configs/copy-only-protected-mirrors.yaml.in b/share/spack/gitlab/cloud_pipelines/configs/copy-only-protected-mirrors.yaml.in new file mode 100644 index 00000000000000..39e5c733b236d2 --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/configs/copy-only-protected-mirrors.yaml.in @@ -0,0 +1,11 @@ +mirrors: + buildcache-source: + fetch: ${PROTECTED_MIRROR_FETCH_DOMAIN}/SPACK_REPLACE_VERSION/${SPACK_CI_STACK_NAME} + push: ${PROTECTED_MIRROR_PUSH_DOMAIN}/SPACK_REPLACE_VERSION/${SPACK_CI_STACK_NAME} + source: False + binary: True + buildcache-destination: + fetch: ${PROTECTED_MIRROR_FETCH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + push: ${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + source: False + binary: True diff --git a/share/spack/gitlab/cloud_pipelines/configs/multi-src-mirrors.yaml.in b/share/spack/gitlab/cloud_pipelines/configs/multi-src-mirrors.yaml.in new file mode 100644 index 00000000000000..0ad46d5fc9014f --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/configs/multi-src-mirrors.yaml.in @@ -0,0 +1,16 @@ +mirrors: + buildcache-source: + fetch: ${PROTECTED_MIRROR_FETCH_DOMAIN}/${PR_TARGET_REF_NAME}/${SPACK_CI_STACK_NAME} + push: ${PROTECTED_MIRROR_PUSH_DOMAIN}/${PR_TARGET_REF_NAME}/${SPACK_CI_STACK_NAME} + source: False + binary: True + buildcache-destination: + fetch: ${PR_MIRROR_FETCH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + push: ${PR_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + source: False + binary: True + buildcache-shared: + fetch: ${PR_MIRROR_FETCH_DOMAIN}/shared_pr_mirror/${SPACK_CI_STACK_NAME} + push: ${PR_MIRROR_PUSH_DOMAIN}/shared_pr_mirror/${SPACK_CI_STACK_NAME} + source: False + binary: True diff --git a/share/spack/gitlab/cloud_pipelines/configs/single-src-pr-mirrors.yaml.in b/share/spack/gitlab/cloud_pipelines/configs/single-src-pr-mirrors.yaml.in new file mode 100644 index 00000000000000..0a2775a4a27def --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/configs/single-src-pr-mirrors.yaml.in @@ -0,0 +1,6 @@ +mirrors: + buildcache-destination: + fetch: ${PR_MIRROR_FETCH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + push: ${PR_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + source: False + binary: True diff --git a/share/spack/gitlab/cloud_pipelines/configs/single-src-protected-mirrors.yaml.in b/share/spack/gitlab/cloud_pipelines/configs/single-src-protected-mirrors.yaml.in new file mode 100644 index 00000000000000..a55cd7273750ee --- /dev/null +++ b/share/spack/gitlab/cloud_pipelines/configs/single-src-protected-mirrors.yaml.in @@ -0,0 +1,6 @@ +mirrors: + buildcache-destination: + fetch: ${PROTECTED_MIRROR_FETCH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + push: ${PROTECTED_MIRROR_PUSH_DOMAIN}/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME} + source: False + binary: True diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml index 1c4e2de308eea2..abd8f4d0242df2 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml @@ -131,9 +131,6 @@ spack: - - $compiler - - $target - - mirrors: { "mirror": "s3://spack-binaries/develop/aws-isc-aarch64" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml index 0a898d1a752b37..038761ac1873fa 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml @@ -142,9 +142,6 @@ spack: - - $compiler - - $target - - mirrors: { "mirror": "s3://spack-binaries/develop/aws-isc" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml index 5ce6d1c8692e2c..85cf7660686d90 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-icelake/spack.yaml @@ -30,8 +30,6 @@ spack: - $optimized_configs # - $optimized_libs - mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-icelake" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml index 5708338a2b3efe..50ba40992a7bc9 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_n1/spack.yaml @@ -30,9 +30,6 @@ spack: - $optimized_configs - $optimized_libs - - mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-neoverse_n1" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml index f2df7696106aa9..50ba40992a7bc9 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-neoverse_v1/spack.yaml @@ -30,9 +30,6 @@ spack: - $optimized_configs - $optimized_libs - - mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-neoverse_v1" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml index 029dd67351c1f6..85cf7660686d90 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-pcluster-skylake/spack.yaml @@ -30,8 +30,6 @@ spack: - $optimized_configs # - $optimized_libs - mirrors: { "mirror": "s3://spack-binaries/develop/aws-pcluster-skylake" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml index 78a3ea785c827d..d154894830c155 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml @@ -21,7 +21,5 @@ spack: - - $default_specs - - $arch - mirrors: { "mirror": "s3://spack-binaries/develop/build_systems" } - cdash: build-group: Build Systems diff --git a/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml index 9963f4b777c4e9..bf298d606db0ea 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/data-vis-sdk/spack.yaml @@ -58,8 +58,6 @@ spack: - ["~paraview +visit"] - [$^visit_specs] - mirrors: {mirror: s3://spack-binaries/develop/data-vis-sdk} - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml index 83e3d9f2905128..413fdf34eb28f9 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml @@ -172,7 +172,5 @@ spack: # - variorum # variorum: /opt/cray/pe/cce/15.0.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: /opt/cray/pe/lib64/libpals.so.0: undefined reference to `json_array_append_new@@libjansson.so.4' # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # openblas: ftn-2307 ftn: ERROR in command line: The "-m" option must be followed by 0, 1, 2, 3 or 4.; make[2]: *** [: spotrf2.o] Error 1; make[1]: *** [Makefile:27: lapacklib] Error 2; make: *** [Makefile:250: netlib] Error 2 - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-cray-rhel" } - cdash: build-group: E4S Cray diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml index dace63659ec54f..c141cd9bf9233a 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-sles/spack.yaml @@ -171,7 +171,5 @@ spack: # - variorum # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-cray-sles" } - cdash: build-group: E4S Cray SLES diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index b4e8114df67f51..db903c15c47a6f 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -340,8 +340,6 @@ spack: # - tasmanian +cuda cuda_arch=90 # tasmanian: conflicts with cuda@12 # - upcxx +cuda cuda_arch=90 # upcxx: needs NVIDIA driver - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-arm-neoverse_v1" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index ec86c35b33d055..d170b0a272772c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -236,8 +236,6 @@ spack: - py-scipy - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-oneapi" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 72e06b060d2f1c..5f8f3d0e628dae 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -251,8 +251,6 @@ spack: # - trilinos +cuda cuda_arch=70 # trilinos: https://github.com/trilinos/Trilinos/issues/11630 # - upcxx +cuda cuda_arch=70 # upcxx: needs NVIDIA driver - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-power" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index cd9addbef0548c..885dbb538b0476 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -335,8 +335,6 @@ spack: # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 # - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898 - mirrors: { "mirror": "s3://spack-binaries/develop/e4s-rocm-external" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 65ab32e80d0579..410a379ee06321 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -382,8 +382,6 @@ spack: # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 # - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898 - mirrors: { "mirror": "s3://spack-binaries/develop/e4s" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml index 69a88597457e6f..263d8e29b30578 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/gpu-tests/spack.yaml @@ -49,8 +49,6 @@ spack: # FAILURES # - kokkos +wrapper +cuda cuda_arch=80 ^cuda@12.0.0 # https://github.com/spack/spack/issues/35378 - mirrors: { "mirror": "s3://spack-binaries/develop/gpu-tests" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml index c137b138ee3ccb..6d8a0b7491f9a3 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml @@ -82,8 +82,6 @@ spack: # - r-xgboost - xgboost - mirrors: { "mirror": "s3://spack-binaries/develop/ml-darwin-aarch64-mps" } - ci: pipeline-gen: - build-job-remove: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml index fa7bf02755be5a..71670d5a91568d 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cpu/spack.yaml @@ -76,9 +76,6 @@ spack: # - r-xgboost - xgboost - mirrors: - mirror: s3://spack-binaries/develop/ml-linux-x86_64-cpu - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml index 5a24d42f23242b..88291690382784 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-cuda/spack.yaml @@ -79,9 +79,6 @@ spack: # - r-xgboost - xgboost - mirrors: - mirror: s3://spack-binaries/develop/ml-linux-x86_64-cuda - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml index e49d43db3d4654..620a95715b41e5 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-linux-x86_64-rocm/spack.yaml @@ -82,9 +82,6 @@ spack: # - r-xgboost - xgboost - mirrors: - mirror: s3://spack-binaries/develop/ml-linux-x86_64-rocm - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws-aarch64/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws-aarch64/spack.yaml index b05b45f76378cf..6453d2a5fe6722 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws-aarch64/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws-aarch64/spack.yaml @@ -38,8 +38,6 @@ spack: - - $compiler - - $target - mirrors: { "mirror": "s3://spack-binaries/develop/radiuss-aws-aarch64" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws/spack.yaml index fd297ede91049a..ca7de563c44fe0 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/radiuss-aws/spack.yaml @@ -28,7 +28,7 @@ spack: - mfem +cuda ^hypre+cuda - raja - raja +cuda - - umpire + - umpire - umpire +cuda - compiler: @@ -44,8 +44,6 @@ spack: - - $compiler - - $target - mirrors: { "mirror": "s3://spack-binaries/develop/radiuss-aws" } - ci: pipeline-gen: - build-job: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml index c80bcf10eed975..ca8e1a990519db 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/radiuss/spack.yaml @@ -40,9 +40,6 @@ spack: - xbraid - zfp - mirrors: - mirror: "s3://spack-binaries/develop/radiuss" - specs: - matrix: - [$radiuss] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index 4b39be884612f8..0bc36ce8e44447 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -49,8 +49,6 @@ spack: - $clang_packages - $gcc_spack_built_packages - mirrors: - mirror: s3://spack-binaries/develop/tutorial ci: pipeline-gen: - build-job: From 3f594e86a1ae0435b730af95e83867ba8b7d20d5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 19 Oct 2023 19:15:18 +0200 Subject: [PATCH 269/806] libvorbis: drop -force_cpusubtype_ALL flag (#40616) This flag was only relevant when targeting powerpc from apple-clang, which we don't do. The flag is removed from apple-clang@15. Let's drop it unconditionally. --- var/spack/repos/builtin/packages/libvorbis/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/libvorbis/package.py b/var/spack/repos/builtin/packages/libvorbis/package.py index 9f4fc58fc99757..cfd0420ca36bd8 100644 --- a/var/spack/repos/builtin/packages/libvorbis/package.py +++ b/var/spack/repos/builtin/packages/libvorbis/package.py @@ -22,5 +22,8 @@ class Libvorbis(AutotoolsPackage): depends_on("pkgconfig", type="build") + def patch(self): + filter_file(r"-force_cpusubtype_ALL", "", "configure", string=True) + # `make check` crashes when run in parallel parallel = False From 408ee04014d90cf3ad6b30a2076631c618e4ceac Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:16:42 -0600 Subject: [PATCH 270/806] Automated deployment to update package flux-core 2023-10-19 (#40605) Co-authored-by: github-actions --- var/spack/repos/builtin/packages/flux-core/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index 09d5b2e4999da3..bb150b154dc9b8 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -20,6 +20,7 @@ class FluxCore(AutotoolsPackage): maintainers("grondo") version("master", branch="master") + version("0.55.0", sha256="2925b8a084e9d1069a96de7689b515ad6f2051ecfb9fbbe4d2643507de7ccd30") version("0.54.0", sha256="721fc3fff64b3b167ae55d0e29379ff3211729248ef97e3b9855816219063b42") version("0.53.0", sha256="2f14d032a2d54f34e066c8a15c79917089e9f7f8558baa03dbfe63dbf56918b7") version("0.52.0", sha256="dca434238405e4cae4686c8143f2cc79919bfd9e26b09c980e1e5f69ffd0c448") From 79896ee85cb18dbedeee35f941ce2675af9ab377 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 19 Oct 2023 20:33:01 +0200 Subject: [PATCH 271/806] spack checksum: restore ability to select top n (#40531) The ability to select the top N versions got removed in the checksum overhaul, cause initially numbers were used for commands. Now that we settled on characters for commands, let's make numbers pick the top N again. --- lib/spack/spack/stage.py | 23 +++++++++++++++++------ lib/spack/spack/test/cmd/checksum.py | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index d53ec5fee8995a..1c7ebdec5c50df 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -921,7 +921,7 @@ def interactive_version_filter( print_header = True - print("commands:") + tty.info(colorize("Enter @*{number} of versions to take, or use a @*{command}:")) commands = ( "@*b{[c]}hecksum", "@*b{[e]}dit", @@ -931,10 +931,10 @@ def interactive_version_filter( "@*b{[r]}estart", "@*b{[q]}uit", ) - colify(list(map(colorize, commands)), indent=2) + colify(list(map(colorize, commands)), indent=4) try: - command = input(colorize("@*g{command>} ")).strip().lower() + command = input(colorize("@*g{action>} ")).strip().lower() except EOFError: print() command = "q" @@ -1039,9 +1039,20 @@ def interactive_version_filter( print() return None else: - tty.warn(f"Ignoring invalid command: {command}") - print_header = False - continue + # Last restort: filter the top N versions + try: + n = int(command) + invalid_command = n < 1 + except ValueError: + invalid_command = True + + if invalid_command: + tty.warn(f"Ignoring invalid command: {command}") + print_header = False + continue + + sorted_and_filtered = sorted_and_filtered[:n] + return {v: url_dict[v] for v in sorted_and_filtered} diff --git a/lib/spack/spack/test/cmd/checksum.py b/lib/spack/spack/test/cmd/checksum.py index 8001334e3e2142..b2fc9d5f6ce11c 100644 --- a/lib/spack/spack/test/cmd/checksum.py +++ b/lib/spack/spack/test/cmd/checksum.py @@ -202,6 +202,29 @@ def test_checksum_interactive_new_only(): } +def test_checksum_interactive_top_n(): + """Test integers select top n versions""" + input = input_from_commands("2", "c") + assert interactive_version_filter( + { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + Version("0.9"): "https://www.example.com/pkg-0.9.tar.gz", + }, + input=input, + ) == { + Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz", + Version("1.0"): "https://www.example.com/pkg-1.0.tar.gz", + } + + +def test_checksum_interactive_unrecognized_command(): + """Unrecognized commands should be ignored""" + input = input_from_commands("-1", "0", "hello", "c") + v = {Version("1.1"): "https://www.example.com/pkg-1.1.tar.gz"} + assert interactive_version_filter(v.copy(), input=input) == v + + def test_checksum_versions(mock_packages, mock_clone_repo, mock_fetch, mock_stage): pkg_cls = spack.repo.PATH.get_pkg_class("zlib") versions = [str(v) for v in pkg_cls.versions] From 72b36ac14446782f47519db8ee5cff6631b2b4c9 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 19 Oct 2023 20:44:05 +0200 Subject: [PATCH 272/806] Improve setup build / run / test environment (#35737) This adds a `SetupContext` class which is responsible for setting package.py module globals, and computing the changes to environment variables for the build, test or run context. The class uses `effective_deptypes` which takes a list of specs (e.g. single item of a spec to build, or a list of environment roots) and a context (build, run, test), and outputs a flat list of specs that affect the environment together with a flag in what way they do so. This list is topologically ordered from root to leaf, so that one can be assured that dependents override variables set by dependencies, not the other way around. This is used to replace the logic in `modifications_from_dependencies`, which has several issues: missing calls to `setup_run_environment`, and the order in which operations are applied. Further, it should improve performance a bit in certain cases, since `effective_deptypes` run in O(v + e) time, whereas `spack env activate` currently can take up to O(v^2 + e) time due to loops over roots. Each edge in the DAG is visited once by calling `effective_deptypes` with `env.concrete_roots()`. By marking and propagating flags through the DAG, this commit also fixes a bug where Spack wouldn't call `setup_run_environment` for runtime dependencies of link dependencies. And this PR ensures that Spack correctly sets up the runtime environment of direct build dependencies. Regarding test dependencies: in a build context they are are build-time test deps, whereas in a test context they are install-time test deps. Since there are no means to distinguish the build/install type test deps, they're both. Further changes: - all `package.py` module globals are guaranteed to be set before any of the `setup_(dependent)_(run|build)_env` functions is called - traversal order during setup: first the group of externals, then the group of non-externals, with specs in each group traversed topological (dependencies are setup before dependents) - modules: only ever call `setup_dependent_run_environment` of *direct* link/run type deps - the marker in `set_module_variables_for_package` is dropped, since we should call the method once per spec. This allows us to set only a cheap subset of globals on the module: for example it's not necessary to compute the expensive `cmake_args` and w/e if the spec under consideration is not the root node to be built. - `spack load`'s `--only` is deprecated (it has no effect now), and `spack load x` now means: do everything that's required for `x` to work at runtime, which requires runtime deps to be setup -- just like `spack env activate`. - `spack load` no longer loads build deps (of build deps) ... - `spack env activate` on partially installed or broken environments: this is all or nothing now. If some spec errors during setup of its runtime env, you'll only get the unconditional variables + a warning that says the runtime changes for specs couldn't be applied. - Remove traversal in upward direction from `setup_dependent_*` in packages. Upward traversal may iterate to specs that aren't children of the roots (e.g. zlib / python have hundreds of dependents, only a small fraction is reachable from the roots. Packages should only modify the direct dependent they receive as an argument) --- lib/spack/spack/bootstrap/core.py | 13 +- lib/spack/spack/build_environment.py | 498 ++++++++++-------- lib/spack/spack/cmd/build_env.py | 3 +- lib/spack/spack/cmd/common/env_utility.py | 20 +- lib/spack/spack/cmd/load.py | 16 +- lib/spack/spack/cmd/test_env.py | 3 +- lib/spack/spack/cmd/unload.py | 3 +- lib/spack/spack/context.py | 29 + lib/spack/spack/environment/environment.py | 58 +- lib/spack/spack/modules/common.py | 15 +- lib/spack/spack/test/build_environment.py | 73 ++- lib/spack/spack/test/cmd/env.py | 15 +- lib/spack/spack/test/cmd/load.py | 86 ++- lib/spack/spack/user_environment.py | 75 ++- share/spack/qa/setup-env-test.fish | 7 +- share/spack/qa/setup-env-test.sh | 5 +- .../repos/builtin/packages/gptune/package.py | 1 + .../repos/builtin/packages/llvm/package.py | 8 - .../repos/builtin/packages/perl/package.py | 11 +- .../repos/builtin/packages/python/package.py | 11 +- .../repos/builtin/packages/ruby/package.py | 5 +- .../repos/builtin/packages/tcl/package.py | 26 +- 22 files changed, 565 insertions(+), 416 deletions(-) create mode 100644 lib/spack/spack/context.py diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index 4b7807e47bba23..d7b39b02e0cc38 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -446,16 +446,11 @@ def ensure_executables_in_path_or_raise( current_bootstrapper.last_search["spec"], current_bootstrapper.last_search["command"], ) - env_mods = spack.util.environment.EnvironmentModifications() - for dep in concrete_spec.traverse( - root=True, order="post", deptype=("link", "run") - ): - env_mods.extend( - spack.user_environment.environment_modifications_for_spec( - dep, set_package_py_globals=False - ) + cmd.add_default_envmod( + spack.user_environment.environment_modifications_for_specs( + concrete_spec, set_package_py_globals=False ) - cmd.add_default_envmod(env_mods) + ) return cmd assert exception_handler, ( diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 881fcb5c9cf93d..96c8cb8a4ad71a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -40,12 +40,15 @@ import sys import traceback import types +from collections import defaultdict +from enum import Flag, auto +from itertools import chain from typing import List, Tuple import llnl.util.tty as tty from llnl.string import plural from llnl.util.filesystem import join_path -from llnl.util.lang import dedupe +from llnl.util.lang import dedupe, stable_partition from llnl.util.symlink import symlink from llnl.util.tty.color import cescape, colorize from llnl.util.tty.log import MultiProcessFd @@ -55,17 +58,21 @@ import spack.build_systems.python import spack.builder import spack.config +import spack.deptypes as dt import spack.main import spack.package_base import spack.paths import spack.platforms import spack.repo import spack.schema.environment +import spack.spec import spack.store import spack.subprocess_context import spack.user_environment import spack.util.path import spack.util.pattern +from spack import traverse +from spack.context import Context from spack.error import NoHeadersError, NoLibrariesError from spack.install_test import spack_install_test_log from spack.installer import InstallError @@ -76,7 +83,6 @@ env_flag, filter_system_paths, get_path, - inspect_path, is_system_path, validate, ) @@ -109,7 +115,6 @@ SPACK_CCACHE_BINARY = "SPACK_CCACHE_BINARY" SPACK_SYSTEM_DIRS = "SPACK_SYSTEM_DIRS" - # Platform-specific library suffix. if sys.platform == "darwin": dso_suffix = "dylib" @@ -406,19 +411,13 @@ def set_compiler_environment_variables(pkg, env): def set_wrapper_variables(pkg, env): - """Set environment variables used by the Spack compiler wrapper - (which have the prefix `SPACK_`) and also add the compiler wrappers - to PATH. - - This determines the injected -L/-I/-rpath options; each - of these specifies a search order and this function computes these - options in a manner that is intended to match the DAG traversal order - in `modifications_from_dependencies`: that method uses a post-order - traversal so that `PrependPath` actions from dependencies take lower - precedence; we use a post-order traversal here to match the visitation - order of `modifications_from_dependencies` (so we are visiting the - lowest priority packages first). - """ + """Set environment variables used by the Spack compiler wrapper (which have the prefix + `SPACK_`) and also add the compiler wrappers to PATH. + + This determines the injected -L/-I/-rpath options; each of these specifies a search order and + this function computes these options in a manner that is intended to match the DAG traversal + order in `SetupContext`. TODO: this is not the case yet, we're using post order, SetupContext + is using topo order.""" # Set environment variables if specified for # the given compiler compiler = pkg.compiler @@ -537,45 +536,42 @@ def update_compiler_args_for_dep(dep): env.set(SPACK_RPATH_DIRS, ":".join(rpath_dirs)) -def set_module_variables_for_package(pkg): +def set_package_py_globals(pkg, context: Context = Context.BUILD): """Populate the Python module of a package with some useful global names. This makes things easier for package writers. """ - # Put a marker on this module so that it won't execute the body of this - # function again, since it is not needed - marker = "_set_run_already_called" - if getattr(pkg.module, marker, False): - return - module = ModuleChangePropagator(pkg) - jobs = determine_number_of_jobs(parallel=pkg.parallel) - m = module - m.make_jobs = jobs - - # TODO: make these build deps that can be installed if not found. - m.make = MakeExecutable("make", jobs) - m.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False) - # TODO: johnwparent: add package or builder support to define these build tools - # for now there is no entrypoint for builders to define these on their - # own - if sys.platform == "win32": - m.nmake = Executable("nmake") - m.msbuild = Executable("msbuild") - # analog to configure for win32 - m.cscript = Executable("cscript") - - # Find the configure script in the archive path - # Don't use which for this; we want to find it in the current dir. - m.configure = Executable("./configure") - - # Standard CMake arguments - m.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.std_args(pkg) - m.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg) - m.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg) - - # Put spack compiler paths in module scope. + + if context == Context.BUILD: + jobs = determine_number_of_jobs(parallel=pkg.parallel) + m.make_jobs = jobs + + # TODO: make these build deps that can be installed if not found. + m.make = MakeExecutable("make", jobs) + m.gmake = MakeExecutable("gmake", jobs) + m.ninja = MakeExecutable("ninja", jobs, supports_jobserver=False) + # TODO: johnwparent: add package or builder support to define these build tools + # for now there is no entrypoint for builders to define these on their + # own + if sys.platform == "win32": + m.nmake = Executable("nmake") + m.msbuild = Executable("msbuild") + # analog to configure for win32 + m.cscript = Executable("cscript") + + # Find the configure script in the archive path + # Don't use which for this; we want to find it in the current dir. + m.configure = Executable("./configure") + + # Standard CMake arguments + m.std_cmake_args = spack.build_systems.cmake.CMakeBuilder.std_args(pkg) + m.std_meson_args = spack.build_systems.meson.MesonBuilder.std_args(pkg) + m.std_pip_args = spack.build_systems.python.PythonPipBuilder.std_args(pkg) + + # Put spack compiler paths in module scope. (Some packages use it + # in setup_run_environment etc, so don't put it context == build) link_dir = spack.paths.build_env_path m.spack_cc = os.path.join(link_dir, pkg.compiler.link_paths["cc"]) m.spack_cxx = os.path.join(link_dir, pkg.compiler.link_paths["cxx"]) @@ -599,9 +595,6 @@ def static_to_shared_library(static_lib, shared_lib=None, **kwargs): m.static_to_shared_library = static_to_shared_library - # Put a marker on this module so that it won't execute the body of this - # function again, since it is not needed - setattr(m, marker, True) module.propagate_changes_to_mro() @@ -727,12 +720,15 @@ def load_external_modules(pkg): load_module(external_module) -def setup_package(pkg, dirty, context="build"): +def setup_package(pkg, dirty, context: Context = Context.BUILD): """Execute all environment setup routines.""" - if context not in ["build", "test"]: - raise ValueError("'context' must be one of ['build', 'test'] - got: {0}".format(context)) + if context not in (Context.BUILD, Context.TEST): + raise ValueError(f"'context' must be Context.BUILD or Context.TEST - got {context}") - set_module_variables_for_package(pkg) + # First populate the package.py's module with the relevant globals that could be used in any + # of the setup_* functions. + setup_context = SetupContext(pkg.spec, context=context) + setup_context.set_all_package_py_globals() # Keep track of env changes from packages separately, since we want to # issue warnings when packages make "suspicious" modifications. @@ -740,13 +736,15 @@ def setup_package(pkg, dirty, context="build"): env_mods = EnvironmentModifications() # setup compilers for build contexts - need_compiler = context == "build" or (context == "test" and pkg.test_requires_compiler) + need_compiler = context == Context.BUILD or ( + context == Context.TEST and pkg.test_requires_compiler + ) if need_compiler: set_compiler_environment_variables(pkg, env_mods) set_wrapper_variables(pkg, env_mods) tty.debug("setup_package: grabbing modifications from dependencies") - env_mods.extend(modifications_from_dependencies(pkg.spec, context, custom_mods_only=False)) + env_mods.extend(setup_context.get_env_modifications()) tty.debug("setup_package: collected all modifications from dependencies") # architecture specific setup @@ -754,7 +752,7 @@ def setup_package(pkg, dirty, context="build"): target = platform.target(pkg.spec.architecture.target) platform.setup_platform_environment(pkg, env_mods) - if context == "build": + if context == Context.BUILD: tty.debug("setup_package: setup build environment for root") builder = spack.builder.create(pkg) builder.setup_build_environment(env_mods) @@ -765,16 +763,7 @@ def setup_package(pkg, dirty, context="build"): "config to assume that the package is part of the system" " includes and omit it when invoked with '--cflags'." ) - elif context == "test": - tty.debug("setup_package: setup test environment for root") - env_mods.extend( - inspect_path( - pkg.spec.prefix, - spack.user_environment.prefix_inspections(pkg.spec.platform), - exclude=is_system_path, - ) - ) - pkg.setup_run_environment(env_mods) + elif context == Context.TEST: env_mods.prepend_path("PATH", ".") # First apply the clean environment changes @@ -813,158 +802,245 @@ def setup_package(pkg, dirty, context="build"): return env_base -def _make_runnable(pkg, env): - # Helper method which prepends a Package's bin/ prefix to the PATH - # environment variable - prefix = pkg.prefix - - for dirname in ["bin", "bin64"]: - bin_dir = os.path.join(prefix, dirname) - if os.path.isdir(bin_dir): - env.prepend_path("PATH", bin_dir) +class EnvironmentVisitor: + def __init__(self, *roots: spack.spec.Spec, context: Context): + # For the roots (well, marked specs) we follow different edges + # than for their deps, depending on the context. + self.root_hashes = set(s.dag_hash() for s in roots) + + if context == Context.BUILD: + # Drop direct run deps in build context + # We don't really distinguish between install and build time test deps, + # so we include them here as build-time test deps. + self.root_depflag = dt.BUILD | dt.TEST | dt.LINK + elif context == Context.TEST: + # This is more of an extended run environment + self.root_depflag = dt.TEST | dt.RUN | dt.LINK + elif context == Context.RUN: + self.root_depflag = dt.RUN | dt.LINK + + def neighbors(self, item): + spec = item.edge.spec + if spec.dag_hash() in self.root_hashes: + depflag = self.root_depflag + else: + depflag = dt.LINK | dt.RUN + return traverse.sort_edges(spec.edges_to_dependencies(depflag=depflag)) -def modifications_from_dependencies( - spec, context, custom_mods_only=True, set_package_py_globals=True -): - """Returns the environment modifications that are required by - the dependencies of a spec and also applies modifications - to this spec's package at module scope, if need be. +class UseMode(Flag): + #: Entrypoint spec (a spec to be built; an env root, etc) + ROOT = auto() - Environment modifications include: + #: A spec used at runtime, but no executables in PATH + RUNTIME = auto() - - Updating PATH so that executables can be found - - Updating CMAKE_PREFIX_PATH and PKG_CONFIG_PATH so that their respective - tools can find Spack-built dependencies - - Running custom package environment modifications + #: A spec used at runtime, with executables in PATH + RUNTIME_EXECUTABLE = auto() - Custom package modifications can conflict with the default PATH changes - we make (specifically for the PATH, CMAKE_PREFIX_PATH, and PKG_CONFIG_PATH - environment variables), so this applies changes in a fixed order: + #: A spec that's a direct build or test dep + BUILDTIME_DIRECT = auto() - - All modifications (custom and default) from external deps first - - All modifications from non-external deps afterwards + #: A spec that should be visible in search paths in a build env. + BUILDTIME = auto() - With that order, `PrependPath` actions from non-external default - environment modifications will take precedence over custom modifications - from external packages. + #: Flag is set when the (node, mode) is finalized + ADDED = auto() - A secondary constraint is that custom and default modifications are - grouped on a per-package basis: combined with the post-order traversal this - means that default modifications of dependents can override custom - modifications of dependencies (again, this would only occur for PATH, - CMAKE_PREFIX_PATH, or PKG_CONFIG_PATH). - Args: - spec (spack.spec.Spec): spec for which we want the modifications - context (str): either 'build' for build-time modifications or 'run' - for run-time modifications - custom_mods_only (bool): if True returns only custom modifications, if False - returns custom and default modifications - set_package_py_globals (bool): whether or not to set the global variables in the - package.py files (this may be problematic when using buildcaches that have - been built on a different but compatible OS) - """ - if context not in ["build", "run", "test"]: - raise ValueError( - "Expecting context to be one of ['build', 'run', 'test'], " "got: {0}".format(context) +def effective_deptypes( + *specs: spack.spec.Spec, context: Context = Context.BUILD +) -> List[Tuple[spack.spec.Spec, UseMode]]: + """Given a list of input specs and a context, return a list of tuples of + all specs that contribute to (environment) modifications, together with + a flag specifying in what way they do so. The list is ordered topologically + from root to leaf, meaning that environment modifications should be applied + in reverse so that dependents override dependencies, not the other way around.""" + visitor = traverse.TopoVisitor( + EnvironmentVisitor(*specs, context=context), + key=lambda x: x.dag_hash(), + root=True, + all_edges=True, + ) + traverse.traverse_depth_first_with_visitor(traverse.with_artificial_edges(specs), visitor) + + # Dictionary with "no mode" as default value, so it's easy to write modes[x] |= flag. + use_modes = defaultdict(lambda: UseMode(0)) + nodes_with_type = [] + + for edge in visitor.edges: + parent, child, depflag = edge.parent, edge.spec, edge.depflag + + # Mark the starting point + if parent is None: + use_modes[child] = UseMode.ROOT + continue + + parent_mode = use_modes[parent] + + # Nothing to propagate. + if not parent_mode: + continue + + # Dependending on the context, include particular deps from the root. + if UseMode.ROOT & parent_mode: + if context == Context.BUILD: + if (dt.BUILD | dt.TEST) & depflag: + use_modes[child] |= UseMode.BUILDTIME_DIRECT + if dt.LINK & depflag: + use_modes[child] |= UseMode.BUILDTIME + + elif context == Context.TEST: + if (dt.RUN | dt.TEST) & depflag: + use_modes[child] |= UseMode.RUNTIME_EXECUTABLE + elif dt.LINK & depflag: + use_modes[child] |= UseMode.RUNTIME + + elif context == Context.RUN: + if dt.RUN & depflag: + use_modes[child] |= UseMode.RUNTIME_EXECUTABLE + elif dt.LINK & depflag: + use_modes[child] |= UseMode.RUNTIME + + # Propagate RUNTIME and RUNTIME_EXECUTABLE through link and run deps. + if (UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE | UseMode.BUILDTIME_DIRECT) & parent_mode: + if dt.LINK & depflag: + use_modes[child] |= UseMode.RUNTIME + if dt.RUN & depflag: + use_modes[child] |= UseMode.RUNTIME_EXECUTABLE + + # Propagate BUILDTIME through link deps. + if UseMode.BUILDTIME & parent_mode: + if dt.LINK & depflag: + use_modes[child] |= UseMode.BUILDTIME + + # Finalize the spec; the invariant is that all in-edges are processed + # before out-edges, meaning that parent is done. + if not (UseMode.ADDED & parent_mode): + use_modes[parent] |= UseMode.ADDED + nodes_with_type.append((parent, parent_mode)) + + # Attach the leaf nodes, since we only added nodes with out-edges. + for spec, parent_mode in use_modes.items(): + if parent_mode and not (UseMode.ADDED & parent_mode): + nodes_with_type.append((spec, parent_mode)) + + return nodes_with_type + + +class SetupContext: + """This class encapsulates the logic to determine environment modifications, and is used as + well to set globals in modules of package.py.""" + + def __init__(self, *specs: spack.spec.Spec, context: Context) -> None: + """Construct a ModificationsFromDag object. + Args: + specs: single root spec for build/test context, possibly more for run context + context: build, run, or test""" + if (context == Context.BUILD or context == Context.TEST) and not len(specs) == 1: + raise ValueError("Cannot setup build environment for multiple specs") + specs_with_type = effective_deptypes(*specs, context=context) + + self.specs = specs + self.context = context + self.external: List[Tuple[spack.spec.Spec, UseMode]] + self.nonexternal: List[Tuple[spack.spec.Spec, UseMode]] + # Reverse so we go from leaf to root + self.nodes_in_subdag = set(id(s) for s, _ in specs_with_type) + + # Split into non-external and external, maintaining topo order per group. + self.external, self.nonexternal = stable_partition( + reversed(specs_with_type), lambda t: t[0].external ) + self.should_be_runnable = UseMode.BUILDTIME_DIRECT | UseMode.RUNTIME_EXECUTABLE + self.should_setup_run_env = UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE + self.should_setup_dependent_build_env = UseMode.BUILDTIME | UseMode.BUILDTIME_DIRECT - env = EnvironmentModifications() + if context == Context.RUN or context == Context.TEST: + self.should_be_runnable |= UseMode.ROOT + self.should_setup_run_env |= UseMode.ROOT - # Note: see computation of 'custom_mod_deps' and 'exe_deps' later in this - # function; these sets form the building blocks of those collections. - build_deps = set(spec.dependencies(deptype=("build", "test"))) - link_deps = set(spec.traverse(root=False, deptype="link")) - build_link_deps = build_deps | link_deps - build_and_supporting_deps = set() - for build_dep in build_deps: - build_and_supporting_deps.update(build_dep.traverse(deptype="run")) - run_and_supporting_deps = set(spec.traverse(root=False, deptype=("run", "link"))) - test_and_supporting_deps = set() - for test_dep in set(spec.dependencies(deptype="test")): - test_and_supporting_deps.update(test_dep.traverse(deptype="run")) - - # All dependencies that might have environment modifications to apply - custom_mod_deps = set() - if context == "build": - custom_mod_deps.update(build_and_supporting_deps) - # Tests may be performed after build - custom_mod_deps.update(test_and_supporting_deps) - else: - # test/run context - custom_mod_deps.update(run_and_supporting_deps) - if context == "test": - custom_mod_deps.update(test_and_supporting_deps) - custom_mod_deps.update(link_deps) - - # Determine 'exe_deps': the set of packages with binaries we want to use - if context == "build": - exe_deps = build_and_supporting_deps | test_and_supporting_deps - elif context == "run": - exe_deps = set(spec.traverse(deptype="run")) - elif context == "test": - exe_deps = test_and_supporting_deps - - def default_modifications_for_dep(dep): - if dep in build_link_deps and not is_system_path(dep.prefix) and context == "build": - prefix = dep.prefix - - env.prepend_path("CMAKE_PREFIX_PATH", prefix) - - for directory in ("lib", "lib64", "share"): - pcdir = os.path.join(prefix, directory, "pkgconfig") - if os.path.isdir(pcdir): - env.prepend_path("PKG_CONFIG_PATH", pcdir) - - if dep in exe_deps and not is_system_path(dep.prefix): - _make_runnable(dep, env) - - def add_modifications_for_dep(dep): - tty.debug("Adding env modifications for {0}".format(dep.name)) - # Some callers of this function only want the custom modifications. - # For callers that want both custom and default modifications, we want - # to perform the default modifications here (this groups custom - # and default modifications together on a per-package basis). - if not custom_mods_only: - default_modifications_for_dep(dep) - - # Perform custom modifications here (PrependPath actions performed in - # the custom method override the default environment modifications - # we do to help the build, namely for PATH, CMAKE_PREFIX_PATH, and - # PKG_CONFIG_PATH) - if dep in custom_mod_deps: - dpkg = dep.package - if set_package_py_globals: - set_module_variables_for_package(dpkg) - - current_module = ModuleChangePropagator(spec.package) - dpkg.setup_dependent_package(current_module, spec) - current_module.propagate_changes_to_mro() - - if context == "build": - builder = spack.builder.create(dpkg) - builder.setup_dependent_build_environment(env, spec) - else: - dpkg.setup_dependent_run_environment(env, spec) - tty.debug("Added env modifications for {0}".format(dep.name)) - - # Note that we want to perform environment modifications in a fixed order. - # The Spec.traverse method provides this: i.e. in addition to - # the post-order semantics, it also guarantees a fixed traversal order - # among dependencies which are not constrained by post-order semantics. - for dspec in spec.traverse(root=False, order="post"): - if dspec.external: - add_modifications_for_dep(dspec) - - for dspec in spec.traverse(root=False, order="post"): - # Default env modifications for non-external packages can override - # custom modifications of external packages (this can only occur - # for modifications to PATH, CMAKE_PREFIX_PATH, and PKG_CONFIG_PATH) - if not dspec.external: - add_modifications_for_dep(dspec) - - return env + # Everything that calls setup_run_environment and setup_dependent_* needs globals set. + self.should_set_package_py_globals = ( + self.should_setup_dependent_build_env | self.should_setup_run_env | UseMode.ROOT + ) + # In a build context, the root and direct build deps need build-specific globals set. + self.needs_build_context = UseMode.ROOT | UseMode.BUILDTIME_DIRECT + + def set_all_package_py_globals(self): + """Set the globals in modules of package.py files.""" + for dspec, flag in chain(self.external, self.nonexternal): + pkg = dspec.package + + if self.should_set_package_py_globals & flag: + if self.context == Context.BUILD and self.needs_build_context & flag: + set_package_py_globals(pkg, context=Context.BUILD) + else: + # This includes runtime dependencies, also runtime deps of direct build deps. + set_package_py_globals(pkg, context=Context.RUN) + + for spec in dspec.dependents(): + # Note: some specs have dependents that are unreachable from the root, so avoid + # setting globals for those. + if id(spec) not in self.nodes_in_subdag: + continue + dependent_module = ModuleChangePropagator(spec.package) + pkg.setup_dependent_package(dependent_module, spec) + dependent_module.propagate_changes_to_mro() + + def get_env_modifications(self) -> EnvironmentModifications: + """Returns the environment variable modifications for the given input specs and context. + Environment modifications include: + - Updating PATH for packages that are required at runtime + - Updating CMAKE_PREFIX_PATH and PKG_CONFIG_PATH so that their respective + tools can find Spack-built dependencies (when context=build) + - Running custom package environment modifications (setup_run_environment, + setup_dependent_build_environment, setup_dependent_run_environment) + + The (partial) order imposed on the specs is externals first, then topological + from leaf to root. That way externals cannot contribute search paths that would shadow + Spack's prefixes, and dependents override variables set by dependencies.""" + env = EnvironmentModifications() + for dspec, flag in chain(self.external, self.nonexternal): + tty.debug(f"Adding env modifications for {dspec.name}") + pkg = dspec.package + + if self.should_setup_dependent_build_env & flag: + self._make_buildtime_detectable(dspec, env) + + for spec in self.specs: + builder = spack.builder.create(pkg) + builder.setup_dependent_build_environment(env, spec) + + if self.should_be_runnable & flag: + self._make_runnable(dspec, env) + + if self.should_setup_run_env & flag: + # TODO: remove setup_dependent_run_environment... + for spec in dspec.dependents(deptype=dt.RUN): + if id(spec) in self.nodes_in_subdag: + pkg.setup_dependent_run_environment(env, spec) + pkg.setup_run_environment(env) + return env + + def _make_buildtime_detectable(self, dep: spack.spec.Spec, env: EnvironmentModifications): + if is_system_path(dep.prefix): + return + + env.prepend_path("CMAKE_PREFIX_PATH", dep.prefix) + for d in ("lib", "lib64", "share"): + pcdir = os.path.join(dep.prefix, d, "pkgconfig") + if os.path.isdir(pcdir): + env.prepend_path("PKG_CONFIG_PATH", pcdir) + + def _make_runnable(self, dep: spack.spec.Spec, env: EnvironmentModifications): + if is_system_path(dep.prefix): + return + + for d in ("bin", "bin64"): + bin_dir = os.path.join(dep.prefix, d) + if os.path.isdir(bin_dir): + env.prepend_path("PATH", bin_dir) def get_cmake_prefix_path(pkg): @@ -996,7 +1072,7 @@ def get_cmake_prefix_path(pkg): def _setup_pkg_and_run( serialized_pkg, function, kwargs, write_pipe, input_multiprocess_fd, jsfd1, jsfd2 ): - context = kwargs.get("context", "build") + context: str = kwargs.get("context", "build") try: # We are in the child process. Python sets sys.stdin to @@ -1012,7 +1088,7 @@ def _setup_pkg_and_run( if not kwargs.get("fake", False): kwargs["unmodified_env"] = os.environ.copy() kwargs["env_modifications"] = setup_package( - pkg, dirty=kwargs.get("dirty", False), context=context + pkg, dirty=kwargs.get("dirty", False), context=Context.from_string(context) ) return_value = function(pkg, kwargs) write_pipe.send(return_value) diff --git a/lib/spack/spack/cmd/build_env.py b/lib/spack/spack/cmd/build_env.py index 7da9213c5b0e7b..f5efca6e230484 100644 --- a/lib/spack/spack/cmd/build_env.py +++ b/lib/spack/spack/cmd/build_env.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import spack.cmd.common.env_utility as env_utility +from spack.context import Context description = ( "run a command in a spec's install environment, or dump its environment to screen or file" @@ -14,4 +15,4 @@ def build_env(parser, args): - env_utility.emulate_env_utility("build-env", "build", args) + env_utility.emulate_env_utility("build-env", Context.BUILD, args) diff --git a/lib/spack/spack/cmd/common/env_utility.py b/lib/spack/spack/cmd/common/env_utility.py index 1816a2c574700c..b8a6338d924f83 100644 --- a/lib/spack/spack/cmd/common/env_utility.py +++ b/lib/spack/spack/cmd/common/env_utility.py @@ -7,7 +7,6 @@ import llnl.util.tty as tty -import spack.build_environment as build_environment import spack.cmd import spack.cmd.common.arguments as arguments import spack.deptypes as dt @@ -15,7 +14,8 @@ import spack.paths import spack.spec import spack.store -from spack import traverse +from spack import build_environment, traverse +from spack.context import Context from spack.util.environment import dump_environment, pickle_environment @@ -42,14 +42,14 @@ def setup_parser(subparser): class AreDepsInstalledVisitor: - def __init__(self, context="build"): - if context not in ("build", "test"): - raise ValueError("context can only be build or test") - - if context == "build": + def __init__(self, context: Context = Context.BUILD): + if context == Context.BUILD: + # TODO: run deps shouldn't be required for build env. self.direct_deps = dt.BUILD | dt.LINK | dt.RUN - else: + elif context == Context.TEST: self.direct_deps = dt.BUILD | dt.TEST | dt.LINK | dt.RUN + else: + raise ValueError("context can only be Context.BUILD or Context.TEST") self.has_uninstalled_deps = False @@ -76,7 +76,7 @@ def neighbors(self, item): return item.edge.spec.edges_to_dependencies(depflag=depflag) -def emulate_env_utility(cmd_name, context, args): +def emulate_env_utility(cmd_name, context: Context, args): if not args.spec: tty.die("spack %s requires a spec." % cmd_name) @@ -120,7 +120,7 @@ def emulate_env_utility(cmd_name, context, args): hashes=True, # This shows more than necessary, but we cannot dynamically change deptypes # in Spec.tree(...). - deptypes="all" if context == "build" else ("build", "test", "link", "run"), + deptypes="all" if context == Context.BUILD else ("build", "test", "link", "run"), ), ) diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index e68fe48dce7fec..5cdd2909c7ae40 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -5,6 +5,8 @@ import sys +import llnl.util.tty as tty + import spack.cmd import spack.cmd.common.arguments as arguments import spack.cmd.find @@ -108,16 +110,14 @@ def load(parser, args): ) return 1 - with spack.store.STORE.db.read_transaction(): - if "dependencies" in args.things_to_load: - include_roots = "package" in args.things_to_load - specs = [ - dep for spec in specs for dep in spec.traverse(root=include_roots, order="post") - ] + if args.things_to_load != "package,dependencies": + tty.warn( + "The `--only` flag in spack load is deprecated and will be removed in Spack v0.22" + ) - env_mod = spack.util.environment.EnvironmentModifications() + with spack.store.STORE.db.read_transaction(): + env_mod = uenv.environment_modifications_for_specs(*specs) for spec in specs: - env_mod.extend(uenv.environment_modifications_for_spec(spec)) env_mod.prepend_path(uenv.spack_loaded_hashes_var, spec.dag_hash()) cmds = env_mod.shell_modifications(args.shell) diff --git a/lib/spack/spack/cmd/test_env.py b/lib/spack/spack/cmd/test_env.py index 049df9d5c0494b..070b766248d8dc 100644 --- a/lib/spack/spack/cmd/test_env.py +++ b/lib/spack/spack/cmd/test_env.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import spack.cmd.common.env_utility as env_utility +from spack.context import Context description = ( "run a command in a spec's test environment, or dump its environment to screen or file" @@ -14,4 +15,4 @@ def test_env(parser, args): - env_utility.emulate_env_utility("test-env", "test", args) + env_utility.emulate_env_utility("test-env", Context.TEST, args) diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index 1fecdc5b33ba1d..7fe634c56de91e 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -88,9 +88,8 @@ def unload(parser, args): ) return 1 - env_mod = spack.util.environment.EnvironmentModifications() + env_mod = uenv.environment_modifications_for_specs(*specs).reversed() for spec in specs: - env_mod.extend(uenv.environment_modifications_for_spec(spec).reversed()) env_mod.remove_path(uenv.spack_loaded_hashes_var, spec.dag_hash()) cmds = env_mod.shell_modifications(args.shell) diff --git a/lib/spack/spack/context.py b/lib/spack/spack/context.py new file mode 100644 index 00000000000000..de3311da22b0ff --- /dev/null +++ b/lib/spack/spack/context.py @@ -0,0 +1,29 @@ +# Copyright 2013-2023 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) +"""This module provides classes used in user and build environment""" + +from enum import Enum + + +class Context(Enum): + """Enum used to indicate the context in which an environment has to be setup: build, + run or test.""" + + BUILD = 1 + RUN = 2 + TEST = 3 + + def __str__(self): + return ("build", "run", "test")[self.value - 1] + + @classmethod + def from_string(cls, s: str): + if s == "build": + return Context.BUILD + elif s == "run": + return Context.RUN + elif s == "test": + return Context.TEST + raise ValueError(f"context should be one of 'build', 'run', 'test', got {s}") diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index ee48955ac54038..62dda31034d2b7 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1690,41 +1690,18 @@ def check_views(self): "Loading the environment view will require reconcretization." % self.name ) - def _env_modifications_for_view(self, view: ViewDescriptor, reverse: bool = False): - all_mods = spack.util.environment.EnvironmentModifications() - - visited = set() - - errors = [] - for root_spec in self.concrete_roots(): - if root_spec in view and root_spec.installed and root_spec.package: - for spec in root_spec.traverse(deptype="run", root=True): - if spec.name in visited: - # It is expected that only one instance of the package - # can be added to the environment - do not attempt to - # add multiple. - tty.debug( - "Not adding {0} to shell modifications: " - "this package has already been added".format( - spec.format("{name}/{hash:7}") - ) - ) - continue - else: - visited.add(spec.name) - - try: - mods = uenv.environment_modifications_for_spec(spec, view) - except Exception as e: - msg = "couldn't get environment settings for %s" % spec.format( - "{name}@{version} /{hash:7}" - ) - errors.append((msg, str(e))) - continue - - all_mods.extend(mods.reversed() if reverse else mods) - - return all_mods, errors + def _env_modifications_for_view( + self, view: ViewDescriptor, reverse: bool = False + ) -> spack.util.environment.EnvironmentModifications: + try: + mods = uenv.environment_modifications_for_specs(*self.concrete_roots(), view=view) + except Exception as e: + # Failing to setup spec-specific changes shouldn't be a hard error. + tty.warn( + "couldn't load runtime environment due to {}: {}".format(e.__class__.__name__, e) + ) + return spack.util.environment.EnvironmentModifications() + return mods.reversed() if reverse else mods def add_view_to_env( self, env_mod: spack.util.environment.EnvironmentModifications, view: str @@ -1740,12 +1717,7 @@ def add_view_to_env( return env_mod env_mod.extend(uenv.unconditional_environment_modifications(descriptor)) - - mods, errors = self._env_modifications_for_view(descriptor) - env_mod.extend(mods) - if errors: - for err in errors: - tty.warn(*err) + env_mod.extend(self._env_modifications_for_view(descriptor)) # deduplicate paths from specs mapped to the same location for env_var in env_mod.group_by_name(): @@ -1767,9 +1739,7 @@ def rm_view_from_env( return env_mod env_mod.extend(uenv.unconditional_environment_modifications(descriptor).reversed()) - - mods, _ = self._env_modifications_for_view(descriptor, reverse=True) - env_mod.extend(mods) + env_mod.extend(self._env_modifications_for_view(descriptor, reverse=True)) return env_mod diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 4b60f52bf43d18..57b7da5ad52ab8 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -56,6 +56,7 @@ import spack.util.file_permissions as fp import spack.util.path import spack.util.spack_yaml as syaml +from spack.context import Context #: config section for this file @@ -717,10 +718,16 @@ def environment_modifications(self): ) # Let the extendee/dependency modify their extensions/dependencies - # before asking for package-specific modifications - env.extend(spack.build_environment.modifications_from_dependencies(spec, context="run")) - # Package specific modifications - spack.build_environment.set_module_variables_for_package(spec.package) + + # The only thing we care about is `setup_dependent_run_environment`, but + # for that to work, globals have to be set on the package modules, and the + # whole chain of setup_dependent_package has to be followed from leaf to spec. + # So: just run it here, but don't collect env mods. + spack.build_environment.SetupContext(context=Context.RUN).set_all_package_py_globals() + + # Then run setup_dependent_run_environment before setup_run_environment. + for dep in spec.dependencies(deptype=("link", "run")): + dep.package.setup_dependent_run_environment(env, spec) spec.package.setup_run_environment(env) # Modifications required from modules.yaml diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py index 2eb80fded3dc2d..0893b76a98a2f3 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -17,7 +17,8 @@ import spack.package_base import spack.spec import spack.util.spack_yaml as syaml -from spack.build_environment import _static_to_shared_library, dso_suffix +from spack.build_environment import UseMode, _static_to_shared_library, dso_suffix +from spack.context import Context from spack.paths import build_env_path from spack.util.cpus import determine_number_of_jobs from spack.util.environment import EnvironmentModifications @@ -438,10 +439,10 @@ def test_parallel_false_is_not_propagating(default_mock_concretization): # b (parallel =True) s = default_mock_concretization("a foobar=bar") - spack.build_environment.set_module_variables_for_package(s.package) + spack.build_environment.set_package_py_globals(s.package) assert s["a"].package.module.make_jobs == 1 - spack.build_environment.set_module_variables_for_package(s["b"].package) + spack.build_environment.set_package_py_globals(s["b"].package) assert s["b"].package.module.make_jobs == spack.build_environment.determine_number_of_jobs( parallel=s["b"].package.parallel ) @@ -575,3 +576,69 @@ def test_setting_attributes(self, default_mock_concretization): if current_module == spack.package_base: break assert current_module.SOME_ATTRIBUTE == 1 + + +def test_effective_deptype_build_environment(default_mock_concretization): + s = default_mock_concretization("dttop") + + # [ ] dttop@1.0 # + # [b ] ^dtbuild1@1.0 # <- direct build dep + # [b ] ^dtbuild2@1.0 # <- indirect build-only dep is dropped + # [bl ] ^dtlink2@1.0 # <- linkable, and runtime dep of build dep + # [ r ] ^dtrun2@1.0 # <- non-linkable, exectuable runtime dep of build dep + # [bl ] ^dtlink1@1.0 # <- direct build dep + # [bl ] ^dtlink3@1.0 # <- linkable, and runtime dep of build dep + # [b ] ^dtbuild2@1.0 # <- indirect build-only dep is dropped + # [bl ] ^dtlink4@1.0 # <- linkable, and runtime dep of build dep + # [ r ] ^dtrun1@1.0 # <- run-only dep is pruned (should it be in PATH?) + # [bl ] ^dtlink5@1.0 # <- children too + # [ r ] ^dtrun3@1.0 # <- children too + # [b ] ^dtbuild3@1.0 # <- children too + + expected_flags = { + "dttop": UseMode.ROOT, + "dtbuild1": UseMode.BUILDTIME_DIRECT, + "dtlink1": UseMode.BUILDTIME_DIRECT | UseMode.BUILDTIME, + "dtlink3": UseMode.BUILDTIME | UseMode.RUNTIME, + "dtlink4": UseMode.BUILDTIME | UseMode.RUNTIME, + "dtrun2": UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE, + "dtlink2": UseMode.RUNTIME, + } + + for spec, effective_type in spack.build_environment.effective_deptypes( + s, context=Context.BUILD + ): + assert effective_type & expected_flags.pop(spec.name) == effective_type + assert not expected_flags, f"Missing {expected_flags.keys()} from effective_deptypes" + + +def test_effective_deptype_run_environment(default_mock_concretization): + s = default_mock_concretization("dttop") + + # [ ] dttop@1.0 # + # [b ] ^dtbuild1@1.0 # <- direct build-only dep is pruned + # [b ] ^dtbuild2@1.0 # <- children too + # [bl ] ^dtlink2@1.0 # <- children too + # [ r ] ^dtrun2@1.0 # <- children too + # [bl ] ^dtlink1@1.0 # <- runtime, not executable + # [bl ] ^dtlink3@1.0 # <- runtime, not executable + # [b ] ^dtbuild2@1.0 # <- indirect build only dep is pruned + # [bl ] ^dtlink4@1.0 # <- runtime, not executable + # [ r ] ^dtrun1@1.0 # <- runtime and executable + # [bl ] ^dtlink5@1.0 # <- runtime, not executable + # [ r ] ^dtrun3@1.0 # <- runtime and executable + # [b ] ^dtbuild3@1.0 # <- indirect build-only dep is pruned + + expected_flags = { + "dttop": UseMode.ROOT, + "dtlink1": UseMode.RUNTIME, + "dtlink3": UseMode.BUILDTIME | UseMode.RUNTIME, + "dtlink4": UseMode.BUILDTIME | UseMode.RUNTIME, + "dtrun1": UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE, + "dtlink5": UseMode.RUNTIME, + "dtrun3": UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE, + } + + for spec, effective_type in spack.build_environment.effective_deptypes(s, context=Context.RUN): + assert effective_type & expected_flags.pop(spec.name) == effective_type + assert not expected_flags, f"Missing {expected_flags.keys()} from effective_deptypes" diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 4845d122060ea6..7d0eb37951b862 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -168,7 +168,7 @@ def test_env_remove(capfd): foo = ev.read("foo") with foo: - with pytest.raises(spack.main.SpackCommandError): + with pytest.raises(SpackCommandError): with capfd.disabled(): env("remove", "-y", "foo") assert "foo" in env("list") @@ -283,7 +283,7 @@ def setup_error(pkg, env): _, err = capfd.readouterr() assert "cmake-client had issues!" in err - assert "Warning: couldn't get environment settings" in err + assert "Warning: couldn't load runtime environment" in err def test_activate_adds_transitive_run_deps_to_path(install_mockery, mock_fetch, monkeypatch): @@ -500,11 +500,14 @@ def test_env_activate_broken_view( # switch to a new repo that doesn't include the installed package # test that Spack detects the missing package and fails gracefully with spack.repo.use_repositories(mock_custom_repository): - with pytest.raises(SpackCommandError): - env("activate", "--sh", "test") + wrong_repo = env("activate", "--sh", "test") + assert "Warning: couldn't load runtime environment" in wrong_repo + assert "Unknown namespace: builtin.mock" in wrong_repo # test replacing repo fixes it - env("activate", "--sh", "test") + normal_repo = env("activate", "--sh", "test") + assert "Warning: couldn't load runtime environment" not in normal_repo + assert "Unknown namespace: builtin.mock" not in normal_repo def test_to_lockfile_dict(): @@ -1044,7 +1047,7 @@ def test_env_commands_die_with_no_env_arg(): env("remove") # these have an optional env arg and raise errors via tty.die - with pytest.raises(spack.main.SpackCommandError): + with pytest.raises(SpackCommandError): env("loads") # This should NOT raise an error with no environment diff --git a/lib/spack/spack/test/cmd/load.py b/lib/spack/spack/test/cmd/load.py index 1aa220b570eed8..26fa374a05d34d 100644 --- a/lib/spack/spack/test/cmd/load.py +++ b/lib/spack/spack/test/cmd/load.py @@ -9,6 +9,7 @@ import spack.spec import spack.user_environment as uenv +import spack.util.environment from spack.main import SpackCommand load = SpackCommand("load") @@ -27,74 +28,63 @@ def test_manpath_trailing_colon( manpath search path via a trailing colon""" install("mpileaks") - sh_out = load("--sh", "--only", "package", "mpileaks") + sh_out = load("--sh", "mpileaks") lines = sh_out.split("\n") assert any(re.match(r"export MANPATH=.*:;", ln) for ln in lines) os.environ["MANPATH"] = "/tmp/man:" - sh_out = load("--sh", "--only", "package", "mpileaks") + sh_out = load("--sh", "mpileaks") lines = sh_out.split("\n") assert any(re.match(r"export MANPATH=.*:/tmp/man:;", ln) for ln in lines) -def test_load(install_mockery, mock_fetch, mock_archive, mock_packages): - """Test that the commands generated by load add the specified prefix - inspections. Also test that Spack records loaded specs by hash in the - user environment. - - CMAKE_PREFIX_PATH is the only prefix inspection guaranteed for fake - packages, since it keys on the prefix instead of a subdir.""" - install_out = install("mpileaks", output=str, fail_on_error=False) - print("spack install mpileaks") - print(install_out) +def test_load_recursive(install_mockery, mock_fetch, mock_archive, mock_packages, working_env): + """Test that `spack load` applies prefix inspections of its required runtime deps in + topo-order""" + install("mpileaks") mpileaks_spec = spack.spec.Spec("mpileaks").concretized() - sh_out = load("--sh", "--only", "package", "mpileaks") - csh_out = load("--csh", "--only", "package", "mpileaks") + # Ensure our reference variable is cleed. + os.environ["CMAKE_PREFIX_PATH"] = "/hello:/world" + + sh_out = load("--sh", "mpileaks") + csh_out = load("--csh", "mpileaks") + + def extract_cmake_prefix_path(output, prefix): + return next(cmd for cmd in output.split(";") if cmd.startswith(prefix))[ + len(prefix) : + ].split(":") - # Test prefix inspections - sh_out_test = "export CMAKE_PREFIX_PATH=%s" % mpileaks_spec.prefix - csh_out_test = "setenv CMAKE_PREFIX_PATH %s" % mpileaks_spec.prefix - assert sh_out_test in sh_out - assert csh_out_test in csh_out + # Map a prefix found in CMAKE_PREFIX_PATH back to a package name in mpileaks' DAG. + prefix_to_pkg = lambda prefix: next( + s.name for s in mpileaks_spec.traverse() if s.prefix == prefix + ) - # Test hashes recorded properly - hash_test_replacements = (uenv.spack_loaded_hashes_var, mpileaks_spec.dag_hash()) - sh_hash_test = "export %s=%s" % hash_test_replacements - csh_hash_test = "setenv %s %s" % hash_test_replacements - assert sh_hash_test in sh_out - assert csh_hash_test in csh_out + paths_sh = extract_cmake_prefix_path(sh_out, prefix="export CMAKE_PREFIX_PATH=") + paths_csh = extract_cmake_prefix_path(csh_out, prefix="setenv CMAKE_PREFIX_PATH ") + # Shouldn't be a difference between loading csh / sh, so check they're the same. + assert paths_sh == paths_csh -def test_load_recursive(install_mockery, mock_fetch, mock_archive, mock_packages): - """Test that the '-r' option to the load command prepends dependency prefix - inspections in post-order""" - install("mpileaks") - mpileaks_spec = spack.spec.Spec("mpileaks").concretized() + # We should've prepended new paths, and keep old ones. + assert paths_sh[-2:] == ["/hello", "/world"] - sh_out = load("--sh", "mpileaks") - csh_out = load("--csh", "mpileaks") + # All but the last two paths are added by spack load; lookup what packages they're from. + pkgs = [prefix_to_pkg(p) for p in paths_sh[:-2]] - # Test prefix inspections - prefix_test_replacement = ":".join( - reversed([s.prefix for s in mpileaks_spec.traverse(order="post")]) + # Do we have all the runtime packages? + assert set(pkgs) == set( + s.name for s in mpileaks_spec.traverse(deptype=("link", "run"), root=True) ) - sh_prefix_test = "export CMAKE_PREFIX_PATH=%s" % prefix_test_replacement - csh_prefix_test = "setenv CMAKE_PREFIX_PATH %s" % prefix_test_replacement - assert sh_prefix_test in sh_out - assert csh_prefix_test in csh_out + # Finally, do we list them in topo order? + for i, pkg in enumerate(pkgs): + set(s.name for s in mpileaks_spec[pkg].traverse(direction="parents")) in set(pkgs[:i]) - # Test spack records loaded hashes properly - hash_test_replacement = ( - uenv.spack_loaded_hashes_var, - ":".join(reversed([s.dag_hash() for s in mpileaks_spec.traverse(order="post")])), - ) - sh_hash_test = "export %s=%s" % hash_test_replacement - csh_hash_test = "setenv %s %s" % hash_test_replacement - assert sh_hash_test in sh_out - assert csh_hash_test in csh_out + # Lastly, do we keep track that mpileaks was loaded? + assert f"export {uenv.spack_loaded_hashes_var}={mpileaks_spec.dag_hash()}" in sh_out + assert f"setenv {uenv.spack_loaded_hashes_var} {mpileaks_spec.dag_hash()}" in csh_out def test_load_includes_run_env(install_mockery, mock_fetch, mock_archive, mock_packages): diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py index 0be11c046cdf07..5d1561a8eaedb7 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py @@ -4,11 +4,18 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import sys +from contextlib import contextmanager +from typing import Callable + +from llnl.util.lang import nullcontext import spack.build_environment import spack.config +import spack.spec import spack.util.environment as environment import spack.util.prefix as prefix +from spack import traverse +from spack.context import Context #: Environment variable name Spack uses to track individually loaded packages spack_loaded_hashes_var = "SPACK_LOADED_HASHES" @@ -62,40 +69,58 @@ def unconditional_environment_modifications(view): return env -def environment_modifications_for_spec(spec, view=None, set_package_py_globals=True): +@contextmanager +def projected_prefix(*specs: spack.spec.Spec, projection: Callable[[spack.spec.Spec], str]): + """Temporarily replace every Spec's prefix with projection(s)""" + prefixes = dict() + for s in traverse.traverse_nodes(specs, key=lambda s: s.dag_hash()): + if s.external: + continue + prefixes[s.dag_hash()] = s.prefix + s.prefix = prefix.Prefix(projection(s)) + + yield + + for s in traverse.traverse_nodes(specs, key=lambda s: s.dag_hash()): + s.prefix = prefixes.get(s.dag_hash(), s.prefix) + + +def environment_modifications_for_specs( + *specs: spack.spec.Spec, view=None, set_package_py_globals: bool = True +): """List of environment (shell) modifications to be processed for spec. This list is specific to the location of the spec or its projection in the view. Args: - spec (spack.spec.Spec): spec for which to list the environment modifications + specs: spec(s) for which to list the environment modifications view: view associated with the spec passed as first argument - set_package_py_globals (bool): whether or not to set the global variables in the + set_package_py_globals: whether or not to set the global variables in the package.py files (this may be problematic when using buildcaches that have been built on a different but compatible OS) """ - spec = spec.copy() - if view and not spec.external: - spec.prefix = prefix.Prefix(view.get_projection_for_spec(spec)) - - # generic environment modifications determined by inspecting the spec - # prefix - env = environment.inspect_path( - spec.prefix, prefix_inspections(spec.platform), exclude=environment.is_system_path - ) - - # Let the extendee/dependency modify their extensions/dependents - # before asking for package-specific modifications - env.extend( - spack.build_environment.modifications_from_dependencies( - spec, context="run", set_package_py_globals=set_package_py_globals - ) - ) - - if set_package_py_globals: - spack.build_environment.set_module_variables_for_package(spec.package) - - spec.package.setup_run_environment(env) + env = environment.EnvironmentModifications() + topo_ordered = traverse.traverse_nodes(specs, root=True, deptype=("run", "link"), order="topo") + + if view: + maybe_projected = projected_prefix(*specs, projection=view.get_projection_for_spec) + else: + maybe_projected = nullcontext() + + with maybe_projected: + # Static environment changes (prefix inspections) + for s in reversed(list(topo_ordered)): + static = environment.inspect_path( + s.prefix, prefix_inspections(s.platform), exclude=environment.is_system_path + ) + env.extend(static) + + # Dynamic environment changes (setup_run_environment etc) + setup_context = spack.build_environment.SetupContext(*specs, context=Context.RUN) + if set_package_py_globals: + setup_context.set_all_package_py_globals() + dynamic = setup_context.get_env_modifications() + env.extend(dynamic) return env diff --git a/share/spack/qa/setup-env-test.fish b/share/spack/qa/setup-env-test.fish index 86563b4b08ce3a..6474917b70766b 100755 --- a/share/spack/qa/setup-env-test.fish +++ b/share/spack/qa/setup-env-test.fish @@ -335,15 +335,14 @@ set _b_bin $_b_loc"/bin" set _a_loc (spack -m location -i shell-a) set _a_bin $_a_loc"/bin" -spt_contains "set -gx PATH $_b_bin" spack -m load --only package --fish shell-b +spt_contains "set -gx PATH $_b_bin" spack -m load --fish shell-b spt_succeeds spack -m load shell-b set LIST_CONTENT (spack -m load shell-b; spack load --list) spt_contains "shell-b@" echo $LIST_CONTENT spt_does_not_contain "shell-a@" echo $LIST_CONTENT # test a variable MacOS clears and one it doesn't for recursive loads -spt_contains "set -gx PATH $_a_bin:$_b_bin" spack -m load --fish shell-a -spt_succeeds spack -m load --only dependencies shell-a -spt_succeeds spack -m load --only package shell-a + +spt_succeeds spack -m load shell-a spt_fails spack -m load d spt_contains "usage: spack load " spack -m load -h spt_contains "usage: spack load " spack -m load -h d diff --git a/share/spack/qa/setup-env-test.sh b/share/spack/qa/setup-env-test.sh index 58feca69ea0487..4172a40155590b 100755 --- a/share/spack/qa/setup-env-test.sh +++ b/share/spack/qa/setup-env-test.sh @@ -104,7 +104,7 @@ contains "usage: spack module " spack -m module --help contains "usage: spack module " spack -m module title 'Testing `spack load`' -contains "export PATH=$(spack -m location -i shell-b)/bin" spack -m load --only package --sh shell-b +contains "export PATH=$(spack -m location -i shell-b)/bin" spack -m load --sh shell-b succeeds spack -m load shell-b LIST_CONTENT=`spack -m load shell-b; spack load --list` contains "shell-b@" echo $LIST_CONTENT @@ -113,8 +113,7 @@ fails spack -m load -l # test a variable MacOS clears and one it doesn't for recursive loads contains "export PATH=$(spack -m location -i shell-a)/bin" spack -m load --sh shell-a contains "export PATH=$(spack -m location -i shell-b)/bin" spack -m load --sh shell-b -succeeds spack -m load --only dependencies shell-a -succeeds spack -m load --only package shell-a +succeeds spack -m load shell-a fails spack -m load d contains "usage: spack load " spack -m load -h contains "usage: spack load " spack -m load -h d diff --git a/var/spack/repos/builtin/packages/gptune/package.py b/var/spack/repos/builtin/packages/gptune/package.py index 2affba20effb04..c0c321c9a4a0d7 100644 --- a/var/spack/repos/builtin/packages/gptune/package.py +++ b/var/spack/repos/builtin/packages/gptune/package.py @@ -52,6 +52,7 @@ class Gptune(CMakePackage): depends_on("py-pyaml", type=("build", "run")) depends_on("py-statsmodels@0.13.0:", type=("build", "run")) depends_on("py-mpi4py@3.0.3:", type=("build", "run")) + depends_on("python", type=("build", "run")) depends_on("pygmo", type=("build", "run")) depends_on("openturns", type=("build", "run")) depends_on("py-pymoo", type=("build", "run"), when="@3.0.0:") diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index b7a78c6fdd9fda..7e110a248ecf0a 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -752,14 +752,6 @@ def setup_build_environment(self, env): os.symlink(bin, sym) env.prepend_path("PATH", self.stage.path) - def setup_run_environment(self, env): - if "+clang" in self.spec: - env.set("CC", join_path(self.spec.prefix.bin, "clang")) - env.set("CXX", join_path(self.spec.prefix.bin, "clang++")) - if "+flang" in self.spec: - env.set("FC", join_path(self.spec.prefix.bin, "flang")) - env.set("F77", join_path(self.spec.prefix.bin, "flang")) - root_cmakelists_dir = "llvm" def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index bffaf875a2fa8d..7a4e15c1f7ca90 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -401,14 +401,13 @@ def install_cpanm(self): maker() maker("install") - def _setup_dependent_env(self, env, dependent_spec, deptype): + def _setup_dependent_env(self, env, dependent_spec): """Set PATH and PERL5LIB to include the extension and any other perl extensions it depends on, assuming they were installed with INSTALL_BASE defined.""" perl_lib_dirs = [] - for d in dependent_spec.traverse(deptype=deptype): - if d.package.extends(self.spec): - perl_lib_dirs.append(d.prefix.lib.perl5) + if dependent_spec.package.extends(self.spec): + perl_lib_dirs.append(dependent_spec.prefix.lib.perl5) if perl_lib_dirs: perl_lib_path = ":".join(perl_lib_dirs) env.prepend_path("PERL5LIB", perl_lib_path) @@ -416,10 +415,10 @@ def _setup_dependent_env(self, env, dependent_spec, deptype): env.append_path("PATH", self.prefix.bin) def setup_dependent_build_environment(self, env, dependent_spec): - self._setup_dependent_env(env, dependent_spec, deptype=("build", "run", "test")) + self._setup_dependent_env(env, dependent_spec) def setup_dependent_run_environment(self, env, dependent_spec): - self._setup_dependent_env(env, dependent_spec, deptype=("run",)) + self._setup_dependent_env(env, dependent_spec) def setup_dependent_package(self, module, dependent_spec): """Called before perl modules' install() methods. diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 59306d8f2377ca..83dbfb382fd94d 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -1244,12 +1244,11 @@ def setup_dependent_run_environment(self, env, dependent_spec): """Set PYTHONPATH to include the site-packages directory for the extension and any other python extensions it depends on. """ - for d in dependent_spec.traverse(deptype=("run"), root=True): - if d.package.extends(self.spec): - # Packages may be installed in platform-specific or platform-independent - # site-packages directories - for directory in {self.platlib, self.purelib}: - env.prepend_path("PYTHONPATH", os.path.join(d.prefix, directory)) + if dependent_spec.package.extends(self.spec): + # Packages may be installed in platform-specific or platform-independent + # site-packages directories + for directory in {self.platlib, self.purelib}: + env.prepend_path("PYTHONPATH", os.path.join(dependent_spec.prefix, directory)) def setup_dependent_package(self, module, dependent_spec): """Called before python modules' install() methods.""" diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index 60cbc76cd87fa1..694c2551e1b372 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -83,9 +83,8 @@ def url_for_version(self, version): return url.format(version.up_to(2), version) def setup_dependent_run_environment(self, env, dependent_spec): - for d in dependent_spec.traverse(deptype=("run"), root=True): - if d.package.extends(self.spec): - env.prepend_path("GEM_PATH", d.prefix) + if dependent_spec.package.extends(self.spec): + env.prepend_path("GEM_PATH", dependent_spec.prefix) def setup_dependent_package(self, module, dependent_spec): """Called before ruby modules' install() methods. Sets GEM_HOME diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index 33bff65e252138..c0082dc52cc1f7 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -151,13 +151,12 @@ def setup_dependent_build_environment(self, env, dependent_spec): # https://core.tcl-lang.org/tk/tktview/447bd3e4abe17452d19a80e6840dcc8a2603fcbc env.prepend_path("TCLLIBPATH", self.spec["tcl"].libs.directories[0], separator=" ") - for d in dependent_spec.traverse(deptype=("build", "run", "test")): - if d.package.extends(self.spec): - # Tcl libraries may be installed in lib or lib64, see #19546 - for lib in ["lib", "lib64"]: - tcllibpath = join_path(d.prefix, lib) - if os.path.exists(tcllibpath): - env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ") + if dependent_spec.package.extends(self.spec): + # Tcl libraries may be installed in lib or lib64, see #19546 + for lib in ["lib", "lib64"]: + tcllibpath = join_path(dependent_spec.prefix, lib) + if os.path.exists(tcllibpath): + env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ") def setup_dependent_run_environment(self, env, dependent_spec): """Set TCLLIBPATH to include the tcl-shipped directory for @@ -167,10 +166,9 @@ def setup_dependent_run_environment(self, env, dependent_spec): * https://wiki.tcl-lang.org/page/TCLLIBPATH """ - for d in dependent_spec.traverse(deptype=("build", "run", "test")): - if d.package.extends(self.spec): - # Tcl libraries may be installed in lib or lib64, see #19546 - for lib in ["lib", "lib64"]: - tcllibpath = join_path(d.prefix, lib) - if os.path.exists(tcllibpath): - env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ") + if dependent_spec.package.extends(self.spec): + # Tcl libraries may be installed in lib or lib64, see #19546 + for lib in ["lib", "lib64"]: + tcllibpath = join_path(dependent_spec.prefix, lib) + if os.path.exists(tcllibpath): + env.prepend_path("TCLLIBPATH", tcllibpath, separator=" ") From 8720cec2831306e417ca0be975ae86daf6c579e7 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Thu, 19 Oct 2023 12:08:24 -0700 Subject: [PATCH 273/806] add nvechip to sundials components when mfem+rocm (#40512) --- var/spack/repos/builtin/packages/mfem/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index b4c66447a16139..5fac0860ea1040 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -1198,6 +1198,8 @@ def sundials_components(self): sun_comps += ",nvecparhyp,nvecparallel" if "+cuda" in spec and "+cuda" in spec["sundials"]: sun_comps += ",nveccuda" + if "+rocm" in spec and "+rocm" in spec["sundials"]: + sun_comps += ",nvechip" return sun_comps @property From fa4d5ee92985a61315ba7aca3b536a9489897ab9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 19 Oct 2023 14:08:43 -0500 Subject: [PATCH 274/806] py-rasterio: add v1.3.9 (#40621) --- var/spack/repos/builtin/packages/py-rasterio/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-rasterio/package.py b/var/spack/repos/builtin/packages/py-rasterio/package.py index e837c282c1263f..83db363c9814c3 100644 --- a/var/spack/repos/builtin/packages/py-rasterio/package.py +++ b/var/spack/repos/builtin/packages/py-rasterio/package.py @@ -20,6 +20,7 @@ class PyRasterio(PythonPackage): maintainers("adamjstewart") version("master", branch="master") + version("1.3.9", sha256="fc6d0d290492fa1a5068711cfebb21cc936968891b7ed9da0690c8a7388885c5") version("1.3.8", sha256="ffdd18e78efdf8ad5861065fd812a66dd34264293317ff6540a078ea891cdef8") version("1.3.7", sha256="abfdcb8f10210b8fad939f40d545d6c47e9e3b5cf4a43773ca8dd11c58204304") version("1.3.6", sha256="c8b90eb10e16102d1ab0334a7436185f295de1c07f0d197e206d1c005fc33905") @@ -37,6 +38,7 @@ class PyRasterio(PythonPackage): version("1.0a12", sha256="47d460326e04c64590ff56952271a184a6307f814efc34fb319c12e690585f3c") # From pyproject.toml + depends_on("py-setuptools@67.8:", when="@1.3.9:", type="build") depends_on("py-cython@0.29.29:", when="@1.3.3:", type="build") depends_on("py-cython@0.29.24:0.29", when="@1.3.0:1.3.2", type="build") From 4c1785d5f6cfae362d04d31e0cdcbe8b6155c46d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:02:51 +0200 Subject: [PATCH 275/806] build(deps): bump urllib3 from 2.0.6 to 2.0.7 in /lib/spack/docs (#40583) --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 8b6c32750401e2..67c09000fdbf75 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -5,7 +5,7 @@ sphinx-rtd-theme==1.3.0 python-levenshtein==0.23.0 docutils==0.18.1 pygments==2.16.1 -urllib3==2.0.6 +urllib3==2.0.7 pytest==7.4.2 isort==5.12.0 black==23.9.1 From ba571f2404005bcc576e6e014dc2fc9cba15a8b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:03:23 +0200 Subject: [PATCH 276/806] build(deps): bump mypy from 1.6.0 to 1.6.1 in /.github/workflows/style (#40602) --- .github/workflows/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt index 125c3559afe877..079c4557f64c72 100644 --- a/.github/workflows/style/requirements.txt +++ b/.github/workflows/style/requirements.txt @@ -2,6 +2,6 @@ black==23.9.1 clingo==5.6.2 flake8==6.1.0 isort==5.12.0 -mypy==1.6.0 +mypy==1.6.1 types-six==1.16.21.9 vermin==1.5.2 From 405de56c718d478f7c9e1446df3567be33d3144a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:03:48 +0200 Subject: [PATCH 277/806] build(deps): bump mypy from 1.6.0 to 1.6.1 in /lib/spack/docs (#40603) --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 67c09000fdbf75..8c7b4e88cc47a1 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -10,4 +10,4 @@ pytest==7.4.2 isort==5.12.0 black==23.9.1 flake8==6.1.0 -mypy==1.6.0 +mypy==1.6.1 From f2ba25e09dba1f0d4eacfa778f281eb549676d1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 23:04:40 +0200 Subject: [PATCH 278/806] build(deps): bump actions/checkout from 4.1.0 to 4.1.1 (#40584) --- .github/workflows/audit.yaml | 2 +- .github/workflows/bootstrap.yml | 22 +++++++++++----------- .github/workflows/build-containers.yml | 2 +- .github/workflows/ci.yaml | 2 +- .github/workflows/nightly-win-builds.yml | 2 +- .github/workflows/unit_tests.yaml | 10 +++++----- .github/workflows/valid-style.yml | 6 +++--- .github/workflows/windows_python.yml | 6 +++--- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index f5eddeca128646..749e6f526aa4b1 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -22,7 +22,7 @@ jobs: matrix: operating_system: ["ubuntu-latest", "macos-latest"] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 with: python-version: ${{inputs.python_version}} diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index ab98e83f4ccebf..db64ca94d5e6a0 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -24,7 +24,7 @@ jobs: make patch unzip which xz python3 python3-devel tree \ cmake bison bison-devel libstdc++-static - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup non-root user @@ -62,7 +62,7 @@ jobs: make patch unzip xz-utils python3 python3-dev tree \ cmake bison - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup non-root user @@ -99,7 +99,7 @@ jobs: bzip2 curl file g++ gcc gfortran git gnupg2 gzip \ make patch unzip xz-utils python3 python3-dev tree - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup non-root user @@ -133,7 +133,7 @@ jobs: make patch unzip which xz python3 python3-devel tree \ cmake bison - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup repo @@ -158,7 +158,7 @@ jobs: run: | brew install cmake bison@2.7 tree - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Bootstrap clingo run: | source share/spack/setup-env.sh @@ -179,7 +179,7 @@ jobs: run: | brew install tree - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Bootstrap clingo run: | set -ex @@ -204,7 +204,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup repo @@ -247,7 +247,7 @@ jobs: bzip2 curl file g++ gcc patchelf gfortran git gzip \ make patch unzip xz-utils python3 python3-dev tree - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup non-root user @@ -284,7 +284,7 @@ jobs: make patch unzip xz-utils python3 python3-dev tree \ gawk - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - name: Setup non-root user @@ -317,7 +317,7 @@ jobs: # Remove GnuPG since we want to bootstrap it sudo rm -rf /usr/local/bin/gpg - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Bootstrap GnuPG run: | source share/spack/setup-env.sh @@ -335,7 +335,7 @@ jobs: # Remove GnuPG since we want to bootstrap it sudo rm -rf /usr/local/bin/gpg - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: Bootstrap GnuPG run: | source share/spack/setup-env.sh diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 5d6ba6adf565e1..807bf6c858d25d 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -56,7 +56,7 @@ jobs: if: github.repository == 'spack/spack' steps: - name: Checkout - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 - name: Set Container Tag Normal (Nightly) run: | diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index af0d8dd8f98f10..047109ca76e70e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,7 +35,7 @@ jobs: core: ${{ steps.filter.outputs.core }} packages: ${{ steps.filter.outputs.packages }} steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 if: ${{ github.event_name == 'push' }} with: fetch-depth: 0 diff --git a/.github/workflows/nightly-win-builds.yml b/.github/workflows/nightly-win-builds.yml index 682ecc4b8384ab..511316a2a35504 100644 --- a/.github/workflows/nightly-win-builds.yml +++ b/.github/workflows/nightly-win-builds.yml @@ -14,7 +14,7 @@ jobs: build-paraview-deps: runs-on: windows-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 4e1d909f025848..7f7f3808b018c0 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -51,7 +51,7 @@ jobs: on_develop: false steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 @@ -98,7 +98,7 @@ jobs: shell: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 @@ -137,7 +137,7 @@ jobs: dnf install -y \ bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \ make patch tcl unzip which xz - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 - name: Setup repo and non-root user run: | git --version @@ -156,7 +156,7 @@ jobs: clingo-cffi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 @@ -191,7 +191,7 @@ jobs: matrix: python-version: ["3.11"] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 diff --git a/.github/workflows/valid-style.yml b/.github/workflows/valid-style.yml index 2f93c627685e05..5b9f33913eadf6 100644 --- a/.github/workflows/valid-style.yml +++ b/.github/workflows/valid-style.yml @@ -18,7 +18,7 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 with: python-version: '3.11' @@ -35,7 +35,7 @@ jobs: style: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 @@ -69,7 +69,7 @@ jobs: dnf install -y \ bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \ make patch tcl unzip which xz - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # @v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 - name: Setup repo and non-root user run: | git --version diff --git a/.github/workflows/windows_python.yml b/.github/workflows/windows_python.yml index 9a99a6ef976516..137c00a9bdbc70 100644 --- a/.github/workflows/windows_python.yml +++ b/.github/workflows/windows_python.yml @@ -15,7 +15,7 @@ jobs: unit-tests: runs-on: windows-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 @@ -39,7 +39,7 @@ jobs: unit-tests-cmd: runs-on: windows-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 @@ -63,7 +63,7 @@ jobs: build-abseil: runs-on: windows-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 with: fetch-depth: 0 - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 From e30f53f206a3bd10ac524f3abf10e08e9aa2369f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Fri, 20 Oct 2023 00:00:24 +0200 Subject: [PATCH 279/806] perl: change permissions in order to apply patch on version 5.38.0 (#40609) Co-authored-by: Harmen Stoppels --- .../repos/builtin/packages/perl/package.py | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 7a4e15c1f7ca90..299ae19436eae9 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -32,6 +32,8 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package url = "http://www.cpan.org/src/5.0/perl-5.34.0.tar.gz" tags = ["windows"] + maintainers("LydDeb") + executables = [r"^perl(-?\d+.*)?$"] # see https://www.cpan.org/src/README.html for @@ -258,13 +260,23 @@ def determine_variants(cls, exes, version): # aren't writeable so make pp.c user writeable # before patching. This should probably walk the # source and make everything writeable in the future. + # The patch "zlib-ng.patch" also fail. So, apply chmod + # to Makefile.PL and Zlib.xs too. def do_stage(self, mirror_only=False): # Do Spack's regular stage super().do_stage(mirror_only) - # Add write permissions on file to be patched - filename = join_path(self.stage.source_path, "pp.c") - perm = os.stat(filename).st_mode - os.chmod(filename, perm | 0o200) + # Add write permissions on files to be patched + files_to_chmod = [ + join_path(self.stage.source_path, "pp.c"), + join_path(self.stage.source_path, "cpan/Compress-Raw-Zlib/Makefile.PL"), + join_path(self.stage.source_path, "cpan/Compress-Raw-Zlib/Zlib.xs"), + ] + for filename in files_to_chmod: + try: + perm = os.stat(filename).st_mode + os.chmod(filename, perm | 0o200) + except IOError: + continue def nmake_arguments(self): args = [] From 0019faaa1737462afa31ffc6b3cd47a26331ac19 Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Thu, 19 Oct 2023 20:02:25 -0400 Subject: [PATCH 280/806] vtk-m: update to latest release (#40624) --- var/spack/repos/builtin/packages/vtk-m/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py index bec8dc963af12d..ce58cc1d6f0ad7 100644 --- a/var/spack/repos/builtin/packages/vtk-m/package.py +++ b/var/spack/repos/builtin/packages/vtk-m/package.py @@ -29,7 +29,7 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version("release", branch="release") - version("2.1.0-rc1", sha256="337df672ac5c2e0b442571a1380aa98ae70a155c93488c32198d055cb893417a") + version("2.1.0-rc2", sha256="94631fff9f668f40c9c797f03cf32a0d22d57111e309b1e8133c2a3f292b4af1") version( "2.0.0", sha256="32643cf3564fa77f8e2a2a5456a574b6b2355bb68918eb62ccde493993ade1a3", From c9e5173bbd84558e580b0d13fdeb2dae54deb96d Mon Sep 17 00:00:00 2001 From: wspear Date: Thu, 19 Oct 2023 22:24:17 -0700 Subject: [PATCH 281/806] TAU: Respect ~fortran for +mpi (#40617) --- var/spack/repos/builtin/packages/tau/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index d34b65d848573d..b61ab5753ca64c 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -261,8 +261,9 @@ def install(self, spec, prefix): if "+mpi" in spec: env["CC"] = spec["mpi"].mpicc env["CXX"] = spec["mpi"].mpicxx - env["F77"] = spec["mpi"].mpif77 - env["FC"] = spec["mpi"].mpifc + if "+fortran" in spec: + env["F77"] = spec["mpi"].mpif77 + env["FC"] = spec["mpi"].mpifc options.append("-mpiinc=%s" % spec["mpi"].prefix.include) options.append("-mpilib=%s" % spec["mpi"].prefix.lib) From 0907d437838cd3392708d2e0a2053b51e63f45ee Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 20 Oct 2023 01:29:38 -0500 Subject: [PATCH 282/806] Drop support for external PythonX.Y (#40628) On some systems, multiple pythonx.y are placed in the same prefix as pythonx (where only one of them is associated with that pythonx). Spack external detection for Python was willing to register all of these as external versions. Moreover, the `package.py` for Python was able to distinguish these. This can cause an issue for some build systems, which will just look for python3 for example, so if that python3 is actually python3.6, and the build system needs 3.7 (which spack may have found in the same prefix, and offered as a suitable external), it will fail when invoking python3. To avoid that issue, we simply avoid treating pythonx.y as external candidates. In the above case, Spack would only detect a Python 3.6 external, and the build would be forced to use a Spack-built Python 3.7 (which we consider a good thing). --- var/spack/repos/builtin/packages/python/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 83dbfb382fd94d..8253ef0f9a6d92 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -326,7 +326,7 @@ class Python(Package): # An in-source build with --enable-optimizations fails for python@3.X build_directory = "spack-build" - executables = [r"^python[\d.]*[mw]?$"] + executables = [r"^python\d?$"] @classmethod def determine_version(cls, exe): From 468f6c757edbd7ae72b822bfab5f435ebfa4bf69 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 20 Oct 2023 09:51:49 +0200 Subject: [PATCH 283/806] schema/compilers.py: fix validation of 2+ entries (#40627) Fix the following syntax which validates only the first array entry: ```python "compilers": { "type": "array", "items": [ { "type": ... } ] } ``` to ```python "compilers": { "type": "array", "items": { "type": ... } } ``` which validates the entire array. Oops... --- lib/spack/spack/schema/compilers.py | 106 ++++++++++++++-------------- 1 file changed, 52 insertions(+), 54 deletions(-) diff --git a/lib/spack/spack/schema/compilers.py b/lib/spack/spack/schema/compilers.py index 6caaf9cc2385b6..924fee7a21ff76 100644 --- a/lib/spack/spack/schema/compilers.py +++ b/lib/spack/spack/schema/compilers.py @@ -14,63 +14,61 @@ properties = { "compilers": { "type": "array", - "items": [ - { - "type": "object", - "additionalProperties": False, - "properties": { - "compiler": { - "type": "object", - "additionalProperties": False, - "required": ["paths", "spec", "modules", "operating_system"], - "properties": { - "paths": { - "type": "object", - "required": ["cc", "cxx", "f77", "fc"], - "additionalProperties": False, - "properties": { - "cc": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "cxx": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "f77": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "fc": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - }, + "items": { + "type": "object", + "additionalProperties": False, + "properties": { + "compiler": { + "type": "object", + "additionalProperties": False, + "required": ["paths", "spec", "modules", "operating_system"], + "properties": { + "paths": { + "type": "object", + "required": ["cc", "cxx", "f77", "fc"], + "additionalProperties": False, + "properties": { + "cc": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "cxx": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "f77": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "fc": {"anyOf": [{"type": "string"}, {"type": "null"}]}, }, - "flags": { - "type": "object", - "additionalProperties": False, - "properties": { - "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - }, - }, - "spec": {"type": "string"}, - "operating_system": {"type": "string"}, - "target": {"type": "string"}, - "alias": {"anyOf": [{"type": "string"}, {"type": "null"}]}, - "modules": { - "anyOf": [{"type": "string"}, {"type": "null"}, {"type": "array"}] - }, - "implicit_rpaths": { - "anyOf": [ - {"type": "array", "items": {"type": "string"}}, - {"type": "boolean"}, - ] - }, - "environment": spack.schema.environment.definition, - "extra_rpaths": { - "type": "array", - "default": [], - "items": {"type": "string"}, + }, + "flags": { + "type": "object", + "additionalProperties": False, + "properties": { + "cflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "cxxflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "fflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "cppflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "ldflags": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "ldlibs": {"anyOf": [{"type": "string"}, {"type": "null"}]}, }, }, - } - }, - } - ], + "spec": {"type": "string"}, + "operating_system": {"type": "string"}, + "target": {"type": "string"}, + "alias": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + "modules": { + "anyOf": [{"type": "string"}, {"type": "null"}, {"type": "array"}] + }, + "implicit_rpaths": { + "anyOf": [ + {"type": "array", "items": {"type": "string"}}, + {"type": "boolean"}, + ] + }, + "environment": spack.schema.environment.definition, + "extra_rpaths": { + "type": "array", + "default": [], + "items": {"type": "string"}, + }, + }, + } + }, + }, } } From aa4d55004cdd134a9ad5d4e35032b6c4644e75a6 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Fri, 20 Oct 2023 06:53:41 -0500 Subject: [PATCH 284/806] Add package py-macs3 and dependencies (#40498) * py-cykhash: adding new package py-cykhash * py-hmmlearn: adding new package py-hmmlearn * py-macs3: adding new package py-macs3 * py-macs3: adding python version restriction and other changes. --- .../builtin/packages/py-cykhash/package.py | 20 +++++++++++++ .../builtin/packages/py-hmmlearn/package.py | 28 +++++++++++++++++++ .../builtin/packages/py-macs3/package.py | 26 +++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cykhash/package.py create mode 100644 var/spack/repos/builtin/packages/py-hmmlearn/package.py create mode 100644 var/spack/repos/builtin/packages/py-macs3/package.py diff --git a/var/spack/repos/builtin/packages/py-cykhash/package.py b/var/spack/repos/builtin/packages/py-cykhash/package.py new file mode 100644 index 00000000000000..85d67fb9799f9e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cykhash/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 PyCykhash(PythonPackage): + """Cython wrapper for khash-sets/maps, efficient implementation of isin and unique.""" + + homepage = "https://github.com/realead/cykhash" + pypi = "cykhash/cykhash-2.0.1.tar.gz" + + maintainers("snehring") + + version("2.0.1", sha256="b4794bc9f549114d8cf1d856d9f64e08ff5f246bf043cf369fdb414e9ceb97f7") + + depends_on("py-setuptools", type="build") + depends_on("py-cython@0.28:", type="build") diff --git a/var/spack/repos/builtin/packages/py-hmmlearn/package.py b/var/spack/repos/builtin/packages/py-hmmlearn/package.py new file mode 100644 index 00000000000000..16bfb20ccf3f66 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-hmmlearn/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2023 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 PyHmmlearn(PythonPackage): + """hmmlearn is a set of algorithms for unsupervised learning and + inference of Hidden Markov Models.""" + + homepage = "https://github.com/hmmlearn/hmmlearn" + pypi = "hmmlearn/hmmlearn-0.3.0.tar.gz" + + maintainers("snehring") + + version("0.3.0", sha256="d13a91ea3695df881465e3d36132d7eef4e84d483f4ba538a4b46e24b5ea100f") + + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm@3.3:", type="build") + depends_on("py-pybind11@2.6:", type="build") + + depends_on("py-numpy@1.10:", type=("build", "run")) + depends_on("py-scikit-learn@0.16:", type=("build", "run")) + depends_on("py-scipy@0.19:", type=("build", "run")) + + conflicts("py-scikit-learn@=0.22.0", msg="Not compatible with scikit-learn@0.22.0") diff --git a/var/spack/repos/builtin/packages/py-macs3/package.py b/var/spack/repos/builtin/packages/py-macs3/package.py new file mode 100644 index 00000000000000..be94b9c290cd7c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-macs3/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 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 PyMacs3(PythonPackage): + """MACS: Model-based Analysis for ChIP-Seq""" + + homepage = "https://github.com/macs3-project/MACS/" + pypi = "MACS3/MACS3-3.0.0b3.tar.gz" + + maintainers("snehring") + + version("3.0.0b3", sha256="caa794d4cfcd7368447eae15878505315dac44c21546e8fecebb3561e9cee362") + + depends_on("python@3.9:", type=("build", "run")) + + depends_on("py-setuptools@60.0:", type="build") + depends_on("py-cython@0.29:0", type=("build", "run")) + + depends_on("py-numpy@1.19:", type=("build", "run")) + depends_on("py-cykhash@2", type=("build", "run")) + depends_on("py-hmmlearn@0.3:", type=("build", "run")) From 00ee72396fbafa766742555a3d21146adfb97479 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:55:41 +0200 Subject: [PATCH 285/806] py-bidscoin: add v4.1.1 and py-argparse-manpage: add new package (#40414) * py-bidscoin: add 4.1.1 * Fix style * Fix restrictions for dependencies --- .../packages/py-argparse-manpage/package.py | 24 +++++++++++++++++++ .../builtin/packages/py-bidscoin/package.py | 15 ++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-argparse-manpage/package.py diff --git a/var/spack/repos/builtin/packages/py-argparse-manpage/package.py b/var/spack/repos/builtin/packages/py-argparse-manpage/package.py new file mode 100644 index 00000000000000..74108bfbdfbaaf --- /dev/null +++ b/var/spack/repos/builtin/packages/py-argparse-manpage/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2023 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 PyArgparseManpage(PythonPackage): + """Build manual page from python's ArgumentParser object.""" + + homepage = "https://github.com/praiskup/argparse-manpage" + pypi = "argparse-manpage/argparse-manpage-4.5.tar.gz" + + version("4.5", sha256="213c061878a10bf0e40f6a293382f6e82409e5110d0683b16ebf87f903d604db") + + variant("setuptools", default=False, description="Enable the setuptools.builds_meta backend") + + depends_on("py-setuptools", type="build") + depends_on("py-packaging", type="build") + + depends_on("py-tomli", when="^python@:3.10", type=("build", "run")) + + depends_on("py-setuptools", when="+setuptools", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-bidscoin/package.py b/var/spack/repos/builtin/packages/py-bidscoin/package.py index 3c840f69716f9c..a5b7dd83024578 100644 --- a/var/spack/repos/builtin/packages/py-bidscoin/package.py +++ b/var/spack/repos/builtin/packages/py-bidscoin/package.py @@ -13,20 +13,23 @@ class PyBidscoin(PythonPackage): homepage = "https://github.com/Donders-Institute/bidscoin" pypi = "bidscoin/bidscoin-3.7.4.tar.gz" + version("4.1.1", sha256="28730e9202d3c44d77c0bbdea9565e00adfdd23e85a6f3f121c1bfce1a7b462b") version("4.0.0", sha256="3b0c26f2e250e06b6f526cdbee09517e1f339da8035c0a316609b4463d75824d") version("3.7.4", sha256="efa32238fb7b75e533e7f5cc318ad5a703716d291985435d43f1de4f18402517") depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools@62.2:", when="@4.1:", type="build") depends_on("py-setuptools@61:", when="@4:", type="build") depends_on("py-setuptools", type="build") - depends_on("py-pytest-runner", type="build") + depends_on("py-argparse-manpage+setuptools", when="@4.1:", type="build") depends_on("py-pandas", type=("build", "run")) depends_on("py-matplotlib", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) depends_on("py-pydicom@2:", type=("build", "run")) - depends_on("py-pyqt5@5.12.1:", type=("build", "run")) + depends_on("py-pyqt6", when="@4.1:", type=("build", "run")) depends_on("py-ruamel-yaml@0.15.35:", type=("build", "run")) + depends_on("py-tomli@1.1:", when="@4.1: ^python@:3.10", type=("build", "run")) depends_on("py-coloredlogs", type=("build", "run")) depends_on("py-tqdm@4.60:", when="@4:", type=("build", "run")) depends_on("py-tqdm", type=("build", "run")) @@ -34,6 +37,10 @@ class PyBidscoin(PythonPackage): depends_on("py-python-dateutil", type=("build", "run")) depends_on("py-nibabel", type=("build", "run")) depends_on("py-bids-validator", when="@4:", type=("build", "run")) - depends_on("py-pydeface", when="@4:", type=("build", "run")) - depends_on("py-pytest", when="@4:", type=("build", "run")) depends_on("dcm2niix", type=("build", "run")) + + # Historical dependencies + depends_on("py-pytest-runner", when="@:3", type="build") + depends_on("py-pyqt5@5.12.1:", when="@:4.0", type=("build", "run")) + depends_on("py-pydeface", when="@4.0", type=("build", "run")) + depends_on("py-pytest", when="@4.0", type=("build", "run")) From 5b9b5eaa2856e1d1fd53350f31da4fd123eaed98 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:56:48 +0200 Subject: [PATCH 286/806] py-dcm2bids: add v3.1.0 (#40447) * py-dcm2bids: add 3.1.0 * Fix python restriction --- .../repos/builtin/packages/py-dcm2bids/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-dcm2bids/package.py b/var/spack/repos/builtin/packages/py-dcm2bids/package.py index 2aa34b5eab1914..fe3deb15629ada 100644 --- a/var/spack/repos/builtin/packages/py-dcm2bids/package.py +++ b/var/spack/repos/builtin/packages/py-dcm2bids/package.py @@ -13,11 +13,15 @@ class PyDcm2bids(PythonPackage): homepage = "https://github.com/unfmontreal/Dcm2Bids" pypi = "dcm2bids/dcm2bids-2.1.9.tar.gz" + version("3.1.0", sha256="53a8a177d556df897e19d72bd517fdae0245927a8938bb9fbbd51f9f33f54f84") version("2.1.9", sha256="d962bd0a7f1ed200ecb699e8ddb29ff58f09ab2f850a7f37511b79c62189f715") - depends_on("python@3.7:", type=("build", "run")) + depends_on("python@3.8:", when="@3:", type=("build", "run")) depends_on("py-setuptools", type="build") - depends_on("py-setuptools-scm", type="build") - depends_on("py-future@0.17.1:", type=("build", "run")) + depends_on("py-packaging@23.1:", when="@3:", type=("build", "run")) depends_on("dcm2niix", type=("build", "run")) + + # Historical dependencies + depends_on("py-setuptools-scm", when="@2", type="build") + depends_on("py-future@0.17.1:", when="@2", type=("build", "run")) From 5de1c1c98f71271c64d8531ce4e76bbdfb67b4e5 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:59:26 +0200 Subject: [PATCH 287/806] py-statsmodels: add 0.14.0 (#39156) * py-statsmodels: add 0.14.0 * Fix style * Update var/spack/repos/builtin/packages/py-statsmodels/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-statsmodels/package.py Co-authored-by: Adam J. Stewart * Remove python limits * Remove comment --------- Co-authored-by: Adam J. Stewart --- .../packages/py-statsmodels/package.py | 55 +++++++++++-------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py index 36968986a33abc..2fe227de4532cf 100644 --- a/var/spack/repos/builtin/packages/py-statsmodels/package.py +++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import glob import os from spack.package import * @@ -13,7 +14,9 @@ class PyStatsmodels(PythonPackage): homepage = "https://www.statsmodels.org" pypi = "statsmodels/statsmodels-0.8.0.tar.gz" + git = "https://github.com/statsmodels/statsmodels.git" + version("0.14.0", sha256="6875c7d689e966d948f15eb816ab5616f4928706b180cf470fd5907ab6f647a4") version("0.13.5", sha256="593526acae1c0fda0ea6c48439f67c3943094c542fe769f8b90fe9e6c6cc4871") version("0.13.2", sha256="77dc292c9939c036a476f1770f9d08976b05437daa229928da73231147cde7d4") version("0.13.1", sha256="006ec8d896d238873af8178d5475203844f2c391194ed8d42ddac37f5ff77a69") @@ -23,36 +26,42 @@ class PyStatsmodels(PythonPackage): version("0.10.2", sha256="9cd2194c6642a8754e85f9a6e6912cdf996bebf6ff715d3cc67f65dadfd37cc9") version("0.10.1", sha256="320659a80f916c2edf9dfbe83512d9004bb562b72eedb7d9374562038697fa10") - depends_on("python@2.7:2.8,3.4:", when="@0.10.1:", type=("build", "link", "run")) - depends_on("python@3.6:", when="@0.12.1:", type=("build", "link", "run")) + depends_on("python@3.8:", when="@0.14:", type=("build", "link", "run")) + depends_on("python", type=("build", "link", "run")) - # according to https://www.statsmodels.org/dev/install.html earlier versions might work. - depends_on("py-setuptools", type="build") - depends_on("py-setuptools@59.2.0:", type="build", when="@0.13.5:") + depends_on("py-setuptools@59.2:", when="@0.13.3:", type="build") + depends_on("py-setuptools@0.6c5:", type="build") - # https://github.com/statsmodels/statsmodels/blob/01b19d7d111b29c183f620ff0a949ef6391ff8ee/pyproject.toml - depends_on("py-cython@0", type="build") - depends_on("py-cython@0.29.14:", type="build", when="@0.12.0:") - depends_on("py-cython@0.29.22:", type="build", when="@0.13.0:") - depends_on("py-cython@0.29.32:", type="build", when="@0.13.5:") + # pyproject.toml + depends_on("py-cython@0.29.26:2", when="@0.14:", type="build") + depends_on("py-cython@0.29.32:2", when="@0.13.5:0.13", type="build") + depends_on("py-cython@0.29.22:2", when="@0.13:", type="build") + depends_on("py-cython@0.29.14:2", when="@0.12:", type="build") + depends_on("py-cython@0.29:2", type="build") + depends_on("py-setuptools-scm+toml@7.0", when="@0.13.3:", type="build") # patsy@0.5.1 works around a Python change # https://github.com/statsmodels/statsmodels/issues/5343 and # https://github.com/pydata/patsy/pull/131 - depends_on("py-numpy@1.11.0:", type=("build", "link", "run"), when="@0.10.1:") - depends_on("py-numpy@1.15.0:", type=("build", "link", "run"), when="@0.12.1:") - depends_on("py-numpy@1.17.0:", type=("build", "link", "run"), when="@0.13.0:") - depends_on("py-pandas@0.19:", type=("build", "run"), when="@0.10.1:") - depends_on("py-pandas@0.23:", type=("build", "run"), when="@0.12.0:") - depends_on("py-pandas@0.25:", type=("build", "run"), when="@0.13.0:") - depends_on("py-patsy@0.4.0:", type=("build", "run"), when="@0.10.1:") - depends_on("py-patsy@0.5.1:", type=("build", "run"), when="@0.12.0:") - depends_on("py-patsy@0.5.2:", type=("build", "run"), when="@0.13.0:") - depends_on("py-scipy@0.18:", type=("build", "run"), when="@0.10.1:") - depends_on("py-scipy@1.2:", type=("build", "run"), when="@0.12.0:") - depends_on("py-scipy@1.3:", type=("build", "run"), when="@0.13.0:") - depends_on("py-packaging@21.3:", type=("build", "run"), when="@0.13.2:") + # requirements.txt + depends_on("py-numpy@1.18:", when="@0.14:", type=("build", "link", "run")) + depends_on("py-numpy@1.17:", when="@0.13:", type=("build", "link", "run")) + depends_on("py-numpy@1.15:", when="@0.12.1:", type=("build", "link", "run")) + depends_on("py-numpy@1.11:", when="@0.10.1:", type=("build", "link", "run")) + depends_on("py-scipy@1.4:", when="@0.13.5:", type=("build", "run")) + conflicts("^py-scipy@1.9.2") + depends_on("py-scipy@1.3:", when="@0.13:", type=("build", "run")) + depends_on("py-scipy@1.2:", when="@0.12:", type=("build", "run")) + depends_on("py-scipy@0.18:", when="@0.10.1:", type=("build", "run")) + depends_on("py-pandas@1:", when="@0.14:", type=("build", "run")) + depends_on("py-pandas@0.25:", when="@0.13:", type=("build", "run")) + depends_on("py-pandas@0.23:", when="@0.12:", type=("build", "run")) + depends_on("py-pandas@0.19:", when="@0.10.1:", type=("build", "run")) + depends_on("py-patsy@0.5.2:", when="@0.13:", type=("build", "run")) + depends_on("py-patsy@0.5.1:", when="@0.12:", type=("build", "run")) + depends_on("py-patsy@0.4:", when="@0.10.1:", type=("build", "run")) + depends_on("py-packaging@21.3:", when="@0.13.2:", type=("build", "run")) depends_on("py-pytest", type="test") From 9bd77b2ed397b1d9fb70a0fb580f641d08b2bbc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Fri, 20 Oct 2023 14:00:46 +0200 Subject: [PATCH 288/806] [add] py-css-parser: new package (#40550) Co-authored-by: LydDeb --- .../builtin/packages/py-css-parser/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-css-parser/package.py diff --git a/var/spack/repos/builtin/packages/py-css-parser/package.py b/var/spack/repos/builtin/packages/py-css-parser/package.py new file mode 100644 index 00000000000000..7ed99c56ca6e20 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-css-parser/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyCssParser(PythonPackage): + """A CSS Cascading Style Sheets library for Python.""" + + homepage = "https://github.com/ebook-utils/css-parser" + pypi = "css-parser/css-parser-1.0.9.tar.gz" + + maintainers("LydDeb") + + version("1.0.9", sha256="196db822cef22745af6a58d180cf8206949ced58b48f5f3ee98f1de1627495bb") + + depends_on("py-setuptools", type="build") From 25aff66d3475a1092ed039fb435940c5a73ced95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Fri, 20 Oct 2023 14:01:38 +0200 Subject: [PATCH 289/806] [add] py-cssutils: new package (#40551) Co-authored-by: LydDeb --- .../builtin/packages/py-cssutils/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cssutils/package.py diff --git a/var/spack/repos/builtin/packages/py-cssutils/package.py b/var/spack/repos/builtin/packages/py-cssutils/package.py new file mode 100644 index 00000000000000..3a6772edc5f134 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-cssutils/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 PyCssutils(PythonPackage): + """A CSS Cascading Style Sheets library for Python.""" + + homepage = "https://github.com/jaraco/cssutils" + pypi = "cssutils/cssutils-2.7.1.tar.gz" + + maintainers("LydDeb") + + version("2.7.1", sha256="340ecfd9835d21df8f98500f0dfcea0aee41cb4e19ecbc2cf94f0a6d36d7cb6c") + + depends_on("py-setuptools@56:", type="build") + depends_on("py-setuptools-scm@3.4.1:+toml", type="build") + depends_on("py-importlib-metadata", type=("build", "run"), when="^python@:3.7") From 004d3e4cca022c7b312c6e43b4cf41f85ee5bd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Fri, 20 Oct 2023 14:03:48 +0200 Subject: [PATCH 290/806] [add] py-fraction: new package (#40554) Co-authored-by: LydDeb --- .../builtin/packages/py-fraction/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-fraction/package.py diff --git a/var/spack/repos/builtin/packages/py-fraction/package.py b/var/spack/repos/builtin/packages/py-fraction/package.py new file mode 100644 index 00000000000000..919d14cadf0c19 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-fraction/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 PyFraction(PythonPackage): + """ + Fraction carries out all the fraction operations including addition, subtraction, multiplicati + on, division, reciprocation. + """ + + homepage = "https://github.com/bradley101/fraction" + pypi = "Fraction/Fraction-2.2.0.tar.gz" + + maintainers("LydDeb") + + version("2.2.0", sha256="2c1179f20c8b749622935fe04db1c7f2987f011f2376bdad84c2a39c8e3d0fdb") + + depends_on("py-setuptools", type="build") From 9543abd2d9289efbe1519f9f55ee456645eb632d Mon Sep 17 00:00:00 2001 From: Claire Guilbaud <34576189+Bidibulke@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:18:41 +0200 Subject: [PATCH 291/806] add recipes for sphinx-book-theme and its dependencies if unknown (#40312) * add recipes for sphinx-book-theme and its dependencies if unknown * fix version and mission https * fix based on reviewers remarks --- .../py-accessible-pygments/package.py | 19 +++++++++++++ .../py-pydata-sphinx-theme/package.py | 28 +++++++++++++++++++ .../packages/py-sphinx-book-theme/package.py | 22 +++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-accessible-pygments/package.py create mode 100644 var/spack/repos/builtin/packages/py-pydata-sphinx-theme/package.py create mode 100644 var/spack/repos/builtin/packages/py-sphinx-book-theme/package.py diff --git a/var/spack/repos/builtin/packages/py-accessible-pygments/package.py b/var/spack/repos/builtin/packages/py-accessible-pygments/package.py new file mode 100644 index 00000000000000..e2254161c79dda --- /dev/null +++ b/var/spack/repos/builtin/packages/py-accessible-pygments/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 PyAccessiblePygments(PythonPackage): + """This package includes a collection of accessible themes for pygments based on + different sources.""" + + homepage = "https://github.com/Quansight-Labs/accessible-pygments" + pypi = "accessible-pygments/accessible-pygments-0.0.4.tar.gz" + + version("0.0.4", sha256="e7b57a9b15958e9601c7e9eb07a440c813283545a20973f2574a5f453d0e953e") + + depends_on("py-pygments@1.5:", type=("build", "run")) + depends_on("py-setuptools", type=("build")) diff --git a/var/spack/repos/builtin/packages/py-pydata-sphinx-theme/package.py b/var/spack/repos/builtin/packages/py-pydata-sphinx-theme/package.py new file mode 100644 index 00000000000000..d1dfd45dab65b7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydata-sphinx-theme/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2023 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 PyPydataSphinxTheme(PythonPackage): + """A clean, three-column, Bootstrap-based Sphinx theme by and for the PyData community.""" + + homepage = "https://pydata-sphinx-theme.readthedocs.io/en/stable" + pypi = "pydata_sphinx_theme/pydata_sphinx_theme-0.14.1.tar.gz" + + version("0.14.1", sha256="d8d4ac81252c16a002e835d21f0fea6d04cf3608e95045c816e8cc823e79b053") + + depends_on("python@3.8:", type=("build", "run")) + + depends_on("py-sphinx-theme-builder", type="build") + + depends_on("py-sphinx@5:", type=("build", "run")) + depends_on("py-beautifulsoup4", type=("build", "run")) + depends_on("py-docutils@:0.16,0.17.1:", type=("build", "run")) + depends_on("py-packaging", type=("build", "run")) + depends_on("py-babel", type=("build", "run")) + depends_on("py-pygments@2.7:", type=("build", "run")) + depends_on("py-accessible-pygments", type=("build", "run")) + depends_on("py-typing-extensions", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-sphinx-book-theme/package.py b/var/spack/repos/builtin/packages/py-sphinx-book-theme/package.py new file mode 100644 index 00000000000000..d34efeb4aefc3f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sphinx-book-theme/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 PySphinxBookTheme(PythonPackage): + """Lightweight Sphinx theme designed to mimic the look-and-feel of an interactive book.""" + + homepage = "https://sphinx-book-theme.readthedocs.io/en/latest" + pypi = "sphinx_book_theme/sphinx_book_theme-1.0.1.tar.gz" + + version("1.0.1", sha256="927b399a6906be067e49c11ef1a87472f1b1964075c9eea30fb82c64b20aedee") + + depends_on("python@3.7:", type=("build", "run")) + + depends_on("py-sphinx-theme-builder@0.2.0a7:", type="build") + + depends_on("py-sphinx@4:6", type=("build", "run")) + depends_on("py-pydata-sphinx-theme@0.13.3:", type=("build", "run")) From 06fc24df5edff050d9092a68f12eff02fceb2a90 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 20 Oct 2023 07:23:54 -0500 Subject: [PATCH 292/806] TensorFlow/Keras/TensorBoard: add v2.14.0 (#40297) Co-authored-by: adamjstewart --- .../builtin/packages/py-keras/package.py | 3 +- .../builtin/packages/py-ml-dtypes/package.py | 25 +++ .../packages/py-tensorboard/package.py | 22 ++- .../builtin/packages/py-tensorflow/package.py | 171 ++++++------------ 4 files changed, 96 insertions(+), 125 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-ml-dtypes/package.py diff --git a/var/spack/repos/builtin/packages/py-keras/package.py b/var/spack/repos/builtin/packages/py-keras/package.py index 5604adf859792e..c6f65dc957cb07 100644 --- a/var/spack/repos/builtin/packages/py-keras/package.py +++ b/var/spack/repos/builtin/packages/py-keras/package.py @@ -21,6 +21,7 @@ class PyKeras(PythonPackage): git = "https://github.com/keras-team/keras.git" url = "https://github.com/keras-team/keras/archive/refs/tags/v2.7.0.tar.gz" + version("2.14.0", sha256="a845d446b6ae626f61dde5ab2fa952530b6c17b4f9ed03e9362bd20172d00cca") version("2.13.1", sha256="b3591493cce75a69adef7b192cec6be222e76e2386d132cd4e34aa190b0ecbd5") version("2.12.0", sha256="6336cebb6b2b0a91f7efd3ff3a9db3a94f2abccf07a40323138afb80826aec62") version("2.11.0", sha256="e7a7c4199ac76ea750d145c1d84ae1b932e68b9bca34e83596bd66b2fc2ad79e") @@ -61,7 +62,7 @@ class PyKeras(PythonPackage): depends_on("py-pydot", type=("build", "run")) depends_on("py-scipy", type=("build", "run")) depends_on("py-six", type=("build", "run")) - for minor_ver in range(6, 14): + for minor_ver in range(6, 15): depends_on( "py-tensorflow@2.{}".format(minor_ver), type=("build", "run"), diff --git a/var/spack/repos/builtin/packages/py-ml-dtypes/package.py b/var/spack/repos/builtin/packages/py-ml-dtypes/package.py new file mode 100644 index 00000000000000..192069e21973d1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-ml-dtypes/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 PyMlDtypes(PythonPackage): + """A stand-alone implementation of several NumPy dtype extensions + used in machine learning libraries.""" + + homepage = "https://github.com/jax-ml/ml_dtypes" + pypi = "ml_dtypes/ml_dtypes-0.3.1.tar.gz" + git = "https://github.com/jax-ml/ml_dtypes.git" + submodules = True + + version("0.3.1", tag="v0.3.1", commit="bbeedd470ecac727c42e97648c0f27bfc312af30") + version("0.2.0", tag="v0.2.0", commit="5b9fc9ad978757654843f4a8d899715dbea30e88") + + depends_on("python@3.9:", when="@0.3:", type=("build", "link", "run")) + depends_on("py-numpy@1.21:", type=("build", "link", "run")) + # Build dependencies are overconstrained, older versions work just fine + depends_on("py-pybind11", type=("build", "link")) + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-tensorboard/package.py b/var/spack/repos/builtin/packages/py-tensorboard/package.py index f1cd059f69794d..f1a9b03bc16ee9 100644 --- a/var/spack/repos/builtin/packages/py-tensorboard/package.py +++ b/var/spack/repos/builtin/packages/py-tensorboard/package.py @@ -7,9 +7,8 @@ class PyTensorboard(PythonPackage): - """TensorBoard is a suite of web applications for - inspecting and understanding your TensorFlow runs and - graphs.""" + """TensorBoard is a suite of web applications for inspecting and understanding + your TensorFlow runs and graphs.""" homepage = "https://github.com/tensorflow/tensorboard" url = "https://files.pythonhosted.org/packages/py3/t/tensorboard/tensorboard-2.9.1-py3-none-any.whl" @@ -17,6 +16,16 @@ class PyTensorboard(PythonPackage): maintainers("aweits") + version( + "2.14.1", + sha256="3db108fb58f023b6439880e177743c5f1e703e9eeb5fb7d597871f949f85fd58", + expand=False, + ) + version( + "2.14.0", + sha256="3667f9745d99280836ad673022362c840f60ed8fefd5a3e30bf071f5a8fd0017", + expand=False, + ) version( "2.13.0", sha256="ab69961ebddbddc83f5fa2ff9233572bdad5b883778c35e4fe94bf1798bd8481", @@ -118,6 +127,7 @@ class PyTensorboard(PythonPackage): expand=False, ) + depends_on("python@3.9:", type=("build", "run"), when="@2.14:") depends_on("python@3.8:", type=("build", "run"), when="@2.12:") depends_on("py-absl-py@0.4:", type=("build", "run")) depends_on("py-grpcio@1.48.2:", type=("build", "run"), when="@2.12:") @@ -135,10 +145,10 @@ class PyTensorboard(PythonPackage): depends_on("py-protobuf@3.6.0:3.19", type=("build", "run"), when="@:2.8") depends_on("py-requests@2.21.0:2", type=("build", "run")) depends_on("py-setuptools@41.0.0:", type=("build", "run")) + depends_on("py-six@1.10.0:", type=("build", "run"), when="@:2.4,2.14:") depends_on("py-tensorboard-data-server@0.7", type=("build", "run"), when="@2.12:") depends_on("py-tensorboard-data-server@0.6", type=("build", "run"), when="@2.5:2.11") - depends_on("py-tensorboard-plugin-wit@1.6.0:", type=("build", "run")) + depends_on("py-tensorboard-plugin-wit@1.6.0:", type=("build", "run"), when="@:2.13") depends_on("py-werkzeug@1.0.1:", type=("build", "run"), when="@2.9:") depends_on("py-werkzeug@0.11.15:", type=("build", "run")) - depends_on("py-wheel@0.26:", type="build") - depends_on("py-six@1.10.0:", type=("build", "run"), when="@:2.4") + depends_on("py-wheel@0.26:", type="build", when="@:2.13") diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index cd90b532c93336..c85f078689fe7d 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -10,18 +10,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): - """An Open Source Machine Learning Framework for Everyone. - - TensorFlow is an end-to-end open source platform for machine learning. It has a - comprehensive, flexible ecosystem of tools, libraries, and community resources that - lets researchers push the state-of-the-art in ML and developers easily build and - deploy ML-powered applications. - - TensorFlow was originally developed by researchers and engineers working on the - Google Brain team within Google's Machine Intelligence Research organization to - conduct machine learning and deep neural networks research. The system is general - enough to be applicable in a wide variety of other domains, as well. - """ + """TensorFlow is an open source machine learning framework for everyone.""" homepage = "https://www.tensorflow.org" url = "https://github.com/tensorflow/tensorflow/archive/v2.3.1.tar.gz" @@ -29,6 +18,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): maintainers("adamjstewart", "aweits") import_modules = ["tensorflow"] + version("2.14.0", sha256="ce357fd0728f0d1b0831d1653f475591662ec5bca736a94ff789e6b1944df19f") + version("2.13.1", sha256="89c07aebd4f41fbe0d08cc88aef00305542134f2f16d3b62918dc3c1182f33e2") version("2.13.0", sha256="e58c939079588623e6fa1d054aec2f90f95018266e0a970fd353a5244f5173dc") version("2.12.1", sha256="6bc4600cc0b88e9e40f1800096f5bddbbd3b6e5527a030dea631b87f2ae46b5b") version("2.12.0", sha256="c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e") @@ -157,16 +148,16 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): extends("python") # Python support based on wheel availability - depends_on("python@3.8:3.11", when="@2.12:", type=("build", "run")) - depends_on("python@3.7:3.10", when="@2.8:2.11", type=("build", "run")) - depends_on("python@3.7:3.9", when="@2.7", type=("build", "run")) - depends_on("python@3.6:3.9", when="@2.5:2.6", type=("build", "run")) - depends_on("python@3.6:3.8", when="@2.4", type=("build", "run")) - depends_on("python@3.5:3.8", when="@2.2:2.3", type=("build", "run")) - depends_on("python@2.7,3.5:3.7", when="@:2.1", type=("build", "run")) + depends_on("python@3.9:3.11", when="@2.14:", type=("build", "run")) + depends_on("python@3.8:3.11", when="@2.12:2.13", type=("build", "run")) + depends_on("python@:3.10", when="@2.8:2.11", type=("build", "run")) + depends_on("python@:3.9", when="@2.5:2.7", type=("build", "run")) + depends_on("python@:3.8", when="@2.2:2.4", type=("build", "run")) + depends_on("python@:3.7", when="@:2.1", type=("build", "run")) # See .bazelversion - depends_on("bazel@5.3.0", type="build", when="@2.11:") + depends_on("bazel@6.1.0", type="build", when="@2.14:") + depends_on("bazel@5.3.0", type="build", when="@2.11:2.13") depends_on("bazel@5.1.1", type="build", when="@2.10") # See _TF_MIN_BAZEL_VERSION and _TF_MAX_BAZEL_VERSION in configure.py depends_on("bazel@4.2.2:5.99.0", type="build", when="@2.9") @@ -203,13 +194,15 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): depends_on("py-astunparse@1.6:", type=("build", "run"), when="@2.7:") depends_on("py-astunparse@1.6.3:1.6", type=("build", "run"), when="@2.4:2.6") depends_on("py-astunparse@1.6.3", type=("build", "run"), when="@2.2:2.3") - depends_on("py-flatbuffers@23.1.21:", type=("build", "run"), when="@2.13:") + depends_on("py-flatbuffers@23.5.26:", type=("build", "run"), when="@2.14:") + depends_on("py-flatbuffers@23.1.21:", type=("build", "run"), when="@2.13") depends_on("py-flatbuffers@2:", type=("build", "run"), when="@2.10:2.12") depends_on("py-flatbuffers@1.12:1", type=("build", "run"), when="@2.9") depends_on("py-flatbuffers@1.12:", type=("build", "run"), when="@2.8") depends_on("py-flatbuffers@1.12:2", type=("build", "run"), when="@2.7") depends_on("py-flatbuffers@1.12", type=("build", "run"), when="@2.4:2.6") - depends_on("py-gast@0.2.1:0.4.0", type=("build", "run"), when="@2.9:") + depends_on("py-gast@0.2.1:0.4,0.5.3:", type=("build", "run"), when="@2.14:") + depends_on("py-gast@0.2.1:0.4.0", type=("build", "run"), when="@2.9:2.13") depends_on("py-gast@0.2.1:", type=("build", "run"), when="@2.8") depends_on("py-gast@0.2.1:0.4", type=("build", "run"), when="@2.7") depends_on("py-gast@0.4.0", type=("build", "run"), when="@2.5:2.6") @@ -232,6 +225,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): depends_on("hdf5~mpi", type="build", when="@1.15.5,2.0.4,2.1.3:~mpi") depends_on("py-libclang@13:", type=("build", "run"), when="@2.9:") depends_on("py-libclang@9.0.1:", type=("build", "run"), when="@2.7:2.8") + depends_on("py-ml-dtypes@0.2.0", type=("build", "run"), when="@2.14:") + depends_on("py-numpy@1.23.5:", type=("build", "run"), when="@2.14:") depends_on("py-numpy@1.22:1.24.3", type=("build", "run"), when="@2.13:") depends_on("py-numpy@1.22:1.23", type=("build", "run"), when="@2.12") depends_on("py-numpy@1.20:", type=("build", "run"), when="@2.8:2.11") @@ -269,32 +264,17 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): depends_on("py-six@1.10:", type=("build", "run"), when="@:2.0") depends_on("py-termcolor@1.1:", type=("build", "run"), when="@1.6:2.3,2.7:") depends_on("py-termcolor@1.1", type=("build", "run"), when="@2.4:2.6") - depends_on("py-typing-extensions@3.6.6:4.5", type=("build", "run"), when="@2.13:") - depends_on("py-typing-extensions@3.6.6:", type=("build", "run"), when="@2.7:2.12") + depends_on("py-typing-extensions@3.6.6:", type=("build", "run"), when="@2.7:2.12,2.14:") + depends_on("py-typing-extensions@3.6.6:4.5", type=("build", "run"), when="@2.13") depends_on("py-typing-extensions@3.7.4:3.7", type=("build", "run"), when="@2.4:2.6") - depends_on("py-wrapt@1.11:", type=("build", "run"), when="@2.13:") - depends_on("py-wrapt@1.11:1.14", type=("build", "run"), when="@2.12") - depends_on("py-wrapt@1.11:", type=("build", "run"), when="@2.7:2.11") + depends_on("py-wrapt@1.11:1.14", type=("build", "run"), when="@2.12,2.14:") + depends_on("py-wrapt@1.11:", type=("build", "run"), when="@2.7:2.11,2.13") depends_on("py-wrapt@1.12.1:1.12", type=("build", "run"), when="@2.4:2.6") depends_on("py-wrapt@1.11.1:", type=("build", "run"), when="@1.12.1,1.14:2.3") + # TODO: add packages for these dependencies # depends_on('py-tensorflow-io-gcs-filesystem@0.23.1:', type=('build', 'run'), when='@2.8:') # depends_on('py-tensorflow-io-gcs-filesystem@0.21:', type=('build', 'run'), when='@2.7') - with when("+rocm"): - depends_on("hip") - depends_on("rocrand") - depends_on("rocblas") - depends_on("rocfft") - depends_on("hipfft") - depends_on("rccl", when="+nccl") - depends_on("hipsparse") - depends_on("hipcub") - depends_on("rocsolver") - depends_on("rocprim") - depends_on("miopen-hip") - depends_on("llvm-amdgpu") - depends_on("hsa-rocr-dev") - depends_on("rocminfo") if sys.byteorder == "little": # Only builds correctly on little-endian machines @@ -304,7 +284,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): depends_on("py-grpcio@1.32", type=("build", "run"), when="@2.4") depends_on("py-grpcio@1.8.6:", type=("build", "run"), when="@1.6:2.3") - for minor_ver in range(5, 14): + for minor_ver in range(5, 15): depends_on( "py-tensorboard@2.{}".format(minor_ver), type=("build", "run"), @@ -356,6 +336,22 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): # depends_on('android-ndk@10:18', when='+android') # depends_on('android-sdk', when='+android') + with when("+rocm"): + depends_on("hip") + depends_on("rocrand") + depends_on("rocblas") + depends_on("rocfft") + depends_on("hipfft") + depends_on("rccl", when="+nccl") + depends_on("hipsparse") + depends_on("hipcub") + depends_on("rocsolver") + depends_on("rocprim") + depends_on("miopen-hip") + depends_on("llvm-amdgpu") + depends_on("hsa-rocr-dev") + depends_on("rocminfo") + # Check configure and configure.py to see when these variants are supported conflicts("+mkl", when="@:1.0") conflicts("+mkl", when="platform=darwin", msg="Darwin is not yet supported") @@ -375,7 +371,13 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): conflicts("+gdr", when="@:1.3") conflicts("+verbs", when="@:1.1") conflicts("+ngraph", when="@:1.10") + conflicts("+opencl", when="platform=windows") conflicts("+computecpp", when="~opencl") + conflicts( + "+cuda", + when="+rocm", + msg="CUDA / ROCm are mututally exclusive. At most 1 GPU platform can be configured", + ) conflicts("+cuda", when="platform=darwin", msg="There is no GPU support for macOS") conflicts( "cuda_arch=none", @@ -422,6 +424,7 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): conflicts( "+nccl", when="platform=cray", msg="Currently NCCL is only supported on Linux platform" ) + conflicts("+mpi", when="platform=windows") conflicts("+mpi", when="@:1.2") conflicts("+android", when="@:1.4") conflicts("+ios", when="@:1.12.0,1.12.2:1.13") @@ -515,6 +518,7 @@ def setup_build_environment(self, env): # Please input the desired Python library path to use env.set("PYTHON_LIB_PATH", python_platlib) + env.set("TF_PYTHON_VERSION", spec["python"].version.up_to(2)) # Ensure swig is in PATH or set SWIG_PATH env.set("SWIG_PATH", spec["swig"].prefix.bin.swig) @@ -696,6 +700,12 @@ def setup_build_environment(self, env): else: env.set("TF_NEED_CUDA", "0") + # Do you want to use Clang to build TensorFlow? + if "%clang" in spec: + env.set("TF_NEED_CLANG", "1") + else: + env.set("TF_NEED_CLANG", "0") + # Do you wish to download a fresh release of clang? (Experimental) env.set("TF_DOWNLOAD_CLANG", "0") @@ -789,14 +799,6 @@ def post_configure_fixes(self): "tensorflow/workspace.bzl", ) - # starting with tensorflow 1.3, tensorboard becomes a dependency - # -> remove from list of required packages - filter_file( - r"'tensorflow-tensorboard", - r"#'tensorflow-tensorboard", - "tensorflow/tools/pip_package/setup.py", - ) - if spec.satisfies("@1.5.0: ~gcp"): # google cloud support seems to be installed on default, leading # to boringssl error manually set the flag to false to avoid @@ -808,15 +810,6 @@ def post_configure_fixes(self): ".tf_configure.bazelrc", ) - if spec.satisfies("@1.6.0:2.1"): - # tensorboard name changed - # there are no corresponding versions of these in spack - filter_file( - r"(^\s*)'tensorboard (>=|~=)", - r"\1#'tensorboard \2", - "tensorflow/tools/pip_package/setup.py", - ) - if spec.satisfies("@1.8.0: ~opencl"): # 1.8.0 and 1.9.0 aborts with numpy import error during python_api # generation somehow the wrong PYTHONPATH is used... @@ -826,64 +819,6 @@ def post_configure_fixes(self): f.write("build --distinct_host_configuration=false\n") f.write('build --action_env PYTHONPATH="{0}"\n'.format(env["PYTHONPATH"])) - if spec.satisfies("@1.13.1:"): - # tensorflow_estimator is an API for tensorflow - # tensorflow-estimator imports tensorflow during build, so - # tensorflow has to be set up first - filter_file( - r"(^\s*)'tensorflow_estimator (>=|~=)", - r"\1#'tensorflow_estimator \2", - "tensorflow/tools/pip_package/setup.py", - ) - - if spec.satisfies("@2.5"): - filter_file( - r"(^\s*)'keras-nightly (>=|~=)", - r"\1#'keras-nightly \2", - "tensorflow/tools/pip_package/setup.py", - ) - - if spec.satisfies("@2.6:"): - filter_file( - r"(^\s*)'keras (>=|~=)", r"\1#'keras \2", "tensorflow/tools/pip_package/setup.py" - ) - - if spec.satisfies("@2.6"): - filter_file( - r"(^\s*)'clang (>=|~=)", r"\1#'clang \2", "tensorflow/tools/pip_package/setup.py" - ) - - # TODO: add support for tensorflow-io-gcs-filesystem - if spec.satisfies("@2.7:"): - filter_file( - r"(^\s*)'tensorflow-io-gcs-filesystem (>=|~=)", - r"\1#'tensorflow-io-gcs-filesystem \2", - "tensorflow/tools/pip_package/setup.py", - ) - - if spec.satisfies("@2.0.0:"): - # now it depends on the nightly versions... - filter_file( - r"REQUIRED_PACKAGES\[i\] = 'tb-nightly (>=|~=)", - r"pass #REQUIRED_PACKAGES[i] = 'tb-nightly \1", - "tensorflow/tools/pip_package/setup.py", - ) - filter_file( - r"REQUIRED_PACKAGES\[i\] = 'tensorflow-estimator-2.0-preview", - r"pass #REQUIRED_PACKAGES[i] = 'tensorflow-estimator-2.0-preview", - "tensorflow/tools/pip_package/setup.py", - ) - filter_file( - r"REQUIRED_PACKAGES\[i\] = 'tf-estimator-nightly (>=|~=)", - r"pass #REQUIRED_PACKAGES[i] = 'tf-estimator-nightly \1", - "tensorflow/tools/pip_package/setup.py", - ) - filter_file( - r"REQUIRED_PACKAGES\[i\] = 'keras-nightly (>=|~=)", - r"pass #REQUIRED_PACKAGES[i] = 'keras-nightly \1", - "tensorflow/tools/pip_package/setup.py", - ) - if spec.satisfies("@1.13.1 +nccl"): filter_file( r"^build --action_env NCCL_INSTALL_PATH=.*", From cbc39977ca03634f7a69eba25bd58c138e5d1519 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 20 Oct 2023 14:37:07 +0200 Subject: [PATCH 293/806] ASP-based solver: minimize weights over edges (#40632) With the introduction of multiple build dependencies from the same package in the DAG, we need to minimize a few weights accounting for edges rather than nodes. If we don't do that we might have multiple "optimal" solutions that differ only in how the same nodes are connected together. This commit ensures optimal versions are picked per parent in case of multiple choices for a dependency. --- lib/spack/spack/solver/concretize.lp | 11 ++++++ lib/spack/spack/test/concretize.py | 37 +++++++++++++++++++ .../packages/py-floating/package.py | 26 +++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 var/spack/repos/duplicates.test/packages/py-floating/package.py diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index da149dd3fa21e6..efca3bfed2a32e 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -1535,6 +1535,17 @@ opt_criterion(5, "non-preferred targets"). build_priority(PackageNode, Priority) }. +% Choose more recent versions for nodes +opt_criterion(1, "edge wiring"). +#minimize{ 0@201: #true }. +#minimize{ 0@1: #true }. +#minimize{ + Weight@1,ParentNode,PackageNode + : version_weight(PackageNode, Weight), + not attr("root", PackageNode), + depends_on(ParentNode, PackageNode) +}. + %----------- % Notes %----------- diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 48334e70a169e1..04959a19b34b51 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -2228,6 +2228,43 @@ def test_pure_build_virtual_dependency(self, strategy): s = Spec("virtual-build").concretized() assert s["pkgconfig"].name == "pkg-config" + @pytest.mark.regression("40595") + def test_no_multiple_solutions_with_different_edges_same_nodes(self): + r"""Tests that the root node, which has a dependency on py-setuptools without constraint, + doesn't randomly pick one of the two setuptools (@=59, @=60) needed by its dependency. + + o py-floating@1.25.0/3baitsp + |\ + | |\ + | | |\ + | o | | py-shapely@1.25.0/4hep6my + |/| | | + | |\| | + | | |/ + | |/| + | | o py-setuptools@60/cwhbthc + | |/ + |/| + | o py-numpy@1.25.0/5q5fx4d + |/| + | |\ + | o | py-setuptools@59/jvsa7sd + |/ / + o | python@3.11.2/pdmjekv + o | gmake@3.0/jv7k2bl + / + o gmake@4.1/uo6ot3d + """ + spec_str = "py-floating" + + root = spack.spec.Spec(spec_str).concretized() + assert root["py-shapely"].satisfies("^py-setuptools@=60") + assert root["py-numpy"].satisfies("^py-setuptools@=59") + + edges = root.edges_to_dependencies("py-setuptools") + assert len(edges) == 1 + assert edges[0].spec.satisfies("@=60") + @pytest.mark.parametrize( "v_str,v_opts,checksummed", diff --git a/var/spack/repos/duplicates.test/packages/py-floating/package.py b/var/spack/repos/duplicates.test/packages/py-floating/package.py new file mode 100644 index 00000000000000..2921b617bd76ad --- /dev/null +++ b/var/spack/repos/duplicates.test/packages/py-floating/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 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 PyFloating(Package): + """An extension that depends on: + - py-setuptools without further constraints + - py-shapely, which depends on py-setuptools@=60 + - py-numpy, which depends on py-setuptools@=59 + + We need to ensure that by default the root node gets the best version + of setuptools it could. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/tdep-1.0.tar.gz" + + version("1.25.0", md5="0123456789abcdef0123456789abcdef") + + extends("python") + depends_on("py-numpy", type=("build", "run")) + depends_on("py-shapely", type=("build", "run")) + depends_on("py-setuptools", type="build") From a0e33bf7b0223c24d031ebf2c882a87579d8ec35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Fri, 20 Oct 2023 14:37:15 +0200 Subject: [PATCH 294/806] py-corner: new package (#40546) * [add] py-corner: new package * py-corner: remove py-wheel dependence with respect to reviewing commentary --------- Co-authored-by: LydDeb --- .../builtin/packages/py-corner/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-corner/package.py diff --git a/var/spack/repos/builtin/packages/py-corner/package.py b/var/spack/repos/builtin/packages/py-corner/package.py new file mode 100644 index 00000000000000..81ae512123dd39 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-corner/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 PyCorner(PythonPackage): + """Make some beautiful corner plots.""" + + homepage = "https://corner.readthedocs.io" + pypi = "corner/corner-2.2.2.tar.gz" + + maintainers("LydDeb") + + version("2.2.2", sha256="4bc79f3b6778c270103f0926e64ef2606c48c3b6f92daf5382fc4babf5d608d1") + + depends_on("python@3.9:", type=("build", "run")) + depends_on("py-setuptools@62.0:", type="build") + depends_on("py-setuptools-scm", type="build") + depends_on("py-matplotlib@2.1:", type=("build", "run")) From 4bade7ef967ca07fce9e46c1d1f466618fd5c987 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 20 Oct 2023 16:20:20 +0200 Subject: [PATCH 295/806] gromacs +cp2k: build in CI (#40494) * gromacs +cp2k: build in CI * libxsmm: x86 only * attempt to fix dbcsr + new mpich * use c11 standard * gromacs: does not depend on dbcsr * cp2k: build with cmake in CI, s.t. dbcsr is a separate package * cp2k: cmake patches for config files and C/C++ std * cp2k: remove unnecessary constraints due to patch --- .../stacks/e4s-neoverse_v1/spack.yaml | 1 + .../stacks/e4s-power/spack.yaml | 1 + .../cloud_pipelines/stacks/e4s/spack.yaml | 1 + .../packages/cp2k/cmake-fixes-2023.2.patch | 600 ++++++++++++++++++ .../repos/builtin/packages/cp2k/package.py | 15 +- .../repos/builtin/packages/dbcsr/package.py | 8 + .../repos/builtin/packages/gromacs/package.py | 1 - .../repos/builtin/packages/libxsmm/package.py | 3 + 8 files changed, 623 insertions(+), 7 deletions(-) create mode 100644 var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index db903c15c47a6f..d42e5f1fcade20 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -101,6 +101,7 @@ spack: - gmp - gotcha - gptune ~mpispawn + - gromacs +cp2k ^cp2k build_system=cmake - h5bench - hdf5-vol-async - hdf5-vol-cache diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 5f8f3d0e628dae..10bf4bc57d99f7 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -101,6 +101,7 @@ spack: - gmp - gotcha - gptune + - gromacs +cp2k ^cp2k build_system=cmake - h5bench - hdf5-vol-async - hdf5-vol-cache diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 410a379ee06321..86eab1d4074d3a 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -107,6 +107,7 @@ spack: - gmp - gotcha - gptune ~mpispawn + - gromacs +cp2k ^cp2k build_system=cmake - h5bench - hdf5-vol-async - hdf5-vol-cache diff --git a/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch b/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch new file mode 100644 index 00000000000000..2961a4ceee8d45 --- /dev/null +++ b/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch @@ -0,0 +1,600 @@ +From 1897cbf3e467dc765f733b09af041fe8f25fa906 Mon Sep 17 00:00:00 2001 +From: Mathieu Taillefumier +Date: Thu, 19 Oct 2023 12:21:50 +0200 +Subject: [PATCH] [cmake] fix for building gromacs and cp2k with cmake and spack + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3f81c7b524..1b6c6a0636 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -49,7 +49,8 @@ if(NOT DEFINED CMAKE_CUDA_STANDARD) + endif() + + # set language and standard +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_C_STANDARD 11) + + find_package(PkgConfig) + +@@ -115,8 +116,8 @@ cmake_dependent_option(CP2K_ENABLE_FFTW3_OPENMP_SUPPORT + "Enable FFTW openmp support" ON "CP2K_USE_FFTW3" OFF) + cmake_dependent_option(CP2K_ENABLE_FFTW3_THREADS_SUPPORT + "Enable FFTW THREADS support" OFF "CP2K_USE_FFTW3" OFF) +-cmake_dependent_option(CP2K_ENABLE_F08_MPI "Enable MPI Fortran 2008 interface" +- OFF "CP2K_USE_MPI" OFF) ++cmake_dependent_option(CP2K_USE_MPI_F08 "Enable MPI Fortran 2008 interface" OFF ++ "CP2K_USE_MPI" OFF) + + cmake_dependent_option( + DBCSR_USE_ACCEL +@@ -748,7 +749,7 @@ add_subdirectory(src) + include(GNUInstallDirs) + + get_target_property(CP2K_LIBS cp2k_link_libs INTERFACE_LINK_LIBRARIES) +-configure_file(cmake/cp2k.pc.in cp2k.pc @ONLY) ++configure_file(cmake/libcp2k.pc.in libcp2k.pc @ONLY) + + message( + STATUS "--------------------------------------------------------------------") +@@ -1039,6 +1040,10 @@ install(FILES "${PROJECT_BINARY_DIR}/cp2kConfig.cmake" + "${PROJECT_BINARY_DIR}/cp2kConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cp2k") + ++install(FILES "${PROJECT_BINARY_DIR}/libcp2k.pc" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ ++ + install( + DIRECTORY "${PROJECT_SOURCE_DIR}/cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cp2k" +diff --git a/cmake/FindBlas.cmake b/cmake/FindBlas.cmake +index 6e5fb78240..335cbd964a 100644 +--- a/cmake/FindBlas.cmake ++++ b/cmake/FindBlas.cmake +@@ -15,104 +15,108 @@ if(NOT + OR CMAKE_Fortran_COMPILER_LOADED)) + message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.") + endif() ++if(NOT CP2K_CONFIG_PACKAGE) ++ set(CP2K_BLAS_VENDOR_LIST ++ "auto" ++ "MKL" ++ "OpenBLAS" ++ "SCI" ++ "GenericBLAS" ++ "Armpl" ++ "FlexiBLAS" ++ "Atlas" ++ "NVHPCBlas" ++ "CUSTOM") ++ ++ set(__BLAS_VENDOR_LIST ${CP2K_BLAS_VENDOR_LIST}) ++ list(REMOVE_ITEM __BLAS_VENDOR_LIST "auto") ++ list(REMOVE_ITEM __BLAS_VENDOR_LIST "CUSTOM") ++ ++ # set(CP2K_BLAS_VENDOR "auto" CACHE STRING "Blas library for computations on ++ # host") ++ set_property(CACHE CP2K_BLAS_VENDOR PROPERTY STRINGS ${CP2K_BLAS_VENDOR_LIST}) ++ ++ if(NOT ${CP2K_BLAS_VENDOR} IN_LIST CP2K_BLAS_VENDOR_LIST) ++ message(FATAL_ERROR "Invalid Host BLAS backend") ++ endif() + +-set(CP2K_BLAS_VENDOR_LIST +- "auto" +- "MKL" +- "OpenBLAS" +- "SCI" +- "GenericBLAS" +- "Armpl" +- "FlexiBLAS" +- "Atlas" +- "NVHPCBlas" +- "CUSTOM") +- +-set(__BLAS_VENDOR_LIST ${CP2K_BLAS_VENDOR_LIST}) +-list(REMOVE_ITEM __BLAS_VENDOR_LIST "auto") +-list(REMOVE_ITEM __BLAS_VENDOR_LIST "CUSTOM") +- +-# set(CP2K_BLAS_VENDOR "auto" CACHE STRING "Blas library for computations on +-# host") +-set_property(CACHE CP2K_BLAS_VENDOR PROPERTY STRINGS ${CP2K_BLAS_VENDOR_LIST}) +- +-if(NOT ${CP2K_BLAS_VENDOR} IN_LIST CP2K_BLAS_VENDOR_LIST) +- message(FATAL_ERROR "Invalid Host BLAS backend") +-endif() +- +-set(CP2K_BLAS_THREAD_LIST "sequential" "thread" "gnu-thread" "intel-thread" +- "tbb-thread" "openmp") +- +-set(CP2K_BLAS_THREADING +- "sequential" +- CACHE STRING "threaded blas library") +-set_property(CACHE CP2K_BLAS_THREADING PROPERTY STRINGS +- ${CP2K_BLAS_THREAD_LIST}) +- +-if(NOT ${CP2K_BLAS_THREADING} IN_LIST CP2K_BLAS_THREAD_LIST) +- message(FATAL_ERROR "Invalid threaded BLAS backend") +-endif() ++ set(CP2K_BLAS_THREAD_LIST "sequential" "thread" "gnu-thread" "intel-thread" ++ "tbb-thread" "openmp") + +-set(CP2K_BLAS_INTERFACE_BITS_LIST "32bits" "64bits") +-set(CP2K_BLAS_INTERFACE +- "32bits" +- CACHE STRING +- "32 bits integers are used for indices, matrices and vectors sizes") +-set_property(CACHE CP2K_BLAS_INTERFACE +- PROPERTY STRINGS ${CP2K_BLAS_INTERFACE_BITS_LIST}) +- +-if(NOT ${CP2K_BLAS_INTERFACE} IN_LIST CP2K_BLAS_INTERFACE_BITS_LIST) +- message( +- FATAL_ERROR +- "Invalid parameters. Blas and lapack can exist in two flavors 32 or 64 bits interfaces (relevant mostly for mkl)" +- ) +-endif() ++ set(CP2K_BLAS_THREADING ++ "sequential" ++ CACHE STRING "threaded blas library") ++ set_property(CACHE CP2K_BLAS_THREADING PROPERTY STRINGS ++ ${CP2K_BLAS_THREAD_LIST}) + +-set(CP2K_BLAS_FOUND FALSE) ++ if(NOT ${CP2K_BLAS_THREADING} IN_LIST CP2K_BLAS_THREAD_LIST) ++ message(FATAL_ERROR "Invalid threaded BLAS backend") ++ endif() + +-# first check for a specific implementation if requested ++ set(CP2K_BLAS_INTERFACE_BITS_LIST "32bits" "64bits") ++ set(CP2K_BLAS_INTERFACE ++ "32bits" ++ CACHE STRING ++ "32 bits integers are used for indices, matrices and vectors sizes") ++ set_property(CACHE CP2K_BLAS_INTERFACE ++ PROPERTY STRINGS ${CP2K_BLAS_INTERFACE_BITS_LIST}) + +-if(NOT CP2K_BLAS_VENDOR MATCHES "auto|CUSTOM") +- find_package(${CP2K_BLAS_VENDOR} REQUIRED) +- if(TARGET CP2K::BLAS::${CP2K_BLAS_VENDOR}::blas) +- get_target_property( +- CP2K_BLAS_INCLUDE_DIRS CP2K::BLAS::${CP2K_BLAS_VENDOR}::blas +- INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property( +- CP2K_BLAS_LINK_LIBRARIES CP2K::BLAS::${CP2K_BLAS_VENDOR}::blas +- INTERFACE_LINK_LIBRARIES) +- set(CP2K_BLAS_FOUND TRUE) +- endif() +-else() +- if(CP2K_BLAS_VENDOR MATCHES "CUSTOM" AND NOT DEFINED CP2K_BLAS_LINK_LIBRARIES) ++ if(NOT ${CP2K_BLAS_INTERFACE} IN_LIST CP2K_BLAS_INTERFACE_BITS_LIST) + message( + FATAL_ERROR +- "Setting CP2K_BLAS_VENDOR=CUSTOM imply setting CP2K_BLAS_LINK_LIBRARIES\n and CP2K_LAPACK_LINK_LIBRARIES to the right libraries. See the README_cmake.md for more details" ++ "Invalid parameters. Blas and lapack can exist in two flavors 32 or 64 bits interfaces (relevant mostly for mkl)" + ) + endif() + +- if(DEFINED CP2K_BLAS_LINK_LIBRARIES) +- set(CP2K_BLAS_FOUND TRUE) ++ set(CP2K_BLAS_FOUND FALSE) ++ ++ # first check for a specific implementation if requested ++ ++ if(NOT CP2K_BLAS_VENDOR MATCHES "auto|CUSTOM") ++ find_package(${CP2K_BLAS_VENDOR} REQUIRED) ++ if(TARGET CP2K::BLAS::${CP2K_BLAS_VENDOR}::blas) ++ get_target_property( ++ CP2K_BLAS_INCLUDE_DIRS CP2K::BLAS::${CP2K_BLAS_VENDOR}::blas ++ INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property( ++ CP2K_BLAS_LINK_LIBRARIES CP2K::BLAS::${CP2K_BLAS_VENDOR}::blas ++ INTERFACE_LINK_LIBRARIES) ++ set(CP2K_BLAS_FOUND TRUE) ++ endif() + else() +- # search for any blas implementation and exit immediately if one is found. +- # we could also give a full list of found implementation and let the user +- # choose which implementation to use +- foreach(_libs ${__BLAS_VENDOR_LIST}) +- # I exclude the first item of the list +- find_package(${_libs}) +- if(TARGET CP2K::BLAS::${_libs}::blas) +- get_target_property(CP2K_BLAS_INCLUDE_DIRS CP2K::BLAS::${_libs}::blas +- INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(CP2K_BLAS_LINK_LIBRARIES CP2K::BLAS::${_libs}::blas +- INTERFACE_LINK_LIBRARIES) +- set(CP2K_BLAS_VENDOR "${_libs}") +- set(CP2K_BLAS_FOUND TRUE) +- break() +- endif() +- endforeach() ++ if(CP2K_BLAS_VENDOR MATCHES "CUSTOM" AND NOT DEFINED ++ CP2K_BLAS_LINK_LIBRARIES) ++ message( ++ FATAL_ERROR ++ "Setting CP2K_BLAS_VENDOR=CUSTOM imply setting CP2K_BLAS_LINK_LIBRARIES\n and CP2K_LAPACK_LINK_LIBRARIES to the right libraries. See the README_cmake.md for more details" ++ ) ++ endif() ++ ++ if(DEFINED CP2K_BLAS_LINK_LIBRARIES) ++ set(CP2K_BLAS_FOUND TRUE) ++ else() ++ # search for any blas implementation and exit immediately if one is found. ++ # we could also give a full list of found implementation and let the user ++ # choose which implementation to use ++ foreach(_libs ${__BLAS_VENDOR_LIST}) ++ # I exclude the first item of the list ++ find_package(${_libs}) ++ if(TARGET CP2K::BLAS::${_libs}::blas) ++ get_target_property(CP2K_BLAS_INCLUDE_DIRS CP2K::BLAS::${_libs}::blas ++ INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property( ++ CP2K_BLAS_LINK_LIBRARIES CP2K::BLAS::${_libs}::blas ++ INTERFACE_LINK_LIBRARIES) ++ set(CP2K_BLAS_VENDOR "${_libs}") ++ set(CP2K_BLAS_FOUND TRUE) ++ break() ++ endif() ++ endforeach() ++ endif() + endif() ++else() ++ set(CP2K_BLAS_FOUND ON) + endif() +- + # we exclude the CP2K_BLAS_INCLUDE_DIRS from the list of mandatory variables as + # having the fortran interface is usually enough. C, C++ and others languages + # might require this information though +diff --git a/cmake/FindLapack.cmake b/cmake/FindLapack.cmake +index 966e0d78d3..77a1e04258 100644 +--- a/cmake/FindLapack.cmake ++++ b/cmake/FindLapack.cmake +@@ -20,33 +20,34 @@ include(FindPackageHandleStandardArgs) + find_package(PkgConfig) + find_package(Blas REQUIRED) + +-if(CP2K_BLAS_FOUND) +- # LAPACK in the Intel MKL 10+ library? +- if(CP2K_BLAS_VENDOR MATCHES "MKL|OpenBLAS|Armpl|SCI|FlexiBLAS|NVHPC") +- # we just need to create the interface that's all +- set(CP2K_LAPACK_FOUND TRUE) +- get_target_property(CP2K_LAPACK_INCLUDE_DIRS CP2K::BLAS::blas +- INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(CP2K_LAPACK_LINK_LIBRARIES CP2K::BLAS::blas +- INTERFACE_LINK_LIBRARIES) +- else() +- # we might get lucky to find a pkgconfig package for lapack (fedora provides +- # one for instance) +- if(PKG_CONFIG_FOUND) +- pkg_check_modules(CP2K_LAPACK lapack) +- endif() ++if(NOT CP2K_CONFIG_PACKAGE) ++ if(CP2K_BLAS_FOUND) ++ # LAPACK in the Intel MKL 10+ library? ++ if(CP2K_BLAS_VENDOR MATCHES "MKL|OpenBLAS|Armpl|SCI|FlexiBLAS|NVHPC") ++ # we just need to create the interface that's all ++ set(CP2K_LAPACK_FOUND TRUE) ++ get_target_property(CP2K_LAPACK_INCLUDE_DIRS CP2K::BLAS::blas ++ INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(CP2K_LAPACK_LINK_LIBRARIES CP2K::BLAS::blas ++ INTERFACE_LINK_LIBRARIES) ++ else() ++ # we might get lucky to find a pkgconfig package for lapack (fedora ++ # provides one for instance) ++ if(PKG_CONFIG_FOUND) ++ pkg_check_modules(CP2K_LAPACK lapack) ++ endif() + +- if(NOT CP2K_LAPACK_FOUND) +- find_library( +- CP2K_LAPACK_LINK_LIBRARIES +- NAMES "lapack" "lapack64" +- PATH_SUFFIXES "openblas" "openblas64" "openblas-pthread" +- "openblas-openmp" "lib" "lib64" +- NO_DEFAULT_PATH) ++ if(NOT CP2K_LAPACK_FOUND) ++ find_library( ++ CP2K_LAPACK_LINK_LIBRARIES ++ NAMES "lapack" "lapack64" ++ PATH_SUFFIXES "openblas" "openblas64" "openblas-pthread" ++ "openblas-openmp" "lib" "lib64" ++ NO_DEFAULT_PATH) ++ endif() + endif() + endif() + endif() +- + # check if found + find_package_handle_standard_args(Lapack + REQUIRED_VARS CP2K_LAPACK_LINK_LIBRARIES) +diff --git a/cmake/cp2k.pc.in b/cmake/cp2k.pc.in +deleted file mode 100644 +index 5b4a095660..0000000000 +--- a/cmake/cp2k.pc.in ++++ /dev/null +@@ -1,19 +0,0 @@ +-# this template is filled-in by CMake `configure_file(... @ONLY)` +-# the `@....@` are filled in by CMake configure_file(), +-# from variables set in your CMakeLists.txt or by CMake itself +-# +-# Good tutoral for understanding .pc files: +-# https://people.freedesktop.org/~dbn/pkg-config-guide.html +- +-prefix="@CMAKE_INSTALL_PREFIX@" +-exec_prefix="${prefix}" +-libdir="${prefix}/lib" +-includedir="${prefix}/include" +- +-Name: @PROJECT_NAME@ +-Description: @CMAKE_PROJECT_DESCRIPTION@ +-URL: @CMAKE_PROJECT_HOMEPAGE_URL@ +-Version: @PROJECT_VERSION@ +-Cflags: -I"${includedir}" +-Libs: -L"${libdir}" -lcp2k -lcp2k_dbm -lcp2k_grid -lcp2k_offload +-#Libs.private: -L"${libdir}" @CP2K_LIBS@ +\ No newline at end of file +diff --git a/cmake/cp2kConfig.cmake.in b/cmake/cp2kConfig.cmake.in +index a3acd47442..a9e0eb5a58 100644 +--- a/cmake/cp2kConfig.cmake.in ++++ b/cmake/cp2kConfig.cmake.in +@@ -5,112 +5,120 @@ + #! SPDX-License-Identifier: GPL-2.0-or-later ! + #!-------------------------------------------------------------------------------------------------! + +- + cmake_minimum_required(VERSION 3.22) ++include(CMakeFindDependencyMacro) ++ ++if(NOT TARGET cp2k::cp2k) ++ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules" ++ ${CMAKE_MODULE_PATH}) ++ ++ # store CXX compiler id. Used in MKL package. ++ set(CP2K_CXX_COMPILER_ID @CMAKE_CXX_COMPILER_ID@) ++ if(NOT ${CMAKE_CXX_COMPILER_ID}) ++ set(CMAKE_CXX_COMPILER_ID ${CP2K_CXX_COMPILER_ID}) ++ endif() ++ ++ set(CP2K_BLAS_VENDOR @CP2K_BLAS_VENDOR@) ++ set(CP2K_SCALAPACK_VENDOR @CP2K_SCALAPACK_VENDOR@) ++ set(CP2K_BLAS_LINK_LIBRARIES @CP2K_BLAS_LINK_LIBRARIES@) ++ set(CP2K_LAPACK_LINK_LIBRARIES @CP2K_LAPACK_LINK_LIBRARIES@) ++ set(CP2K_SCALAPACK_LINK_LIBRARIES @CP2K_SCALAPACK_LINK_LIBRARIES@) ++ ++ set(CP2K_CONFIG_PACKAGE ON) ++ find_dependency(Lapack REQUIRED) ++ ++ # define lapack and blas TARGETS ++ ++ if(@CP2K_USE_MPI@) ++ find_dependency(SCALAPACK REQUIRED) ++ endif() ++ unset(CP2K_CONFIG_PACKAGE) ++ ++ set(cp2k_VERSION @cp2k_VERSION@) ++ ++ find_dependency(DBCSR 2.5 REQUIRED) ++ ++ if(@CP2K_USE_LIBXSMM@) ++ find_dependency(LibXSMM REQUIRED) ++ endif() ++ ++ if(@CP2K_USE_HIP@) ++ # Find hip ++ find_dependency(hipfft REQUIRED IMPORTED CONFIG) ++ find_dependency(hipblas REQUIRED IMPORTED CONFIG) ++ endif() ++ ++ if(@CP2K_USE_CUDA@) ++ find_dependency(CUDAToolkit REQUIRED) ++ endif() ++ if(@CP2K_USE_ELPA@) ++ find_dependency(Elpa REQUIRED) ++ endif() ++ ++ if(@CP2K_USE_LIBXC@) ++ find_dependency(LibXC 6 REQUIRED EXACT) ++ endif() ++ ++ if(@CP2K_USE_COSMA@) ++ find_dependency(cosma REQUIRED) ++ endif() ++ ++ if(@CP2K_USE_MPI@) ++ find_dependency(MPI REQUIRED) ++ endif() ++ ++ if(@CP2K_USE_FFTW3@) ++ find_dependency(Fftw REQUIRED) ++ endif() ++ # QUIP ++ if(@CP2K_USE_QUIP@) ++ find_dependency(Quip REQUIRED) ++ endif() + +-# store CXX compiler id. Used in MKL package. +-set(SIRIUS_CXX_COMPILER_ID @CMAKE_CXX_COMPILER_ID@) +-if(NOT ${CMAKE_CXX_COMPILER_ID}) +- set(CMAKE_CXX_COMPILER_ID ${SIRIUS_CXX_COMPILER_ID}) +-endif() +- +-set(CP2K_BLAS_VENDOR @CP2K_BLAS_VENDOR@) +-set(CP2K_SCALAPACK_VENDOR @CP2K_SCALAPACK_VENDOR@) +- +-if (@CP2K_BLAS_VENDOR@ MATCHES "CUSTOM") +- set(CP2K_BLAS_LINK_LIBRARIES @CP2K_BLAS_LINK_LIBRARIES@) +- set(CP2K_LAPACK_LINK_LIBRARIES @CP2K_LAPACK_LINK_LIBRARIES@) +-endif() +- +-if (@CP2K_SCALAPACK_VENDOR@ MATCHES "CUSTOM") +- set(CP2K_SCALAPACK_LINK_LIBRARIES @CP2K_SCALAPACK_LINK_LIBRARIES@) +-endif() +- +-find_package(Lapack REQUIRED) +-find_package(DBCSR 2.4 REQUIRED) +- +-if(@CP2K_USE_LIBXSMM@ +- find_package(LibXSMM REQUIRED) +-endif() +- +-if (@@CP2K_USE_HIP@) +- # Find hip +- find_package(hipfft REQUIRED IMPORTED CONFIG) +- find_package(hipblas REQUIRED IMPORTED CONFIG) +-endif() +- +-if (@@CP2K_USE_CUDA@) +- find_package(CUDAToolkit REQUIRED) +-endif() +-if(@CP2K_USE_ELPA@) +- find_package(Elpa REQUIRED) +-endif() +- +-if(@CP2K_USE_LIBXC@) +- find_package(LibXC 6 REQUIRED EXACT) +-endif() +- +-if(@CP2K_USE_COSMA@) +- find_package(cosma REQUIRED) +-endif() ++ # libint + +-if (@@CP2K_USE_MPI@) +- find_package(MPI REQUIRED) +- find_package(SCALAPACK REQUIRED) +-endif() ++ if(@CP2K_USE_LIBINT2@) ++ find_dependency(Libint2 REQUIRED) ++ endif() + +-if(@CP2K_USE_FFTW3@) +- find_package(Fftw REQUIRED) +-endif() +- # QUIP +-if(@CP2K_USE_QUIP@) +- find_package(Quip REQUIRED) +-endif() ++ # spglib + +-# libint ++ if(@CP2K_USE_SPGLIB@) ++ find_dependency(LibSPG REQUIRED) ++ endif() + +-if(@CP2K_USE_LIBINT2@) +- find_package(Libint2 REQUIRED) +-endif() ++ if(@CP2K_USE_SPLA@) ++ find_dependency(SPLA REQUIRED) ++ endif() + +-# spglib ++ if(@CP2K_USE_SIRIUS@) ++ find_dependency(sirius REQUIRED) ++ endif() + +-if(@CP2K_USE_SPGLIB@) +- find_package(LibSPG REQUIRED) +-endif() ++ if(@CP2K_USE_SUPERLU@) ++ find_dependency(SuperLU REQUIRED) ++ endif() + +-if(@CP2K_USE_SPLA@) +- find_package(SPLA REQUIRED) +-endif() ++ if(@CP2K_USE_METIS@) ++ find_dependency(Metis) ++ endif() + +-if(@CP2K_USE_SIRIUS@) +- find_package(sirius REQUIRED) +-endif() +- +-if(@CP2K_USE_SUPERLU@) +- find_package(SuperLU REQUIRED) +-endif() ++ if(@CP2K_USE_PEXSI@) ++ # PEXSI 1.2 uses cmake as build system ++ find_dependency(PEXSI REQUIRED) ++ endif() + +-if(@CP2K_USE_PARMETIS@) +- find_package(Metis) +-endif() ++ if(@CP2K_USE_PLUMED@) ++ find_dependency(Plumed REQUIRED) ++ endif() + +-if(@CP2K_USE_PTSCOTCH@) +- find_package(Ptscotch REQUIRED) +-endif() ++ if(@CP2K_USE_LIBTORCH@) ++ find_dependency(Torch REQUIRED) ++ endif() + +-if(@CP2K_USE_PEXSI@) +- # PEXSI 1.2 uses cmake as build system +- find_package(PEXSI REQUIRED) +-endif() ++ include("${CMAKE_CURRENT_LIST_DIR}/cp2kTargets.cmake") + +-if(@CP2K_USE_PLUMED@) +- find_package(Plumed REQUIRED) +-endif() ++ # Clean-up module path. ++ list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules") + +-if(@CP2K_USE_LIBTORCH@) +- find_package(Torch REQUIRED) + endif() +- +-# Include SIRIUS target +-include("${CMAKE_CURRENT_LIST_DIR}/cp2kTargets.cmake") +diff --git a/cmake/libcp2k.pc.in b/cmake/libcp2k.pc.in +new file mode 100644 +index 0000000000..618af55e28 +--- /dev/null ++++ b/cmake/libcp2k.pc.in +@@ -0,0 +1,11 @@ ++prefix="@CMAKE_INSTALL_PREFIX@" ++exec_prefix="${prefix}" ++libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@" ++includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" ++ ++Name: @PROJECT_NAME@ ++Description: @CMAKE_PROJECT_DESCRIPTION@ ++URL: @CMAKE_PROJECT_HOMEPAGE_URL@ ++Version: @PROJECT_VERSION@ ++Cflags: -I"${includedir}/cp2k" -I"${includedir}/cp2k/@CMAKE_Fortran_COMPILER_ID@-@CMAKE_Fortran_COMPILER_VERSION@" ++Libs: -L"${libdir}" -lcp2k +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index dbc955885e..e003d4f88d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1555,7 +1555,7 @@ target_compile_definitions( + cp2k + PUBLIC $<$:__parallel> + $<$:__SCALAPACK> +- $<$:__MPI_08> ++ $<$:__MPI_08> + __COMPILE_DATE=\"${CP2K_TIMESTAMP}\" + __COMPILE_HOST=\"${CP2K_HOST_NAME}\" + __COMPILE_REVISION=\"${CP2K_GIT_HASH}\" +@@ -1774,12 +1774,12 @@ install( + EXPORT cp2k_targets + FILE cp2kTargets.cmake + NAMESPACE cp2k:: +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cp2k") ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") + +-install(FILES start/libcp2k.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cp2k") ++install(FILES start/libcp2k.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") + + install( + DIRECTORY "${PROJECT_BINARY_DIR}/src/mod_files" +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cp2k" ++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}" + FILES_MATCHING + PATTERN "*.mod") diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 94dfbfec400418..27deecf78472aa 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -276,12 +276,10 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): depends_on("wannier90", when="@3.0+mpi") with when("build_system=cmake"): - depends_on("dbcsr") - depends_on("dbcsr@2.6:", when="@2023.2:") + depends_on("dbcsr@2.6:") depends_on("dbcsr+openmp", when="+openmp") depends_on("dbcsr+cuda", when="+cuda") depends_on("dbcsr+rocm", when="+rocm") - conflicts("+mpi_f08", when="@:2023.2") # CP2K needs compiler specific compilation flags, e.g. optflags conflicts("%apple-clang") @@ -352,6 +350,7 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): # These patches backport 2023.x fixes to previous versions patch("backport_avoid_null_2022.x.patch", when="@2022.1:2022.2 %aocc@:4.0") patch("backport_avoid_null_9.1.patch", when="@9.1 %aocc@:4.0") + patch("cmake-fixes-2023.2.patch", when="@2023.2 build_system=cmake") # Patch for an undefined constant due to incompatible changes in ELPA @when("@9.1:2022.2 +elpa") @@ -427,9 +426,13 @@ def edit(self, spec, prefix): ldflags = [] libs = [] - # CP2K Makefile doesn't set C standard, but the source code uses - # C99-style for-loops with inline definition of iterating variable. - cflags.append(self.compiler.c99_flag) + # CP2K Makefile doesn't set C standard + if spec.satisfies("@2023.2:"): + # Use of DBL_DECIMAL_DIG + cflags.append(self.compiler.c11_flag) + else: + # C99-style for-loops with inline definition of iterating variable. + cflags.append(self.compiler.c99_flag) if "%intel" in spec: cflags.append("-fp-model precise") diff --git a/var/spack/repos/builtin/packages/dbcsr/package.py b/var/spack/repos/builtin/packages/dbcsr/package.py index 57ff0b5a402f50..2a3251304f44c2 100644 --- a/var/spack/repos/builtin/packages/dbcsr/package.py +++ b/var/spack/repos/builtin/packages/dbcsr/package.py @@ -98,6 +98,14 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage): conflicts("smm=blas", when="+opencl") + with when("+mpi"): + # When using mpich 4.1 or higher, mpi_f08 has to be used, otherwise: + # Error: Type mismatch in argument 'baseptr' at (1); passed TYPE(c_ptr) + # to INTEGER(8) + conflicts("^mpich@4.1:", when="@:2.5") + conflicts("~mpi_f08", when="^mpich@4.1:") + depends_on("mpich+fortran", when="^mpich") + generator("ninja") depends_on("ninja@1.10:", type="build") diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index a4a024eb1cb618..052832e0036308 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -261,7 +261,6 @@ class Gromacs(CMakePackage, CudaPackage): depends_on("hwloc", when="+hwloc@2019:") depends_on("cp2k@8.1:", when="+cp2k") - depends_on("dbcsr", when="+cp2k") depends_on("nvhpc", when="+cufftmp") diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py index 4e853c41cf31f8..4de81dace46dd2 100644 --- a/var/spack/repos/builtin/packages/libxsmm/package.py +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -82,6 +82,9 @@ class Libxsmm(MakefilePackage): # (). depends_on("binutils+ld+gas@2.33:", type="build", when="@:1.17") + # Intel Architecture or compatible CPU required + requires("target=x86_64:") + @property def libs(self): result = find_libraries(["libxsmm", "libxsmmf"], root=self.prefix, recursive=True) From 27a0425e5d432647d549d4f671f8556b097bfa4e Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 20 Oct 2023 17:09:19 +0200 Subject: [PATCH 296/806] concretize separately: show concretization time per spec as they concretize when verbose (#40634) --- lib/spack/spack/environment/environment.py | 51 ++++++----- lib/spack/spack/test/cmd/dev_build.py | 3 +- lib/spack/spack/util/parallel.py | 87 ++++--------------- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 4 +- 4 files changed, 47 insertions(+), 98 deletions(-) diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 62dda31034d2b7..51ea453c39ef3c 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1480,11 +1480,12 @@ def _concretize_separately(self, tests=False): self._add_concrete_spec(s, concrete, new=False) # Concretize any new user specs that we haven't concretized yet - arguments, root_specs = [], [] + args, root_specs, i = [], [], 0 for uspec, uspec_constraints in zip(self.user_specs, self.user_specs.specs_as_constraints): if uspec not in old_concretized_user_specs: root_specs.append(uspec) - arguments.append((uspec_constraints, tests)) + args.append((i, uspec_constraints, tests)) + i += 1 # Ensure we don't try to bootstrap clingo in parallel if spack.config.get("config:concretizer", "clingo") == "clingo": @@ -1503,34 +1504,36 @@ def _concretize_separately(self, tests=False): _ = spack.compilers.get_compiler_config() # Early return if there is nothing to do - if len(arguments) == 0: + if len(args) == 0: return [] # Solve the environment in parallel on Linux start = time.time() - max_processes = min( - len(arguments), # Number of specs - spack.util.cpus.determine_number_of_jobs(parallel=True), - ) + num_procs = min(len(args), spack.util.cpus.determine_number_of_jobs(parallel=True)) - # TODO: revisit this print as soon as darwin is parallel too + # TODO: support parallel concretization on macOS and Windows msg = "Starting concretization" - if sys.platform != "darwin": - pool_size = spack.util.parallel.num_processes(max_processes=max_processes) - if pool_size > 1: - msg = msg + " pool with {0} processes".format(pool_size) + if sys.platform not in ("darwin", "win32") and num_procs > 1: + msg += f" pool with {num_procs} processes" tty.msg(msg) - concretized_root_specs = spack.util.parallel.parallel_map( - _concretize_task, arguments, max_processes=max_processes, debug=tty.is_debug() - ) + batch = [] + for i, concrete, duration in spack.util.parallel.imap_unordered( + _concretize_task, args, processes=num_procs, debug=tty.is_debug() + ): + batch.append((i, concrete)) + tty.verbose(f"[{duration:7.2f}s] {root_specs[i]}") + sys.stdout.flush() + + # Add specs in original order + batch.sort(key=lambda x: x[0]) + by_hash = {} # for attaching information on test dependencies + for root, (_, concrete) in zip(root_specs, batch): + self._add_concrete_spec(root, concrete) + by_hash[concrete.dag_hash()] = concrete finish = time.time() - tty.msg("Environment concretized in %.2f seconds." % (finish - start)) - by_hash = {} - for abstract, concrete in zip(root_specs, concretized_root_specs): - self._add_concrete_spec(abstract, concrete) - by_hash[concrete.dag_hash()] = concrete + tty.msg(f"Environment concretized in {finish - start:.2f} seconds") # Unify the specs objects, so we get correct references to all parents self._read_lockfile_dict(self._to_lockfile_dict()) @@ -2392,10 +2395,12 @@ def _concretize_from_constraints(spec_constraints, tests=False): invalid_constraints.extend(inv_variant_constraints) -def _concretize_task(packed_arguments): - spec_constraints, tests = packed_arguments +def _concretize_task(packed_arguments) -> Tuple[int, Spec, float]: + index, spec_constraints, tests = packed_arguments with tty.SuppressOutput(msg_enabled=False): - return _concretize_from_constraints(spec_constraints, tests) + start = time.time() + spec = _concretize_from_constraints(spec_constraints, tests) + return index, spec, time.time() - start def make_repo_path(root): diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py index 71ab195b649c8e..c5a7b5c3bb801a 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -11,6 +11,7 @@ import spack.build_environment import spack.environment as ev +import spack.error import spack.spec import spack.store from spack.main import SpackCommand @@ -237,7 +238,7 @@ def test_dev_build_env_version_mismatch(tmpdir, install_mockery, mutable_mock_en env("create", "test", "./spack.yaml") with ev.read("test"): - with pytest.raises(RuntimeError): + with pytest.raises((RuntimeError, spack.error.UnsatisfiableSpecError)): install() diff --git a/lib/spack/spack/util/parallel.py b/lib/spack/spack/util/parallel.py index 06e9ed52256828..683835641ae17e 100644 --- a/lib/spack/spack/util/parallel.py +++ b/lib/spack/spack/util/parallel.py @@ -2,14 +2,11 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import contextlib import multiprocessing import os import sys import traceback -from .cpus import cpus_available - class ErrorFromWorker: """Wrapper class to report an error from a worker process""" @@ -56,79 +53,25 @@ def __call__(self, *args, **kwargs): return value -def raise_if_errors(*results, **kwargs): - """Analyze results from worker Processes to search for ErrorFromWorker - objects. If found print all of them and raise an exception. - - Args: - *results: results from worker processes - debug: if True show complete stacktraces - - Raise: - RuntimeError: if ErrorFromWorker objects are in the results - """ - debug = kwargs.get("debug", False) # This can be a keyword only arg in Python 3 - errors = [x for x in results if isinstance(x, ErrorFromWorker)] - if not errors: - return - - msg = "\n".join([error.stacktrace if debug else str(error) for error in errors]) - - error_fmt = "{0}" - if len(errors) > 1 and not debug: - error_fmt = "errors occurred during concretization of the environment:\n{0}" - - raise RuntimeError(error_fmt.format(msg)) - - -@contextlib.contextmanager -def pool(*args, **kwargs): - """Context manager to start and terminate a pool of processes, similar to the - default one provided in Python 3.X - - Arguments are forwarded to the multiprocessing.Pool.__init__ method. - """ - try: - p = multiprocessing.Pool(*args, **kwargs) - yield p - finally: - p.terminate() - p.join() - - -def num_processes(max_processes=None): - """Return the number of processes in a pool. - - Currently the function return the minimum between the maximum number - of processes and the cpus available. - - When a maximum number of processes is not specified return the cpus available. - - Args: - max_processes (int or None): maximum number of processes allowed - """ - max_processes or cpus_available() - return min(cpus_available(), max_processes) - - -def parallel_map(func, arguments, max_processes=None, debug=False): - """Map a task object to the list of arguments, return the list of results. +def imap_unordered(f, list_of_args, *, processes: int, debug=False): + """Wrapper around multiprocessing.Pool.imap_unordered. Args: - func (Task): user defined task object - arguments (list): list of arguments for the task - max_processes (int or None): maximum number of processes allowed - debug (bool): if False, raise an exception containing just the error messages + f: function to apply + list_of_args: list of tuples of args for the task + processes: maximum number of processes allowed + debug: if False, raise an exception containing just the error messages from workers, if True an exception with complete stacktraces Raises: RuntimeError: if any error occurred in the worker processes """ - task_wrapper = Task(func) - if sys.platform != "darwin" and sys.platform != "win32": - with pool(processes=num_processes(max_processes=max_processes)) as p: - results = p.map(task_wrapper, arguments) - else: - results = list(map(task_wrapper, arguments)) - raise_if_errors(*results, debug=debug) - return results + if sys.platform in ("darwin", "win32") or len(list_of_args) == 1: + yield from map(f, list_of_args) + return + + with multiprocessing.Pool(processes) as p: + for result in p.imap_unordered(Task(f), list_of_args): + if isinstance(result, ErrorFromWorker): + raise RuntimeError(result.stacktrace if debug else str(result)) + yield result diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 905901ff295e5d..245bb51933ccf0 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -144,7 +144,7 @@ default: - spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))" < "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" - spack config add -f "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" - - spack + - spack -v --config-scope "${SPACK_CI_CONFIG_ROOT}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" @@ -197,7 +197,7 @@ default: - spack --version - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME} - spack env activate --without-view . - - spack + - spack -v ci generate --check-index-only --buildcache-destination "${PUSH_BUILDCACHE_DEPRECATED}" --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir" From 76c57af0213b199b996836dc5b706438e7f936dd Mon Sep 17 00:00:00 2001 From: "Garth N. Wells" Date: Fri, 20 Oct 2023 18:04:02 +0100 Subject: [PATCH 297/806] py-fenics-ffcx: update to v0.7 (#40569) --- .../packages/py-fenics-ffcx/package.py | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py index 45c11e7952f596..2cd0584a662527 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py @@ -15,24 +15,41 @@ class PyFenicsFfcx(PythonPackage): maintainers("chrisrichardson", "garth-wells", "jhale") version("main", branch="main") + version("0.7.0", sha256="7f3c3ca91d63ce7831d37799cc19d0551bdcd275bdfa4c099711679533dd1c71") version("0.6.0", sha256="076fad61d406afffd41019ae1abf6da3f76406c035c772abad2156127667980e") version( "0.5.0.post0", sha256="039908c9998b51ba53e5deb3a97016062c262f0a4285218644304f7d3cd35882" ) version("0.4.2", sha256="3be6eef064d6ef907245db5b6cc15d4e603762e68b76e53e099935ca91ef1ee4") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-setuptools@58:", type=("build", "run")) + depends_on("python@3.8:", when="@0.7:", type=("build", "run")) + depends_on("py-setuptools@62:", when="@0.7:", type="build") + depends_on("py-setuptools@58:", when="@0.4.2:0.6", type="build") + # CFFI is required at runtime for JIT support depends_on("py-cffi", type=("build", "run")) + # py-numpy>=1.21 required because FFCx uses NumPy typing (version + # requirement not properly set in the FFCx pyproject.toml file) depends_on("py-numpy@1.21:", type=("build", "run")) depends_on("py-fenics-ufl@main", type=("build", "run"), when="@main") - depends_on("py-fenics-ufl@2023.1", type=("build", "run"), when="@0.6") + depends_on("py-fenics-ufl@2023.3.0:", type=("build", "run"), when="@0.8") + depends_on("py-fenics-ufl@2023.2.0", type=("build", "run"), when="@0.7") depends_on("py-fenics-ufl@2022.2.0", type=("build", "run"), when="@0.5.0:0.5") depends_on("py-fenics-ufl@2022.1.0", type=("build", "run"), when="@0.4.2") depends_on("py-fenics-basix@main", type=("build", "run"), when="@main") + depends_on("py-fenics-basix@0.7", type=("build", "run"), when="@0.7") depends_on("py-fenics-basix@0.6.0:0.6", type=("build", "run"), when="@0.6.0:0.6") depends_on("py-fenics-basix@0.5.1:0.5", type=("build", "run"), when="@0.5.0:0.5") depends_on("py-fenics-basix@0.4.2", type=("build", "run"), when="@0.4.2") + + depends_on("py-pytest@6:", type="test") + depends_on("py-sympy", type="test") + + @run_after("install") + @on_package_attributes(run_tests=True) + def check_build(self): + with working_dir("test"): + pytest = which("pytest") + pytest("--ignore=test_cmdline.py") From d442fac69adba6fb4107ef7fe1a9c9dd54461421 Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Sat, 21 Oct 2023 01:28:45 +0200 Subject: [PATCH 298/806] gromacs: add 2022.6, 2023.2, 2023.3 versions (#38906) * gromacs: add 2022.6, 2023.2 versions * gromacs: add version 2023.3 --- var/spack/repos/builtin/packages/gromacs/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 052832e0036308..e280234a0e45fa 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -30,8 +30,11 @@ class Gromacs(CMakePackage, CudaPackage): version("main", branch="main") version("master", branch="main", deprecated=True) + version("2023.3", sha256="4ec8f8d0c7af76b13f8fd16db8e2c120e749de439ae9554d9f653f812d78d1cb") + version("2023.2", sha256="bce1480727e4b2bb900413b75d99a3266f3507877da4f5b2d491df798f9fcdae") version("2023.1", sha256="eef2bb4a6cb6314cf9da47f26df2a0d27af4bf7b3099723d43601073ab0a42f4") version("2023", sha256="ac92c6da72fbbcca414fd8a8d979e56ecf17c4c1cdabed2da5cfb4e7277b7ba8") + version("2022.6", sha256="75d277138475679dd3e334e384a71516570cde767310476687f2a5b72333ea41") version("2022.5", sha256="083cc3c424bb93ffe86c12f952e3e5b4e6c9f6520de5338761f24b75e018c223") version("2022.4", sha256="c511be602ff29402065b50906841def98752639b92a95f1b0a1060d9b5e27297") version("2022.3", sha256="14cfb130ddaf8f759a3af643c04f5a0d0d32b09bc3448b16afa5b617f5e35dae") From 0c18f81b80b54a4b04c779e269a2831dc7c85a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Sat, 21 Oct 2023 02:09:13 +0200 Subject: [PATCH 299/806] [add] py-dict2css: new package (#40552) Co-authored-by: LydDeb --- .../builtin/packages/py-dict2css/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-dict2css/package.py diff --git a/var/spack/repos/builtin/packages/py-dict2css/package.py b/var/spack/repos/builtin/packages/py-dict2css/package.py new file mode 100644 index 00000000000000..7e962e56d75e0a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dict2css/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 PyDict2css(PythonPackage): + """A μ-library for constructing cascading style sheets from Python dictionaries.""" + + homepage = "https://github.com/sphinx-toolbox/dict2css" + pypi = "dict2css/dict2css-0.3.0.tar.gz" + + maintainers("LydDeb") + + version("0.3.0", sha256="1e8b1bf580dca2083198f88a60ec88c878a8829d760dfe45483ef80fe2905117") + + depends_on("py-whey", type="build") + depends_on("py-cssutils@2.2.0:", type=("build", "run")) + depends_on("py-domdf-python-tools@2.2.0:", type=("build", "run")) From 8714b24420a3f66cc9b168e95102d742f112b976 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Sat, 21 Oct 2023 00:38:03 -0600 Subject: [PATCH 300/806] py-kombu: pick older version of py-setuptools (#40642) --- var/spack/repos/builtin/packages/py-kombu/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-kombu/package.py b/var/spack/repos/builtin/packages/py-kombu/package.py index 9c732796cf30a6..23fc35f315f405 100644 --- a/var/spack/repos/builtin/packages/py-kombu/package.py +++ b/var/spack/repos/builtin/packages/py-kombu/package.py @@ -23,7 +23,7 @@ class PyKombu(PythonPackage): variant("redis", default=False, description="Use redis transport") - depends_on("py-setuptools", type="build") + depends_on("py-setuptools@:55", type="build") depends_on("py-amqp@2.5.2:2.5", when="@:4.6.6", type=("build", "run")) depends_on("py-amqp@2.6.0:2.6", when="@4.6.7:4", type=("build", "run")) depends_on("py-amqp@5.0.0:5", when="@5.0.0:5.0.2", type=("build", "run")) From d820cf73e999bda6f8036bb2bbfbbec94c049005 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 21 Oct 2023 13:38:30 +0200 Subject: [PATCH 301/806] py-kombu: fix setuptools bound (#40646) --- var/spack/repos/builtin/packages/py-kombu/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-kombu/package.py b/var/spack/repos/builtin/packages/py-kombu/package.py index 23fc35f315f405..6f13c380ffb840 100644 --- a/var/spack/repos/builtin/packages/py-kombu/package.py +++ b/var/spack/repos/builtin/packages/py-kombu/package.py @@ -23,7 +23,10 @@ class PyKombu(PythonPackage): variant("redis", default=False, description="Use redis transport") - depends_on("py-setuptools@:55", type="build") + depends_on("py-setuptools", type="build") + # "pytz>dev" in tests_require: setuptools parser changed in v60 and errors. + depends_on("py-setuptools@:59", when="@4.6:5.2", type="build") + depends_on("py-amqp@2.5.2:2.5", when="@:4.6.6", type=("build", "run")) depends_on("py-amqp@2.6.0:2.6", when="@4.6.7:4", type=("build", "run")) depends_on("py-amqp@5.0.0:5", when="@5.0.0:5.0.2", type=("build", "run")) From 1527853efde5ceecd61ff97f4b883132ed72cc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Sat, 21 Oct 2023 15:26:36 +0200 Subject: [PATCH 302/806] intel-tbb: patch patch for Apple's patch (#40640) While e.g. GNU patch 2.7.6 (as provided by homebrew) would apply the previous version of this patch without problems, Apple's patch 2.0-12u11-Apple fails to find out which file to patch. Adding two lines to the patch fixes that. Renamed the patch in order to not require a `spack clean -m`. --- .../intel-tbb/{gcc_13-2021.patch => gcc_13-2021-v2.patch} | 2 ++ var/spack/repos/builtin/packages/intel-tbb/package.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) rename var/spack/repos/builtin/packages/intel-tbb/{gcc_13-2021.patch => gcc_13-2021-v2.patch} (92%) diff --git a/var/spack/repos/builtin/packages/intel-tbb/gcc_13-2021.patch b/var/spack/repos/builtin/packages/intel-tbb/gcc_13-2021-v2.patch similarity index 92% rename from var/spack/repos/builtin/packages/intel-tbb/gcc_13-2021.patch rename to var/spack/repos/builtin/packages/intel-tbb/gcc_13-2021-v2.patch index e1e1b1116bf6f8..d1e87cd7c4d5ac 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/gcc_13-2021.patch +++ b/var/spack/repos/builtin/packages/intel-tbb/gcc_13-2021-v2.patch @@ -16,6 +16,8 @@ Signed-off-by: Sam James diff --git a/test/common/utils_assert.h b/test/common/utils_assert.h index 1df8ae72acc49fe38dac4d9bed4e9f4f26affcf5..0123ab881e124a800a5ebf8507050148038747d5 100644 +--- a/test/common/utils_assert.h ++++ b/test/common/utils_assert.h @@ -20,6 +20,8 @@ #include "config.h" #include "utils_report.h" diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 45761c7a06fcc3..14da30b2d430fe 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -125,7 +125,7 @@ class IntelTbb(CMakePackage, MakefilePackage): patch("gcc_generic-pedantic-4.4.patch", level=1, when="@:2019.0") # Patch and conflicts for GCC 13 support (#1031). - patch("gcc_13-2021.patch", when="@2021.1:") + patch("gcc_13-2021-v2.patch", when="@2021.1:") conflicts("%gcc@13", when="@:2021.3") # Patch cmakeConfig.cmake.in to find the libraries where we install them. From f915489c62503cdb3895d0e8d76a13ae7307b99a Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Sun, 22 Oct 2023 01:52:44 -0700 Subject: [PATCH 303/806] Docs: Add version range example to conditional dependencies (#40630) * Docs: Add version range example to conditional dependencies * Add when context manager example --- lib/spack/docs/packaging_guide.rst | 45 ++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index ae6be5b4a6eb3e..157236ebfcc12e 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2557,9 +2557,10 @@ Conditional dependencies ^^^^^^^^^^^^^^^^^^^^^^^^ You may have a package that only requires a dependency under certain -conditions. For example, you may have a package that has optional MPI support, -- MPI is only a dependency when you want to enable MPI support for the -package. In that case, you could say something like: +conditions. For example, you may have a package with optional MPI support. +You would then provide a variant to reflect that the feature is optional +and specify the MPI dependency only applies when MPI support is enabled. +In that case, you could say something like: .. code-block:: python @@ -2567,13 +2568,39 @@ package. In that case, you could say something like: depends_on("mpi", when="+mpi") -``when`` can include constraints on the variant, version, compiler, etc. and -the :mod:`syntax` is the same as for Specs written on the command -line. -If a dependency/feature of a package isn't typically used, you can save time -by making it conditional (since Spack will not build the dependency unless it -is required for the Spec). +Suppose the above package also has, since version 3, optional `Trilinos` +support and you want them both to build either with or without MPI. Further +suppose you require a version of `Trilinos` no older than 12.6. In that case, +the `trilinos` variant and dependency directives would be: + +.. code-block:: python + + variant("trilinos", default=False, description="Enable Trilinos support") + + depends_on("trilinos@12.6:", when="@3: +trilinos") + depends_on("trilinos@12.6: +mpi", when="@3: +trilinos +mpi") + + +Alternatively, you could use the `when` context manager to equivalently specify +the `trilinos` variant dependencies as follows: + +.. code-block:: python + + with when("@3: +trilinos"): + depends_on("trilinos@12.6:") + depends_on("trilinos +mpi", when="+mpi") + + +The argument to ``when`` in either case can include any Spec constraints that +are supported on the command line using the same :ref:`syntax `. + +.. note:: + + If a dependency isn't typically used, you can save time by making it + conditional since Spack will not build the dependency unless it is + required for the Spec. + .. _dependency_dependency_patching: From bbb4c939daf970c62658863c1e80d2b5d01e4520 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sun, 22 Oct 2023 16:07:31 +0200 Subject: [PATCH 304/806] py-kiwisolver: add a new version (#40653) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/py-kiwisolver/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-kiwisolver/package.py b/var/spack/repos/builtin/packages/py-kiwisolver/package.py index 803646240a34cb..08ad89b0e4d407 100644 --- a/var/spack/repos/builtin/packages/py-kiwisolver/package.py +++ b/var/spack/repos/builtin/packages/py-kiwisolver/package.py @@ -12,6 +12,7 @@ class PyKiwisolver(PythonPackage): homepage = "https://github.com/nucleic/kiwi" pypi = "kiwisolver/kiwisolver-1.1.0.tar.gz" + version("1.4.5", sha256="e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec") version("1.4.4", sha256="d41997519fcba4a1e46eb4a2fe31bc12f0ff957b2b81bac28db24744f333e955") version("1.3.2", sha256="fc4453705b81d03568d5b808ad8f09c77c47534f6ac2e72e733f9ca4714aa75c") version("1.3.1", sha256="950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248") From 7cd5fcb48491441eee3aebc390e8551cc01b47e4 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sun, 22 Oct 2023 19:17:48 +0200 Subject: [PATCH 305/806] zlib-ng: add v2.1.4 (#40647) --- var/spack/repos/builtin/packages/zlib-ng/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/zlib-ng/package.py b/var/spack/repos/builtin/packages/zlib-ng/package.py index d069545dc1ec78..8444736856a3c2 100644 --- a/var/spack/repos/builtin/packages/zlib-ng/package.py +++ b/var/spack/repos/builtin/packages/zlib-ng/package.py @@ -16,8 +16,17 @@ class ZlibNg(AutotoolsPackage, CMakePackage): maintainers("haampie") - version("2.1.3", sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a") - version("2.1.2", sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33") + version("2.1.4", sha256="a0293475e6a44a3f6c045229fe50f69dc0eebc62a42405a51f19d46a5541e77a") + version( + "2.1.3", + sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a", + deprecated=True, + ) + version( + "2.1.2", + sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33", + deprecated=True, + ) version("2.0.7", sha256="6c0853bb27738b811f2b4d4af095323c3d5ce36ceed6b50e5f773204fb8f7200") version("2.0.0", sha256="86993903527d9b12fc543335c19c1d33a93797b3d4d37648b5addae83679ecd8") From eea3c07628d8c9f796cd5fb2649dc93933aa8a9f Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:18:16 +0200 Subject: [PATCH 306/806] glib: add patch with a fix for PTRACE_0_EXITKILL (#40655) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/glib/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 7ccdf2fd2ad0c7..1dd0ad9ea2295c 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -173,6 +173,13 @@ class Glib(MesonPackage, AutotoolsPackage): patch("meson-gettext-2.66.patch", when="@2.66:2.68,2.72") patch("meson-gettext-2.70.patch", when="@2.70") + # Don't use PTRACE_O_EXITKILL if it's not defined + patch( + "https://gitlab.gnome.org/GNOME/glib/-/commit/bda87264372c006c94e21ffb8ff9c50ecb3e14bd.diff", + sha256="2c25d7b3bf581b3ec992d7af997fa6c769174d49b9350e0320c33f5e048cba99", + when="@2.78.0", + ) + def url_for_version(self, version): """Handle glib's version-based custom URLs.""" url = "https://download.gnome.org/sources/glib" From 1c0d3bc07158578a34ea5fd4f7565386085302c0 Mon Sep 17 00:00:00 2001 From: Bill Williams Date: Sun, 22 Oct 2023 22:11:19 +0200 Subject: [PATCH 307/806] Add Score-P 8.3 and dependencies (#40478) Includes Score-P 8.3 and Cubew/cubelib 4.8.2. --- var/spack/repos/builtin/packages/cubelib/package.py | 2 ++ var/spack/repos/builtin/packages/cubew/package.py | 2 ++ var/spack/repos/builtin/packages/scorep/package.py | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/cubelib/package.py b/var/spack/repos/builtin/packages/cubelib/package.py index 713c301f2ff246..919a001fedaa4f 100644 --- a/var/spack/repos/builtin/packages/cubelib/package.py +++ b/var/spack/repos/builtin/packages/cubelib/package.py @@ -11,7 +11,9 @@ class Cubelib(AutotoolsPackage): homepage = "https://www.scalasca.org/software/cube-4.x/download.html" url = "https://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubelib-4.4.tar.gz" + maintainers = ("swat-jsc", "wrwilliams") + version("4.8.2", sha256="d6fdef57b1bc9594f1450ba46cf08f431dd0d4ae595c47e2f3454e17e4ae74f4") version("4.8", sha256="171c93ac5afd6bc74c50a9a58efdaf8589ff5cc1e5bd773ebdfb2347b77e2f68") version("4.7.1", sha256="62cf33a51acd9a723fff9a4a5411cd74203e24e0c4ffc5b9e82e011778ed4f2f") version("4.7", sha256="e44352c80a25a49b0fa0748792ccc9f1be31300a96c32de982b92477a8740938") diff --git a/var/spack/repos/builtin/packages/cubew/package.py b/var/spack/repos/builtin/packages/cubew/package.py index 6674a7cf662697..bcab0920fd1833 100644 --- a/var/spack/repos/builtin/packages/cubew/package.py +++ b/var/spack/repos/builtin/packages/cubew/package.py @@ -11,7 +11,9 @@ class Cubew(AutotoolsPackage): homepage = "https://www.scalasca.org/software/cube-4.x/download.html" url = "https://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubew-4.4.tar.gz" + maintainers = ("swat-jsc", "wrwilliams") + version("4.8.2", sha256="4f3bcf0622c2429b8972b5eb3f14d79ec89b8161e3c1cc5862ceda417d7975d2") version("4.8", sha256="73c7f9e9681ee45d71943b66c01cfe675b426e4816e751ed2e0b670563ca4cf3") version("4.7.1", sha256="0d364a4930ca876aa887ec40d12399d61a225dbab69e57379b293516d7b6db8d") version("4.7", sha256="a7c7fca13e6cb252f08d4380223d7c56a8e86a67de147bcc0279ebb849c884a5") diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index ba9ac487e521e1..316173a73e297d 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -16,6 +16,8 @@ class Scorep(AutotoolsPackage): url = "https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-7.1/scorep-7.1.tar.gz" maintainers("wrwilliams") + version("8.3", sha256="76c914e6319221c059234597a3bc53da788ed679179ac99c147284dcefb1574a") + # version 8.2 was immediately superseded before it hit Spack version("8.1", sha256="3a40b481fce610871ddf6bdfb88a6d06b9e5eb38c6080faac6d5e44990060a37") version("8.0", sha256="4c0f34f20999f92ebe6ca1ff706d0846b8ce6cd537ffbedb49dfaef0faa66311") version("7.1", sha256="98dea497982001fb82da3429ca55669b2917a0858c71abe2cfe7cd113381f1f7") @@ -93,8 +95,10 @@ def url_for_version(self, version): # SCOREP 8 depends_on("binutils", type="link", when="@8:") depends_on("otf2@3:", when="@8:") - depends_on("cubew@4.8:", when="@8:") - depends_on("cubelib@4.8:", when="@8:") + depends_on("cubew@4.8.2:", when="@8.3:") + depends_on("cubelib@4.8.2:", when="@8.3:") + depends_on("cubew@4.8:", when="@8:8.2") + depends_on("cubelib@4.8:", when="@8:8.2") # fall through to Score-P 7's OPARI2, no new release # SCOREP 7 depends_on("otf2@2.3:2.3.99", when="@7.0:7") From 428202b24690f52340481735df5fe47726ab8cc2 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 08:58:24 +0200 Subject: [PATCH 308/806] libxml2: fix GitLab patch (#40658) GitLab's .patch URLs do not provide stable/full hashes, while .diff URLs do. See #40656 for more information. --- var/spack/repos/builtin/packages/libxml2/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index f0de744c590f41..ca92e6994a682b 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -74,8 +74,8 @@ def url_for_version(self, version): # Use NAN/INFINITY if available to avoid SIGFPE # See https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/186 patch( - "https://gitlab.gnome.org/GNOME/libxml2/-/commit/c9925454fd384a17c8c03d358c6778a552e9287b.patch", - sha256="3e06d42596b105839648070a5921157fe284b932289ffdbfa304ddc3457e5637", + "https://gitlab.gnome.org/GNOME/libxml2/-/commit/c9925454fd384a17c8c03d358c6778a552e9287b.diff", + sha256="5dc43fed02b443d2563a502a52caafe39477c06fc30b70f786d5ed3eb5aea88d", when="@2.9.11:2.9.14", ) build_system(conditional("nmake", when="platform=windows"), "autotools", default="autotools") From c5d0fd42e6fd90156cc05072938d19e7b983c19b Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 08:58:47 +0200 Subject: [PATCH 309/806] vtk: fix GitLab patch (#40659) GitLab's .patch URLs do not provide stable/full hashes, while .diff URLs do. See #40656 for more information. --- var/spack/repos/builtin/packages/vtk/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 122e29408eb652..d73bb332594ea4 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -195,8 +195,8 @@ class Vtk(CMakePackage): ) patch( - "https://gitlab.kitware.com/vtk/vtk/-/commit/5a1c96e12e9b4a660d326be3bed115a2ceadb573.patch", - sha256="65175731c080961f85d779d613ac1f6bce89783745e54e864edec7637b03b18a", + "https://gitlab.kitware.com/vtk/vtk/-/commit/5a1c96e12e9b4a660d326be3bed115a2ceadb573.diff", + sha256="c446a90459b108082db5b28d9aeda99d030e636325e01929beba062cafb16b76", when="@9.1", ) From 8b4e557fed3479314848ef3ebc44a298c4b6ac4f Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 08:59:10 +0200 Subject: [PATCH 310/806] garfieldpp: fix GitLab patch (#40660) GitLab's .patch URLs do not provide stable/full hashes, while .diff URLs do. See #40656 for more information. --- var/spack/repos/builtin/packages/garfieldpp/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/garfieldpp/package.py b/var/spack/repos/builtin/packages/garfieldpp/package.py index 40671403cc7eb4..0bbdda3e3d9d8a 100644 --- a/var/spack/repos/builtin/packages/garfieldpp/package.py +++ b/var/spack/repos/builtin/packages/garfieldpp/package.py @@ -18,8 +18,8 @@ class Garfieldpp(CMakePackage): maintainers("mirguest") patch( - "https://gitlab.cern.ch/garfield/garfieldpp/-/commit/882c3023cfa89b45ca7a0c95ab1518454536e8e1.patch", - sha256="440bc8129c55168e6c45d39e4344911d48ddb13fd3f9ee05974b2ede46a23b93", + "https://gitlab.cern.ch/garfield/garfieldpp/-/commit/882c3023cfa89b45ca7a0c95ab1518454536e8e1.diff", + sha256="ea3b91d67011abe41e72c7b55578d14b77bd2ef5e7f344077091934b24f38f0d", when="@4.0", ) From f4c813f74a91c567bbea6462df2a982653ada203 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 08:59:38 +0200 Subject: [PATCH 311/806] gobject-introspection: fix GitLab patch (#40661) GitLab's .patch URLs do not provide stable/full hashes, while .diff URLs do. See #40656 for more information. --- .../repos/builtin/packages/gobject-introspection/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py index 4f46e4ef7029a0..c7bfb372b473a9 100644 --- a/var/spack/repos/builtin/packages/gobject-introspection/package.py +++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py @@ -74,8 +74,8 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage): # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/325 patch( "https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/" - "1f9284228092b2a7200e8a78bc0ea6702231c6db.patch", - sha256="7700828b638c85255c87fcc317ea7e9572ff443f65c86648796528885e5b4cea", + "1f9284228092b2a7200e8a78bc0ea6702231c6db.diff", + sha256="dcb9e7c956dff49c3a73535829382e8662fa6bd13bdfb416e8eac47b2604fa0a", when="@:1.63.1", ) From 8a4860480a88bcadb47370e4d4604b925a0bb028 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 08:59:58 +0200 Subject: [PATCH 312/806] knem: fix GitLab patch (#40662) GitLab's .patch URLs do not provide stable/full hashes, while .diff URLs do. See #40656 for more information. --- var/spack/repos/builtin/packages/knem/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/knem/package.py b/var/spack/repos/builtin/packages/knem/package.py index 2b229c93d28755..3e1bcd925c8b3b 100644 --- a/var/spack/repos/builtin/packages/knem/package.py +++ b/var/spack/repos/builtin/packages/knem/package.py @@ -32,8 +32,8 @@ class Knem(AutotoolsPackage): variant("hwloc", default=True, description="Enable hwloc in the user-space tools") patch( - "https://gitlab.inria.fr/knem/knem/-/commit/5c8cb902d6040df58cdc4e4e4c10d1f1426c3525.patch", - sha256="78885a02d6f031a793db6a7190549f8d64c8606b353051d65f8e3f802b801902", + "https://gitlab.inria.fr/knem/knem/-/commit/5c8cb902d6040df58cdc4e4e4c10d1f1426c3525.diff", + sha256="a422277f02247bde680d4a3c8ccb8c05498a79109ba1ade4a037bedd6efe3c79", when="@1.1.4", ) From d9167834c48c416fb0d777816913d360cbb2cb8e Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 09:00:22 +0200 Subject: [PATCH 313/806] libtheora: fix GitLab patch (#40657) GitLab's .patch URLs do not provide stable/full hashes, while .diff URLs do. See #40656 for more information. --- var/spack/repos/builtin/packages/libtheora/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libtheora/package.py b/var/spack/repos/builtin/packages/libtheora/package.py index 6386da3497d85f..7c454a52504f25 100644 --- a/var/spack/repos/builtin/packages/libtheora/package.py +++ b/var/spack/repos/builtin/packages/libtheora/package.py @@ -46,8 +46,8 @@ class Libtheora(AutotoolsPackage, MSBuildPackage): patch("exit-prior-to-running-configure.patch", when="@1.1.1") patch("fix_encoding.patch", when="@1.1:") patch( - "https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.patch", - sha256="8b1f256fa6bfb4ce1355c5be1104e8cfe695c8484d8ea19db06c006880a02298", + "https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff", + sha256="e01ef71a1c19783a0b323b90a625e5c360ddb7ee03d2b6c201f1519f1704ea11", when="^libpng@1.6:", ) patch("libtheora-inc-external-ogg.patch", when="platform=windows") From cfc5363053d4ee063273e3d69d658590920657dc Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Mon, 23 Oct 2023 00:15:03 -0700 Subject: [PATCH 314/806] Docs: Update spec variant checks plus python quotes and string formatting (#40643) --- .../docs/build_systems/autotoolspackage.rst | 95 +++++++++++-------- .../docs/build_systems/cachedcmakepackage.rst | 22 ++--- lib/spack/docs/build_systems/cudapackage.rst | 28 +++--- .../docs/build_systems/custompackage.rst | 32 +++---- .../docs/build_systems/makefilepackage.rst | 50 +++++----- .../docs/build_systems/pythonpackage.rst | 62 ++++++------ lib/spack/docs/build_systems/rocmpackage.rst | 23 +++-- lib/spack/docs/build_systems/sconspackage.rst | 20 ++-- lib/spack/docs/packaging_guide.rst | 8 +- 9 files changed, 176 insertions(+), 164 deletions(-) diff --git a/lib/spack/docs/build_systems/autotoolspackage.rst b/lib/spack/docs/build_systems/autotoolspackage.rst index abf25f149bc59a..8b8ccb8f35c1c7 100644 --- a/lib/spack/docs/build_systems/autotoolspackage.rst +++ b/lib/spack/docs/build_systems/autotoolspackage.rst @@ -127,9 +127,9 @@ check out a commit from the ``master`` branch, you would want to add: .. code-block:: python - depends_on('autoconf', type='build', when='@master') - depends_on('automake', type='build', when='@master') - depends_on('libtool', type='build', when='@master') + depends_on("autoconf", type="build", when="@master") + depends_on("automake", type="build", when="@master") + depends_on("libtool", type="build", when="@master") It is typically redundant to list the ``m4`` macro processor package as a dependency, since ``autoconf`` already depends on it. @@ -145,7 +145,7 @@ example, the ``bash`` shell is used to run the ``autogen.sh`` script. .. code-block:: python def autoreconf(self, spec, prefix): - which('bash')('autogen.sh') + which("bash")("autogen.sh") """"""""""""""""""""""""""""""""""""""" patching configure or Makefile.in files @@ -186,9 +186,9 @@ To opt out of this feature, use the following setting: To enable it conditionally on different architectures, define a property and make the package depend on ``gnuconfig`` as a build dependency: -.. code-block +.. code-block:: python - depends_on('gnuconfig', when='@1.0:') + depends_on("gnuconfig", when="@1.0:") @property def patch_config_files(self): @@ -230,7 +230,7 @@ version, this can be done like so: @property def force_autoreconf(self): - return self.version == Version('1.2.3') + return self.version == Version("1.2.3") ^^^^^^^^^^^^^^^^^^^^^^^ Finding configure flags @@ -278,13 +278,22 @@ function like so: def configure_args(self): args = [] - if '+mpi' in self.spec: - args.append('--enable-mpi') + if self.spec.satisfies("+mpi"): + args.append("--enable-mpi") else: - args.append('--disable-mpi') + args.append("--disable-mpi") return args + +Alternatively, you can use the :ref:`enable_or_disable ` helper: + +.. code-block:: python + + def configure_args(self): + return [self.enable_or_disable("mpi")] + + Note that we are explicitly disabling MPI support if it is not requested. This is important, as many Autotools packages will enable options by default if the dependencies are found, and disable them @@ -295,9 +304,11 @@ and `here `_ @@ -113,7 +113,7 @@ you can do this like so: .. code-block:: python - build_targets = ['CC=cc'] + build_targets = ["CC=cc"] If you do need access to the spec, you can create a property like so: @@ -125,8 +125,8 @@ If you do need access to the spec, you can create a property like so: spec = self.spec return [ - 'CC=cc', - 'BLASLIB={0}'.format(spec['blas'].libs.ld_flags), + "CC=cc", + f"BLASLIB={spec['blas'].libs.ld_flags}", ] @@ -145,12 +145,12 @@ and a ``filter_file`` method to help with this. For example: .. code-block:: python def edit(self, spec, prefix): - makefile = FileFilter('Makefile') + makefile = FileFilter("Makefile") - makefile.filter(r'^\s*CC\s*=.*', 'CC = ' + spack_cc) - makefile.filter(r'^\s*CXX\s*=.*', 'CXX = ' + spack_cxx) - makefile.filter(r'^\s*F77\s*=.*', 'F77 = ' + spack_f77) - makefile.filter(r'^\s*FC\s*=.*', 'FC = ' + spack_fc) + makefile.filter(r"^\s*CC\s*=.*", f"CC = {spack_cc}") + makefile.filter(r"^\s*CXX\s*=.*", f"CXX = {spack_cxx}") + makefile.filter(r"^\s*F77\s*=.*", f"F77 = {spack_f77}") + makefile.filter(r"^\s*FC\s*=.*", f"FC = {spack_fc}") `stream `_ @@ -181,16 +181,16 @@ well for storing variables: def edit(self, spec, prefix): config = { - 'CC': 'cc', - 'MAKE': 'make', + "CC": "cc", + "MAKE": "make", } - if '+blas' in spec: - config['BLAS_LIBS'] = spec['blas'].libs.joined() + if spec.satisfies("+blas"): + config["BLAS_LIBS"] = spec["blas"].libs.joined() - with open('make.inc', 'w') as inc: + with open("make.inc", "w") as inc: for key in config: - inc.write('{0} = {1}\n'.format(key, config[key])) + inc.write(f"{key} = {config[key]}\n") `elk `_ @@ -204,14 +204,14 @@ them in a list: def edit(self, spec, prefix): config = [ - 'INSTALL_DIR = {0}'.format(prefix), - 'INCLUDE_DIR = $(INSTALL_DIR)/include', - 'LIBRARY_DIR = $(INSTALL_DIR)/lib', + f"INSTALL_DIR = {prefix}", + "INCLUDE_DIR = $(INSTALL_DIR)/include", + "LIBRARY_DIR = $(INSTALL_DIR)/lib", ] - with open('make.inc', 'w') as inc: + with open("make.inc", "w") as inc: for var in config: - inc.write('{0}\n'.format(var)) + inc.write(f"{var}\n") `hpl `_ @@ -284,7 +284,7 @@ can tell Spack where to locate it like so: .. code-block:: python - build_directory = 'src' + build_directory = "src" ^^^^^^^^^^^^^^^^^^^ @@ -299,8 +299,8 @@ install the package: def install(self, spec, prefix): mkdir(prefix.bin) - install('foo', prefix.bin) - install_tree('lib', prefix.lib) + install("foo", prefix.bin) + install_tree("lib", prefix.lib) ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/build_systems/pythonpackage.rst b/lib/spack/docs/build_systems/pythonpackage.rst index 17295a457fe139..168ff5dc88223c 100644 --- a/lib/spack/docs/build_systems/pythonpackage.rst +++ b/lib/spack/docs/build_systems/pythonpackage.rst @@ -152,16 +152,16 @@ set. Once set, ``pypi`` will be used to define the ``homepage``, .. code-block:: python - homepage = 'https://pypi.org/project/setuptools/' - url = 'https://pypi.org/packages/source/s/setuptools/setuptools-49.2.0.zip' - list_url = 'https://pypi.org/simple/setuptools/' + homepage = "https://pypi.org/project/setuptools/" + url = "https://pypi.org/packages/source/s/setuptools/setuptools-49.2.0.zip" + list_url = "https://pypi.org/simple/setuptools/" is equivalent to: .. code-block:: python - pypi = 'setuptools/setuptools-49.2.0.zip' + pypi = "setuptools/setuptools-49.2.0.zip" If a package has a different homepage listed on PyPI, you can @@ -208,7 +208,7 @@ dependencies to your package: .. code-block:: python - depends_on('py-setuptools@42:', type='build') + depends_on("py-setuptools@42:", type="build") Note that ``py-wheel`` is already listed as a build dependency in the @@ -232,7 +232,7 @@ Look for dependencies under the following keys: * ``dependencies`` under ``[project]`` These packages are required for building and installation. You can - add them with ``type=('build', 'run')``. + add them with ``type=("build", "run")``. * ``[project.optional-dependencies]`` @@ -279,12 +279,12 @@ distutils library, and has almost the exact same API. In addition to * ``setup_requires`` These packages are usually only needed at build-time, so you can - add them with ``type='build'``. + add them with ``type="build"``. * ``install_requires`` These packages are required for building and installation. You can - add them with ``type=('build', 'run')``. + add them with ``type=("build", "run")``. * ``extras_require`` @@ -296,7 +296,7 @@ distutils library, and has almost the exact same API. In addition to These are packages that are required to run the unit tests for the package. These dependencies can be specified using the - ``type='test'`` dependency type. However, the PyPI tarballs rarely + ``type="test"`` dependency type. However, the PyPI tarballs rarely contain unit tests, so there is usually no reason to add these. See https://setuptools.pypa.io/en/latest/userguide/dependency_management.html @@ -321,7 +321,7 @@ older versions of flit may use the following keys: * ``requires`` under ``[tool.flit.metadata]`` These packages are required for building and installation. You can - add them with ``type=('build', 'run')``. + add them with ``type=("build", "run")``. * ``[tool.flit.metadata.requires-extra]`` @@ -434,12 +434,12 @@ the BLAS/LAPACK library you want pkg-config to search for: .. code-block:: python - depends_on('py-pip@22.1:', type='build') + depends_on("py-pip@22.1:", type="build") def config_settings(self, spec, prefix): return { - 'blas': spec['blas'].libs.names[0], - 'lapack': spec['lapack'].libs.names[0], + "blas": spec["blas"].libs.names[0], + "lapack": spec["lapack"].libs.names[0], } @@ -463,10 +463,10 @@ has an optional dependency on ``libyaml`` that can be enabled like so: def global_options(self, spec, prefix): options = [] - if '+libyaml' in spec: - options.append('--with-libyaml') + if spec.satisfies("+libyaml"): + options.append("--with-libyaml") else: - options.append('--without-libyaml') + options.append("--without-libyaml") return options @@ -492,10 +492,10 @@ allows you to specify the directories to search for ``libyaml``: def install_options(self, spec, prefix): options = [] - if '+libyaml' in spec: + if spec.satisfies("+libyaml"): options.extend([ - spec['libyaml'].libs.search_flags, - spec['libyaml'].headers.include_flags, + spec["libyaml"].libs.search_flags, + spec["libyaml"].headers.include_flags, ]) return options @@ -556,7 +556,7 @@ detected are wrong, you can provide the names yourself by overriding .. code-block:: python - import_modules = ['six'] + import_modules = ["six"] Sometimes the list of module names to import depends on how the @@ -571,9 +571,9 @@ This can be expressed like so: @property def import_modules(self): - modules = ['yaml'] - if '+libyaml' in self.spec: - modules.append('yaml.cyaml') + modules = ["yaml"] + if self.spec.satisfies("+libyaml"): + modules.append("yaml.cyaml") return modules @@ -586,14 +586,14 @@ Instead of defining the ``import_modules`` explicitly, only the subset of module names to be skipped can be defined by using ``skip_modules``. If a defined module has submodules, they are skipped as well, e.g., in case the ``plotting`` modules should be excluded from the -automatically detected ``import_modules`` ``['nilearn', 'nilearn.surface', -'nilearn.plotting', 'nilearn.plotting.data']`` set: +automatically detected ``import_modules`` ``["nilearn", "nilearn.surface", +"nilearn.plotting", "nilearn.plotting.data"]`` set: .. code-block:: python - skip_modules = ['nilearn.plotting'] + skip_modules = ["nilearn.plotting"] -This will set ``import_modules`` to ``['nilearn', 'nilearn.surface']`` +This will set ``import_modules`` to ``["nilearn", "nilearn.surface"]`` Import tests can be run during the installation using ``spack install --test=root`` or at any time after the installation using @@ -612,11 +612,11 @@ after the ``install`` phase: .. code-block:: python - @run_after('install') + @run_after("install") @on_package_attributes(run_tests=True) def install_test(self): - with working_dir('spack-test', create=True): - python('-c', 'import numpy; numpy.test("full", verbose=2)') + with working_dir("spack-test", create=True): + python("-c", "import numpy; numpy.test('full', verbose=2)") when testing is enabled during the installation (i.e., ``spack install @@ -638,7 +638,7 @@ provides Python bindings in a ``python`` directory, you can use: .. code-block:: python - build_directory = 'python' + build_directory = "python" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/build_systems/rocmpackage.rst b/lib/spack/docs/build_systems/rocmpackage.rst index 636e5b812623f2..8f90794dfb7df5 100644 --- a/lib/spack/docs/build_systems/rocmpackage.rst +++ b/lib/spack/docs/build_systems/rocmpackage.rst @@ -81,28 +81,27 @@ class of your package. For example, you can add it to your class MyRocmPackage(CMakePackage, ROCmPackage): ... # Ensure +rocm and amdgpu_targets are passed to dependencies - depends_on('mydeppackage', when='+rocm') + depends_on("mydeppackage", when="+rocm") for val in ROCmPackage.amdgpu_targets: - depends_on('mydeppackage amdgpu_target={0}'.format(val), - when='amdgpu_target={0}'.format(val)) + depends_on(f"mydeppackage amdgpu_target={val}", + when=f"amdgpu_target={val}") ... def cmake_args(self): spec = self.spec args = [] ... - if '+rocm' in spec: + if spec.satisfies("+rocm"): # Set up the hip macros needed by the build args.extend([ - '-DENABLE_HIP=ON', - '-DHIP_ROOT_DIR={0}'.format(spec['hip'].prefix)]) - rocm_archs = spec.variants['amdgpu_target'].value - if 'none' not in rocm_archs: - args.append('-DHIP_HIPCC_FLAGS=--amdgpu-target={0}' - .format(",".join(rocm_archs))) + "-DENABLE_HIP=ON", + f"-DHIP_ROOT_DIR={spec['hip'].prefix}"]) + rocm_archs = spec.variants["amdgpu_target"].value + if "none" not in rocm_archs: + args.append(f"-DHIP_HIPCC_FLAGS=--amdgpu-target={','.join(rocm_archs}") else: # Ensure build with hip is disabled - args.append('-DENABLE_HIP=OFF') + args.append("-DENABLE_HIP=OFF") ... return args ... @@ -114,7 +113,7 @@ build. This example also illustrates how to check for the ``rocm`` variant using ``self.spec`` and how to retrieve the ``amdgpu_target`` variant's value -using ``self.spec.variants['amdgpu_target'].value``. +using ``self.spec.variants["amdgpu_target"].value``. All five packages using ``ROCmPackage`` as of January 2021 also use the :ref:`CudaPackage `. So it is worth looking at those packages diff --git a/lib/spack/docs/build_systems/sconspackage.rst b/lib/spack/docs/build_systems/sconspackage.rst index 18002586a06c75..a17e1271b86d3b 100644 --- a/lib/spack/docs/build_systems/sconspackage.rst +++ b/lib/spack/docs/build_systems/sconspackage.rst @@ -57,7 +57,7 @@ overridden like so: .. code-block:: python def test(self): - scons('check') + scons("check") ^^^^^^^^^^^^^^^ @@ -88,7 +88,7 @@ base class already contains: .. code-block:: python - depends_on('scons', type='build') + depends_on("scons", type="build") If you want to specify a particular version requirement, you can override @@ -96,7 +96,7 @@ this in your package: .. code-block:: python - depends_on('scons@2.3.0:', type='build') + depends_on("scons@2.3.0:", type="build") ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -238,14 +238,14 @@ the package build phase. This is done by overriding ``build_args`` like so: def build_args(self, spec, prefix): args = [ - 'PREFIX={0}'.format(prefix), - 'ZLIB={0}'.format(spec['zlib'].prefix), + f"PREFIX={prefix}", + f"ZLIB={spec['zlib'].prefix}", ] - if '+debug' in spec: - args.append('DEBUG=yes') + if spec.satisfies("+debug"): + args.append("DEBUG=yes") else: - args.append('DEBUG=no') + args.append("DEBUG=no") return args @@ -275,8 +275,8 @@ environment variables. For example, cantera has the following option: * env_vars: [ string ] Environment variables to propagate through to SCons. Either the string "all" or a comma separated list of variable names, e.g. - 'LD_LIBRARY_PATH,HOME'. - - default: 'LD_LIBRARY_PATH,PYTHONPATH' + "LD_LIBRARY_PATH,HOME". + - default: "LD_LIBRARY_PATH,PYTHONPATH" In the case of cantera, using ``env_vars=all`` allows us to use diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 157236ebfcc12e..d488ae0c7f1825 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1549,7 +1549,7 @@ its value: def configure_args(self): ... - if "+shared" in self.spec: + if self.spec.satisfies("+shared"): extra_args.append("--enable-shared") else: extra_args.append("--disable-shared") @@ -1636,7 +1636,7 @@ Within a package recipe a multi-valued variant is tested using a ``key=value`` s .. code-block:: python - if "languages=jit" in spec: + if spec.satisfies("languages=jit"): options.append("--enable-host-shared") """"""""""""""""""""""""""""""""""""""""""" @@ -3528,7 +3528,7 @@ need to override methods like ``configure_args``: def configure_args(self): args = ["--enable-cxx"] + self.enable_or_disable("libs") - if "libs=static" in self.spec: + if self.spec.satisfies("libs=static"): args.append("--with-pic") return args @@ -4391,7 +4391,7 @@ for supported features, for instance: .. code-block:: python - if "avx512" in spec.target: + if spec.satisfies("target=avx512"): args.append("--with-avx512") The snippet above will append the ``--with-avx512`` item to a list of arguments only if the corresponding From a675156c70f6506498f95da587c73e220ecc65c5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 23 Oct 2023 09:37:20 +0200 Subject: [PATCH 315/806] py-cython: new version, python 3.11 upperbound (#40343) --- var/spack/repos/builtin/packages/py-cython/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index ba371b1b1649e6..d0426c40392d97 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -13,6 +13,7 @@ class PyCython(PythonPackage): pypi = "cython/Cython-0.29.21.tar.gz" tags = ["build-tools"] + version("3.0.4", sha256="2e379b491ee985d31e5faaf050f79f4a8f59f482835906efe4477b33b4fbe9ff") version("3.0.0", sha256="350b18f9673e63101dbbfcf774ee2f57c20ac4636d255741d76ca79016b1bd82") version( "3.0.0a9", @@ -45,6 +46,9 @@ class PyCython(PythonPackage): version("0.23.5", sha256="0ae5a5451a190e03ee36922c4189ca2c88d1df40a89b4f224bc842d388a0d1b6") version("0.23.4", sha256="fec42fecee35d6cc02887f1eef4e4952c97402ed2800bfe41bbd9ed1a0730d8e") + # https://github.com/cython/cython/issues/5751 (distutils not yet dropped) + depends_on("python@:3.11", type=("build", "link", "run")) + # https://github.com/cython/cython/commit/1cd24026e9cf6d63d539b359f8ba5155fd48ae21 # collections.Iterable was removed in Python 3.10 depends_on("python@:3.9", when="@:0.29.14", type=("build", "link", "run")) From 96548047f881e474ee715b0502001d25df366637 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 23 Oct 2023 10:26:20 +0200 Subject: [PATCH 316/806] concretizer verbose: show progress in % too (#40654) --- lib/spack/spack/environment/environment.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 51ea453c39ef3c..0b36351d4e853c 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1518,11 +1518,14 @@ def _concretize_separately(self, tests=False): tty.msg(msg) batch = [] - for i, concrete, duration in spack.util.parallel.imap_unordered( - _concretize_task, args, processes=num_procs, debug=tty.is_debug() + for j, (i, concrete, duration) in enumerate( + spack.util.parallel.imap_unordered( + _concretize_task, args, processes=num_procs, debug=tty.is_debug() + ) ): batch.append((i, concrete)) - tty.verbose(f"[{duration:7.2f}s] {root_specs[i]}") + percentage = (j + 1) / len(args) * 100 + tty.verbose(f"{duration:6.1f}s [{percentage:3.0f}%] {root_specs[i]}") sys.stdout.flush() # Add specs in original order From a6466b9dddf59cc185800ac428bd4ba535b96c2e Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 23 Oct 2023 02:43:54 -0700 Subject: [PATCH 317/806] 3proxy: respect compiler choice (#39240) --- var/spack/repos/builtin/packages/3proxy/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/3proxy/package.py b/var/spack/repos/builtin/packages/3proxy/package.py index e9a408698b87ac..78e52895145b65 100644 --- a/var/spack/repos/builtin/packages/3proxy/package.py +++ b/var/spack/repos/builtin/packages/3proxy/package.py @@ -24,7 +24,9 @@ class _3proxy(MakefilePackage): depends_on("m4", type="build") def build(self, spec, prefix): - make("-f", f"Makefile.{platform.system()}") + make("-f", f"Makefile.{platform.system()}", f"CC={spack_cc}") def install(self, spec, prefix): - make("-f", f"Makefile.{platform.system()}", f"prefix={prefix}", "install") + make( + "-f", f"Makefile.{platform.system()}", f"prefix={prefix}", f"CC={spack_cc}", "install" + ) From a452e8379e12bd46925df30b99cf4b30edf80457 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 23 Oct 2023 16:22:41 +0200 Subject: [PATCH 318/806] nghttp2: add v1.57.0 (#40652) --- var/spack/repos/builtin/packages/nghttp2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/nghttp2/package.py b/var/spack/repos/builtin/packages/nghttp2/package.py index fe9d4f94e38a8e..2de551d8b5fa49 100644 --- a/var/spack/repos/builtin/packages/nghttp2/package.py +++ b/var/spack/repos/builtin/packages/nghttp2/package.py @@ -13,6 +13,7 @@ class Nghttp2(AutotoolsPackage): homepage = "https://nghttp2.org/" url = "https://github.com/nghttp2/nghttp2/releases/download/v1.26.0/nghttp2-1.26.0.tar.gz" + version("1.57.0", sha256="1e3258453784d3b7e6cc48d0be087b168f8360b5d588c66bfeda05d07ad39ffd") version("1.52.0", sha256="9877caa62bd72dde1331da38ce039dadb049817a01c3bdee809da15b754771b8") version("1.51.0", sha256="2a0bef286f65b35c24250432e7ec042441a8157a5b93519412d9055169d9ce54") version("1.50.0", sha256="d162468980dba58e54e31aa2cbaf96fd2f0890e6dd141af100f6bd1b30aa73c6") From 47c97604922ba05c49247058c4e39a60ff9b7cb7 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:11:51 +0200 Subject: [PATCH 319/806] geant4: add patch for when using the system expat library (#40650) Co-authored-by: jmcarcell --- .../packages/geant4/package-cache.patch | 48 +++++++++++++++++++ .../repos/builtin/packages/geant4/package.py | 3 ++ 2 files changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/geant4/package-cache.patch diff --git a/var/spack/repos/builtin/packages/geant4/package-cache.patch b/var/spack/repos/builtin/packages/geant4/package-cache.patch new file mode 100644 index 00000000000000..835a4c34098d0e --- /dev/null +++ b/var/spack/repos/builtin/packages/geant4/package-cache.patch @@ -0,0 +1,48 @@ +diff --git a/cmake/Modules/G4CMakeUtilities.cmake b/cmake/Modules/G4CMakeUtilities.cmake +index 16f7b3c8c0..84acfcd5e7 100644 +--- a/cmake/Modules/G4CMakeUtilities.cmake ++++ b/cmake/Modules/G4CMakeUtilities.cmake +@@ -221,6 +221,21 @@ function(geant4_export_package_variables _file) + get_property(__var_value CACHE ${__var} PROPERTY VALUE) + get_property(__var_type CACHE ${__var} PROPERTY TYPE) + get_property(__var_help CACHE ${__var} PROPERTY HELPSTRING) ++ # Variable may not be in cache, only local (canonical case being EXPAT_LIBRARY since CMake 3.27) ++ # We still need to account for these because they may be required to be in the CACHE at least set in ++ # earlier versions. ++ # 1. Variable may not be in cache, only local (canonical case being EXPAT_LIBRARY since CMake 3.27) ++ # We still need to account for these because they may be required to be in the CACHE at least set in ++ # earlier versions. ++ # 2. Depending on CMake version, variable may be in cache but unitialized, here we want the local value ++ if(((NOT __var_value) AND (NOT __var_type) AND (NOT __var_help)) OR (__var_type STREQUAL "UNINITIALIZED")) ++ set(__var_value ${${__var}}) ++ # TODO: set type based on whether it looks like a bool or path, but PATH almost invariably what we save ++ # Only important in cmake GUI and if value needs to be changed, which we don't if package cache is used ++ set(__var_type PATH) ++ set(__var_help "no documentation, not a cache value") ++ endif() ++ + list(APPEND __local_build_setting "geant4_set_and_check_package_variable(${__var} \"${__var_value}\" ${__var_type} \"${__var_help}\")") + endforeach() + +diff --git a/cmake/Modules/G4OptionalComponents.cmake b/cmake/Modules/G4OptionalComponents.cmake +index 7b3a1f9836..f503a2994a 100644 +--- a/cmake/Modules/G4OptionalComponents.cmake ++++ b/cmake/Modules/G4OptionalComponents.cmake +@@ -78,6 +78,8 @@ else() + unset(EXPAT_FOUND) + unset(EXPAT_INCLUDE_DIR CACHE) + unset(EXPAT_LIBRARY CACHE) ++ unset(EXPAT_LIBRARY_RELEASE CACHE) ++ unset(EXPAT_LIBRARY_DEBUG CACHE) + message(FATAL_ERROR + "Detected system expat header and library: + EXPAT_INCLUDE_DIR = ${__badexpat_include_dir} +@@ -88,7 +90,7 @@ Set the above CMake variables to point to an expat install of the required versi + + # Backward compatibility for sources.cmake using the variable + set(EXPAT_LIBRARIES EXPAT::EXPAT) +- geant4_save_package_variables(EXPAT EXPAT_INCLUDE_DIR EXPAT_LIBRARY) ++ geant4_save_package_variables(EXPAT EXPAT_INCLUDE_DIR EXPAT_LIBRARY EXPAT_LIBRARY_RELEASE EXPAT_LIBRARY_DEBUG) + else() + set(EXPAT_FOUND TRUE) + set(GEANT4_USE_BUILTIN_EXPAT TRUE) \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index bf4ade6ce7baf7..afc4464b098bd8 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -151,6 +151,9 @@ def std_when(values): patch("cxx17_geant4_10_0.patch", level=1, when="@10.4.0 cxxstd=17") patch("geant4-10.4.3-cxx17-removed-features.patch", level=1, when="@10.4.3 cxxstd=17") + # See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556 + patch("package-cache.patch", level=1, when="@10.7.0:11.2.0^cmake@3.17:") + # NVHPC: "thread-local declaration follows non-thread-local declaration" conflicts("%nvhpc", when="+threads") From 3eac79bba7f64327bd69b6d2fc0e89fd3b5ef6e9 Mon Sep 17 00:00:00 2001 From: Olivier Cessenat Date: Mon, 23 Oct 2023 18:56:12 +0200 Subject: [PATCH 320/806] ngspice: new version 41 and option osdi (#40664) --- var/spack/repos/builtin/packages/ngspice/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/ngspice/package.py b/var/spack/repos/builtin/packages/ngspice/package.py index c826b24052d635..08bbbd712f49e5 100644 --- a/var/spack/repos/builtin/packages/ngspice/package.py +++ b/var/spack/repos/builtin/packages/ngspice/package.py @@ -18,6 +18,7 @@ class Ngspice(AutotoolsPackage): # Master version by default adds the experimental adms feature version("master", branch="master") + version("41", sha256="1ce219395d2f50c33eb223a1403f8318b168f1e6d1015a7db9dbf439408de8c4") version("40", sha256="e303ca7bc0f594e2d6aa84f68785423e6bf0c8dad009bb20be4d5742588e890d") version("39", sha256="bf94e811eaad8aaf05821d036a9eb5f8a65d21d30e1cab12701885e09618d771") version("38", sha256="2c3e22f6c47b165db241cf355371a0a7558540ab2af3f8b5eedeeb289a317c56") @@ -52,6 +53,7 @@ class Ngspice(AutotoolsPackage): variant("openmp", default=False, description="Compile with multi-threading support") variant("readline", default=True, description="Build readline support (for bin)") variant("fft", default=True, description="Use external fftw lib") + variant("osdi", default=False, description="Use osdi/OpenVAF") depends_on("fftw-api@3:~mpi~openmp", when="+fft~openmp") depends_on("fftw-api@3:~mpi+openmp", when="+fft+openmp") @@ -120,6 +122,8 @@ def configure_args(self): args.append("--enable-openmp") if "~fft" in spec: args.append("--with-fftw3=no") + if "+osdi" in spec: + args.append("--enable-osdi") if "darwin" in spec.architecture: args.append("--enable-pss") if "@master" in spec: From bf6d5df0ec4c0177a59e32c20f2c7128edb679d2 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 23 Oct 2023 20:22:39 +0200 Subject: [PATCH 321/806] audit: add check for GitLab patches (#40656) GitLab's .patch URLs only provide abbreviated hashes, while .diff URLs provide full hashes. There does not seem to be a parameter to force .patch URLs to also return full hashes, so we should make sure to use the .diff ones. --- lib/spack/spack/audit.py | 43 +++++++++++++------ lib/spack/spack/test/audit.py | 4 ++ .../invalid-gitlab-patch-url/package.py | 20 +++++++++ .../package.py | 20 +++++++++ 4 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/invalid-gitlab-patch-url/package.py create mode 100644 var/spack/repos/builtin.mock/packages/invalid-selfhosted-gitlab-patch-url/package.py diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index 176c45487f51d0..8b13ffc7cf72db 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -307,10 +307,17 @@ def _check_build_test_callbacks(pkgs, error_cls): @package_directives def _check_patch_urls(pkgs, error_cls): - """Ensure that patches fetched from GitHub have stable sha256 hashes.""" + """Ensure that patches fetched from GitHub and GitLab have stable sha256 + hashes.""" github_patch_url_re = ( r"^https?://(?:patch-diff\.)?github(?:usercontent)?\.com/" - ".+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)" + r".+/.+/(?:commit|pull)/[a-fA-F0-9]+\.(?:patch|diff)" + ) + # Only .diff URLs have stable/full hashes: + # https://forum.gitlab.com/t/patches-with-full-index/29313 + gitlab_patch_url_re = ( + r"^https?://(?:.+)?gitlab(?:.+)/" + r".+/.+/-/(?:commit|merge_requests)/[a-fA-F0-9]+\.(?:patch|diff)" ) errors = [] @@ -321,19 +328,27 @@ def _check_patch_urls(pkgs, error_cls): if not isinstance(patch, spack.patch.UrlPatch): continue - if not re.match(github_patch_url_re, patch.url): - continue - - full_index_arg = "?full_index=1" - if not patch.url.endswith(full_index_arg): - errors.append( - error_cls( - "patch URL in package {0} must end with {1}".format( - pkg_cls.name, full_index_arg - ), - [patch.url], + if re.match(github_patch_url_re, patch.url): + full_index_arg = "?full_index=1" + if not patch.url.endswith(full_index_arg): + errors.append( + error_cls( + "patch URL in package {0} must end with {1}".format( + pkg_cls.name, full_index_arg + ), + [patch.url], + ) + ) + elif re.match(gitlab_patch_url_re, patch.url): + if not patch.url.endswith(".diff"): + errors.append( + error_cls( + "patch URL in package {0} must end with .diff".format( + pkg_cls.name + ), + [patch.url], + ) ) - ) return errors diff --git a/lib/spack/spack/test/audit.py b/lib/spack/spack/test/audit.py index 2efc2bbd88913a..a3d4bb8e3fbaf1 100644 --- a/lib/spack/spack/test/audit.py +++ b/lib/spack/spack/test/audit.py @@ -21,6 +21,10 @@ (["wrong-variant-in-depends-on"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]), # This package has a GitHub patch URL without full_index=1 (["invalid-github-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]), + # This package has invalid GitLab patch URLs + (["invalid-gitlab-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]), + # This package has invalid GitLab patch URLs + (["invalid-selfhosted-gitlab-patch-url"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]), # This package has a stand-alone 'test*' method in build-time callbacks (["fail-test-audit"], ["PKG-DIRECTIVES", "PKG-PROPERTIES"]), # This package has no issues diff --git a/var/spack/repos/builtin.mock/packages/invalid-gitlab-patch-url/package.py b/var/spack/repos/builtin.mock/packages/invalid-gitlab-patch-url/package.py new file mode 100644 index 00000000000000..527a1815e62863 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/invalid-gitlab-patch-url/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 InvalidGitlabPatchUrl(Package): + """Package that has GitLab patch URLs that fail auditing.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/patch-1.0.tar.gz" + + version("1.0", md5="0123456789abcdef0123456789abcdef") + + patch( + "https://gitlab.com/QEF/q-e/-/commit/4ca3afd4c6f27afcf3f42415a85a353a7be1bd37.patch", + sha256="d7dec588efb5c04f99d949d8b9bb4a0fbc98b917ae79e12e4b87ad7c3dc9e268", + ) diff --git a/var/spack/repos/builtin.mock/packages/invalid-selfhosted-gitlab-patch-url/package.py b/var/spack/repos/builtin.mock/packages/invalid-selfhosted-gitlab-patch-url/package.py new file mode 100644 index 00000000000000..818876405c26f6 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/invalid-selfhosted-gitlab-patch-url/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 InvalidSelfhostedGitlabPatchUrl(Package): + """Package that has GitLab patch URLs that fail auditing.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/patch-1.0.tar.gz" + + version("1.0", md5="0123456789abcdef0123456789abcdef") + + patch( + "https://gitlab.gnome.org/GNOME/glib/-/commit/bda87264372c006c94e21ffb8ff9c50ecb3e14bd.patch", + sha256="2e811ec62cb09044c95a4d0213993f09af70cdcc1c709257b33bc9248ae950ed", + ) From 66f07088cbd6ac123e8a92081ed7b4a8dd928e26 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 23 Oct 2023 13:56:27 -0500 Subject: [PATCH 322/806] py-scikit-learn: add v1.3.2 (#40672) --- .../builtin/packages/py-scikit-learn/package.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py index 389bc6d48bbb9d..05f6d09b53952b 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -17,6 +17,7 @@ class PyScikitLearn(PythonPackage): maintainers("adamjstewart") version("master", branch="master") + version("1.3.2", sha256="a2f54c76accc15a34bfb9066e6c7a56c1e7235dda5762b990792330b52ccfb05") version("1.3.1", sha256="1a231cced3ee3fa04756b4a7ab532dc9417acd581a330adff5f2c01ac2831fcf") version("1.3.0", sha256="8be549886f5eda46436b6e555b0e4873b4f10aa21c07df45c4bc1735afbccd7a") version("1.2.2", sha256="8429aea30ec24e7a8c7ed8a3fa6213adf3814a6efbea09e16e0a0c71e1a1a3d7") @@ -51,7 +52,8 @@ class PyScikitLearn(PythonPackage): variant("openmp", default=True, description="Build with OpenMP support") # Based on PyPI wheel availability - depends_on("python@3.8:3.11", when="@1.1.3:", type=("build", "run")) + depends_on("python@3.8:3.12", when="@1.3.1:", type=("build", "run")) + depends_on("python@3.8:3.11", when="@1.1.3:1.3.0", type=("build", "run")) depends_on("python@3.8:3.10", when="@1.1.0:1.1.2", type=("build", "run")) depends_on("python@:3.10", when="@1.0.2", type=("build", "run")) depends_on("python@:3.9", when="@0.24:1.0.1", type=("build", "run")) @@ -61,6 +63,10 @@ class PyScikitLearn(PythonPackage): # pyproject.toml depends_on("py-setuptools", type="build") depends_on("py-setuptools@:59", when="@:1.2.1", type="build") + depends_on("py-cython@0.29.33:2", when="@1.3:", type="build") + depends_on("py-cython@0.29.24:2", when="@1.0.2:", type="build") + depends_on("py-cython@0.28.5:2", when="@0.21:", type="build") + depends_on("py-cython@0.23:2", type="build") # sklearn/_min_dependencies.py depends_on("py-numpy@1.17.3:", when="@1.1:", type=("build", "run")) @@ -80,10 +86,6 @@ class PyScikitLearn(PythonPackage): depends_on("py-joblib@1:", when="@1.1:", type=("build", "run")) depends_on("py-joblib@0.11:", type=("build", "run")) depends_on("py-threadpoolctl@2.0.0:", when="@0.23:", type=("build", "run")) - depends_on("py-cython@0.29.33:", when="@1.3:", type="build") - depends_on("py-cython@0.29.24:", when="@1.0.2:", type="build") - depends_on("py-cython@0.28.5:", when="@0.21:", type="build") - depends_on("py-cython@0.23:", type="build") depends_on("llvm-openmp", when="@0.21: %apple-clang +openmp") # Test dependencies From 8def7f5583e0bb52aff735cd3737e7080ab4993d Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 23 Oct 2023 14:31:20 -0500 Subject: [PATCH 323/806] Update survey package file for survey version 9 changes. (#40619) * Update survey package file for survey version 9 changes. * Fix single quote - make double. * Small change to trigger spack tests --- .../repos/builtin/packages/survey/package.py | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/survey/package.py b/var/spack/repos/builtin/packages/survey/package.py index 79bac929665e8e..1fc4c550f0d37e 100644 --- a/var/spack/repos/builtin/packages/survey/package.py +++ b/var/spack/repos/builtin/packages/survey/package.py @@ -19,7 +19,7 @@ class Survey(CMakePackage): available for tools inside current MPI implementations including: MPICH, MVAPICH, MPT, and OpenMPI. It also supports multiple architectures and has been tested on machines based on Intel, - AMD, ARM, and IBM P8/9 processors and integrated GPUs. + AMD, ARM, and IBM P8/9 processors and integrated NVIDIA GPUs. Survey is a licensed product with the source not openly available. To access the survey source and build with spack please contact: @@ -33,7 +33,8 @@ class Survey(CMakePackage): maintainers("jgalarowicz") version("master", branch="master") - version("1.0.8", branch="1.0.8") + version("1.0.9", branch="1.0.9") + version("1.0.8", tag="1.0.8") version("1.0.7", tag="1.0.7") version("1.0.6", tag="1.0.6") version("1.0.5", tag="1.0.5") @@ -45,6 +46,7 @@ class Survey(CMakePackage): version("1.0.0", branch="1.0.0") variant("mpi", default=False, description="Enable mpi, build MPI data collector") + variant("debug", default=False, description="Build a debug survey version") variant( "tls_model", @@ -61,9 +63,10 @@ class Survey(CMakePackage): depends_on("libmonitor@2021.11.08+commrank", type=("build", "link", "run"), when="@1.0.3:") depends_on("papi@5:", type=("build", "link", "run")) - depends_on("gotcha@master", type=("build", "link", "run")) - depends_on("llvm-openmp@9.0.0", type=("build", "link", "run"), when="@:1.0.2") - depends_on("llvm-openmp@12.0.1", type=("build", "link", "run"), when="@1.0.3:") + depends_on("gotcha@master", type=("build", "link"), when="@:1.0.7") + depends_on("gotcha@1.0.4", type=("build", "link"), when="@1.0.8:") + depends_on("llvm-openmp@9.0.0", type=("build", "link"), when="@:1.0.2") + depends_on("llvm-openmp@12.0.1", type=("build", "link"), when="@1.0.3:") # MPI Installation depends_on("mpi", when="+mpi") @@ -81,6 +84,10 @@ class Survey(CMakePackage): depends_on("py-more-itertools", type=("build", "run"), when="@1.0.4:") depends_on("py-versioneer", type=("build", "run"), when="@1.0.5:") depends_on("py-filelock", type=("build", "run"), when="@1.0.7:") + depends_on("py-zipp", type=("build", "run"), when="@1.0.7:") + depends_on("py-humanize", type=("build", "run"), when="@1.0.8:") + depends_on("py-importlib-resources", type=("build", "run"), when="@1.0.8:") + depends_on("py-gitpython", type=("build", "run"), when="@1.0.9:") extends("python") @@ -117,6 +124,11 @@ def cmake_args(self): mpi_options = self.get_mpi_cmake_options(spec) cmake_args.extend(mpi_options) + if "+debug" in spec: + cmake_args.append("-DCMAKE_C_FLAGS=-g -O2") + cmake_args.append("-DCMAKE_CXX_FLAGS=-g -O2") + cmake_args.append("-DCMAKE_BUILD_TYPE=Custom") + return cmake_args def setup_run_environment(self, env): From 1e4a5791b28a506cb3843e95c9cec5860a104600 Mon Sep 17 00:00:00 2001 From: Taillefumier Mathieu <29380261+mtaillefumier@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:37:42 +0200 Subject: [PATCH 324/806] Add rccl and nccl variants to cp2k and cosma (#40451) --- var/spack/repos/builtin/packages/cosma/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/cosma/package.py b/var/spack/repos/builtin/packages/cosma/package.py index 2fccafe1872b0e..19db9a0531859c 100644 --- a/var/spack/repos/builtin/packages/cosma/package.py +++ b/var/spack/repos/builtin/packages/cosma/package.py @@ -48,6 +48,9 @@ class Cosma(CMakePackage): with when("+cuda"): variant("nccl", default=False, description="Use cuda nccl") + with when("+rocm"): + variant("rccl", default=False, description="Use rocm rccl") + depends_on("cmake@3.22:", type="build") depends_on("mpi@3:") depends_on("blas", when="~cuda ~rocm") @@ -114,6 +117,7 @@ def cmake_args(self): self.define_from_variant("COSMA_WITH_TESTS", "tests"), self.define_from_variant("COSMA_WITH_APPS", "apps"), self.define_from_variant("COSMA_WITH_NCCL", "nccl"), + self.define_from_variant("COSMA_WITH_RCCL", "rccl"), self.define_from_variant("COSMA_WITH_GPU_AWARE_MPI", "gpu_direct"), self.define_from_variant("COSMA_WITH_PROFILING", "profiling"), self.define("COSMA_WITH_BENCHMARKS", False), From d0982115b3c7e0804cba1b3420532be1f36bbc19 Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Mon, 23 Oct 2023 16:01:57 -0400 Subject: [PATCH 325/806] Adios2: add kokkos variant (#40623) * adios2: update variants and dependencies * adios2: add kokkos rocm|cuda|sycl variant * e4s oneapi ci stack: add adios2 +sycl * e4s ci stack: add adios2 +rocm * [@spackbot] updating style on behalf of vicentebolea * Apply suggestions from code review * adios2: fixed cuda variant * update ecp-data-vis-sdk * Update share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml --------- Co-authored-by: eugeneswalker Co-authored-by: vicentebolea --- .../stacks/e4s-oneapi/spack.yaml | 2 +- .../stacks/e4s-rocm-external/spack.yaml | 2 + .../cloud_pipelines/stacks/e4s/spack.yaml | 2 + .../repos/builtin/packages/adios2/package.py | 60 ++++++++++++++++--- .../packages/ecp-data-vis-sdk/package.py | 2 +- 5 files changed, 59 insertions(+), 9 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index d170b0a272772c..605a69e4a57d31 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -227,8 +227,8 @@ spack: - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples - - tau +mpi +opencl +level_zero ~pdt # tau: requires libdrm.so to be installed - slate +sycl + - tau +mpi +opencl +level_zero ~pdt # tau: requires libdrm.so to be installed # -- # - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler. # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index 885dbb538b0476..b5ac17207796fe 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -258,6 +258,7 @@ spack: - tau +mpi +rocm # tau: has issue with `spack env depfile` build # ROCM 908 + - adios2 +kokkos +rocm amdgpu_target=gfx908 - amrex +rocm amdgpu_target=gfx908 - arborx +rocm amdgpu_target=gfx908 - cabana +rocm amdgpu_target=gfx908 @@ -297,6 +298,7 @@ spack: # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898 # ROCM 90a + - adios2 +kokkos +rocm amdgpu_target=gfx90a - amrex +rocm amdgpu_target=gfx90a - arborx +rocm amdgpu_target=gfx90a - cabana +rocm amdgpu_target=gfx90a diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 86eab1d4074d3a..710360172ab1c2 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -306,6 +306,7 @@ spack: - tau +mpi +rocm # tau: has issue with `spack env depfile` build # ROCM 908 + - adios2 +kokkos +rocm amdgpu_target=gfx908 - amrex +rocm amdgpu_target=gfx908 - arborx +rocm amdgpu_target=gfx908 - cabana +rocm amdgpu_target=gfx908 @@ -345,6 +346,7 @@ spack: # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898 # ROCM 90a + - adios2 +kokkos +rocm amdgpu_target=gfx90a - amrex +rocm amdgpu_target=gfx90a - arborx +rocm amdgpu_target=gfx90a - cabana +rocm amdgpu_target=gfx90a diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index bfb08227e6ff9d..218457f3e38a4e 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -9,7 +9,7 @@ from spack.package import * -class Adios2(CMakePackage, CudaPackage): +class Adios2(CMakePackage, CudaPackage, ROCmPackage): """The Adaptable Input Output System version 2, developed in the Exascale Computing Program""" @@ -62,7 +62,8 @@ class Adios2(CMakePackage, CudaPackage): variant( "libpressio", default=False, when="@2.8:", description="Enable LibPressio for compression" ) - variant("blosc", default=True, when="@2.4:", description="Enable Blosc compression") + variant("blosc", default=True, when="@2.4:2.8", description="Enable Blosc compression") + variant("blosc2", default=True, when="@2.9:", description="Enable Blosc2 compression") variant("bzip2", default=True, when="@2.4:", description="Enable BZip2 compression") variant("zfp", default=True, description="Enable ZFP compression") variant("png", default=True, when="@2.4:", description="Enable PNG compression") @@ -78,7 +79,7 @@ class Adios2(CMakePackage, CudaPackage): description="Enable the DataMan engine for WAN transports", ) variant("dataspaces", default=False, when="@2.5:", description="Enable support for DATASPACES") - variant("ssc", default=True, description="Enable the SSC staging engine") + variant("ssc", default=True, when="@:2.7", description="Enable the SSC staging engine") variant("hdf5", default=False, description="Enable the HDF5 engine") variant( "aws", @@ -94,7 +95,8 @@ class Adios2(CMakePackage, CudaPackage): ) # Optional language bindings, C++11 and C always provided - variant("cuda", default=False, when="@2.8:", description="Enable CUDA support") + variant("kokkos", default=False, when="@2.9:", description="Enable Kokkos support") + variant("sycl", default=False, when="@2.10:", description="Enable SYCL support") variant("python", default=False, description="Enable the Python bindings") variant("fortran", default=True, description="Enable the Fortran bindings") @@ -108,6 +110,37 @@ class Adios2(CMakePackage, CudaPackage): depends_on("cmake@3.12.0:", type="build") + # Standalone CUDA support + depends_on("cuda", when="+cuda ~kokkos") + + # Kokkos support + depends_on("kokkos@3.7: +cuda +wrapper", when="+kokkos +cuda") + depends_on("kokkos@3.7: +rocm", when="+kokkos +rocm") + depends_on("kokkos@3.7: +sycl", when="+kokkos +sycl") + + # Propagate CUDA target to kokkos for +cuda + for cuda_arch in CudaPackage.cuda_arch_values: + depends_on( + "kokkos cuda_arch=%s" % cuda_arch, when="+kokkos +cuda cuda_arch=%s" % cuda_arch + ) + + # Propagate AMD GPU target to kokkos for +rocm + for amdgpu_value in ROCmPackage.amdgpu_targets: + depends_on( + "kokkos amdgpu_target=%s" % amdgpu_value, + when="+kokkos +rocm amdgpu_target=%s" % amdgpu_value, + ) + + conflicts("+cuda", when="@:2.7") + conflicts("+rocm", when="@:2.8") + + conflicts("+cuda", when="+sycl") + conflicts("+rocm", when="+cuda") + conflicts("+rocm", when="+sycl") + + conflicts("+rocm", when="~kokkos", msg="ADIOS2 does not support HIP without Kokkos") + conflicts("+sycl", when="~kokkos", msg="ADIOS2 does not support SYCL without Kokkos") + for _platform in ["linux", "darwin", "cray"]: depends_on("pkgconfig", type="build", when=f"platform={_platform}") variant( @@ -135,8 +168,8 @@ class Adios2(CMakePackage, CudaPackage): depends_on("hdf5+mpi", when="+hdf5+mpi") depends_on("libpressio", when="+libpressio") - depends_on("c-blosc", when="@:2.8 +blosc") - depends_on("c-blosc2", when="@2.9: +blosc") + depends_on("c-blosc", when="+blosc") + depends_on("c-blosc2", when="+blosc2") depends_on("bzip2", when="+bzip2") depends_on("libpng@1.6:", when="+png") depends_on("zfp@0.5.1:0.5", when="+zfp") @@ -202,6 +235,7 @@ def cmake_args(self): from_variant("BUILD_SHARED_LIBS", "shared"), from_variant("ADIOS2_USE_AWSSDK", "aws"), from_variant("ADIOS2_USE_Blosc", "blosc"), + from_variant("ADIOS2_USE_Blosc2", "blosc2"), from_variant("ADIOS2_USE_BZip2", "bzip2"), from_variant("ADIOS2_USE_DataMan", "dataman"), from_variant("ADIOS2_USE_DataSpaces", "dataspaces"), @@ -214,9 +248,13 @@ def cmake_args(self): from_variant("ADIOS2_USE_SST", "sst"), from_variant("ADIOS2_USE_SZ", "sz"), from_variant("ADIOS2_USE_ZFP", "zfp"), - from_variant("ADIOS2_USE_CUDA", "cuda"), from_variant("ADIOS2_USE_Catalyst", "libcatalyst"), from_variant("ADIOS2_USE_LIBPRESSIO", "libpressio"), + self.define("ADIOS2_USE_CUDA", self.spec.satisfies("+cuda ~kokkos")), + self.define("ADIOS2_USE_Kokkos", self.spec.satisfies("+kokkos")), + self.define("Kokkos_ENABLE_CUDA", self.spec.satisfies("+cuda +kokkos")), + self.define("Kokkos_ENABLE_HIP", self.spec.satisfies("+rocm")), + self.define("Kokkos_ENABLE_SYCL", self.spec.satisfies("+sycl")), self.define("BUILD_TESTING", self.run_tests), self.define("ADIOS2_BUILD_EXAMPLES", False), self.define("ADIOS2_USE_Endian_Reverse", True), @@ -244,6 +282,14 @@ def cmake_args(self): args.append(f"-DPYTHON_EXECUTABLE:FILEPATH={spec['python'].command.path}") args.append(f"-DPython_EXECUTABLE:FILEPATH={spec['python'].command.path}") + # hip support + if "+cuda" in spec: + args.append(self.builder.define_cuda_architectures(self)) + + # hip support + if "+rocm" in spec: + args.append(self.builder.define_hip_architectures(self)) + return args @property diff --git a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py index 189515b05638eb..f23a736569f24a 100644 --- a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py +++ b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py @@ -102,7 +102,7 @@ class EcpDataVisSdk(BundlePackage, CudaPackage, ROCmPackage): amdgpu_target_variants = ["amdgpu_target={0}".format(x) for x in ROCmPackage.amdgpu_targets] dav_sdk_depends_on( - "adios2+shared+mpi+python+blosc+sst+ssc+dataman", + "adios2+shared+mpi+python+sst+dataman", when="+adios2", propagate=["cuda", "hdf5", "sz", "zfp", "fortran"] + cuda_arch_variants, ) From 88622d512985487c527b911603d29a55414abf50 Mon Sep 17 00:00:00 2001 From: Nakano Masaki Date: Tue, 24 Oct 2023 05:02:15 +0900 Subject: [PATCH 326/806] fix installation error of bear (#40637) Co-authored-by: Tom Scogland --- var/spack/repos/builtin/packages/bear/package.py | 6 +++--- var/spack/repos/builtin/packages/grpc/package.py | 2 +- var/spack/repos/builtin/packages/re2/package.py | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py index 18240c7f330954..becb364a2c2d99 100644 --- a/var/spack/repos/builtin/packages/bear/package.py +++ b/var/spack/repos/builtin/packages/bear/package.py @@ -23,10 +23,10 @@ class Bear(CMakePackage): version("2.0.4", sha256="33ea117b09068aa2cd59c0f0f7535ad82c5ee473133779f1cc20f6f99793a63e") depends_on("pkgconfig", when="@3:") - depends_on("fmt", when="@3.0.0:") - depends_on("grpc", when="@3.0.0:") + depends_on("fmt@8", when="@3.0.0:") + depends_on("grpc +shared", when="@3.0.0:") depends_on("nlohmann-json", when="@3.0.0:") - depends_on("spdlog", when="@3.0.0:") + depends_on("spdlog +fmt_external", when="@3.0.0:") depends_on("cmake@2.8:", type="build") depends_on("python", type="build") depends_on("googletest", type="test", when="@3:") diff --git a/var/spack/repos/builtin/packages/grpc/package.py b/var/spack/repos/builtin/packages/grpc/package.py index dd7f3f5acf422a..58e64427ec23fb 100644 --- a/var/spack/repos/builtin/packages/grpc/package.py +++ b/var/spack/repos/builtin/packages/grpc/package.py @@ -59,7 +59,7 @@ class Grpc(CMakePackage): depends_on("zlib-api") depends_on("c-ares") depends_on("abseil-cpp", when="@1.27:") - depends_on("re2+pic", when="@1.33.1:") + depends_on("re2+pic@2023-09-01", when="@1.33.1:") def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/re2/package.py b/var/spack/repos/builtin/packages/re2/package.py index 761005949b60e2..3c62d3da76217c 100644 --- a/var/spack/repos/builtin/packages/re2/package.py +++ b/var/spack/repos/builtin/packages/re2/package.py @@ -13,6 +13,9 @@ class Re2(CMakePackage): homepage = "https://github.com/google/re2" url = "https://github.com/google/re2/archive/2020-08-01.tar.gz" + version( + "2023-09-01", sha256="5bb6875ae1cd1e9fedde98018c346db7260655f86fdb8837e3075103acd3649b" + ) version( "2021-06-01", sha256="26155e050b10b5969e986dab35654247a3b1b295e0532880b5a9c13c0a700ceb" ) @@ -26,6 +29,8 @@ class Re2(CMakePackage): variant("shared", default=False, description="Build shared instead of static libraries") variant("pic", default=True, description="Enable position independent code") + depends_on("abseil-cpp", when="@2023-09-01:") + # shared libs must have position-independent code conflicts("+shared ~pic") From bc54aa1e8219954001d2f9e44974c6a99cd58ce9 Mon Sep 17 00:00:00 2001 From: Annop Wongwathanarat Date: Tue, 24 Oct 2023 07:58:04 +0100 Subject: [PATCH 327/806] armpl-gcc: add version 23.10 and macOS support (#40511) --- .../builtin/packages/armpl-gcc/package.py | 119 +++++++++++++++--- 1 file changed, 104 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py index 22f8521d925169..f0157ae551ffe1 100644 --- a/var/spack/repos/builtin/packages/armpl-gcc/package.py +++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py @@ -31,11 +31,62 @@ "rhel8": "RHEL-8", "rhel9": "RHEL-9", "rocky8": "RHEL-8", + "rocky9": "RHEL-9", "amzn2": "AmazonLinux-2", "amzn2023": "AmazonLinux-2023", } _versions = { + "23.10_gcc-12.2": { + "RHEL-7": ("e5e2c69ad281a676f2a06c835fbf31d4f9fdf46aa3f3f7c8aafff46985f64902"), + "RHEL-8": ("cc0f3572ead93d1e31797b7a39a40cff3414878df9bd24a452bf4877dc35ca4c"), + "RHEL-9": ("18c75f57333031e454921cc3f4f22fd567e5a701424ff9ac219bbfe9955a8a96"), + "SLES-15": ("e1e891eceaffedecf7351e2c499ef2b49a36c9af29174b366ff470d0a568c18f"), + "Ubuntu-20.04": ("976424875c52c2062fc76cbc5d527ee82413cdc0432d7c59f423295a3b0cc612"), + "Ubuntu-22.04": ("6dd778edf55e13e8b766d75c340f0259f6cb507a93966d76d188b8b3943c769b"), + "AmazonLinux-2": ("423ac3df262b5fcca6cea480503b693306c970dd8e8e05c753ece92446ac7fee"), + "AmazonLinux-2023": ("acadf3b6cde866cb41f7363b290a646a492769aaa5819d4c0d60df89913342a9"), + }, + "23.10_gcc-11.3": { + "RHEL-7": ("b2afbdc056ae01fb5c71935448b19300ef368962a94ae76b8811f1d328c723c2"), + "RHEL-8": ("79b83a8a2c46b949896b3964c761cbd0b66c37826996afb62c466af5fb420bc2"), + "RHEL-9": ("7a84f561bcf941bb25123b3ef730b4c02616bc51215933870677163e78af38e3"), + "SLES-15": ("9243c405d092d3eabff112ccabc300e96f13c3d2c5c319df04d7093bb6f535a2"), + "Ubuntu-20.04": ("a16df088ef9303040d92b017b233c6e4c6f0300d09c2ad0a66c0318831bf009c"), + "Ubuntu-22.04": ("fabda66dc6388fa8c094443fa53deece5590db66caaa6a1e39e99e64d5bb0709"), + "AmazonLinux-2": ("db5d039fa1d07695a71b8733584d878bb778d41bc0ecc3e19059b75cffdcf8cd"), + "AmazonLinux-2023": ("977fd465702f086a69e3f7fc28f2bcb6c79a7af381dc7d865345115b26f4631f"), + }, + "23.10_gcc-10.4": { + "RHEL-7": ("3c8bad3af82a76ca1a45705afd47028cc26c7093377a554e692e1cd6f61cb304"), + "RHEL-8": ("381afae0e3e94aa91029f571de0e51c2342e50b4f855db7a9b9ca66e16e26276"), + "SLES-15": ("226e9519407331b4ad5ded8699cd15f1d9b845843304bbf21f47009a399fe2a0"), + "Ubuntu-20.04": ("45de59f795ad9026a838ab611b03b1644169a034ce59d6cca2c7940850fa17ad"), + "AmazonLinux-2": ("637b51da12548dc66da9132328fe2ea39ba0736af66fb30332ca8eeb540e3373"), + }, + "23.10_gcc-9.3": { + "RHEL-7": ("6fc2e3319b83ea2b1bf8d98ec43f614b937bb5f23d15aefe9e9171c882d24a60"), + "RHEL-8": ("1a05548a7051d1df42280fdcfcffeaf89d519aa7978bffd29171da60fdbccecf"), + "SLES-15": ("389ddd34e1299e4d942864f63f236158a81ce4190f59af512a1bea3221153bfe"), + "Ubuntu-20.04": ("a1a221859b5f0962df3a0c6ce31669827bff0bfffb185b80429620f14b40f4f4"), + "AmazonLinux-2": ("2eef9b28e95e75f0040eb61c9e1b406ec4d0b81cce3e95a652029aa0898733a0"), + }, + "23.10_gcc-8.2": { + "RHEL-7": ("d6596721e74e7bdc8d9ce7b8b2a4c5ab2bd430f3ca69b9ec84f587f1aa181083"), + "RHEL-8": ("004aed52003e19a6c14df303456318e486ad783eb543b79285c7953a23722a4a"), + "SLES-15": ("12c638c0cc5bdc220699499ec6bb160a7b889f105901f4354bd2748a77d25c8e"), + "AmazonLinux-2": ("d039134236cda298cd0920c3c5b017eeef83fcab82949221dc7deb081026252f"), + }, + "23.10_gcc-7.5": { + "RHEL-7": ("1a0ca860c168987d174923dfc7800e10521303914793162a8bae2b2cd3f68203"), + "AmazonLinux-2": ("58b201a6bbe7ee10563d8d42b32a77c4b15c57b4e81abb35d24b8c3fc9cff4d9"), + }, + "23.10_flang-new_clang_17": { + "macOS": ("baf09cd6d1d1b7c780b8b31cfe1dd709596b182dc714127fbc9f23007ff9e23a") + }, + "23.06_flang-new_clang_16": { + "macOS": ("232f5e89e0f1f4777480c64a790e477dfd2f423d3cf5704a116a2736f36250ea") + }, "23.04.1_gcc-12.2": { "RHEL-7": ("789cc093cb7e0d9294aff0fdf94b74987435a09cdff4c1b7118a03350548d03c"), "RHEL-8": ("1b668baec6d3df2d48c5aedc70baa6a9b638983b94bf2cd58d378859a1da49f0"), @@ -177,20 +228,28 @@ def get_os(ver): - spack_os = spack.platforms.host().default_os + platform = spack.platforms.host() + if platform.name == "darwin": + return "macOS" if ver.startswith("22."): - return _os_map_before_23.get(spack_os, "") + return _os_map_before_23.get(platform.default_os, "") else: - return _os_map.get(spack_os, "RHEL-7") + return _os_map.get(platform.default_os, "RHEL-7") def get_package_url(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(".", "-") - gcc_version = version.split("_")[1] + compiler_version = version.split("_", 1)[1] os = get_os(armpl_version) - filename = "arm-performance-libraries_" + armpl_version + "_" + os + "_" + gcc_version + ".tar" + if os == "macOS": + if armpl_version.startswith("23.06"): + return f"{base_url}{armpl_version_dashed}/armpl_{armpl_version}_{compiler_version}.dmg" + else: + filename = f"arm-performance-libraries_{armpl_version}_macOS.dmg" + return f"{base_url}{armpl_version_dashed}/macos/{filename}" + filename = f"arm-performance-libraries_{armpl_version}_{os}_{compiler_version}.tar" os_short = "" if armpl_version.startswith("22.0."): os_short = os.replace("-", "") @@ -198,7 +257,7 @@ def get_package_url(version): os_short = os.split(".")[0].lower() if "amazonlinux" in os_short: os_short = os_short.replace("amazonlinux", "al") - return base_url + armpl_version_dashed + "/" + os_short + "/" + filename + return f"{base_url}{armpl_version_dashed}/{os_short}/{filename}" def get_armpl_prefix(spec): @@ -215,16 +274,26 @@ class ArmplGcc(Package): maintainers("annop-w") for ver, packages in _versions.items(): - key = "{0}".format(get_os(ver)) + key = get_os(ver) sha256sum = packages.get(key) url = get_package_url(ver) if sha256sum: - version(ver, sha256=sha256sum, url=url) + extension = os.path.splitext(url)[1] + # Don't attempt to expand .dmg files + expand = extension != ".dmg" + version(ver, sha256=sha256sum, url=url, extension=extension, expand=expand) conflicts("target=x86:", msg="Only available on Aarch64") conflicts("target=ppc64:", msg="Only available on Aarch64") conflicts("target=ppc64le:", msg="Only available on Aarch64") + conflicts("%gcc@:11", when="@23.10_gcc-12.2") + conflicts("%gcc@:10", when="@23.10_gcc-11.3") + conflicts("%gcc@:9", when="@23.10_gcc-10.4") + conflicts("%gcc@:8", when="@23.10_gcc-9.3") + conflicts("%gcc@:7", when="@23.10_gcc-8.2") + conflicts("%gcc@:6", when="@23.10_gcc-7.5") + conflicts("%gcc@:11", when="@23.04.1_gcc-12.2") conflicts("%gcc@:10", when="@23.04.1_gcc-11.3") conflicts("%gcc@:9", when="@23.04.1_gcc-10.2") @@ -266,17 +335,29 @@ class ArmplGcc(Package): # Run the installer with the desired install directory def install(self, spec, prefix): + if spec.platform == "darwin": + hdiutil = which("hdiutil") + # Mount image + mountpoint = os.path.join(self.stage.path, "mount") + hdiutil("attach", "-mountpoint", mountpoint, self.stage.archive_file) + try: + # Run installer + exe_name = f"armpl_{spec.version.string}_install.sh" + installer = Executable(os.path.join(mountpoint, exe_name)) + installer("-y", f"--install_dir={prefix}") + finally: + # Unmount image + hdiutil("detach", mountpoint) + return if self.compiler.name != "gcc": raise spack.error.SpackError(("Only compatible with GCC.\n")) with when("@:22"): - armpl_version = "{}".format(spec.version.up_to(3)).split("_")[0] + armpl_version = spec.version.up_to(3).string.split("_")[0] with when("@23:"): - armpl_version = "{}".format(spec.version).split("_")[0] + armpl_version = spec.version.string.split("_")[0] - exe = Executable( - "./arm-performance-libraries_{0}_{1}.sh".format(armpl_version, get_os(armpl_version)) - ) + exe = Executable(f"./arm-performance-libraries_{armpl_version}_{get_os(armpl_version)}.sh") exe("--accept", "--force", "--install-to", prefix) @property @@ -330,14 +411,22 @@ def headers(self): def setup_run_environment(self, env): armpl_dir = get_armpl_prefix(self.spec) - env.prepend_path("LD_LIBRARY_PATH", join_path(armpl_dir, "lib")) + if self.spec.platform == "darwin": + env.prepend_path("DYLD_LIBRARY_PATH", join_path(armpl_dir, "lib")) + else: + env.prepend_path("LD_LIBRARY_PATH", join_path(armpl_dir, "lib")) @run_after("install") def check_install(self): armpl_dir = get_armpl_prefix(self.spec) armpl_example_dir = join_path(armpl_dir, "examples") # run example makefile - make("-C", armpl_example_dir, "ARMPL_DIR=" + armpl_dir) + if self.spec.platform == "darwin": + # Fortran examples on MacOS requires flang-new which is + # not commonly installed, so only run the C examples. + make("-C", armpl_example_dir, "ARMPL_DIR=" + armpl_dir, "c_examples") + else: + make("-C", armpl_example_dir, "ARMPL_DIR=" + armpl_dir) # clean up make("-C", armpl_example_dir, "ARMPL_DIR=" + armpl_dir, "clean") From cf9a32e6db7f106e0cac164b76b7dcc6b7bcdfbb Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:08:05 -0700 Subject: [PATCH 328/806] exago: fix v1.5.1 tag; only allow python up to 3.10 for for @:1.5 (#40676) * exago: fix v1.5.1 tag; only allow python up to 3.10 for for @:1.5 due to pybind error with py 3.11 * hiop@:1.0 +cuda: constrain to cuda@:11.9 --- var/spack/repos/builtin/packages/exago/package.py | 4 ++-- var/spack/repos/builtin/packages/hiop/package.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index d28b4fa1f82018..b38aff0147b9a0 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -17,7 +17,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pnnl/ExaGO.git" maintainers("ryandanehy", "cameronrutherford", "pelesh") - version("1.5.1", commit="7abe482c8da0e247f9de4896f5982c4cacbecd78", submodules=True) + version("1.5.1", tag="v1.5.1", submodules=True) version("1.5.0", commit="227f49573a28bdd234be5500b3733be78a958f15", submodules=True) version("1.4.1", commit="ea607c685444b5f345bfdc9a59c345f0f30adde2", submodules=True) version("1.4.0", commit="4f4c3fdb40b52ace2d6ba000e7f24b340ec8e886", submodules=True) @@ -64,7 +64,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): ) # Dependencies - depends_on("python@3.6:", when="@1.3.0:+python") + depends_on("python@3.6:3.10", when="@1.3.0:1.5+python") depends_on("py-pytest", type=("build", "run"), when="@1.5.0:+python") depends_on("py-mpi4py", when="@1.3.0:+mpi+python") depends_on("pkgconfig", type="build") diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index ff62c7da56c0ee..9ceedc36b4bd0c 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -104,6 +104,10 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): depends_on("magma@{0}:".format(magma_v), when="@{0}:+rocm".format(hiop_v)) depends_on("cuda@11:", when="@develop:+cuda") + + # https://github.com/spack/spack/issues/40678 + depends_on("cuda@:11.9", when="@:1.0 +cuda") + depends_on("raja", when="+raja") depends_on("umpire", when="+raja") depends_on("raja+openmp", when="+raja~cuda~rocm") From d075732cc5e473a79d5eaacce5bb19b2405a8e7a Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:28:23 -0700 Subject: [PATCH 329/806] hiop +cuda: fix issue 40678 (#40688) --- var/spack/repos/builtin/packages/hiop/package.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index 9ceedc36b4bd0c..353c7fd942b675 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -103,10 +103,9 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): depends_on("magma@{0}:".format(magma_v), when="@{0}:+cuda".format(hiop_v)) depends_on("magma@{0}:".format(magma_v), when="@{0}:+rocm".format(hiop_v)) - depends_on("cuda@11:", when="@develop:+cuda") - # https://github.com/spack/spack/issues/40678 - depends_on("cuda@:11.9", when="@:1.0 +cuda") + depends_on("cuda@11:11.9", when="@develop:+cuda") + depends_on("cuda@:11.9", when="+cuda") depends_on("raja", when="+raja") depends_on("umpire", when="+raja") From 444c27ca53aaf9e2ea6dfea780c499e6beafc673 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:21:58 +0200 Subject: [PATCH 330/806] neovim: conflict for libluv problem on macOS + add newer versions of neovim and libluv (#40690) * add conflict with libluv version >=1.44 just on macOS * minor change * add libluv versions * neovim: add newer releases --- var/spack/repos/builtin/packages/libluv/package.py | 2 ++ var/spack/repos/builtin/packages/neovim/package.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libluv/package.py b/var/spack/repos/builtin/packages/libluv/package.py index abf42d47f08ee5..b3600f63ce6f54 100644 --- a/var/spack/repos/builtin/packages/libluv/package.py +++ b/var/spack/repos/builtin/packages/libluv/package.py @@ -14,7 +14,9 @@ class Libluv(CMakePackage): homepage = "https://github.com/luvit/luv" url = "https://github.com/luvit/luv/releases/download/1.36.0-0/luv-1.36.0-0.tar.gz" + version("1.45.0-0", sha256="fa6c46fb09f88320afa7f88017efd7b0d2b3a0158c5ba5b6851340b0332a2b81") version("1.44.2-1", sha256="3eb5c7bc44f61fbc4148ea30e3221d410263e0ffa285672851fc19debf9e5c30") + version("1.44.2-0", sha256="30639f8e0fac7fb0c3a04b94a00f73c6d218c15765347ceb0998a6b72464b6cf") version("1.43.0-0", sha256="567a6f3dcdcf8a9b54ddc57ffef89d1e950d72832b85ee81c8c83a9d4e0e9de2") version("1.42.0-1", sha256="4b6fbaa89d2420edf6070ad9e522993e132bd7eb2540ff754c2b9f1497744db2") version("1.42.0-0", sha256="b5228a9d0eaacd9f862b6270c732d5c90773a28ce53b6d9e32a14050e7947f36") diff --git a/var/spack/repos/builtin/packages/neovim/package.py b/var/spack/repos/builtin/packages/neovim/package.py index db8bd4a66c63ef..737cc57de7e39b 100644 --- a/var/spack/repos/builtin/packages/neovim/package.py +++ b/var/spack/repos/builtin/packages/neovim/package.py @@ -17,6 +17,8 @@ class Neovim(CMakePackage): version("master", branch="master") version("stable", tag="stable", commit="7d4bba7aa7a4a3444919ea7a3804094c290395ef") + version("0.9.4", sha256="148356027ee8d586adebb6513a94d76accc79da9597109ace5c445b09d383093") + version("0.9.2", sha256="06b8518bad4237a28a67a4fbc16ec32581f35f216b27f4c98347acee7f5fb369") version("0.9.1", sha256="8db17c2a1f4776dcda00e59489ea0d98ba82f7d1a8ea03281d640e58d8a3a00e") version("0.9.0", sha256="39d79107c54d2f3babcad2cd157c399241c04f6e75e98c18e8afaf2bb5e82937") version("0.8.3", sha256="adf45ff160e1d89f519b6114732eba03485ae469beb27919b0f7a4f6b44233c1") @@ -136,7 +138,10 @@ class Neovim(CMakePackage): # Support for `libvterm@0.2:` has been added in neovim@0.8.0 # term: Add support for libvterm >= 0.2 (https://github.com/neovim/neovim/releases/tag/v0.8.0) # https://github.com/neovim/neovim/issues/16217#issuecomment-958590493 - conflicts("^libvterm@0.2:", when="@:0.7") + conflicts("libvterm@0.2:", when="@:0.7") + + # https://github.com/neovim/neovim/issues/25770 + conflicts("libluv@1.44:", when="platform=darwin") @when("^lua") def cmake_args(self): From 83532b5469126acd89e15b6b1f5d637390d7c4ae Mon Sep 17 00:00:00 2001 From: Filippo Barbari <121092059+fbarbari@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:26:26 +0200 Subject: [PATCH 331/806] Added new benchmark version up to 1.8.3 (#40689) --- var/spack/repos/builtin/packages/benchmark/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/benchmark/package.py b/var/spack/repos/builtin/packages/benchmark/package.py index 9026d3d1c14928..fe0b286352fcd1 100644 --- a/var/spack/repos/builtin/packages/benchmark/package.py +++ b/var/spack/repos/builtin/packages/benchmark/package.py @@ -16,7 +16,16 @@ class Benchmark(CMakePackage): # first properly installed CMake config packages in # 1.2.0 release: https://github.com/google/benchmark/issues/363 version("main", branch="main") + version("1.8.3", sha256="6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce") + version("1.8.2", sha256="2aab2980d0376137f969d92848fbb68216abb07633034534fc8c65cc4e7a0e93") + version("1.8.1", sha256="e9ff65cecfed4f60c893a1e8a1ba94221fad3b27075f2f80f47eb424b0f8c9bd") + version("1.8.0", sha256="ea2e94c24ddf6594d15c711c06ccd4486434d9cf3eca954e2af8a20c88f9f172") + version("1.7.1", sha256="6430e4092653380d9dc4ccb45a1e2dc9259d581f4866dc0759713126056bc1d7") + version("1.7.0", sha256="3aff99169fa8bdee356eaa1f691e835a6e57b1efeadb8a0f9f228531158246ac") + version("1.6.2", sha256="a9f77e6188c1cd4ebedfa7538bf5176d6acc72ead6f456919e5f464ef2f06158") + version("1.6.1", sha256="6132883bc8c9b0df5375b16ab520fac1a85dc9e4cf5be59480448ece74b278d4") version("1.6.0", sha256="1f71c72ce08d2c1310011ea6436b31e39ccab8c2db94186d26657d41747c85d6") + version("1.5.6", sha256="789f85b4810d13ff803834ea75999e41b326405d83d6a538baf01499eda96102") version("1.5.5", sha256="3bff5f237c317ddfd8d5a9b96b3eede7c0802e799db520d38ce756a2a46a18a0") version("1.5.4", sha256="e3adf8c98bb38a198822725c0fc6c0ae4711f16fbbf6aeb311d5ad11e5a081b5") version("1.5.0", sha256="3c6a165b6ecc948967a1ead710d4a181d7b0fbcaa183ef7ea84604994966221a") From 95558d67aee2fe5deda4c1ad37eeed0b0fb382f3 Mon Sep 17 00:00:00 2001 From: AMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:06:32 +0100 Subject: [PATCH 332/806] openmpi: fix pmi@4.2.3: compat (#40686) --- var/spack/repos/builtin/packages/openmpi/package.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 87e5bc4f2bfee5..5325235612442d 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -555,11 +555,14 @@ class Openmpi(AutotoolsPackage, CudaPackage): # PMIx is unavailable for @1, and required for @2: # OpenMPI @2: includes a vendored version: - # depends_on('pmix@1.1.2', when='@2.1.6') - # depends_on('pmix@3.2.3', when='@4.1.2') - depends_on("pmix@1.0:1", when="@2.0:2 ~internal-pmix") - depends_on("pmix@3.2:", when="@4.0:4 ~internal-pmix") - depends_on("pmix@4.2:", when="@5.0:5 ~internal-pmix") + with when("~internal-pmix"): + depends_on("pmix@1", when="@2") + depends_on("pmix@3.2:", when="@4:") + depends_on("pmix@4.2:", when="@5:") + + # pmix@4.2.3 contains a breaking change, compat fixed in openmpi@4.1.6 + # See https://www.mail-archive.com/announce@lists.open-mpi.org//msg00158.html + depends_on("pmix@:4.2.2", when="@:4.1.5") # Libevent is required when *vendored* PMIx is used depends_on("libevent@2:", when="@main") From 50f25964cf5962ea9841640354d17ccc3bfcef16 Mon Sep 17 00:00:00 2001 From: renjithravindrankannath <94420380+renjithravindrankannath@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:30:02 -0700 Subject: [PATCH 333/806] Updating rvs binary path. (#40604) * Updating rvs binary path * Updating spec check as per the recommendation --- .../builtin/packages/rocm-validation-suite/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py index dfefd8ef75d5c5..adad90b646e628 100644 --- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py @@ -179,14 +179,18 @@ def setup_build_environment(self, build_env): depends_on("hip-rocclr@" + ver, when="@" + ver) def patch(self): - if "@4.5.0:5.1" in self.spec: + if self.spec.satisfies("@4.5:5.1"): filter_file( "@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True ) - elif "@5.2.0:" in self.spec: + elif self.spec.satisfies("@5.2:5.4"): filter_file( "@ROCM_PATH@/bin", self.spec.prefix.bin, "rvs/conf/deviceid.sh.in", string=True ) + elif self.spec.satisfies("@5.5:"): + filter_file( + "@ROCM_PATH@/rvs", self.spec.prefix.rvs, "rvs/conf/deviceid.sh.in", string=True + ) def cmake_args(self): args = [ From 2d203df075581204b552ec8e9bf131ec587974e6 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:46:23 -0700 Subject: [PATCH 334/806] Add ufs-utils@1.11.0 (#40695) * Add ufs-utils@1.11.0 * Update package.py --- var/spack/repos/builtin/packages/ufs-utils/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/ufs-utils/package.py b/var/spack/repos/builtin/packages/ufs-utils/package.py index e551e7fec1fdbb..50380bfe5889b2 100644 --- a/var/spack/repos/builtin/packages/ufs-utils/package.py +++ b/var/spack/repos/builtin/packages/ufs-utils/package.py @@ -18,6 +18,12 @@ class UfsUtils(CMakePackage): maintainers("t-brown", "edwardhartnett", "AlexanderRichert-NOAA", "Hang-Lei-NOAA") + version( + "1.11.0", + tag="ufs_utils_1_11_0", + commit="72701ab45165ae67a1c4b4d855e763bf5674dbd2", + submodules=True, + ) version( "1.10.0", tag="ufs_utils_1_10_0", From e1da9339d9a512a040fc6aab18d85912432f2b58 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:37:26 -0400 Subject: [PATCH 335/806] Windows: search PATH for patch utility (#40513) Previously, we only searched for `patch` inside of whatever Git installation was available because the most common installation of Git available on Windows had `patch`. That's not true for all possible installations of Git though, so this updates the search to also check PATH. --- lib/spack/spack/patch.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index 8b094a7642d634..7e2fcaff103ef3 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -7,6 +7,7 @@ import inspect import os import os.path +import pathlib import sys import llnl.util.filesystem @@ -36,10 +37,12 @@ def apply_patch(stage, patch_path, level=1, working_dir="."): """ git_utils_path = os.environ.get("PATH", "") if sys.platform == "win32": - git = which_string("git", required=True) - git_root = git.split("\\")[:-2] - git_root.extend(["usr", "bin"]) - git_utils_path = os.sep.join(git_root) + git = which_string("git") + if git: + git = pathlib.Path(git) + git_root = git.parent.parent + git_root = git_root / "usr" / "bin" + git_utils_path = os.pathsep.join([str(git_root), git_utils_path]) # TODO: Decouple Spack's patch support on Windows from Git # for Windows, and instead have Spack directly fetch, install, and From 1ecb100e433c075e619f1802f4f80c50ae348f36 Mon Sep 17 00:00:00 2001 From: Taillefumier Mathieu <29380261+mtaillefumier@users.noreply.github.com> Date: Wed, 25 Oct 2023 09:55:13 +0200 Subject: [PATCH 336/806] [cp2k] Use fftw3 MKL by default when cp2k is compiled with mkl (#40671) --- .../packages/cp2k/cmake-fixes-2023.2.patch | 154 +++++++++++++++--- 1 file changed, 134 insertions(+), 20 deletions(-) diff --git a/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch b/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch index 2961a4ceee8d45..985edad3aa5a1c 100644 --- a/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch +++ b/var/spack/repos/builtin/packages/cp2k/cmake-fixes-2023.2.patch @@ -1,10 +1,22 @@ -From 1897cbf3e467dc765f733b09af041fe8f25fa906 Mon Sep 17 00:00:00 2001 +From b75eb217115820059aba26d1ff1a8657e3841e7d Mon Sep 17 00:00:00 2001 From: Mathieu Taillefumier -Date: Thu, 19 Oct 2023 12:21:50 +0200 -Subject: [PATCH] [cmake] fix for building gromacs and cp2k with cmake and spack +Date: Mon, 23 Oct 2023 15:50:44 +0200 +Subject: [PATCH] cmake-fixes-2023.2 + +--- + CMakeLists.txt | 63 +++++++----- + cmake/FindBlas.cmake | 174 +++++++++++++++++----------------- + cmake/FindLapack.cmake | 47 ++++----- + cmake/cp2k.pc.in | 19 ---- + cmake/cp2kConfig.cmake.in | 195 ++++++++++++++++++++------------------ + cmake/libcp2k.pc.in | 11 +++ + src/CMakeLists.txt | 18 ++-- + 7 files changed, 276 insertions(+), 251 deletions(-) + delete mode 100644 cmake/cp2k.pc.in + create mode 100644 cmake/libcp2k.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3f81c7b524..1b6c6a0636 100644 +index 3f81c7b52..f2d85d033 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,8 @@ if(NOT DEFINED CMAKE_CUDA_STANDARD) @@ -17,7 +29,18 @@ index 3f81c7b524..1b6c6a0636 100644 find_package(PkgConfig) -@@ -115,8 +116,8 @@ cmake_dependent_option(CP2K_ENABLE_FFTW3_OPENMP_SUPPORT +@@ -108,6 +109,10 @@ option(CP2K_USE_LIBXSMM "Use libxsmm for small gemms (supports x86 platforms)" + OFF) + option(CP2K_BUILD_DBCSR "Duild dbcsr at the same time than cp2k." OFF) + option(BUILD_SHARED_LIBS "Build cp2k shared library" ON) ++option( ++ CP2K_USE_FFTW3_WITH_MKL ++ "If set to ON use the original implementation of fftw3 instead of the MKL implementation." ++ OFF) + + cmake_dependent_option(CP2K_ENABLE_ELPA_OPENMP_SUPPORT + "Enable elpa openmp support" ON "CP2K_USE_ELPA" OFF) +@@ -115,8 +120,8 @@ cmake_dependent_option(CP2K_ENABLE_FFTW3_OPENMP_SUPPORT "Enable FFTW openmp support" ON "CP2K_USE_FFTW3" OFF) cmake_dependent_option(CP2K_ENABLE_FFTW3_THREADS_SUPPORT "Enable FFTW THREADS support" OFF "CP2K_USE_FFTW3" OFF) @@ -28,7 +51,71 @@ index 3f81c7b524..1b6c6a0636 100644 cmake_dependent_option( DBCSR_USE_ACCEL -@@ -748,7 +749,7 @@ add_subdirectory(src) +@@ -527,7 +532,7 @@ if(CP2K_USE_ACCEL MATCHES "CUDA") + endif() + + set(CP2K_USE_CUDA ON) +- message(STATUS ``"-- CUDA compiler and libraries found") ++ message(STATUS "-- CUDA compiler and libraries found") + elseif(CP2K_USE_ACCEL MATCHES "HIP") + enable_language(HIP) + # Find hip +@@ -620,27 +625,36 @@ endif() + + # FFTW3 + ++set(CP2K_USE_FFTW3_ OFF) + if(CP2K_USE_FFTW3) +- find_package(Fftw REQUIRED) +- if(CP2K_ENABLE_FFTW3_THREADS_SUPPORT AND CP2K_ENABLE_FFTW3_OPENMP_SUPPORT) +- message( +- FATAL_ERROR +- "Fftw3 threads and openmp supports can not be used at the same time") +- endif() ++ if(CP2K_USE_FFTW3_WITH_MKL OR NOT CP2K_BLAS_VENDOR MATCHES "MKL") ++ find_package(Fftw REQUIRED) ++ if(CP2K_ENABLE_FFTW3_THREADS_SUPPORT AND CP2K_ENABLE_FFTW3_OPENMP_SUPPORT) ++ message( ++ FATAL_ERROR ++ "Fftw3 threads and openmp supports can not be used at the same time") ++ endif() + +- if((CP2K_ENABLE_FFTW3_THREADS_SUPPORT) AND (NOT TARGET +- CP2K::FFTW3::fftw3_threads)) +- message( +- FATAL_ERROR +- "fftw3 was compiled without multithreading support (--enable-threads option in fftw build system)." +- ) +- endif() ++ if((CP2K_ENABLE_FFTW3_THREADS_SUPPORT) AND (NOT TARGET ++ CP2K::FFTW3::fftw3_threads)) ++ message( ++ FATAL_ERROR ++ "fftw3 was compiled without multithreading support (--enable-threads option in fftw build system)." ++ ) ++ endif() + +- if((CP2K_ENABLE_FFTW3_OPENMP_SUPPORT) AND (NOT TARGET CP2K::FFTW3::fftw3_omp)) +- message( +- FATAL_ERROR +- "fftw3 was compiled without openmp support (--enable-openmp option in fftw build system)." +- ) ++ if((CP2K_ENABLE_FFTW3_OPENMP_SUPPORT) AND (NOT TARGET CP2K::FFTW3::fftw3_omp ++ )) ++ message( ++ FATAL_ERROR ++ "fftw3 was compiled without openmp support (--enable-openmp option in fftw build system)." ++ ) ++ endif() ++ # we use this variable later on to include the fftw target whenever mkl is ++ # found or not ++ set(CP2K_USE_FFTW3_ ON) ++ else() ++ message("-- Using the MKL implementation of FFTW3.") + endif() + endif() + +@@ -748,7 +762,7 @@ add_subdirectory(src) include(GNUInstallDirs) get_target_property(CP2K_LIBS cp2k_link_libs INTERFACE_LINK_LIBRARIES) @@ -37,19 +124,18 @@ index 3f81c7b524..1b6c6a0636 100644 message( STATUS "--------------------------------------------------------------------") -@@ -1039,6 +1040,10 @@ install(FILES "${PROJECT_BINARY_DIR}/cp2kConfig.cmake" +@@ -1039,6 +1053,9 @@ install(FILES "${PROJECT_BINARY_DIR}/cp2kConfig.cmake" "${PROJECT_BINARY_DIR}/cp2kConfigVersion.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cp2k") +install(FILES "${PROJECT_BINARY_DIR}/libcp2k.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") -+ + install( DIRECTORY "${PROJECT_SOURCE_DIR}/cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cp2k" diff --git a/cmake/FindBlas.cmake b/cmake/FindBlas.cmake -index 6e5fb78240..335cbd964a 100644 +index 6e5fb7824..335cbd964 100644 --- a/cmake/FindBlas.cmake +++ b/cmake/FindBlas.cmake @@ -15,104 +15,108 @@ if(NOT @@ -247,7 +333,7 @@ index 6e5fb78240..335cbd964a 100644 # having the fortran interface is usually enough. C, C++ and others languages # might require this information though diff --git a/cmake/FindLapack.cmake b/cmake/FindLapack.cmake -index 966e0d78d3..77a1e04258 100644 +index 966e0d78d..77a1e0425 100644 --- a/cmake/FindLapack.cmake +++ b/cmake/FindLapack.cmake @@ -20,33 +20,34 @@ include(FindPackageHandleStandardArgs) @@ -310,7 +396,7 @@ index 966e0d78d3..77a1e04258 100644 REQUIRED_VARS CP2K_LAPACK_LINK_LIBRARIES) diff --git a/cmake/cp2k.pc.in b/cmake/cp2k.pc.in deleted file mode 100644 -index 5b4a095660..0000000000 +index 5b4a09566..000000000 --- a/cmake/cp2k.pc.in +++ /dev/null @@ -1,19 +0,0 @@ @@ -335,10 +421,10 @@ index 5b4a095660..0000000000 -#Libs.private: -L"${libdir}" @CP2K_LIBS@ \ No newline at end of file diff --git a/cmake/cp2kConfig.cmake.in b/cmake/cp2kConfig.cmake.in -index a3acd47442..a9e0eb5a58 100644 +index a3acd4744..1c310e19b 100644 --- a/cmake/cp2kConfig.cmake.in +++ b/cmake/cp2kConfig.cmake.in -@@ -5,112 +5,120 @@ +@@ -5,112 +5,121 @@ #! SPDX-License-Identifier: GPL-2.0-or-later ! #!-------------------------------------------------------------------------------------------------! @@ -405,9 +491,10 @@ index a3acd47442..a9e0eb5a58 100644 + find_dependency(MPI REQUIRED) + endif() + -+ if(@CP2K_USE_FFTW3@) ++ if(@CP2K_USE_FFTW3@ OR @CP2K_USE_FFTW3_WITH_MKL@) + find_dependency(Fftw REQUIRED) + endif() ++ + # QUIP + if(@CP2K_USE_QUIP@) + find_dependency(Quip REQUIRED) @@ -554,7 +641,7 @@ index a3acd47442..a9e0eb5a58 100644 -include("${CMAKE_CURRENT_LIST_DIR}/cp2kTargets.cmake") diff --git a/cmake/libcp2k.pc.in b/cmake/libcp2k.pc.in new file mode 100644 -index 0000000000..618af55e28 +index 000000000..618af55e2 --- /dev/null +++ b/cmake/libcp2k.pc.in @@ -0,0 +1,11 @@ @@ -570,19 +657,41 @@ index 0000000000..618af55e28 +Cflags: -I"${includedir}/cp2k" -I"${includedir}/cp2k/@CMAKE_Fortran_COMPILER_ID@-@CMAKE_Fortran_COMPILER_VERSION@" +Libs: -L"${libdir}" -lcp2k diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index dbc955885e..e003d4f88d 100644 +index dbc955885..1178101ad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt +@@ -1536,9 +1536,9 @@ target_link_libraries( + $<$:CP2K::LIBSPG::libspg> + $<$:CP2K::Libxc::xc> + $<$:CP2K::ELPA::elpa> +- $<$:CP2K::FFTW3::fftw3> +- $<$:CP2K::FFTW3::fftw3_threads> +- $<$:CP2K::FFTW3::fftw3_omp> ++ $<$:CP2K::FFTW3::fftw3> ++ $<$,$>:CP2K::FFTW3::fftw3_threads> ++ $<$,$>:CP2K::FFTW3::fftw3_omp> + $<$:SPLA::spla> + $<$:CP2K::Libint2::int2> + $<$:${TORCH_LIBRARIES}> @@ -1555,7 +1555,7 @@ target_compile_definitions( cp2k PUBLIC $<$:__parallel> $<$:__SCALAPACK> - $<$:__MPI_08> -+ $<$:__MPI_08> ++ $<$:__MPI_F08> __COMPILE_DATE=\"${CP2K_TIMESTAMP}\" __COMPILE_HOST=\"${CP2K_HOST_NAME}\" __COMPILE_REVISION=\"${CP2K_GIT_HASH}\" -@@ -1774,12 +1774,12 @@ install( +@@ -1577,7 +1577,7 @@ target_compile_definitions( + $<$:__OFFLOAD_GEMM> + $<$:__ELPA> + $<$:__LIBXC> +- $<$:__FFTW3> ++ $<$:__FFTW3> + $<$:__LIBINT> + $<$:__LIBPEXSI> + $<$:__LIBTORCH> +@@ -1774,12 +1774,14 @@ install( EXPORT cp2k_targets FILE cp2kTargets.cmake NAMESPACE cp2k:: @@ -590,11 +699,16 @@ index dbc955885e..e003d4f88d 100644 + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") -install(FILES start/libcp2k.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cp2k") -+install(FILES start/libcp2k.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") ++install(FILES start/libcp2k.h ++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") install( DIRECTORY "${PROJECT_BINARY_DIR}/src/mod_files" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cp2k" -+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}" ++ DESTINATION ++ "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}" FILES_MATCHING PATTERN "*.mod") +-- +2.41.0 + From f4bbc0dbd2747c2ebdf5ccbd366cc6d5e924ebf9 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 25 Oct 2023 12:13:32 +0200 Subject: [PATCH 337/806] Add dlaf variant to cp2k (#40702) --- .../repos/builtin/packages/cp2k/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 27deecf78472aa..2e765c7539fffb 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -83,6 +83,13 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): description="Enable optimised diagonalisation routines from ELPA", when="@6.1:", ) + variant( + "dlaf", + default=False, + description="Enable DLA-Future eigensolver and Cholesky decomposition", + # TODO: Pin version when integrated in a release + when="@master build_system=cmake", + ) variant( "sirius", default=False, @@ -226,6 +233,15 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): depends_on("elpa@2021.11.001:", when="@9.1:") depends_on("elpa@2023.05.001:", when="@2023.2:") + with when("+dlaf"): + conflicts( + "~mpi", msg="DLA-Future requires MPI. Only the distributed eigensolver is available." + ) + depends_on("dla-future@0.2.1: +scalapack") + depends_on("dla-future ~cuda~rocm", when="~cuda~rocm") + depends_on("dla-future +cuda", when="+cuda") + depends_on("dla-future +rocm", when="+rocm") + with when("+plumed"): depends_on("plumed+shared") depends_on("plumed+mpi", when="+mpi") @@ -945,6 +961,7 @@ def cmake_args(self): args += [ self.define_from_variant("CP2K_ENABLE_REGTESTS", "enable_regtests"), self.define_from_variant("CP2K_USE_ELPA", "elpa"), + self.define_from_variant("CP2K_USE_DLAF", "dlaf"), self.define_from_variant("CP2K_USE_LIBINT2", "libint"), self.define_from_variant("CP2K_USE_SIRIUS", "sirius"), self.define_from_variant("CP2K_USE_SPLA", "spla"), From 30630933227c0cfb5cebb260638f15a61b51e89d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 25 Oct 2023 06:06:35 -0500 Subject: [PATCH 338/806] py-lightning: py-torch~distributed is broken again (#40696) --- var/spack/repos/builtin/packages/py-lightning/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-lightning/package.py b/var/spack/repos/builtin/packages/py-lightning/package.py index f5131ec0715265..8bec9806ee3478 100644 --- a/var/spack/repos/builtin/packages/py-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-lightning/package.py @@ -94,3 +94,6 @@ class PyLightning(PythonPackage): depends_on("py-websocket-client@:2", type=("build", "run")) depends_on("py-websockets@:12", when="@2.0.5:", type=("build", "run")) depends_on("py-websockets@:11", when="@:2.0.4", type=("build", "run")) + + # https://github.com/Lightning-AI/lightning/issues/18858 + conflicts("^py-torch~distributed", when="@2.1.0") From 0c30418732d67afd224172763e07d64316ae7933 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 25 Oct 2023 17:35:47 +0200 Subject: [PATCH 339/806] ci: darwin aarch64 use apple-clang-15 tag (#40706) --- share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml | 2 +- .../cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 245bb51933ccf0..f4850a17ba8ec1 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -706,7 +706,7 @@ ml-linux-x86_64-rocm-build: SPACK_CI_STACK_NAME: ml-darwin-aarch64-mps ml-darwin-aarch64-mps-generate: - tags: [ "macos-ventura", "apple-clang-14", "aarch64-macos" ] + tags: [ "macos-ventura", "apple-clang-15", "aarch64-macos" ] extends: [ ".ml-darwin-aarch64-mps", ".generate-base"] ml-darwin-aarch64-mps-build: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml index 6d8a0b7491f9a3..0905305113f083 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/ml-darwin-aarch64-mps/spack.yaml @@ -89,7 +89,7 @@ spack: - build-job: variables: CI_GPG_KEY_ROOT: /etc/protected-runner - tags: [ "macos-ventura", "apple-clang-14", "aarch64-macos" ] + tags: [ "macos-ventura", "apple-clang-15", "aarch64-macos" ] cdash: build-group: Machine Learning MPS From c0a4be156ceb02773687e3dd8d95af772415b1ab Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 25 Oct 2023 20:55:04 +0200 Subject: [PATCH 340/806] ci: don't put compilers in config (#40700) * ci: don't register detectable compilers Cause they go out of sync... * remove intel compiler, it can be detected too * Do not run spack compiler find since compilers are registered in concretize job already * trilinos: work around +stokhos +cuda +superlu-dist bug due to EMPTY macro --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 1 + .../gitlab/cloud_pipelines/configs/ci.yaml | 2 +- .../stacks/e4s-neoverse_v1/spack.yaml | 15 ---------- .../stacks/e4s-oneapi/spack.yaml | 28 ------------------- .../stacks/e4s-power/spack.yaml | 15 ---------- .../stacks/e4s-rocm-external/spack.yaml | 15 ---------- .../cloud_pipelines/stacks/e4s/spack.yaml | 15 ---------- .../builtin/packages/trilinos/package.py | 5 ++++ 8 files changed, 7 insertions(+), 89 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index f4850a17ba8ec1..579153bdfdc395 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -140,6 +140,7 @@ default: - spack --version - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME} - spack env activate --without-view . + - spack compiler find - export SPACK_CI_CONFIG_ROOT="${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/configs" - spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))" < "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index 9aad850b5df065..29dc993a15578c 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -12,7 +12,7 @@ ci: before_script-: - - spack list --count # ensure that spack's cache is populated - - spack env activate --without-view ${SPACK_CONCRETE_ENV_DIR} - - spack compiler find + - spack compiler list - if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi - - mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data # AWS runners mount E4S public key (verification), UO runners mount public/private (signing/verification) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index d42e5f1fcade20..47f0b55f9f03be 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -54,21 +54,6 @@ spack: cuda: version: [11.8.0] - compilers: - - compiler: - spec: gcc@11.4.0 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - flags: {} - operating_system: ubuntu20.04 - target: aarch64 - modules: [] - environment: {} - extra_rpaths: [] - specs: # CPU - adios diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 605a69e4a57d31..8e420a5b75c961 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -5,34 +5,6 @@ spack: reuse: false unify: false - compilers: - - compiler: - spec: oneapi@2023.2.1 - paths: - cc: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/icx - cxx: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/icpx - f77: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/ifx - fc: /opt/intel/oneapi/compiler/2023.2.1/linux/bin/ifx - flags: {} - operating_system: ubuntu20.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - - compiler: - spec: gcc@=11.4.0 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - flags: {} - operating_system: ubuntu20.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - packages: all: require: '%oneapi target=x86_64_v3' diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 10bf4bc57d99f7..95f8d37e0436bc 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -5,21 +5,6 @@ spack: reuse: false unify: false - compilers: - - compiler: - spec: gcc@9.4.0 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - flags: {} - operating_system: ubuntu20.04 - target: ppc64le - modules: [] - environment: {} - extra_rpaths: [] - packages: all: require: "%gcc@9.4.0 target=ppc64le" diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index b5ac17207796fe..c11dcf6ae1a551 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -5,21 +5,6 @@ spack: reuse: false unify: false - compilers: - - compiler: - spec: gcc@=11.4.0 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - flags: {} - operating_system: ubuntu20.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - packages: all: require: '%gcc target=x86_64_v3' diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 710360172ab1c2..ea9bd5fe70b72f 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -5,21 +5,6 @@ spack: reuse: false unify: false - compilers: - - compiler: - spec: gcc@=11.4.0 - paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - flags: {} - operating_system: ubuntu20.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] - packages: all: require: '%gcc target=x86_64_v3' diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 9af8ab14dcdd73..1681ac35d2e9a2 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -358,6 +358,11 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): conflicts("@:13.0.1 +cuda", when="^cuda@11:") # Build hangs with CUDA 11.6 (see #28439) conflicts("+cuda +stokhos", when="^cuda@11.6:") + # superlu-dist defines a macro EMPTY which conflicts with a header in cuda + # used when building stokhos + # Fix: https://github.com/xiaoyeli/superlu_dist/commit/09cb1430f7be288fd4d75b8ed461aa0b7e68fefe + # is not tagged yet. See discussion here https://github.com/trilinos/Trilinos/issues/11839 + conflicts("+cuda +stokhos +superlu-dist") # Cuda UVM must be enabled prior to 13.2 # See https://github.com/spack/spack/issues/28869 conflicts("~uvm", when="@:13.1 +cuda") From 6bd2dd032b89c4846643b437c80122b11e0ded8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:58:53 +0200 Subject: [PATCH 341/806] build(deps): bump pytest from 7.4.2 to 7.4.3 in /lib/spack/docs (#40697) --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 8c7b4e88cc47a1..31403710385657 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -6,7 +6,7 @@ python-levenshtein==0.23.0 docutils==0.18.1 pygments==2.16.1 urllib3==2.0.7 -pytest==7.4.2 +pytest==7.4.3 isort==5.12.0 black==23.9.1 flake8==6.1.0 From 932d7a65e01c5bf2749179c1be54ed92b4bd17f4 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 25 Oct 2023 16:10:48 -0500 Subject: [PATCH 342/806] PyTorch: patch breakpad dependency (#40648) --- var/spack/repos/builtin/packages/py-torch/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index b876bf06362b98..8b641c4e702159 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -103,7 +103,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): "breakpad", default=True, description="Enable breakpad crash dump library", - when="@1.9:1.11", + when="@1.10:1.11", ) conflicts("+cuda+rocm") @@ -286,6 +286,14 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): when="@1.1:1.8.1", ) + # https://github.com/pytorch/pytorch/issues/70297 + patch( + "https://github.com/google/breakpad/commit/605c51ed96ad44b34c457bbca320e74e194c317e.patch?full_index=1", + sha256="694d83db3a2147d543357f22ba5c8d5683d0ed43e693d42bca8f24ec50080f98", + when="+breakpad", + working_dir="third_party/breakpad", + ) + # Fixes CMake configuration error when XNNPACK is disabled # https://github.com/pytorch/pytorch/pull/35607 # https://github.com/pytorch/pytorch/pull/37865 From 2a245fdd21a6a5657e59527df6ef1f3914a74222 Mon Sep 17 00:00:00 2001 From: Filippo Barbari <121092059+fbarbari@users.noreply.github.com> Date: Thu, 26 Oct 2023 00:49:46 +0200 Subject: [PATCH 343/806] Added Highway versions up to 1.0.7 (#40691) --- var/spack/repos/builtin/packages/highway/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/highway/package.py b/var/spack/repos/builtin/packages/highway/package.py index a708d3f3157df9..75f5398ab29717 100644 --- a/var/spack/repos/builtin/packages/highway/package.py +++ b/var/spack/repos/builtin/packages/highway/package.py @@ -12,7 +12,13 @@ class Highway(CMakePackage): homepage = "https://github.com/google/highway" url = "https://github.com/google/highway/archive/refs/tags/1.0.0.tar.gz" + version("1.0.7", sha256="5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5") + version("1.0.6", sha256="d89664a045a41d822146e787bceeefbf648cc228ce354f347b18f2b419e57207") + version("1.0.5", sha256="99b7dad98b8fa088673b720151458fae698ae5df9154016e39de4afdc23bb927") version("1.0.4", sha256="faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2") + version("1.0.3", sha256="566fc77315878473d9a6bd815f7de78c73734acdcb745c3dde8579560ac5440e") + version("1.0.2", sha256="e8ef71236ac0d97f12d553ec1ffc5b6375d57b5f0b860c7447dd69b6ed1072db") + version("1.0.1", sha256="7ca6af7dc2e3e054de9e17b9dfd88609a7fd202812b1c216f43cc41647c97311") version("1.0.0", sha256="ab4f5f864932268356f9f6aa86f612fa4430a7db3c8de0391076750197e876b8") depends_on("cmake@3.10:", type="build") From d9edc92119446f0fadec634b5c2f437fb1f83482 Mon Sep 17 00:00:00 2001 From: Dominic Hofer <6570912+dominichofer@users.noreply.github.com> Date: Thu, 26 Oct 2023 01:22:22 +0200 Subject: [PATCH 344/806] cuda: add NVHPC_CUDA_HOME. (#40507) * [cuda] Add NVHPC_CUDA_HOME. * Add CUDA_HOME and NVHC_CUDA_HOME to cuda's dependent build env. --------- Co-authored-by: Dominic Hofer --- var/spack/repos/builtin/packages/cuda/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 77bf03da37a368..e624acbaa9db8d 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -582,6 +582,8 @@ def setup_build_environment(self, env): def setup_dependent_build_environment(self, env, dependent_spec): env.set("CUDAHOSTCXX", dependent_spec.package.compiler.cxx) + env.set("CUDA_HOME", self.prefix) + env.set("NVHPC_CUDA_HOME", self.prefix) @property def cmake_prefix_paths(self): @@ -593,6 +595,7 @@ def cmake_prefix_paths(self): def setup_run_environment(self, env): env.set("CUDA_HOME", self.prefix) + env.set("NVHPC_CUDA_HOME", self.prefix) def install(self, spec, prefix): if os.path.exists("/tmp/cuda-installer.log"): From 3e47f3f05c633cbab34ceb33c9b4e90b9d49570c Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Wed, 25 Oct 2023 19:24:31 -0400 Subject: [PATCH 345/806] initial commit to fix mivisionx build for 5.6 (#40579) --- var/spack/repos/builtin/packages/mivisionx/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mivisionx/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py index bd1a40a8726aeb..b298160520f53f 100644 --- a/var/spack/repos/builtin/packages/mivisionx/package.py +++ b/var/spack/repos/builtin/packages/mivisionx/package.py @@ -182,7 +182,7 @@ def patch(self): depends_on("cmake@3.5:", type="build") depends_on("ffmpeg@:4", type="build", when="@:5.3") - depends_on("ffmpeg@4.4:", type="build", when="@5.4:") + depends_on("ffmpeg@4.4", type="build", when="@5.4:") depends_on("protobuf@:3", type="build") depends_on( "opencv@:3.4" From 3c590ad071938fd8e524ff7a9039101fe90fa385 Mon Sep 17 00:00:00 2001 From: Victoria Cherkas <87643948+victoria-cherkas@users.noreply.github.com> Date: Thu, 26 Oct 2023 01:24:54 +0200 Subject: [PATCH 346/806] fdb: add releases v5.11.23 and v5.11.17 (#40571) --- var/spack/repos/builtin/packages/fdb/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/fdb/package.py b/var/spack/repos/builtin/packages/fdb/package.py index c6a2d6aa66b298..7dc2f75e76b031 100644 --- a/var/spack/repos/builtin/packages/fdb/package.py +++ b/var/spack/repos/builtin/packages/fdb/package.py @@ -18,6 +18,8 @@ class Fdb(CMakePackage): # master version of fdb is subject to frequent changes and is to be used experimentally. version("master", branch="master") + version("5.11.23", sha256="09b1d93f2b71d70c7b69472dfbd45a7da0257211f5505b5fcaf55bfc28ca6c65") + version("5.11.17", sha256="375c6893c7c60f6fdd666d2abaccb2558667bd450100817c0e1072708ad5591e") version("5.10.8", sha256="6a0db8f98e13c035098dd6ea2d7559f883664cbf9cba8143749539122ac46099") version("5.7.8", sha256="6adac23c0d1de54aafb3c663d077b85d0f804724596623b381ff15ea4a835f60") @@ -39,6 +41,7 @@ class Fdb(CMakePackage): depends_on("cmake@3.12:", type="build") depends_on("ecbuild@3.4:", type="build") + depends_on("ecbuild@3.7:", type="build", when="@5.11.6:") depends_on("eckit@1.16:") depends_on("eckit+admin", when="+tools") From 8e19576ec5ab26dc435938c20686387e850323ba Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 25 Oct 2023 23:26:49 +0000 Subject: [PATCH 347/806] Paraview 5.12 prep (#40527) * paraview: rebase the adios2 patch for 5.12-to-be * paraview: disable fastfloat and token for 5.12-to-be * paraview: require older protobuf for 5.12 as well * paraview: require C++11-supporting protobuf for `master` too --- .../builtin/packages/paraview/package.py | 14 +- .../vtk-adios2-module-no-kit-5.12.patch | 230 ++++++++++++++++++ 2 files changed, 241 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/paraview/vtk-adios2-module-no-kit-5.12.patch diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 5760a9d68da7de..5ca64f29c08610 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -226,8 +226,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): depends_on("protobuf@3.4:3.18", when="@:5.10%xl") depends_on("protobuf@3.4:3.18", when="@:5.10%xl_r") # protobuf requires newer abseil-cpp, which in turn requires C++14, - # but paraview uses C++11 by default - depends_on("protobuf@3.4:3.21", when="@:5.11") + # but paraview uses C++11 by default. Use for 5.11+ until ParaView updates + # its C++ standard level. + depends_on("protobuf@3.4:3.21", when="@5.11:") + depends_on("protobuf@3.4:3.21", when="@master") depends_on("libxml2") depends_on("lz4") depends_on("xz") @@ -280,7 +282,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): # Fix IOADIOS2 module to work with kits # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8653 - patch("vtk-adios2-module-no-kit.patch", when="@5.8:") + patch("vtk-adios2-module-no-kit.patch", when="@5.8:5.11") + # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8653 + patch("vtk-adios2-module-no-kit-5.12.patch", when="@5.12:") # Patch for paraview 5.9.0%xl_r # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7591 @@ -426,6 +430,10 @@ def nvariant_bool(feature): self.define_from_variant("VISIT_BUILD_READER_Silo", "visitbridge"), ] + if spec.satisfies("@5.12:"): + cmake_args.append("-DVTK_MODULE_USE_EXTERNAL_VTK_fast_float:BOOL=OFF") + cmake_args.append("-DVTK_MODULE_USE_EXTERNAL_VTK_token:BOOL=OFF") + if spec.satisfies("@5.11:"): cmake_args.append("-DVTK_MODULE_USE_EXTERNAL_VTK_verdict:BOOL=OFF") diff --git a/var/spack/repos/builtin/packages/paraview/vtk-adios2-module-no-kit-5.12.patch b/var/spack/repos/builtin/packages/paraview/vtk-adios2-module-no-kit-5.12.patch new file mode 100644 index 00000000000000..34a98eac474716 --- /dev/null +++ b/var/spack/repos/builtin/packages/paraview/vtk-adios2-module-no-kit-5.12.patch @@ -0,0 +1,230 @@ +diff --git a/VTK/IO/ADIOS2/CMakeLists.txt b/VTK/IO/ADIOS2/CMakeLists.txt +index 86c6d49cc4f..07b1d4fe0ef 100644 +--- a/VTK/IO/ADIOS2/CMakeLists.txt ++++ b/VTK/IO/ADIOS2/CMakeLists.txt +@@ -1,9 +1,9 @@ + vtk_module_find_package(PRIVATE_IF_SHARED + PACKAGE ADIOS2 + VERSION 2.4) +-if (VTK_USE_MPI AND NOT ADIOS2_HAVE_MPI) ++if (TARGET VTK::ParallelMPI AND NOT ADIOS2_HAVE_MPI) + message(FATAL_ERROR "VTK built with MPI requires ADIOS2 built with MPI") +-elseif(NOT VTK_USE_MPI AND ADIOS2_HAVE_MPI) ++elseif(NOT TARGET VTK::ParallelMPI AND ADIOS2_HAVE_MPI) + message(FATAL_ERROR "VTK built without MPI requires ADIOS2 built without MPI") + endif() + +@@ -18,38 +18,30 @@ set(classes_core vtkADIOS2CoreImageReader) + set(private_classes_core Core/vtkADIOS2CoreArraySelection) + set(private_headers_core Core/vtkADIOS2CoreTypeTraits.h) + set(private_templates_core) +-set(vtk_io_adios2_core_enabled TRUE CACHE INTERNAL "" FORCE) + +-if (vtk_io_adios2_core_enabled) +- list(APPEND classes ${classes_core}) +- list(APPEND private_classes ${private_classes_core}) +- list(APPEND private_headers ${private_headers_core}) +- list(APPEND private_templates ${private_templates_core}) +-endif() ++list(APPEND classes ${classes_core}) ++list(APPEND private_classes ${private_classes_core}) ++list(APPEND private_headers ${private_headers_core}) ++list(APPEND private_templates ${private_templates_core}) ++ ++# Build VTX Schema for Parallel ++if (TARGET VTK::ParallelMPI) ++ set(classes_vtx vtkADIOS2VTXReader) ++ set(private_classes_vtx ++ VTX/VTXSchemaManager ++ VTX/common/VTXDataArray ++ VTX/common/VTXHelper ++ VTX/schema/VTXSchema ++ VTX/schema/vtk/VTXvtkBase ++ VTX/schema/vtk/VTXvtkVTI ++ VTX/schema/vtk/VTXvtkVTU) ++ set(private_headers_vtx VTX/common/VTXTypes.h) ++ set(private_templates_vtx ++ VTX/common/VTXHelper.txx ++ VTX/schema/VTXSchema.txx ++ VTX/schema/vtk/VTXvtkVTI.txx ++ VTX/schema/vtk/VTXvtkVTU.txx) + +-set(classes_vtx vtkADIOS2VTXReader) +-set(private_classes_vtx +- VTX/VTXSchemaManager +- VTX/common/VTXDataArray +- VTX/common/VTXHelper +- VTX/schema/VTXSchema +- VTX/schema/vtk/VTXvtkBase +- VTX/schema/vtk/VTXvtkVTI +- VTX/schema/vtk/VTXvtkVTU) +-set(private_headers_vtx VTX/common/VTXTypes.h) +-set(private_templates_vtx +- VTX/common/VTXHelper.txx +- VTX/schema/VTXSchema.txx +- VTX/schema/vtk/VTXvtkVTI.txx +- VTX/schema/vtk/VTXvtkVTU.txx) +- +-if (VTK_USE_MPI) +- set(vtk_io_adios2_vtx_enabled TRUE CACHE INTERNAL "" FORCE) +-else () +- set(vtk_io_adios2_vtx_enabled FALSE CACHE INTERNAL "" FORCE) +-endif() +- +-if (vtk_io_adios2_vtx_enabled) + list(APPEND classes ${classes_vtx}) + list(APPEND private_classes ${private_classes_vtx}) + list(APPEND private_headers ${private_headers_vtx}) +@@ -63,10 +55,6 @@ vtk_module_add_module(VTK::IOADIOS2 + PRIVATE_TEMPLATES ${private_templates}) + vtk_module_link(VTK::IOADIOS2 PRIVATE adios2::adios2) + +-if (ADIOS2_HAVE_MPI) +- vtk_module_definitions(VTK::IOADIOS2 PRIVATE IOADIOS2_HAVE_MPI) +-endif () +- + if (ADIOS2_VERSION VERSION_GREATER_EQUAL "2.8.0") + vtk_module_definitions(VTK::IOADIOS2 PRIVATE IOADIOS2_BP5_RANDOM_ACCESS) + endif () +diff --git a/VTK/IO/ADIOS2/Testing/Cxx/CMakeLists.txt b/VTK/IO/ADIOS2/Testing/Cxx/CMakeLists.txt +index 1534a1e7271..29c51970daf 100644 +--- a/VTK/IO/ADIOS2/Testing/Cxx/CMakeLists.txt ++++ b/VTK/IO/ADIOS2/Testing/Cxx/CMakeLists.txt +@@ -2,40 +2,34 @@ find_package(ADIOS2 2.4 REQUIRED + COMPONENTS CXX + OPTIONAL_COMPONENTS MPI) + +-if (ADIOS2_HAVE_MPI) +- if (vtk_io_adios2_core_enabled) +- set(TestADIOS2BPReaderSingleTimeStep_NUMPROCS 2) ++if (TARGET VTK::ParallelMPI) ++ set(TestADIOS2BPReaderSingleTimeStep_NUMPROCS 2) + # For now vtkMultiBlockVolumeMapper does not support rendering in parallel +- set(TestADIOS2BPReaderMultiTimeSteps_NUMPROCS 2) +- set(TestADIOS2BPReaderMultiTimeSteps2D_NUMPROCS 2) +- vtk_add_test_mpi(vtkIOADIOS2CxxTests-MPI mpiTests TESTING_DATA +- TestADIOS2BPReaderMPISingleTimeStep.cxx +- TestADIOS2BPReaderMPIMultiTimeSteps3D.cxx,NO_VALID +- TestADIOS2BPReaderMPIMultiTimeSteps2D.cxx) +- vtk_test_cxx_executable(vtkIOADIOS2CxxTests-MPI mpiTests) +- endif() ++ set(TestADIOS2BPReaderMultiTimeSteps_NUMPROCS 2) ++ set(TestADIOS2BPReaderMultiTimeSteps2D_NUMPROCS 2) ++ vtk_add_test_mpi(vtkIOADIOS2CxxTests-MPI mpiTests TESTING_DATA ++ TestADIOS2BPReaderMPISingleTimeStep.cxx ++ TestADIOS2BPReaderMPIMultiTimeSteps3D.cxx,NO_VALID ++ TestADIOS2BPReaderMPIMultiTimeSteps2D.cxx) ++ vtk_test_cxx_executable(vtkIOADIOS2CxxTests-MPI mpiTests) + + # VTX tests +- if (vtk_io_adios2_vtx_enabled) +- vtk_add_test_cxx(vtkIOADIOS2VTXCxxTests tests TESTING_DATA NO_OUTPUT +- UnitTestIOADIOS2VTX.cxx,NO_VALID +- #TestIOADIOS2VTX_VTI3D.cxx, +- TestIOADIOS2VTX_VTI3DRendering.cxx,NO_VALID +- #TestIOADIOS2VTX_VTU3D.cxx,NO_VALID +- TestIOADIOS2VTX_VTU3DRendering.cxx,NO_VALID +- TestIOADIOS2VTX_VTU2DRendering.cxx,NO_VALID +- TestIOADIOS2VTX_VTU1DRendering.cxx,NO_VALID) ++ vtk_add_test_cxx(vtkIOADIOS2VTXCxxTests tests TESTING_DATA NO_OUTPUT ++ UnitTestIOADIOS2VTX.cxx,NO_VALID ++ #TestIOADIOS2VTX_VTI3D.cxx, ++ TestIOADIOS2VTX_VTI3DRendering.cxx,NO_VALID ++ #TestIOADIOS2VTX_VTU3D.cxx,NO_VALID ++ TestIOADIOS2VTX_VTU3DRendering.cxx,NO_VALID ++ TestIOADIOS2VTX_VTU2DRendering.cxx,NO_VALID ++ TestIOADIOS2VTX_VTU1DRendering.cxx,NO_VALID) + +- vtk_test_cxx_executable(vtkIOADIOS2VTXCxxTests tests) +- target_link_libraries(vtkIOADIOS2VTXCxxTests PUBLIC adios2::adios2) +- endif () ++ vtk_test_cxx_executable(vtkIOADIOS2VTXCxxTests tests) ++ target_link_libraries(vtkIOADIOS2VTXCxxTests PUBLIC adios2::adios2) + else () +- if (vtk_io_adios2_core_enabled) +- vtk_add_test_cxx(vtkIOADIOS2CxxTests tests TESTING_DATA +- TestADIOS2BPReaderSingleTimeStep.cxx +- TestADIOS2BPReaderMultiTimeSteps3D.cxx +- TestADIOS2BPReaderMultiTimeSteps2D.cxx) ++ vtk_add_test_cxx(vtkIOADIOS2CxxTests tests TESTING_DATA ++ TestADIOS2BPReaderSingleTimeStep.cxx ++ TestADIOS2BPReaderMultiTimeSteps3D.cxx ++ TestADIOS2BPReaderMultiTimeSteps2D.cxx) + +- vtk_test_cxx_executable(vtkIOADIOS2CxxTests tests) +- endif () ++ vtk_test_cxx_executable(vtkIOADIOS2CxxTests tests) + endif () +diff --git a/VTK/IO/ADIOS2/vtk.module b/VTK/IO/ADIOS2/vtk.module +index 5069bd828b0..fe37260eb6d 100644 +--- a/VTK/IO/ADIOS2/vtk.module ++++ b/VTK/IO/ADIOS2/vtk.module +@@ -2,8 +2,6 @@ NAME + VTK::IOADIOS2 + LIBRARY_NAME + vtkIOADIOS2 +-KIT +- VTK::IO + SPDX_LICENSE_IDENTIFIER + LicenseRef-BSD-3-Clause-Sandia-USGov + SPDX_COPYRIGHT_TEXT +diff --git a/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx b/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx +index 6ba4d25230d..c209fd905d5 100644 +--- a/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx ++++ b/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx +@@ -28,7 +28,7 @@ + #include "vtkLongLongArray.h" + #include "vtkMultiBlockDataSet.h" + #include "vtkMultiPieceDataSet.h" +-#include "vtkMultiProcessController.h" ++#include "vtkMultiProcessController.h" // For the MPI controller member + #include "vtkNew.h" + #include "vtkObjectFactory.h" + #include "vtkPointData.h" +@@ -46,7 +46,7 @@ + #include "vtkUnstructuredGrid.h" + #include "vtksys/SystemTools.hxx" + +-#ifdef IOADIOS2_HAVE_MPI ++#if VTK_MODULE_ENABLE_VTK_ParallelMPI + #include "vtkMPI.h" + #include "vtkMPIController.h" + #endif +@@ -126,7 +126,7 @@ vtkNew vtkADIOS2CoreImageReader::vtkADIOS2CoreImageReaderI + int myLen = static_cast(ibds->GetNumberOfBlocks()); + int* allLens{ nullptr }; + int procId{ 0 }, numProcess{ 0 }; +-#ifdef IOADIOS2_HAVE_MPI ++#if VTK_MODULE_ENABLE_VTK_ParallelMPI + auto ctrl = vtkMultiProcessController::GetGlobalController(); + if (ctrl) + { +@@ -286,7 +286,7 @@ const vtkADIOS2CoreImageReader::StringToParams& vtkADIOS2CoreImageReader::GetAva + //------------------------------------------------------------------------------ + void vtkADIOS2CoreImageReader::SetController(vtkMultiProcessController* controller) + { +-#ifdef IOADIOS2_HAVE_MPI ++#if VTK_MODULE_ENABLE_VTK_ParallelMPI + vtkMPIController* mpiController = vtkMPIController::SafeDownCast(controller); + if (controller && !mpiController) + { +@@ -337,7 +337,7 @@ bool vtkADIOS2CoreImageReader::OpenAndReadMetaData() + // Initialize the ADIOS2 data structures + if (!this->Impl->Adios) + { +-#ifdef IOADIOS2_HAVE_MPI ++#if VTK_MODULE_ENABLE_VTK_ParallelMPI + // Make sure the ADIOS subsystem is initialized before processing any + // sort of request. + if (!this->Controller) +@@ -910,7 +910,7 @@ void vtkADIOS2CoreImageReader::CalculateWorkDistribution(const std::string& varN + auto var = this->Impl->AdiosIO.InquireVariable(varName); + size_t blockNum = this->Impl->BpReader.BlocksInfo(var, this->Impl->RequestStep).size(); + +-#ifdef IOADIOS2_HAVE_MPI ++#if VTK_MODULE_ENABLE_VTK_ParallelMPI + size_t rank = static_cast(this->Controller->GetLocalProcessId()); + size_t procs = static_cast(this->Controller->GetNumberOfProcesses()); + #else +-- +GitLab From b4cf3d9f18ea79e378de57a527898968b0fd6baa Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 26 Oct 2023 11:26:47 +0200 Subject: [PATCH 348/806] git versions: fix commit shas [automated] (#40703) --- .../builtin/packages/cpp-logger/package.py | 2 +- .../repos/builtin/packages/dakota/package.py | 7 +++- .../repos/builtin/packages/damaris/package.py | 36 ++++++++++++------- .../repos/builtin/packages/exago/package.py | 4 ++- .../repos/builtin/packages/hpx/package.py | 2 +- .../repos/builtin/packages/ipm/package.py | 2 +- .../repos/builtin/packages/neovim/package.py | 2 +- .../repos/builtin/packages/upp/package.py | 21 +++++++++-- 8 files changed, 54 insertions(+), 22 deletions(-) diff --git a/var/spack/repos/builtin/packages/cpp-logger/package.py b/var/spack/repos/builtin/packages/cpp-logger/package.py index 93c27cf9842ccf..f325fa09dfc2ba 100644 --- a/var/spack/repos/builtin/packages/cpp-logger/package.py +++ b/var/spack/repos/builtin/packages/cpp-logger/package.py @@ -15,4 +15,4 @@ class CppLogger(CMakePackage): version("develop", branch="develop") version("master", branch="master") - version("0.0.1", tag="v0.0.1", commit="47994ccd8958129a422950a432742b902bb283ca") + version("0.0.1", tag="v0.0.1", commit="d48b38ab14477bb7c53f8189b8b4be2ea214c28a") diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py index a91764e9e43edd..e0374ad927880e 100644 --- a/var/spack/repos/builtin/packages/dakota/package.py +++ b/var/spack/repos/builtin/packages/dakota/package.py @@ -40,7 +40,12 @@ class Dakota(CMakePackage): git = "https://github.com/snl-dakota/dakota.git" url = "https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.12-release-public.src.tar.gz" - version("6.18", tag="v6.18.0", submodules=submodules) + version( + "6.18", + tag="v6.18.0", + commit="f6cb33b517bb304795e1e14d3673fe289df2ec9b", + submodules=submodules, + ) version("6.12", sha256="4d69f9cbb0c7319384ab9df27643ff6767eb410823930b8fbd56cc9de0885bc9") version("6.9", sha256="989b689278964b96496e3058b8ef5c2724d74bcd232f898fe450c51eba7fe0c2") version("6.3", sha256="0fbc310105860d77bb5c96de0e8813d75441fca1a5e6dfaf732aa095c4488d52") diff --git a/var/spack/repos/builtin/packages/damaris/package.py b/var/spack/repos/builtin/packages/damaris/package.py index a93bbece1318c3..3f8b6f156bead8 100644 --- a/var/spack/repos/builtin/packages/damaris/package.py +++ b/var/spack/repos/builtin/packages/damaris/package.py @@ -16,19 +16,29 @@ class Damaris(CMakePackage): maintainers("jcbowden") version("master", branch="master") - version("1.9.2", tag="v1.9.2") - version("1.9.1", tag="v1.9.1") - version("1.9.0", tag="v1.9.0") - version("1.8.2", tag="v1.8.2") - version("1.8.1", tag="v1.8.1") - version("1.8.0", tag="v1.8.0") - version("1.7.1", tag="v1.7.1") - version("1.7.0", tag="v1.7.0") - version("1.6.0", tag="v1.6.0", deprecated=True) - version("1.5.0", tag="v1.5.0", deprecated=True) - version("1.3.3", tag="v1.3.3", deprecated=True) - version("1.3.2", tag="v1.3.2", deprecated=True) - version("1.3.1", tag="v1.3.1", deprecated=True) + version("1.9.2", tag="v1.9.2", commit="22c146b4b4ca047d4d36fd904d248e0280b3c0ea") + version("1.9.1", tag="v1.9.1", commit="2fe83f587837b7ad0b5c187b8ff453f7d3ad2c18") + version("1.9.0", tag="v1.9.0", commit="23cac3a8ade9f9c20499081a8ed10b3e51801428") + version("1.8.2", tag="v1.8.2", commit="bd447e677cdf81389f93bea3139af0fa54554a01") + version("1.8.1", tag="v1.8.1", commit="18513edb1e11974a4296263ff8499d2802e17891") + version("1.8.0", tag="v1.8.0", commit="56701eee59d464cc73d248fbd5e7a8a70e7a3933") + version("1.7.1", tag="v1.7.1", commit="09dfbe7828ee295b4433c9e01c6523fa6b4adab5") + version("1.7.0", tag="v1.7.0", commit="9ab3ea4c568de16f5d43b8b5ad71feb4864a5584") + version( + "1.6.0", tag="v1.6.0", commit="1fe4c61cce03babd24315b8e6156f226baac97a2", deprecated=True + ) + version( + "1.5.0", tag="v1.5.0", commit="68206a696ad430aa8426ca370501aa71914fbc87", deprecated=True + ) + version( + "1.3.3", tag="v1.3.3", commit="f1c473507c080738f7092f6a7d72deb938ade786", deprecated=True + ) + version( + "1.3.2", tag="v1.3.2", commit="38b50664523e56900809a19f0cf52fc0ab5dca53", deprecated=True + ) + version( + "1.3.1", tag="v1.3.1", commit="6cee3690fa7d387acc8f5f650a7b019e13b90284", deprecated=True + ) variant("fortran", default=True, description="Enables Fortran support") variant("hdf5", default=False, description="Enables the HDF5 storage plugin") diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index b38aff0147b9a0..c7868779166a36 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -17,7 +17,9 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pnnl/ExaGO.git" maintainers("ryandanehy", "cameronrutherford", "pelesh") - version("1.5.1", tag="v1.5.1", submodules=True) + version( + "1.5.1", tag="v1.5.1", commit="84e9faf9d9dad8d851075eba26038338d90e6d3a", submodules=True + ) version("1.5.0", commit="227f49573a28bdd234be5500b3733be78a958f15", submodules=True) version("1.4.1", commit="ea607c685444b5f345bfdc9a59c345f0f30adde2", submodules=True) version("1.4.0", commit="4f4c3fdb40b52ace2d6ba000e7f24b340ec8e886", submodules=True) diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py index b55c9ea6143b6a..5c0d390e590441 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -21,7 +21,7 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage): tags = ["e4s"] version("master", branch="master") - version("stable", tag="stable", commit="38d5bf935e5a49f9466c5e615e04e8d553a73dc6") + version("stable", tag="stable", commit="103a7b8e3719a0db948d1abde29de0ff91e070be") version("1.9.1", sha256="1adae9d408388a723277290ddb33c699aa9ea72defadf3f12d4acc913a0ff22d") version("1.9.0", sha256="2a8dca78172fbb15eae5a5e9facf26ab021c845f9c09e61b1912e6cf9e72915a") version("1.8.1", sha256="2fc4c10f55e2e6bcdc6f6ff950e26c6d8e218e138fdbd885ee71ccf5c5549054") diff --git a/var/spack/repos/builtin/packages/ipm/package.py b/var/spack/repos/builtin/packages/ipm/package.py index 0c4b94c8c47b4f..654707a96abdf2 100644 --- a/var/spack/repos/builtin/packages/ipm/package.py +++ b/var/spack/repos/builtin/packages/ipm/package.py @@ -19,7 +19,7 @@ class Ipm(AutotoolsPackage): maintainers("Christoph-TU") version("master", branch="master", preferred=True) - version("2.0.6", tag="2.0.6") + version("2.0.6", tag="2.0.6", commit="b008141ee16d39b33e20bffde615564afa107575") variant("papi", default=False, description="Enable PAPI") variant("cuda", default=False, description="Enable CUDA") diff --git a/var/spack/repos/builtin/packages/neovim/package.py b/var/spack/repos/builtin/packages/neovim/package.py index 737cc57de7e39b..36069fa76b9428 100644 --- a/var/spack/repos/builtin/packages/neovim/package.py +++ b/var/spack/repos/builtin/packages/neovim/package.py @@ -16,7 +16,7 @@ class Neovim(CMakePackage): maintainers("albestro", "trws") version("master", branch="master") - version("stable", tag="stable", commit="7d4bba7aa7a4a3444919ea7a3804094c290395ef") + version("stable", tag="stable", commit="d772f697a281ce9c58bf933997b87c7f27428a60") version("0.9.4", sha256="148356027ee8d586adebb6513a94d76accc79da9597109ace5c445b09d383093") version("0.9.2", sha256="06b8518bad4237a28a67a4fbc16ec32581f35f216b27f4c98347acee7f5fb369") version("0.9.1", sha256="8db17c2a1f4776dcda00e59489ea0d98ba82f7d1a8ea03281d640e58d8a3a00e") diff --git a/var/spack/repos/builtin/packages/upp/package.py b/var/spack/repos/builtin/packages/upp/package.py index 3cef205afdb6ef..8bdb1187921da4 100644 --- a/var/spack/repos/builtin/packages/upp/package.py +++ b/var/spack/repos/builtin/packages/upp/package.py @@ -20,10 +20,25 @@ class Upp(CMakePackage): maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA") version("develop", branch="develop") - version("11.0.0", tag="upp_v11.0.0", submodules=True) + version( + "11.0.0", + tag="upp_v11.0.0", + commit="6b5c589c7650132c6f13a729a2853676a7b93bbb", + submodules=True, + ) version("10.0.10", sha256="0c96a88d0e79b554d5fcee9401efcf4d6273da01d15e3413845274f73d70b66e") - version("10.0.9", tag="upp_v10.0.9", submodules=True) - version("10.0.8", tag="upp_v10.0.8", submodules=True) + version( + "10.0.9", + tag="upp_v10.0.9", + commit="a49af0549958def4744cb3903c7315476fe44530", + submodules=True, + ) + version( + "10.0.8", + tag="upp_v10.0.8", + commit="ce989911a7a09a2e2a0e61b3acc87588b5b9fc26", + submodules=True, + ) version("8.2.0", sha256="38de2178dc79420f42aa3fb8b85796fc49d43d66f90e5276e47ab50c282627ac") variant("openmp", default=True, description="Use OpenMP threading") From bf88ed45da1554bd55436780846623ba1afeb3a6 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:33:27 +0200 Subject: [PATCH 349/806] libluv: require CMake 3 and CMP0042 (#40716) --- var/spack/repos/builtin/packages/libluv/package.py | 7 +++++++ var/spack/repos/builtin/packages/neovim/package.py | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/libluv/package.py b/var/spack/repos/builtin/packages/libluv/package.py index b3600f63ce6f54..ff9a9db5e62d09 100644 --- a/var/spack/repos/builtin/packages/libluv/package.py +++ b/var/spack/repos/builtin/packages/libluv/package.py @@ -22,11 +22,18 @@ class Libluv(CMakePackage): version("1.42.0-0", sha256="b5228a9d0eaacd9f862b6270c732d5c90773a28ce53b6d9e32a14050e7947f36") version("1.36.0-0", sha256="f2e7eb372574f25c6978c1dc74280d22efdcd7df2dda4a286c7fe7dceda26445") + # https://github.com/neovim/neovim/issues/25770 + # up to 1.45 (included) dynamic library on macOS did not have the @rpath prefix, being not + # usable on this platform. + # from 1.46, by requiring a newer cmake version, CMP0042 is in place and it works correctly. + depends_on("cmake@3:", type="build") + depends_on("lua-lang", type="link") depends_on("libuv", type="link") def cmake_args(self): args = [ + self.define("CMAKE_POLICY_DEFAULT_CMP0042", "NEW"), "-DLUA_BUILD_TYPE=System", "-DBUILD_STATIC_LIBS=ON", "-DBUILD_SHARED_LIBS=ON", diff --git a/var/spack/repos/builtin/packages/neovim/package.py b/var/spack/repos/builtin/packages/neovim/package.py index 36069fa76b9428..ff59c4f539f0f2 100644 --- a/var/spack/repos/builtin/packages/neovim/package.py +++ b/var/spack/repos/builtin/packages/neovim/package.py @@ -140,9 +140,6 @@ class Neovim(CMakePackage): # https://github.com/neovim/neovim/issues/16217#issuecomment-958590493 conflicts("libvterm@0.2:", when="@:0.7") - # https://github.com/neovim/neovim/issues/25770 - conflicts("libluv@1.44:", when="platform=darwin") - @when("^lua") def cmake_args(self): return [self.define("PREFER_LUA", True)] From 86520abb68e64769d8feb87e4e4b151d5a2263ea Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Thu, 26 Oct 2023 13:49:13 +0200 Subject: [PATCH 350/806] modules: hide implicit modulefiles (#36619) Renames exclude_implicits to hide_implicits When hide_implicits option is enabled, generate modulefile of implicitly installed software and hide them. Even if implicit, those modulefiles may be referred as dependency in other modulefiles thus they should be generated to make module properly load dependent module. A new hidden property is added to BaseConfiguration class. To hide modulefiles, modulercs are generated along modulefiles. Such rc files contain specific module command to indicate a module should be hidden (for instance when using "module avail"). A modulerc property is added to TclFileLayout and LmodFileLayout classes to get fully qualified path name of the modulerc associated to a given modulefile. Modulerc files will be located in each module directory, next to the version modulefiles. This scheme is supported by both module tool implementations. modulerc_header and hide_cmd_format attributes are added to TclModulefileWriter and LmodModulefileWriter. They help to know how to generate a modulerc file with hidden commands for each module tool. Tcl modulerc file requires an header. As we use a command introduced on Modules 4.7 (module-hide --hidden-loaded), a version requirement is added to header string. For lmod, modules that open up a hierarchy are never hidden, even if they are implicitly installed. Modulerc is created, updated or removed when associated modulefile is written or removed. If an implicit modulefile becomes explicit, hidden command in modulerc for this modulefile is removed. If modulerc becomes empty, this file is removed. Modulerc file is not rewritten when no content change is detected. Co-authored-by: Harmen Stoppels --- lib/spack/spack/modules/common.py | 118 ++++++++++++++++-- lib/spack/spack/modules/lmod.py | 18 +++ lib/spack/spack/modules/tcl.py | 10 ++ lib/spack/spack/schema/modules.py | 52 +++++++- .../data/modules/lmod/hide_implicits.yaml | 11 ++ .../data/modules/tcl/exclude_implicits.yaml | 2 + .../test/data/modules/tcl/hide_implicits.yaml | 6 + lib/spack/spack/test/modules/common.py | 22 +++- lib/spack/spack/test/modules/lmod.py | 85 +++++++++++++ lib/spack/spack/test/modules/tcl.py | 103 +++++++++++++-- 10 files changed, 407 insertions(+), 20 deletions(-) create mode 100644 lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml create mode 100644 lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 57b7da5ad52ab8..98dcdb4fb1e3e5 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -491,10 +491,6 @@ def excluded(self): exclude_rules = conf.get("exclude", []) exclude_matches = [x for x in exclude_rules if spec.satisfies(x)] - # Should I exclude the module because it's implicit? - exclude_implicits = conf.get("exclude_implicits", None) - excluded_as_implicit = exclude_implicits and not self.explicit - def debug_info(line_header, match_list): if match_list: msg = "\t{0} : {1}".format(line_header, spec.cshort_spec) @@ -505,16 +501,28 @@ def debug_info(line_header, match_list): debug_info("INCLUDE", include_matches) debug_info("EXCLUDE", exclude_matches) - if excluded_as_implicit: - msg = "\tEXCLUDED_AS_IMPLICIT : {0}".format(spec.cshort_spec) - tty.debug(msg) - - is_excluded = exclude_matches or excluded_as_implicit - if not include_matches and is_excluded: + if not include_matches and exclude_matches: return True return False + @property + def hidden(self): + """Returns True if the module has been hidden, False otherwise.""" + + # A few variables for convenience of writing the method + spec = self.spec + conf = self.module.configuration(self.name) + + hidden_as_implicit = not self.explicit and conf.get( + "hide_implicits", conf.get("exclude_implicits", False) + ) + + if hidden_as_implicit: + tty.debug(f"\tHIDDEN_AS_IMPLICIT : {spec.cshort_spec}") + + return hidden_as_implicit + @property def context(self): return self.conf.get("context", {}) @@ -849,6 +857,26 @@ def __init__(self, spec, module_set_name, explicit=None): name = type(self).__name__ raise DefaultTemplateNotDefined(msg.format(name)) + # Check if format for module hide command has been defined, + # throw if not found + try: + self.hide_cmd_format + except AttributeError: + msg = "'{0}' object has no attribute 'hide_cmd_format'\n" + msg += "Did you forget to define it in the class?" + name = type(self).__name__ + raise HideCmdFormatNotDefined(msg.format(name)) + + # Check if modulerc header content has been defined, + # throw if not found + try: + self.modulerc_header + except AttributeError: + msg = "'{0}' object has no attribute 'modulerc_header'\n" + msg += "Did you forget to define it in the class?" + name = type(self).__name__ + raise ModulercHeaderNotDefined(msg.format(name)) + def _get_template(self): """Gets the template that will be rendered for this spec.""" # Get templates and put them in the order of importance: @@ -943,6 +971,9 @@ def write(self, overwrite=False): # Symlink defaults if needed self.update_module_defaults() + # record module hiddenness if implicit + self.update_module_hiddenness() + def update_module_defaults(self): if any(self.spec.satisfies(default) for default in self.conf.defaults): # This spec matches a default, it needs to be symlinked to default @@ -953,6 +984,60 @@ def update_module_defaults(self): os.symlink(self.layout.filename, default_tmp) os.rename(default_tmp, default_path) + def update_module_hiddenness(self, remove=False): + """Update modulerc file corresponding to module to add or remove + command that hides module depending on its hidden state. + + Args: + remove (bool): if True, hiddenness information for module is + removed from modulerc. + """ + modulerc_path = self.layout.modulerc + hide_module_cmd = self.hide_cmd_format % self.layout.use_name + hidden = self.conf.hidden and not remove + modulerc_exists = os.path.exists(modulerc_path) + updated = False + + if modulerc_exists: + # retrieve modulerc content + with open(modulerc_path, "r") as f: + content = f.readlines() + content = "".join(content).split("\n") + # remove last empty item if any + if len(content[-1]) == 0: + del content[-1] + already_hidden = hide_module_cmd in content + + # remove hide command if module not hidden + if already_hidden and not hidden: + content.remove(hide_module_cmd) + updated = True + + # add hide command if module is hidden + elif not already_hidden and hidden: + if len(content) == 0: + content = self.modulerc_header.copy() + content.append(hide_module_cmd) + updated = True + else: + content = self.modulerc_header.copy() + if hidden: + content.append(hide_module_cmd) + updated = True + + # no modulerc file change if no content update + if updated: + is_empty = content == self.modulerc_header or len(content) == 0 + # remove existing modulerc if empty + if modulerc_exists and is_empty: + os.remove(modulerc_path) + # create or update modulerc + elif content != self.modulerc_header: + # ensure file ends with a newline character + content.append("") + with open(modulerc_path, "w") as f: + f.write("\n".join(content)) + def remove(self): """Deletes the module file.""" mod_file = self.layout.filename @@ -960,6 +1045,7 @@ def remove(self): try: os.remove(mod_file) # Remove the module file self.remove_module_defaults() # Remove default targeting module file + self.update_module_hiddenness(remove=True) # Remove hide cmd in modulerc os.removedirs( os.path.dirname(mod_file) ) # Remove all the empty directories from the leaf up @@ -1003,5 +1089,17 @@ class DefaultTemplateNotDefined(AttributeError, ModulesError): """ +class HideCmdFormatNotDefined(AttributeError, ModulesError): + """Raised if the attribute 'hide_cmd_format' has not been specified + in the derived classes. + """ + + +class ModulercHeaderNotDefined(AttributeError, ModulesError): + """Raised if the attribute 'modulerc_header' has not been specified + in the derived classes. + """ + + class ModulesTemplateNotFoundError(ModulesError, RuntimeError): """Raised if the template for a module file was not found.""" diff --git a/lib/spack/spack/modules/lmod.py b/lib/spack/spack/modules/lmod.py index d81e07e0bf9449..e2bcfa2973ecea 100644 --- a/lib/spack/spack/modules/lmod.py +++ b/lib/spack/spack/modules/lmod.py @@ -232,6 +232,13 @@ def missing(self): """Returns the list of tokens that are not available.""" return [x for x in self.hierarchy_tokens if x not in self.available] + @property + def hidden(self): + # Never hide a module that opens a hierarchy + if any(self.spec.package.provides(x) for x in self.hierarchy_tokens): + return False + return super().hidden + class LmodFileLayout(BaseFileLayout): """File layout for lmod module files.""" @@ -274,6 +281,13 @@ def filename(self): ) return fullname + @property + def modulerc(self): + """Returns the modulerc file associated with current module file""" + return os.path.join( + os.path.dirname(self.filename), ".".join([".modulerc", self.extension]) + ) + def token_to_path(self, name, value): """Transforms a hierarchy token into the corresponding path part. @@ -470,6 +484,10 @@ class LmodModulefileWriter(BaseModuleFileWriter): default_template = posixpath.join("modules", "modulefile.lua") + modulerc_header: list = [] + + hide_cmd_format = 'hide_version("%s")' + class CoreCompilersNotFoundError(spack.error.SpackError, KeyError): """Error raised if the key 'core_compilers' has not been specified diff --git a/lib/spack/spack/modules/tcl.py b/lib/spack/spack/modules/tcl.py index 58b075379294b5..ed12827c33ef3a 100644 --- a/lib/spack/spack/modules/tcl.py +++ b/lib/spack/spack/modules/tcl.py @@ -6,6 +6,7 @@ """This module implements the classes necessary to generate Tcl non-hierarchical modules. """ +import os.path import posixpath from typing import Any, Dict @@ -56,6 +57,11 @@ class TclConfiguration(BaseConfiguration): class TclFileLayout(BaseFileLayout): """File layout for tcl module files.""" + @property + def modulerc(self): + """Returns the modulerc file associated with current module file""" + return os.path.join(os.path.dirname(self.filename), ".modulerc") + class TclContext(BaseContext): """Context class for tcl module files.""" @@ -73,3 +79,7 @@ class TclModulefileWriter(BaseModuleFileWriter): # os.path.join due to spack.spec.Spec.format # requiring forward slash path seperators at this stage default_template = posixpath.join("modules", "modulefile.tcl") + + modulerc_header = ["#%Module4.7"] + + hide_cmd_format = "module-hide --soft --hidden-loaded %s" diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py index 1d285f851bb85f..adf1a935861010 100644 --- a/lib/spack/spack/schema/modules.py +++ b/lib/spack/spack/schema/modules.py @@ -17,7 +17,7 @@ #: THIS NEEDS TO BE UPDATED FOR EVERY NEW KEYWORD THAT #: IS ADDED IMMEDIATELY BELOW THE MODULE TYPE ATTRIBUTE spec_regex = ( - r"(?!hierarchy|core_specs|verbose|hash_length|defaults|filter_hierarchy_specs|" + r"(?!hierarchy|core_specs|verbose|hash_length|defaults|filter_hierarchy_specs|hide|" r"whitelist|blacklist|" # DEPRECATED: remove in 0.20. r"include|exclude|" # use these more inclusive/consistent options r"projections|naming_scheme|core_compilers|all)(^\w[\w-]*)" @@ -89,6 +89,7 @@ "exclude": array_of_strings, "exclude_implicits": {"type": "boolean", "default": False}, "defaults": array_of_strings, + "hide_implicits": {"type": "boolean", "default": False}, "naming_scheme": {"type": "string"}, # Can we be more specific here? "projections": projections_scheme, "all": module_file_configuration, @@ -187,3 +188,52 @@ "additionalProperties": False, "properties": properties, } + + +# deprecated keys and their replacements +old_to_new_key = {"exclude_implicits": "hide_implicits"} + + +def update_keys(data, key_translations): + """Change blacklist/whitelist to exclude/include. + + Arguments: + data (dict): data from a valid modules configuration. + key_translations (dict): A dictionary of keys to translate to + their respective values. + + Return: + (bool) whether anything was changed in data + """ + changed = False + + if isinstance(data, dict): + keys = list(data.keys()) + for key in keys: + value = data[key] + + translation = key_translations.get(key) + if translation: + data[translation] = data.pop(key) + changed = True + + changed |= update_keys(value, key_translations) + + elif isinstance(data, list): + for elt in data: + changed |= update_keys(elt, key_translations) + + return changed + + +def update(data): + """Update the data in place to remove deprecated properties. + + Args: + data (dict): dictionary to be updated + + Returns: + True if data was changed, False otherwise + """ + # translate blacklist/whitelist to exclude/include + return update_keys(data, old_to_new_key) diff --git a/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml b/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml new file mode 100644 index 00000000000000..d13c1a7b975ff1 --- /dev/null +++ b/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml @@ -0,0 +1,11 @@ +enable: + - lmod +lmod: + hide_implicits: true + core_compilers: + - 'clang@3.3' + hierarchy: + - mpi + + all: + autoload: direct diff --git a/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml b/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml index 2d892c43513a51..5af22e6e40c272 100644 --- a/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml +++ b/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml @@ -1,3 +1,5 @@ +# DEPRECATED: remove this in ? +# See `hide_implicits.yaml` for the new syntax enable: - tcl tcl: diff --git a/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml b/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml new file mode 100644 index 00000000000000..3ae7517b8f8b2b --- /dev/null +++ b/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml @@ -0,0 +1,6 @@ +enable: + - tcl +tcl: + hide_implicits: true + all: + autoload: direct diff --git a/lib/spack/spack/test/modules/common.py b/lib/spack/spack/test/modules/common.py index 0c8a98432ff378..15656dff259671 100644 --- a/lib/spack/spack/test/modules/common.py +++ b/lib/spack/spack/test/modules/common.py @@ -14,6 +14,7 @@ import spack.package_base import spack.schema.modules import spack.spec +import spack.util.spack_yaml as syaml from spack.modules.common import UpstreamModuleIndex from spack.spec import Spec @@ -190,11 +191,30 @@ def find_nothing(*args): spack.package_base.PackageBase.uninstall_by_spec(spec) +@pytest.mark.parametrize( + "module_type, old_config,new_config", + [("tcl", "exclude_implicits.yaml", "hide_implicits.yaml")], +) +def test_exclude_include_update(module_type, old_config, new_config): + module_test_data_root = os.path.join(spack.paths.test_path, "data", "modules", module_type) + with open(os.path.join(module_test_data_root, old_config)) as f: + old_yaml = syaml.load(f) + with open(os.path.join(module_test_data_root, new_config)) as f: + new_yaml = syaml.load(f) + + # ensure file that needs updating is translated to the right thing. + assert spack.schema.modules.update_keys(old_yaml, spack.schema.modules.old_to_new_key) + assert new_yaml == old_yaml + # ensure a file that doesn't need updates doesn't get updated + original_new_yaml = new_yaml.copy() + assert not spack.schema.modules.update_keys(new_yaml, spack.schema.modules.old_to_new_key) + assert original_new_yaml == new_yaml + + @pytest.mark.regression("37649") def test_check_module_set_name(mutable_config): """Tests that modules set name are validated correctly and an error is reported if the name we require does not exist or is reserved by the configuration.""" - # Minimal modules.yaml config. spack.config.set( "modules", diff --git a/lib/spack/spack/test/modules/lmod.py b/lib/spack/spack/test/modules/lmod.py index fcea6b0e794eaf..510006f0a98dda 100644 --- a/lib/spack/spack/test/modules/lmod.py +++ b/lib/spack/spack/test/modules/lmod.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import pytest @@ -433,3 +434,87 @@ def test_modules_no_arch(self, factory, module_configuration): path = module.layout.filename assert str(spec.os) not in path + + def test_hide_implicits(self, module_configuration): + """Tests the addition and removal of hide command in modulerc.""" + module_configuration("hide_implicits") + + spec = spack.spec.Spec("mpileaks@2.3").concretized() + + # mpileaks is defined as implicit, thus hide command should appear in modulerc + writer = writer_cls(spec, "default", False) + writer.write() + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = f.readlines() + content = "".join(content).split("\n") + hide_cmd = 'hide_version("%s")' % writer.layout.use_name + assert len([x for x in content if hide_cmd == x]) == 1 + + # mpileaks becomes explicit, thus modulerc is removed + writer = writer_cls(spec, "default", True) + writer.write(overwrite=True) + assert not os.path.exists(writer.layout.modulerc) + + # mpileaks is defined as explicit, no modulerc file should exist + writer = writer_cls(spec, "default", True) + writer.write() + assert not os.path.exists(writer.layout.modulerc) + + # explicit module is removed + writer.remove() + assert not os.path.exists(writer.layout.modulerc) + assert not os.path.exists(writer.layout.filename) + + # implicit module is removed + writer = writer_cls(spec, "default", False) + writer.write(overwrite=True) + assert os.path.exists(writer.layout.filename) + assert os.path.exists(writer.layout.modulerc) + writer.remove() + assert not os.path.exists(writer.layout.modulerc) + assert not os.path.exists(writer.layout.filename) + + # three versions of mpileaks are implicit + writer = writer_cls(spec, "default", False) + writer.write(overwrite=True) + spec_alt1 = spack.spec.Spec("mpileaks@2.2").concretized() + spec_alt2 = spack.spec.Spec("mpileaks@2.1").concretized() + writer_alt1 = writer_cls(spec_alt1, "default", False) + writer_alt1.write(overwrite=True) + writer_alt2 = writer_cls(spec_alt2, "default", False) + writer_alt2.write(overwrite=True) + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = f.readlines() + content = "".join(content).split("\n") + hide_cmd = 'hide_version("%s")' % writer.layout.use_name + hide_cmd_alt1 = 'hide_version("%s")' % writer_alt1.layout.use_name + hide_cmd_alt2 = 'hide_version("%s")' % writer_alt2.layout.use_name + assert len([x for x in content if hide_cmd == x]) == 1 + assert len([x for x in content if hide_cmd_alt1 == x]) == 1 + assert len([x for x in content if hide_cmd_alt2 == x]) == 1 + + # one version is removed, a second becomes explicit + writer_alt1.remove() + writer_alt2 = writer_cls(spec_alt2, "default", True) + writer_alt2.write(overwrite=True) + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = f.readlines() + content = "".join(content).split("\n") + assert len([x for x in content if hide_cmd == x]) == 1 + assert len([x for x in content if hide_cmd_alt1 == x]) == 0 + assert len([x for x in content if hide_cmd_alt2 == x]) == 0 + + # disable hide_implicits configuration option + module_configuration("autoload_direct") + writer = writer_cls(spec, "default") + writer.write(overwrite=True) + assert not os.path.exists(writer.layout.modulerc) + + # reenable hide_implicits configuration option + module_configuration("hide_implicits") + writer = writer_cls(spec, "default") + writer.write(overwrite=True) + assert os.path.exists(writer.layout.modulerc) diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py index 3c5bb01b81035a..cc12a1eedc8bb8 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import pytest @@ -438,38 +439,40 @@ def test_extend_context(self, modulefile_content, module_configuration): @pytest.mark.regression("4400") @pytest.mark.db - def test_exclude_implicits(self, module_configuration, database): - module_configuration("exclude_implicits") + @pytest.mark.parametrize("config_name", ["hide_implicits", "exclude_implicits"]) + def test_hide_implicits_no_arg(self, module_configuration, database, config_name): + module_configuration(config_name) # mpileaks has been installed explicitly when setting up # the tests database mpileaks_specs = database.query("mpileaks") for item in mpileaks_specs: writer = writer_cls(item, "default") - assert not writer.conf.excluded + assert not writer.conf.hidden # callpath is a dependency of mpileaks, and has been pulled # in implicitly callpath_specs = database.query("callpath") for item in callpath_specs: writer = writer_cls(item, "default") - assert writer.conf.excluded + assert writer.conf.hidden @pytest.mark.regression("12105") - def test_exclude_implicits_with_arg(self, module_configuration): - module_configuration("exclude_implicits") + @pytest.mark.parametrize("config_name", ["hide_implicits", "exclude_implicits"]) + def test_hide_implicits_with_arg(self, module_configuration, config_name): + module_configuration(config_name) # mpileaks is defined as explicit with explicit argument set on writer mpileaks_spec = spack.spec.Spec("mpileaks") mpileaks_spec.concretize() writer = writer_cls(mpileaks_spec, "default", True) - assert not writer.conf.excluded + assert not writer.conf.hidden # callpath is defined as implicit with explicit argument set on writer callpath_spec = spack.spec.Spec("callpath") callpath_spec.concretize() writer = writer_cls(callpath_spec, "default", False) - assert writer.conf.excluded + assert writer.conf.hidden @pytest.mark.regression("9624") @pytest.mark.db @@ -498,3 +501,87 @@ def test_modules_no_arch(self, factory, module_configuration): path = module.layout.filename assert str(spec.os) not in path + + def test_hide_implicits(self, module_configuration): + """Tests the addition and removal of hide command in modulerc.""" + module_configuration("hide_implicits") + + spec = spack.spec.Spec("mpileaks@2.3").concretized() + + # mpileaks is defined as implicit, thus hide command should appear in modulerc + writer = writer_cls(spec, "default", False) + writer.write() + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = f.readlines() + content = "".join(content).split("\n") + hide_cmd = "module-hide --soft --hidden-loaded %s" % writer.layout.use_name + assert len([x for x in content if hide_cmd == x]) == 1 + + # mpileaks becomes explicit, thus modulerc is removed + writer = writer_cls(spec, "default", True) + writer.write(overwrite=True) + assert not os.path.exists(writer.layout.modulerc) + + # mpileaks is defined as explicit, no modulerc file should exist + writer = writer_cls(spec, "default", True) + writer.write() + assert not os.path.exists(writer.layout.modulerc) + + # explicit module is removed + writer.remove() + assert not os.path.exists(writer.layout.modulerc) + assert not os.path.exists(writer.layout.filename) + + # implicit module is removed + writer = writer_cls(spec, "default", False) + writer.write(overwrite=True) + assert os.path.exists(writer.layout.filename) + assert os.path.exists(writer.layout.modulerc) + writer.remove() + assert not os.path.exists(writer.layout.modulerc) + assert not os.path.exists(writer.layout.filename) + + # three versions of mpileaks are implicit + writer = writer_cls(spec, "default", False) + writer.write(overwrite=True) + spec_alt1 = spack.spec.Spec("mpileaks@2.2").concretized() + spec_alt2 = spack.spec.Spec("mpileaks@2.1").concretized() + writer_alt1 = writer_cls(spec_alt1, "default", False) + writer_alt1.write(overwrite=True) + writer_alt2 = writer_cls(spec_alt2, "default", False) + writer_alt2.write(overwrite=True) + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = f.readlines() + content = "".join(content).split("\n") + hide_cmd = "module-hide --soft --hidden-loaded %s" % writer.layout.use_name + hide_cmd_alt1 = "module-hide --soft --hidden-loaded %s" % writer_alt1.layout.use_name + hide_cmd_alt2 = "module-hide --soft --hidden-loaded %s" % writer_alt2.layout.use_name + assert len([x for x in content if hide_cmd == x]) == 1 + assert len([x for x in content if hide_cmd_alt1 == x]) == 1 + assert len([x for x in content if hide_cmd_alt2 == x]) == 1 + + # one version is removed, a second becomes explicit + writer_alt1.remove() + writer_alt2 = writer_cls(spec_alt2, "default", True) + writer_alt2.write(overwrite=True) + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = f.readlines() + content = "".join(content).split("\n") + assert len([x for x in content if hide_cmd == x]) == 1 + assert len([x for x in content if hide_cmd_alt1 == x]) == 0 + assert len([x for x in content if hide_cmd_alt2 == x]) == 0 + + # disable hide_implicits configuration option + module_configuration("autoload_direct") + writer = writer_cls(spec, "default") + writer.write(overwrite=True) + assert not os.path.exists(writer.layout.modulerc) + + # reenable hide_implicits configuration option + module_configuration("hide_implicits") + writer = writer_cls(spec, "default") + writer.write(overwrite=True) + assert os.path.exists(writer.layout.modulerc) From 1c8073c21f2dc469b70f3169b8a9cda770c3ff93 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 26 Oct 2023 14:48:35 +0200 Subject: [PATCH 351/806] spack checksum: show long flags in usage output (#40407) --- lib/spack/spack/cmd/checksum.py | 8 ++++---- share/spack/spack-completion.bash | 2 +- share/spack/spack-completion.fish | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index efa4a268c16b5b..91a04ca1c9dd03 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -37,30 +37,30 @@ def setup_parser(subparser): help="don't clean up staging area when command completes", ) subparser.add_argument( - "-b", "--batch", + "-b", action="store_true", default=False, help="don't ask which versions to checksum", ) subparser.add_argument( - "-l", "--latest", + "-l", action="store_true", default=False, help="checksum the latest available version", ) subparser.add_argument( - "-p", "--preferred", + "-p", action="store_true", default=False, help="checksum the known Spack preferred version", ) modes_parser = subparser.add_mutually_exclusive_group() modes_parser.add_argument( - "-a", "--add-to-package", + "-a", action="store_true", default=False, help="add new versions to package", diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 0280524536cfbc..890948892a1a7d 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -681,7 +681,7 @@ _spack_change() { _spack_checksum() { if $list_options then - SPACK_COMPREPLY="-h --help --keep-stage -b --batch -l --latest -p --preferred -a --add-to-package --verify -j --jobs" + SPACK_COMPREPLY="-h --help --keep-stage --batch -b --latest -l --preferred -p --add-to-package -a --verify -j --jobs" else _all_packages fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index e37b3448d5fcfc..a09cdfa83716ea 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -906,14 +906,14 @@ complete -c spack -n '__fish_spack_using_command checksum' -s h -l help -f -a he complete -c spack -n '__fish_spack_using_command checksum' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -f -a keep_stage complete -c spack -n '__fish_spack_using_command checksum' -l keep-stage -d 'don\'t clean up staging area when command completes' -complete -c spack -n '__fish_spack_using_command checksum' -s b -l batch -f -a batch -complete -c spack -n '__fish_spack_using_command checksum' -s b -l batch -d 'don\'t ask which versions to checksum' -complete -c spack -n '__fish_spack_using_command checksum' -s l -l latest -f -a latest -complete -c spack -n '__fish_spack_using_command checksum' -s l -l latest -d 'checksum the latest available version' -complete -c spack -n '__fish_spack_using_command checksum' -s p -l preferred -f -a preferred -complete -c spack -n '__fish_spack_using_command checksum' -s p -l preferred -d 'checksum the known Spack preferred version' -complete -c spack -n '__fish_spack_using_command checksum' -s a -l add-to-package -f -a add_to_package -complete -c spack -n '__fish_spack_using_command checksum' -s a -l add-to-package -d 'add new versions to package' +complete -c spack -n '__fish_spack_using_command checksum' -l batch -s b -f -a batch +complete -c spack -n '__fish_spack_using_command checksum' -l batch -s b -d 'don\'t ask which versions to checksum' +complete -c spack -n '__fish_spack_using_command checksum' -l latest -s l -f -a latest +complete -c spack -n '__fish_spack_using_command checksum' -l latest -s l -d 'checksum the latest available version' +complete -c spack -n '__fish_spack_using_command checksum' -l preferred -s p -f -a preferred +complete -c spack -n '__fish_spack_using_command checksum' -l preferred -s p -d 'checksum the known Spack preferred version' +complete -c spack -n '__fish_spack_using_command checksum' -l add-to-package -s a -f -a add_to_package +complete -c spack -n '__fish_spack_using_command checksum' -l add-to-package -s a -d 'add new versions to package' complete -c spack -n '__fish_spack_using_command checksum' -l verify -f -a verify complete -c spack -n '__fish_spack_using_command checksum' -l verify -d 'verify known package checksums' complete -c spack -n '__fish_spack_using_command checksum' -s j -l jobs -r -f -a jobs From f57c2501a38134f1b1ec70384b3efc6fd1124468 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 26 Oct 2023 08:18:02 -0500 Subject: [PATCH 352/806] PythonPackage: nested config_settings (#40693) * PythonPackage: nested config_settings * flake8 --- lib/spack/spack/build_systems/python.py | 43 +++++++++++++++---------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index fa27f8de495b67..c370178d7032b6 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -24,14 +24,30 @@ import spack.spec import spack.store from spack.directives import build_system, depends_on, extends, maintainers -from spack.error import NoHeadersError, NoLibrariesError, SpecError +from spack.error import NoHeadersError, NoLibrariesError from spack.install_test import test_part from spack.util.executable import Executable -from spack.version import Version from ._checks import BaseBuilder, execute_install_time_tests +def _flatten_dict(dictionary): + """Iterable that yields KEY=VALUE paths through a dictionary. + Args: + dictionary: Possibly nested dictionary of arbitrary keys and values. + Yields: + A single path through the dictionary. + """ + for key, item in dictionary.items(): + if isinstance(item, dict): + # Recursive case + for value in _flatten_dict(item): + yield f"{key}={value}" + else: + # Base case + yield f"{key}={item}" + + class PythonExtension(spack.package_base.PackageBase): maintainers("adamjstewart") @@ -454,14 +470,15 @@ def build_directory(self): def config_settings(self, spec, prefix): """Configuration settings to be passed to the PEP 517 build backend. - Requires pip 22.1 or newer. + Requires pip 22.1 or newer for keys that appear only a single time, + or pip 23.1 or newer if the same key appears multiple times. Args: spec (spack.spec.Spec): build spec prefix (spack.util.prefix.Prefix): installation prefix Returns: - dict: dictionary of KEY, VALUE settings + dict: Possibly nested dictionary of KEY, VALUE settings """ return {} @@ -525,22 +542,14 @@ def install(self, pkg, spec, prefix): pip.add_default_arg("-m") pip.add_default_arg("pip") - args = PythonPipBuilder.std_args(pkg) + ["--prefix=" + prefix] - - for key, value in self.config_settings(spec, prefix).items(): - if spec["py-pip"].version < Version("22.1"): - raise SpecError( - "'{}' package uses 'config_settings' which is only supported by " - "pip 22.1+. Add the following line to the package to fix this:\n\n" - ' depends_on("py-pip@22.1:", type="build")'.format(spec.name) - ) - - args.append("--config-settings={}={}".format(key, value)) + args = PythonPipBuilder.std_args(pkg) + [f"--prefix={prefix}"] + for setting in _flatten_dict(self.config_settings(spec, prefix)): + args.append(f"--config-settings={setting}") for option in self.install_options(spec, prefix): - args.append("--install-option=" + option) + args.append(f"--install-option={option}") for option in self.global_options(spec, prefix): - args.append("--global-option=" + option) + args.append(f"--global-option={option}") if pkg.stage.archive_file and pkg.stage.archive_file.endswith(".whl"): args.append(pkg.stage.archive_file) From 751b64cbcdb86ce94a05503e853f788b94aaeb11 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Thu, 26 Oct 2023 15:55:49 +0200 Subject: [PATCH 353/806] modules: no --delim option if separator is colon character (#39010) Update Tcl modulefile template to simplify generated `append-path`, `prepend-path` and `remove-path` commands and improve their readability. If path element delimiter is colon character, do not set the `--delim` option as it is the default delimiter value. --- lib/spack/spack/test/modules/tcl.py | 34 ++++++-------------- share/spack/templates/modules/modulefile.tcl | 14 +++++++- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py index cc12a1eedc8bb8..4a8d9e10a2fdae 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -133,9 +133,9 @@ def test_prepend_path_separator(self, modulefile_content, module_configuration): module_configuration("module_path_separator") content = modulefile_content("module-path-separator") - assert len([x for x in content if "append-path --delim {:} COLON {foo}" in x]) == 1 - assert len([x for x in content if "prepend-path --delim {:} COLON {foo}" in x]) == 1 - assert len([x for x in content if "remove-path --delim {:} COLON {foo}" in x]) == 1 + assert len([x for x in content if "append-path COLON {foo}" in x]) == 1 + assert len([x for x in content if "prepend-path COLON {foo}" in x]) == 1 + assert len([x for x in content if "remove-path COLON {foo}" in x]) == 1 assert len([x for x in content if "append-path --delim {;} SEMICOLON {bar}" in x]) == 1 assert len([x for x in content if "prepend-path --delim {;} SEMICOLON {bar}" in x]) == 1 assert len([x for x in content if "remove-path --delim {;} SEMICOLON {bar}" in x]) == 1 @@ -150,37 +150,23 @@ def test_manpath_setup(self, modulefile_content, module_configuration): # no manpath set by module content = modulefile_content("mpileaks") - assert len([x for x in content if "append-path --delim {:} MANPATH {}" in x]) == 0 + assert len([x for x in content if "append-path MANPATH {}" in x]) == 0 # manpath set by module with prepend-path content = modulefile_content("module-manpath-prepend") - assert ( - len([x for x in content if "prepend-path --delim {:} MANPATH {/path/to/man}" in x]) - == 1 - ) - assert ( - len( - [ - x - for x in content - if "prepend-path --delim {:} MANPATH {/path/to/share/man}" in x - ] - ) - == 1 - ) - assert len([x for x in content if "append-path --delim {:} MANPATH {}" in x]) == 1 + assert len([x for x in content if "prepend-path MANPATH {/path/to/man}" in x]) == 1 + assert len([x for x in content if "prepend-path MANPATH {/path/to/share/man}" in x]) == 1 + assert len([x for x in content if "append-path MANPATH {}" in x]) == 1 # manpath set by module with append-path content = modulefile_content("module-manpath-append") - assert ( - len([x for x in content if "append-path --delim {:} MANPATH {/path/to/man}" in x]) == 1 - ) - assert len([x for x in content if "append-path --delim {:} MANPATH {}" in x]) == 1 + assert len([x for x in content if "append-path MANPATH {/path/to/man}" in x]) == 1 + assert len([x for x in content if "append-path MANPATH {}" in x]) == 1 # manpath set by module with setenv content = modulefile_content("module-manpath-setenv") assert len([x for x in content if "setenv MANPATH {/path/to/man}" in x]) == 1 - assert len([x for x in content if "append-path --delim {:} MANPATH {}" in x]) == 0 + assert len([x for x in content if "append-path MANPATH {}" in x]) == 0 @pytest.mark.regression("29578") def test_setenv_raw_value(self, modulefile_content, module_configuration): diff --git a/share/spack/templates/modules/modulefile.tcl b/share/spack/templates/modules/modulefile.tcl index 746fea2f31def9..d1593b88280e65 100644 --- a/share/spack/templates/modules/modulefile.tcl +++ b/share/spack/templates/modules/modulefile.tcl @@ -54,11 +54,23 @@ conflict {{ name }} {% block environment %} {% for command_name, cmd in environment_modifications %} {% if command_name == 'PrependPath' %} +{% if cmd.separator == ':' %} +prepend-path {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} +{% else %} prepend-path --delim {{ '{' }}{{ cmd.separator }}{{ '}' }} {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} +{% endif %} {% elif command_name in ('AppendPath', 'AppendFlagsEnv') %} +{% if cmd.separator == ':' %} +append-path {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} +{% else %} append-path --delim {{ '{' }}{{ cmd.separator }}{{ '}' }} {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} +{% endif %} {% elif command_name in ('RemovePath', 'RemoveFlagsEnv') %} +{% if cmd.separator == ':' %} +remove-path {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} +{% else %} remove-path --delim {{ '{' }}{{ cmd.separator }}{{ '}' }} {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} +{% endif %} {% elif command_name == 'SetEnv' %} setenv {{ cmd.name }} {{ '{' }}{{ cmd.value }}{{ '}' }} {% elif command_name == 'UnsetEnv' %} @@ -68,7 +80,7 @@ unsetenv {{ cmd.name }} {% endfor %} {# Make sure system man pages are enabled by appending trailing delimiter to MANPATH #} {% if has_manpath_modifications %} -append-path --delim {{ '{' }}:{{ '}' }} MANPATH {{ '{' }}{{ '}' }} +append-path MANPATH {{ '{' }}{{ '}' }} {% endif %} {% endblock %} From 53d501119263cfb04f741106cadeb2507e431599 Mon Sep 17 00:00:00 2001 From: Auriane R <48684432+aurianer@users.noreply.github.com> Date: Thu, 26 Oct 2023 16:08:21 +0200 Subject: [PATCH 354/806] Add conflict between cxxstd > 17 and cuda < 12 in pika (#40717) * Add conflict with C++ standard > 17 and cuda < 12 * Removing map_cxxstd since boost supports C++20 flag --- var/spack/repos/builtin/packages/pika/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index 50ff40f4112d90..0fd20bb0a3656a 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -42,7 +42,6 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): generator("ninja") - map_cxxstd = lambda cxxstd: "2a" if cxxstd == "20" else cxxstd cxxstds = ("17", "20", "23") variant( "cxxstd", @@ -91,6 +90,9 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): conflicts("%clang@:8", when="@0.2:") conflicts("+stdexec", when="cxxstd=17") conflicts("cxxstd=23", when="^cmake@:3.20.2") + # CUDA version <= 11 does not support C++20 and newer + for cxxstd in filter(lambda x: x != "17", cxxstds): + conflicts(f"cxxstd={cxxstd}", when="^cuda@:11") # Other dependencies depends_on("boost@1.71:") @@ -139,7 +141,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): ) for cxxstd in cxxstds: - depends_on("boost cxxstd={0}".format(map_cxxstd(cxxstd)), when="cxxstd={0}".format(cxxstd)) + depends_on("boost cxxstd={0}".format(cxxstd), when="cxxstd={0}".format(cxxstd)) depends_on("fmt cxxstd={0}".format(cxxstd), when="@0.11: cxxstd={0}".format(cxxstd)) # COROUTINES From e96f31c29d3408e6421d277728272c7c037c199b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 26 Oct 2023 18:57:55 +0200 Subject: [PATCH 355/806] spack checksum pkg@1.2, use as version filter (#39694) * spack checksum pkg@1.2, use as version filter Currently pkg@1.2 splits on @ and looks for 1.2 specifically, with this PR pkg@1.2 is a filter so any matching 1.2, 1.2.1, ..., 1.2.10 version is displayed. * fix tests * fix style --- lib/spack/spack/cmd/checksum.py | 22 ++++++++-------------- lib/spack/spack/stage.py | 6 ++++-- lib/spack/spack/test/cmd/checksum.py | 12 +++--------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index 91a04ca1c9dd03..9e5e32b3b76c7a 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -21,7 +21,6 @@ from spack.package_base import PackageBase, deprecated_version, preferred_version from spack.util.editor import editor from spack.util.format import get_version_lines -from spack.util.naming import valid_fully_qualified_module_name from spack.version import Version description = "checksum available versions of a package" @@ -68,27 +67,19 @@ def setup_parser(subparser): modes_parser.add_argument( "--verify", action="store_true", default=False, help="verify known package checksums" ) - arguments.add_common_arguments(subparser, ["package", "jobs"]) + subparser.add_argument("package", help="package or spec. for example cmake or cmake@3.18") subparser.add_argument( "versions", nargs=argparse.REMAINDER, help="versions to generate checksums for" ) + arguments.add_common_arguments(subparser, ["jobs"]) def checksum(parser, args): - # Did the user pass 'package@version' string? - if len(args.versions) == 0 and "@" in args.package: - args.versions = [args.package.split("@")[1]] - args.package = args.package.split("@")[0] - - # Make sure the user provided a package and not a URL - if not valid_fully_qualified_module_name(args.package): - tty.die("`spack checksum` accepts package names, not URLs.") + spec = spack.spec.Spec(args.package) # Get the package we're going to generate checksums for - pkg_cls = spack.repo.PATH.get_pkg_class(args.package) - pkg = pkg_cls(spack.spec.Spec(args.package)) + pkg = spack.repo.PATH.get_pkg_class(spec.name)(spec) - # Build a list of versions to checksum versions = [Version(v) for v in args.versions] # Define placeholder for remote versions. @@ -152,7 +143,10 @@ def checksum(parser, args): tty.die(f"Could not find any remote versions for {pkg.name}") elif len(url_dict) > 1 and not args.batch and sys.stdin.isatty(): filtered_url_dict = spack.stage.interactive_version_filter( - url_dict, pkg.versions, url_changes=url_changed_for_version + url_dict, + pkg.versions, + url_changes=url_changed_for_version, + initial_verion_filter=spec.versions, ) if not filtered_url_dict: exit(0) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 1c7ebdec5c50df..690a45e7c5106e 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -870,6 +870,7 @@ def interactive_version_filter( url_dict: Dict[StandardVersion, str], known_versions: Iterable[StandardVersion] = (), *, + initial_verion_filter: Optional[VersionList] = None, url_changes: Set[StandardVersion] = set(), input: Callable[..., str] = input, ) -> Optional[Dict[StandardVersion, str]]: @@ -883,8 +884,9 @@ def interactive_version_filter( Filtered dictionary of versions to URLs or None if the user wants to quit """ # Find length of longest string in the list for padding - sorted_and_filtered = sorted(url_dict.keys(), reverse=True) - version_filter = VersionList([":"]) + version_filter = initial_verion_filter or VersionList([":"]) + sorted_and_filtered = [v for v in url_dict if v.satisfies(version_filter)] + sorted_and_filtered.sort(reverse=True) max_len = max(len(str(v)) for v in sorted_and_filtered) orig_url_dict = url_dict # only copy when using editor to modify print_header = True diff --git a/lib/spack/spack/test/cmd/checksum.py b/lib/spack/spack/test/cmd/checksum.py index b2fc9d5f6ce11c..0dbaa88053070a 100644 --- a/lib/spack/spack/test/cmd/checksum.py +++ b/lib/spack/spack/test/cmd/checksum.py @@ -8,6 +8,7 @@ import pytest import spack.cmd.checksum +import spack.parser import spack.repo import spack.spec from spack.main import SpackCommand @@ -254,17 +255,10 @@ def test_checksum_deprecated_version(mock_packages, mock_clone_repo, mock_fetch, assert "Added 0 new versions to" not in output -def test_checksum_at(mock_packages): - pkg_cls = spack.repo.PATH.get_pkg_class("zlib") - versions = [str(v) for v in pkg_cls.versions] - output = spack_checksum(f"zlib@{versions[0]}") - assert "Found 1 version" in output - - def test_checksum_url(mock_packages): pkg_cls = spack.repo.PATH.get_pkg_class("zlib") - output = spack_checksum(f"{pkg_cls.url}", fail_on_error=False) - assert "accepts package names" in output + with pytest.raises(spack.parser.SpecSyntaxError): + spack_checksum(f"{pkg_cls.url}") def test_checksum_verification_fails(install_mockery, capsys): From 7ecb9243c166eeb062ec0b4faadb6978b7798ce8 Mon Sep 17 00:00:00 2001 From: Ryan Danehy Date: Thu, 26 Oct 2023 11:18:31 -0700 Subject: [PATCH 356/806] Update spack package for exago@1.6.0 release (#40614) * Update spack package for exago:1.6.0 * update style * Weird spack style env bug fixed * Update spack package for exago:1.6.0 * update style * Weird spack style env bug fixed * changes to allow release 1.6.0 * fix depends, and versioning * rm cmake variable * add s * style fix --------- Co-authored-by: Ryan Danehy Co-authored-by: Ryan Danehy Co-authored-by: ryan.danehy@pnnl.gov --- .../repos/builtin/packages/exago/package.py | 50 +++++++++++++------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index c7868779166a36..ab48bab3776b86 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -17,20 +17,36 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pnnl/ExaGO.git" maintainers("ryandanehy", "cameronrutherford", "pelesh") + version( + "1.6.0", tag="v1.6.0", commit="159cd173572280ac0f6f094a71dcc3ebeeb34076", submodules=True + ) version( "1.5.1", tag="v1.5.1", commit="84e9faf9d9dad8d851075eba26038338d90e6d3a", submodules=True ) - version("1.5.0", commit="227f49573a28bdd234be5500b3733be78a958f15", submodules=True) - version("1.4.1", commit="ea607c685444b5f345bfdc9a59c345f0f30adde2", submodules=True) - version("1.4.0", commit="4f4c3fdb40b52ace2d6ba000e7f24b340ec8e886", submodules=True) - version("1.3.0", commit="58b039d746a6eac8e84b0afc01354cd58caec485", submodules=True) - version("1.2.0", commit="255a214ec747b7bdde7a6d8151c083067b4d0907", submodules=True) - version("1.1.2", commit="db3bb16e19c09e01402071623258dae4d13e5133", submodules=True) - version("1.1.1", commit="0e0a3f27604876749d47c06ec71daaca4b270df9", submodules=True) - version("1.1.0", commit="dc8dd85544ff1b55a64a3cbbbdf12b8a0c6fdaf6", submodules=True) - version("1.0.0", commit="230d7df2f384f68b952a1ea03aad41431eaad283") - version("0.99.2", commit="56961641f50827b3aa4c14524f2f978dc48b9ce5") - version("0.99.1", commit="0ae426c76651ba5a9dbcaeb95f18d1b8ba961690") + version( + "1.5.0", tag="v1.5.0", commit="227f49573a28bdd234be5500b3733be78a958f15", submodules=True + ) + version( + "1.4.1", tag="v1.4.1", commit="ea607c685444b5f345bfdc9a59c345f0f30adde2", submodules=True + ) + version( + "1.4.0", tag="v1.4.0", commit="4f4c3fdb40b52ace2d6ba000e7f24b340ec8e886", submodules=True + ) + version( + "1.3.0", tag="v1.3.0", commit="58b039d746a6eac8e84b0afc01354cd58caec485", submodules=True + ) + version( + "1.1.2", tag="v1.1.2", commit="db3bb16e19c09e01402071623258dae4d13e5133", submodules=True + ) + version( + "1.1.1", tag="v1.1.1", commit="0e0a3f27604876749d47c06ec71daaca4b270df9", submodules=True + ) + version( + "1.1.0", tag="v1.1.0", commit="dc8dd85544ff1b55a64a3cbbbdf12b8a0c6fdaf6", submodules=True + ) + version("1.0.0", tag="v1.0.0", commit="230d7df2f384f68b952a1ea03aad41431eaad283") + version("0.99.2", tag="v0.99.2", commit="56961641f50827b3aa4c14524f2f978dc48b9ce5") + version("0.99.1", tag="v0.99.1", commit="0ae426c76651ba5a9dbcaeb95f18d1b8ba961690") version("main", branch="main", submodules=True) version("develop", branch="develop", submodules=True) version( @@ -49,7 +65,6 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): conflicts( "+python", when="+ipopt+rocm", msg="Python bindings require -fPIC with Ipopt for rocm." ) - variant("logging", default=False, description="Enable/Disable spdlog based logging") # Solver options variant("hiop", default=False, description="Enable/Disable HiOp") @@ -64,7 +79,12 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): "~hiop~ipopt+python @:1.5.0", msg="ExaGO Python wrapper requires at least one solver enabled.", ) - + conflicts( + "+hiop~mpi ^hiop@1.0.0:~mpi", + when="@1.5.1:1.6.1", + msg="#18 - builds with hiop and without MPI cause compile time errors", + ) + conflicts("+python~mpi", msg="#16 - Python wrapper requires MPI enabled") # Dependencies depends_on("python@3.6:3.10", when="@1.3.0:1.5+python") depends_on("py-pytest", type=("build", "run"), when="@1.5.0:+python") @@ -76,7 +96,6 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): depends_on("cuda", when="+cuda") depends_on("raja", when="+raja") depends_on("umpire", when="+raja") - depends_on("cmake@3.18:", type="build") # Profiling @@ -117,7 +136,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): depends_on("hiop@0.3.99:", when="@0.99:+hiop") depends_on("hiop@0.5.1:", when="@1.1.0:+hiop") depends_on("hiop@0.5.3:", when="@1.3.0:+hiop") - depends_on("hiop@0.7.0:", when="@1.5.0:+hiop") + depends_on("hiop@0.7.0:1.0.0", when="@1.5.0:+hiop") depends_on("hiop~mpi", when="+hiop~mpi") depends_on("hiop+mpi", when="+hiop+mpi") @@ -191,7 +210,6 @@ def cmake_args(self): self.define_from_variant("EXAGO_ENABLE_HIOP", "hiop"), self.define_from_variant("EXAGO_ENABLE_IPOPT", "ipopt"), self.define_from_variant("EXAGO_ENABLE_PYTHON", "python"), - self.define_from_variant("EXAGO_ENABLE_LOGGING", "logging"), ] ) From cbf9dd0aee8043f86be22806e04cccb81a9afce8 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 26 Oct 2023 12:08:55 -0700 Subject: [PATCH 357/806] unmaintained a* packages: update to use f-strings (#40467) --- .../abi-compliance-checker/package.py | 2 +- .../builtin/packages/abi-dumper/package.py | 2 +- .../repos/builtin/packages/abinit/package.py | 79 ++++++++----------- .../repos/builtin/packages/abyss/package.py | 8 +- .../repos/builtin/packages/accfft/package.py | 10 +-- .../repos/builtin/packages/ace/package.py | 2 +- .../repos/builtin/packages/ack/package.py | 2 +- .../builtin/packages/acpica-tools/package.py | 2 +- .../builtin/packages/activeharmony/package.py | 2 +- .../repos/builtin/packages/adf/package.py | 2 +- .../repos/builtin/packages/alglib/package.py | 2 +- .../builtin/packages/alsa-lib/package.py | 4 +- .../repos/builtin/packages/amg2013/package.py | 6 +- .../repos/builtin/packages/amg2023/package.py | 2 +- .../repos/builtin/packages/amp/package.py | 4 +- .../builtin/packages/anicalculator/package.py | 2 +- .../repos/builtin/packages/ape/package.py | 6 +- .../builtin/packages/apr-util/package.py | 24 +++--- .../repos/builtin/packages/apr/package.py | 2 +- .../repos/builtin/packages/aragorn/package.py | 2 +- .../repos/builtin/packages/archer/package.py | 8 +- .../repos/builtin/packages/argon2/package.py | 2 +- .../builtin/packages/armadillo/package.py | 12 +-- .../builtin/packages/arpack-ng/package.py | 6 +- .../builtin/packages/asdcplib/package.py | 2 +- .../repos/builtin/packages/aspa/package.py | 4 +- .../repos/builtin/packages/aspcud/package.py | 12 ++- .../builtin/packages/aspera-cli/package.py | 2 +- .../repos/builtin/packages/astral/package.py | 2 +- .../repos/builtin/packages/astyle/package.py | 4 +- .../builtin/packages/at-spi2-atk/package.py | 2 +- .../builtin/packages/at-spi2-core/package.py | 2 +- .../repos/builtin/packages/atk/package.py | 4 +- .../repos/builtin/packages/atlas/package.py | 6 +- .../builtin/packages/atom-dft/package.py | 4 +- .../repos/builtin/packages/atompaw/package.py | 6 +- .../builtin/packages/audacious/package.py | 2 +- .../builtin/packages/augustus/package.py | 32 ++++---- .../repos/builtin/packages/authd/package.py | 2 +- .../builtin/packages/autodock-vina/package.py | 4 +- .../repos/builtin/packages/autogen/package.py | 2 +- .../repos/builtin/packages/avizo/package.py | 16 ++-- 42 files changed, 137 insertions(+), 164 deletions(-) diff --git a/var/spack/repos/builtin/packages/abi-compliance-checker/package.py b/var/spack/repos/builtin/packages/abi-compliance-checker/package.py index 05d57471ba24f2..6f575badd208dc 100644 --- a/var/spack/repos/builtin/packages/abi-compliance-checker/package.py +++ b/var/spack/repos/builtin/packages/abi-compliance-checker/package.py @@ -22,4 +22,4 @@ class AbiComplianceChecker(MakefilePackage): depends_on("universal-ctags") def install(self, spec, prefix): - make("prefix={0}".format(prefix), "install") + make(f"prefix={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/abi-dumper/package.py b/var/spack/repos/builtin/packages/abi-dumper/package.py index f649bf9db20874..584eed3664cdd0 100644 --- a/var/spack/repos/builtin/packages/abi-dumper/package.py +++ b/var/spack/repos/builtin/packages/abi-dumper/package.py @@ -25,4 +25,4 @@ class AbiDumper(Package): depends_on("vtable-dumper@1.1:") def install(self, spec, prefix): - make("prefix={0}".format(prefix), "install") + make(f"prefix={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 445fc60bbe0985..a343bf69d7e3c4 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -101,11 +101,7 @@ class Abinit(AutotoolsPackage): # TODO: The logic here can be reversed with the new concretizer. Instead of # using `conflicts`, `depends_on` could be used instead. for fftw in ["amdfftw", "cray-fftw", "fujitsu-fftw", "fftw"]: - conflicts( - "+openmp", - when="^{0}~openmp".format(fftw), - msg="Need to request {0} +openmp".format(fftw), - ) + conflicts("+openmp", when=f"^{fftw}~openmp", msg=f"Need to request {fftw} +openmp") mkl_message = "Need to set dependent variant to threads=openmp" conflicts("+openmp", when="^intel-mkl threads=none", msg=mkl_message) @@ -137,34 +133,28 @@ def configure_args(self): oapp = options.append if "@:8" in spec: - oapp("--enable-optim={0}".format(self.spec.variants["optimization-flavor"].value)) + oapp(f"--enable-optim={self.spec.variants['optimization-flavor'].value}") else: - oapp("--with-optim-flavor={0}".format(self.spec.variants["optimization-flavor"].value)) + oapp(f"--with-optim-flavor={self.spec.variants['optimization-flavor'].value}") if "+wannier90" in spec: if "@:8" in spec: - oapp( - "--with-wannier90-libs=-L{0}".format( - spec["wannier90"].prefix.lib + " -lwannier -lm" - ) - ) - oapp("--with-wannier90-incs=-I{0}".format(spec["wannier90"].prefix.modules)) - oapp("--with-wannier90-bins={0}".format(spec["wannier90"].prefix.bin)) + oapp(f"--with-wannier90-libs=-L{spec['wannier90'].prefix.lib} -lwannier -lm") + oapp(f"--with-wannier90-incs=-I{spec['wannier90'].prefix.modules}") + oapp(f"--with-wannier90-bins={spec['wannier90'].prefix.bin}") oapp("--enable-connectors") oapp("--with-dft-flavor=atompaw+libxc+wannier90") else: options.extend( [ - "WANNIER90_CPPFLAGS=-I{0}".format(spec["wannier90"].prefix.modules), - "WANNIER90_LIBS=-L{0} {1}".format( - spec["wannier90"].prefix.lib, "-lwannier" - ), + f"WANNIER90_CPPFLAGS=-I{spec['wannier90'].prefix.modules}", + f"WANNIER90_LIBS=-L{spec['wannier90'].prefix.lib} -lwannier", ] ) else: if "@:9.8" in spec: - oapp("--with-fftw={0}".format(spec["fftw-api"].prefix)) - oapp("--with-hdf5={0}".format(spec["hdf5"].prefix)) + oapp(f"--with-fftw={spec['fftw-api'].prefix}") + oapp(f"--with-hdf5={spec['hdf5'].prefix}") if "@:8" in spec: oapp("--with-dft-flavor=atompaw+libxc") @@ -172,9 +162,9 @@ def configure_args(self): "--without-wannier90", if "+mpi" in spec: - oapp("CC={0}".format(spec["mpi"].mpicc)) - oapp("CXX={0}".format(spec["mpi"].mpicxx)) - oapp("FC={0}".format(spec["mpi"].mpifc)) + oapp(f"CC={spec['mpi'].mpicc}") + oapp(f"CXX={spec['mpi'].mpicxx}") + oapp(f"FC={spec['mpi'].mpifc}") # MPI version: # let the configure script auto-detect MPI support from mpi_prefix @@ -208,14 +198,14 @@ def configure_args(self): if "+scalapack" in spec: linalg = spec["scalapack"].libs + linalg if "@:8" in spec: - linalg_flavor = "scalapack+{0}".format(linalg_flavor) + linalg_flavor = f"scalapack+{linalg_flavor}" if "@:8" in spec: - oapp("--with-linalg-libs={0}".format(linalg.ld_flags)) + oapp(f"--with-linalg-libs={linalg.ld_flags}") else: - oapp("LINALG_LIBS={0}".format(linalg.ld_flags)) + oapp(f"LINALG_LIBS={linalg.ld_flags}") - oapp("--with-linalg-flavor={0}".format(linalg_flavor)) + oapp(f"--with-linalg-flavor={linalg_flavor}") if "^mkl" in spec: fftflavor = "dfti" @@ -225,32 +215,32 @@ def configure_args(self): else: fftflavor, fftlibs = "fftw3", "-lfftw3 -lfftw3f" - oapp("--with-fft-flavor={0}".format(fftflavor)) + oapp(f"--with-fft-flavor={fftflavor}") if "@:8" in spec: if "^mkl" in spec: - oapp("--with-fft-incs={0}".format(spec["fftw-api"].headers.cpp_flags)) - oapp("--with-fft-libs={0}".format(spec["fftw-api"].libs.ld_flags)) + oapp(f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}") + oapp(f"--with-fft-libs={spec['fftw-api'].libs.ld_flags}") else: options.extend( [ - "--with-fft-incs={0}".format(spec["fftw-api"].headers.cpp_flags), - "--with-fft-libs=-L{0} {1}".format(spec["fftw-api"].prefix.lib, fftlibs), + f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}", + f"--with-fft-libs=-L{spec['fftw-api'].prefix.lib} {fftlibs}", ] ) else: if "^mkl" in spec: options.extend( [ - "FFT_CPPFLAGS={0}".format(spec["fftw-api"].headers.cpp_flags), - "FFT_LIBs={0}".format(spec["fftw-api"].libs.ld_flags), + f"FFT_CPPFLAGS={spec['fftw-api'].headers.cpp_flags}", + f"FFT_LIBs={spec['fftw-api'].libs.ld_flags}", ] ) else: options.extend( [ - "FFTW3_CPPFLAGS={0}".format(spec["fftw-api"].headers.cpp_flags), - "FFTW3_LIBS=-L{0} {1}".format(spec["fftw-api"].prefix.lib, fftlibs), + f"FFTW3_CPPFLAGS={spec['fftw-api'].headers.cpp_flags}", + f"FFTW3_LIBS=-L{spec['fftw-api'].prefix.lib} {fftlibs}", ] ) @@ -259,12 +249,12 @@ def configure_args(self): if "@:8" in spec: options.extend( [ - "--with-libxc-incs={0}".format(libxc.headers.cpp_flags), - "--with-libxc-libs={0}".format(libxc.libs.ld_flags + " -lm"), + f"--with-libxc-incs={libxc.headers.cpp_flags}", + f"--with-libxc-libs={libxc.libs.ld_flags + ' -lm'}", ] ) else: - oapp("--with-libxc={0}".format(libxc.prefix)) + oapp(f"--with-libxc={libxc.prefix}") # Netcdf4/HDF5 hdf5 = spec["hdf5:hl"] @@ -276,24 +266,21 @@ def configure_args(self): # to link with the high level HDF5 library options.extend( [ - "--with-netcdf-incs={0}".format( + "--with-netcdf-incs={}".format( netcdfc.headers.cpp_flags + " " + netcdff.headers.cpp_flags ), - "--with-netcdf-libs={0}".format( + "--with-netcdf-libs={}".format( netcdff.libs.ld_flags + " " + hdf5.libs.ld_flags ), ] ) else: options.extend( - [ - "--with-netcdf={0}".format(netcdfc.prefix), - "--with-netcdf-fortran={0}".format(netcdff.prefix), - ] + [f"--with-netcdf={netcdfc.prefix}", f"--with-netcdf-fortran={netcdff.prefix}"] ) if self.spec.satisfies("%fj"): - oapp("FCFLAGS_MODDIR=-M{0}".format(join_path(self.stage.source_path, "src/mods"))) + oapp(f"FCFLAGS_MODDIR=-M{join_path(self.stage.source_path, 'src/mods')}") return options diff --git a/var/spack/repos/builtin/packages/abyss/package.py b/var/spack/repos/builtin/packages/abyss/package.py index c345626761d1c3..1cb46a8957eed1 100644 --- a/var/spack/repos/builtin/packages/abyss/package.py +++ b/var/spack/repos/builtin/packages/abyss/package.py @@ -60,12 +60,12 @@ class Abyss(AutotoolsPackage): def configure_args(self): maxk = int(self.spec.variants["maxk"].value) args = [ - "--with-boost=%s" % self.spec["boost"].prefix, - "--with-sqlite=%s" % self.spec["sqlite"].prefix, - "--with-mpi=%s" % self.spec["mpi"].prefix, + f"--with-boost={self.spec['boost'].prefix}", + f"--with-sqlite={self.spec['sqlite'].prefix}", + f"--with-mpi={self.spec['mpi'].prefix}", ] if maxk: - args.append("--enable-maxk=%s" % maxk) + args.append(f"--enable-maxk={maxk}") if self.spec["mpi"].name == "mpich": args.append("--enable-mpich") return args diff --git a/var/spack/repos/builtin/packages/accfft/package.py b/var/spack/repos/builtin/packages/accfft/package.py index aa32f1b0a53e81..eb99aec48492d9 100644 --- a/var/spack/repos/builtin/packages/accfft/package.py +++ b/var/spack/repos/builtin/packages/accfft/package.py @@ -32,15 +32,15 @@ class Accfft(CMakePackage, CudaPackage): def cmake_args(self): spec = self.spec args = [ - "-DFFTW_ROOT={0}".format(spec["fftw"].prefix), - "-DFFTW_USE_STATIC_LIBS=false", - "-DBUILD_GPU={0}".format("true" if "+cuda" in spec else "false"), - "-DBUILD_SHARED={0}".format("true" if "+shared" in spec else "false"), + self.define("FFTW_ROOT", spec["fftw"].prefix), + self.define("FFTW_USE_STATIC_LIBS", "false"), + self.define("BUILD_GPU", str(spec.satisfies("+cuda")).lower()), + self.define("BUILD_SHARED", str(spec.satisfies("+shared")).lower()), ] if "+cuda" in spec: cuda_arch = [x for x in spec.variants["cuda_arch"].value if x] if cuda_arch: - args.append("-DCUDA_NVCC_FLAGS={0}".format(" ".join(self.cuda_flags(cuda_arch)))) + args.append(f"-DCUDA_NVCC_FLAGS={' '.join(self.cuda_flags(cuda_arch))}") return args diff --git a/var/spack/repos/builtin/packages/ace/package.py b/var/spack/repos/builtin/packages/ace/package.py index c152bbdeb60fc8..afd164fc31527c 100644 --- a/var/spack/repos/builtin/packages/ace/package.py +++ b/var/spack/repos/builtin/packages/ace/package.py @@ -43,4 +43,4 @@ def edit(self, spec, prefix): "include $(ACE_ROOT)/include/makeinclude/" "platform_linux" + supported[self.compiler.name] + ".GNU\n" ) - f.write("INSTALL_PREFIX=%s" % prefix) + f.write(f"INSTALL_PREFIX={prefix}") diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py index 684106ff5db260..320f9e818cc60a 100644 --- a/var/spack/repos/builtin/packages/ack/package.py +++ b/var/spack/repos/builtin/packages/ack/package.py @@ -41,7 +41,7 @@ class Ack(Package): def install(self, spec, prefix): mkdirp(prefix.bin) - ack_source = "ack-{0}-single-file".format(self.version) + ack_source = f"ack-{self.version}-single-file" ack_installed = join_path(prefix.bin, "ack") # install source diff --git a/var/spack/repos/builtin/packages/acpica-tools/package.py b/var/spack/repos/builtin/packages/acpica-tools/package.py index 55fee583c7841b..c9d063a5a975f1 100644 --- a/var/spack/repos/builtin/packages/acpica-tools/package.py +++ b/var/spack/repos/builtin/packages/acpica-tools/package.py @@ -19,4 +19,4 @@ class AcpicaTools(MakefilePackage): depends_on("bison", type="build") def install(self, spec, prefix): - make("PREFIX={0}".format(prefix), "install") + make(f"PREFIX={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py index e3f2d92955a6c4..62af3515b9051c 100644 --- a/var/spack/repos/builtin/packages/activeharmony/package.py +++ b/var/spack/repos/builtin/packages/activeharmony/package.py @@ -29,7 +29,7 @@ def setup_build_environment(self, spack_env): @when("@:4.5") def install(self, spec, prefix): - make("install", "PREFIX=%s" % prefix) + make("install", f"PREFIX={prefix}") @when("@4.6.0:") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/adf/package.py b/var/spack/repos/builtin/packages/adf/package.py index 908cd5351faf16..244087f1116027 100644 --- a/var/spack/repos/builtin/packages/adf/package.py +++ b/var/spack/repos/builtin/packages/adf/package.py @@ -19,7 +19,7 @@ class Adf(Package): version("2017.113", sha256="666ef15d253b74c707dd14da35e7cf283ca20e21e24ed43cb953fb9d1f2f1e15") def url_for_version(self, version): - return "file://{0}/adf/adf{1}.pc64_linux.openmpi.bin.tgz".format(os.getcwd(), version) + return f"file://{os.getcwd()}/adf/adf{version}.pc64_linux.openmpi.bin.tgz" # Licensing license_required = True diff --git a/var/spack/repos/builtin/packages/alglib/package.py b/var/spack/repos/builtin/packages/alglib/package.py index f962d0fd44fc10..98ade340fd2e11 100644 --- a/var/spack/repos/builtin/packages/alglib/package.py +++ b/var/spack/repos/builtin/packages/alglib/package.py @@ -30,7 +30,7 @@ def edit(self, spec, prefix): filter_file(r"so", dso_suffix, make_file) def install(self, spec, prefix): - name = "libalglib.{0}".format(dso_suffix) + name = f"libalglib.{dso_suffix}" with working_dir("src"): mkdirp(prefix.lib) install(name, prefix.lib) diff --git a/var/spack/repos/builtin/packages/alsa-lib/package.py b/var/spack/repos/builtin/packages/alsa-lib/package.py index 631e9bf6851717..46e3d2f1bfa672 100644 --- a/var/spack/repos/builtin/packages/alsa-lib/package.py +++ b/var/spack/repos/builtin/packages/alsa-lib/package.py @@ -30,8 +30,8 @@ def configure_args(self): spec = self.spec args = [] if spec.satisfies("+python"): - args.append("--with-pythonlibs={0}".format(spec["python"].libs.ld_flags)) - args.append("--with-pythonincludes={0}".format(spec["python"].headers.include_flags)) + args.append(f"--with-pythonlibs={spec['python'].libs.ld_flags}") + args.append(f"--with-pythonincludes={spec['python'].headers.include_flags}") else: args.append("--disable-python") return args diff --git a/var/spack/repos/builtin/packages/amg2013/package.py b/var/spack/repos/builtin/packages/amg2013/package.py index 638e874a46cf10..def0b495a83aac 100644 --- a/var/spack/repos/builtin/packages/amg2013/package.py +++ b/var/spack/repos/builtin/packages/amg2013/package.py @@ -46,9 +46,9 @@ def build_targets(self): if "+int64" in self.spec: include_cflags.append("-DHYPRE_BIGINT") - targets.append("INCLUDE_CFLAGS={0}".format(" ".join(include_cflags))) - targets.append("INCLUDE_LFLAGS={0}".format(" ".join(include_lflags))) - targets.append("CC={0}".format(self.spec["mpi"].mpicc)) + targets.append(f"INCLUDE_CFLAGS={' '.join(include_cflags)}") + targets.append(f"INCLUDE_LFLAGS={' '.join(include_lflags)}") + targets.append(f"CC={self.spec['mpi'].mpicc}") return targets diff --git a/var/spack/repos/builtin/packages/amg2023/package.py b/var/spack/repos/builtin/packages/amg2023/package.py index 96b2dc335d74a3..a2e8b676e9a9c9 100644 --- a/var/spack/repos/builtin/packages/amg2023/package.py +++ b/var/spack/repos/builtin/packages/amg2023/package.py @@ -40,7 +40,7 @@ def cmake_args(self): cmake_options = [] cmake_options.append(self.define_from_variant("AMG_WITH_CALIPER", "caliper")) cmake_options.append(self.define_from_variant("AMG_WITH_OMP", "openmp")) - cmake_options.append("-DHYPRE_PREFIX={0}".format(self.spec["hypre"].prefix)) + cmake_options.append(self.define("HYPRE_PREFIX", self.spec["hypre"].prefix)) if self.spec["hypre"].satisfies("+cuda"): cmake_options.append("-DAMG_WITH_CUDA=ON") if self.spec["hypre"].satisfies("+rocm"): diff --git a/var/spack/repos/builtin/packages/amp/package.py b/var/spack/repos/builtin/packages/amp/package.py index 1716a13e57a36a..f0ec4071ce14a4 100644 --- a/var/spack/repos/builtin/packages/amp/package.py +++ b/var/spack/repos/builtin/packages/amp/package.py @@ -117,9 +117,7 @@ def cmake_args(self): ): if "+" + vname in spec: tpl_list.append(vname.upper()) - options.append( - self.define("TPL_{0}_INSTALL_DIR".format(vname.upper()), spec[vname].prefix) - ) + options.append(self.define(f"TPL_{vname.upper()}_INSTALL_DIR", spec[vname].prefix)) if "+netcdf" in spec: tpl_list.append("NETCDF") diff --git a/var/spack/repos/builtin/packages/anicalculator/package.py b/var/spack/repos/builtin/packages/anicalculator/package.py index b14e05a67020fe..9d002975d98485 100644 --- a/var/spack/repos/builtin/packages/anicalculator/package.py +++ b/var/spack/repos/builtin/packages/anicalculator/package.py @@ -19,7 +19,7 @@ class Anicalculator(Package): https://spack.readthedocs.io/en/latest/mirrors.html""" homepage = "https://ani.jgi.doe.gov/html/download.php?" - url = "file://{0}/ANIcalculator_v1.tgz".format(os.getcwd()) + url = f"file://{os.getcwd()}/ANIcalculator_v1.tgz" manual_download = True version("1", sha256="236596a9a204cbcad162fc66be3506b2530b1f48f4f84d9647ccec3ca7483a43") diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py index 9468a7f9a69567..39b833ab0e10d6 100644 --- a/var/spack/repos/builtin/packages/ape/package.py +++ b/var/spack/repos/builtin/packages/ape/package.py @@ -23,9 +23,9 @@ def install(self, spec, prefix): args = [] args.extend( [ - "--prefix=%s" % prefix, - "--with-gsl-prefix=%s" % spec["gsl"].prefix, - "--with-libxc-prefix=%s" % spec["libxc"].prefix, + f"--prefix={prefix}", + f"--with-gsl-prefix={spec['gsl'].prefix}", + f"--with-libxc-prefix={spec['libxc'].prefix}", ] ) diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 2351c48619f49c..dc0fad53d225d9 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -37,16 +37,16 @@ class AprUtil(AutotoolsPackage): @property def libs(self): return find_libraries( - ["libaprutil-{0}".format(self.version.up_to(1))], root=self.prefix, recursive=True + [f"libaprutil-{self.version.up_to(1)}"], root=self.prefix, recursive=True ) def configure_args(self): spec = self.spec args = [ - "--with-apr={0}".format(spec["apr"].prefix), - "--with-expat={0}".format(spec["expat"].prefix), - "--with-iconv={0}".format(spec["iconv"].prefix), + f"--with-apr={spec['apr'].prefix}", + f"--with-expat={spec['expat'].prefix}", + f"--with-iconv={spec['iconv'].prefix}", # TODO: Add support for the following database managers "--without-ndbm", "--without-berkeley-db", @@ -55,34 +55,30 @@ def configure_args(self): ] if "+crypto" in spec: - args.extend(["--with-crypto", "--with-openssl={0}".format(spec["openssl"].prefix)]) + args.extend(["--with-crypto", f"--with-openssl={spec['openssl'].prefix}"]) else: args.append("--without-crypto") if "+gdbm" in spec: - args.append("--with-gdbm={0}".format(spec["gdbm"].prefix)) + args.append(f"--with-gdbm={spec['gdbm'].prefix}") else: args.append("--without-gdbm") if "+pgsql" in spec: - args.append("--with-pgsql={0}".format(spec["postgresql"].prefix)) + args.append(f"--with-pgsql={spec['postgresql'].prefix}") else: args.append("--without-pgsql") if "+sqlite" in spec: if spec.satisfies("^sqlite@3.0:3"): - args.extend( - ["--with-sqlite3={0}".format(spec["sqlite"].prefix), "--without-sqlite2"] - ) + args.extend([f"--with-sqlite3={spec['sqlite'].prefix}", "--without-sqlite2"]) elif spec.satisfies("^sqlite@2.0:2"): - args.extend( - ["--with-sqlite2={0}".format(spec["sqlite"].prefix), "--without-sqlite3"] - ) + args.extend([f"--with-sqlite2={spec['sqlite'].prefix}", "--without-sqlite3"]) else: args.extend(["--without-sqlite2", "--without-sqlite3"]) if "+odbc" in spec: - args.append("--with-odbc={0}".format(spec["unixodbc"].prefix)) + args.append(f"--with-odbc={spec['unixodbc'].prefix}") else: args.append("--without-odbc") diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py index de82ee5817c18a..45de21e3ee02af 100644 --- a/var/spack/repos/builtin/packages/apr/package.py +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -26,5 +26,5 @@ class Apr(AutotoolsPackage): @property def libs(self): return find_libraries( - ["libapr-{0}".format(self.version.up_to(1))], root=self.prefix, recursive=True + [f"libapr-{self.version.up_to(1)}"], root=self.prefix, recursive=True ) diff --git a/var/spack/repos/builtin/packages/aragorn/package.py b/var/spack/repos/builtin/packages/aragorn/package.py index dc55dc52bb84be..8ac7894192f457 100644 --- a/var/spack/repos/builtin/packages/aragorn/package.py +++ b/var/spack/repos/builtin/packages/aragorn/package.py @@ -31,7 +31,7 @@ class Aragorn(Package): # fix checksum error def url_for_version(self, version): - return "http://www.ansikte.se/ARAGORN/Downloads/aragorn{0}.c".format(version) + return f"http://www.ansikte.se/ARAGORN/Downloads/aragorn{version}.c" def install(self, spec, prefix): cc = Executable(spack_cc) diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py index 8492eebc96b26c..52011bebd46f26 100644 --- a/var/spack/repos/builtin/packages/archer/package.py +++ b/var/spack/repos/builtin/packages/archer/package.py @@ -38,9 +38,9 @@ def patch(self): def cmake_args(self): return [ - "-DCMAKE_C_COMPILER=clang", - "-DCMAKE_CXX_COMPILER=clang++", - "-DOMP_PREFIX:PATH=%s" % self.spec["llvm-openmp-ompt"].prefix, + self.define("CMAKE_C_COMPILER", "clang"), + self.define("CMAKE_CXX_COMPILER", "clang++"), + self.define("OMP_PREFIX:PATH", self.spec["llvm-openmp-ompt"].prefix), ] @run_after("install") @@ -56,7 +56,7 @@ def test_run_parallel_example(self): raise SkipTest("Parallel test directory does not exist") test_exe = "parallel-simple" - test_src = "{0}.c".format(test_exe) + test_src = f"{test_exe}.c" with working_dir(test_dir): clang = which("clang-archer") clang("-o", test_exe, test_src) diff --git a/var/spack/repos/builtin/packages/argon2/package.py b/var/spack/repos/builtin/packages/argon2/package.py index c9762b6bc978cb..d41ba9761c1366 100644 --- a/var/spack/repos/builtin/packages/argon2/package.py +++ b/var/spack/repos/builtin/packages/argon2/package.py @@ -20,4 +20,4 @@ class Argon2(MakefilePackage): version("20161029", sha256="fe0049728b946b58b94cc6db89b34e2d050c62325d16316a534d2bedd78cd5e7") def install(self, spec, prefix): - make("PREFIX={0}".format(prefix), "install", "LIBRARY_REL=lib") + make(f"PREFIX={prefix}", "install", "LIBRARY_REL=lib") diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py index 9d83de741a8efb..78794086f91b7c 100644 --- a/var/spack/repos/builtin/packages/armadillo/package.py +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -66,14 +66,14 @@ def cmake_args(self): return [ # ARPACK support - "-DARPACK_LIBRARY={0}".format(spec["arpack-ng"].libs.joined(";")), + self.define("ARPACK_LIBRARY", spec["arpack-ng"].libs.joined(";")), # BLAS support - "-DBLAS_LIBRARY={0}".format(spec["blas"].libs.joined(";")), + self.define("BLAS_LIBRARY", spec["blas"].libs.joined(";")), # LAPACK support - "-DLAPACK_LIBRARY={0}".format(spec["lapack"].libs.joined(";")), + self.define("LAPACK_LIBRARY", spec["lapack"].libs.joined(";")), # SuperLU support - "-DSuperLU_INCLUDE_DIR={0}".format(spec["superlu"].prefix.include), - "-DSuperLU_LIBRARY={0}".format(spec["superlu"].libs.joined(";")), + self.define("SuperLU_INCLUDE_DIR", spec["superlu"].prefix.include), + self.define("SuperLU_LIBRARY", spec["superlu"].libs.joined(";")), # HDF5 support - "-DDETECT_HDF5={0}".format("ON" if "+hdf5" in spec else "OFF"), + self.define("DETECT_HDF5", "ON" if spec.satisfies("+hdf5") else "OFF"), ] diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 92176069c1f19a..c50b90d6d10f45 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -150,14 +150,14 @@ def configure_args(self): options = ( self.enable_or_disable("mpi") + [ - "--with-blas={0}".format(spec["blas"].libs.ld_flags), - "--with-lapack={0}".format(spec["lapack"].libs.ld_flags), + f"--with-blas={spec['blas'].libs.ld_flags}", + f"--with-lapack={spec['lapack'].libs.ld_flags}", ] + self.enable_or_disable("shared") ) if "+mpi" in spec: - options.append("F77={0}".format(spec["mpi"].mpif77)) + options.append(f"F77={spec['mpi'].mpif77}") return options diff --git a/var/spack/repos/builtin/packages/asdcplib/package.py b/var/spack/repos/builtin/packages/asdcplib/package.py index 7ca3b2f9f1b786..5aec849ee59480 100644 --- a/var/spack/repos/builtin/packages/asdcplib/package.py +++ b/var/spack/repos/builtin/packages/asdcplib/package.py @@ -27,6 +27,6 @@ class Asdcplib(AutotoolsPackage): def configure_args(self): spec = self.spec - args = ["--with-openssl={0}".format(spec["openssl"].prefix)] + args = [f"--with-openssl={spec['openssl'].prefix}"] return args diff --git a/var/spack/repos/builtin/packages/aspa/package.py b/var/spack/repos/builtin/packages/aspa/package.py index 6bfbad1d3926e2..8219a46b004bd3 100644 --- a/var/spack/repos/builtin/packages/aspa/package.py +++ b/var/spack/repos/builtin/packages/aspa/package.py @@ -35,12 +35,12 @@ def build_targets(self): targets = [ "--directory=exec", "--file=Makefile", - "LIBS={0} {1} {2}".format( + "LIBS={} {} {}".format( self.spec["lapack"].libs.ld_flags, self.spec["blas"].libs.ld_flags, self.spec["hdf5"].libs.ld_flags, ), - "CXX={0}".format(self.spec["mpi"].mpicxx), + f"CXX={self.spec['mpi'].mpicxx}", ] return targets diff --git a/var/spack/repos/builtin/packages/aspcud/package.py b/var/spack/repos/builtin/packages/aspcud/package.py index fbaef453e990e4..8233dcaba0e058 100644 --- a/var/spack/repos/builtin/packages/aspcud/package.py +++ b/var/spack/repos/builtin/packages/aspcud/package.py @@ -28,11 +28,9 @@ class Aspcud(CMakePackage): depends_on("clingo") def cmake_args(self): - spec = self.spec - gringo_path = join_path(spec["clingo"].prefix.bin, "gringo") - clasp_path = join_path(spec["clingo"].prefix.bin, "clasp") - args = [ - "-DASPCUD_GRINGO_PATH={0}".format(gringo_path), - "-DASPCUD_CLASP_PATH={0}".format(clasp_path), + gringo_path = join_path(self.spec["clingo"].prefix.bin, "gringo") + clasp_path = join_path(self.spec["clingo"].prefix.bin, "clasp") + return [ + self.define("ASPCUD_GRINGO_PATH", gringo_path), + self.define("ASPCUD_CLASP_PATH", clasp_path), ] - return args diff --git a/var/spack/repos/builtin/packages/aspera-cli/package.py b/var/spack/repos/builtin/packages/aspera-cli/package.py index afa63b4c33dc8f..91aa1e19e47818 100644 --- a/var/spack/repos/builtin/packages/aspera-cli/package.py +++ b/var/spack/repos/builtin/packages/aspera-cli/package.py @@ -29,7 +29,7 @@ def install(self, spec, prefix): # Update destination path filter_file( "INSTALL_DIR=~/.aspera", - "INSTALL_DIR=%s" % prefix, + f"INSTALL_DIR={prefix}", runfile, string=True, stop_at="__ARCHIVE_FOLLOWS__", diff --git a/var/spack/repos/builtin/packages/astral/package.py b/var/spack/repos/builtin/packages/astral/package.py index 3afa3691ba0b0f..af196ab9c391c4 100644 --- a/var/spack/repos/builtin/packages/astral/package.py +++ b/var/spack/repos/builtin/packages/astral/package.py @@ -31,7 +31,7 @@ def install(self, spec, prefix): make() mkdirp(prefix.bin) install_tree("lib", prefix.tools.lib) - jar_file = "astral.{v}.jar".format(v=self.version) + jar_file = f"astral.{self.version}.jar" install(jar_file, prefix.tools) script_sh = join_path(os.path.dirname(__file__), "astral.sh") diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 951661004b724a..ef4fe29378ffa0 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -30,11 +30,11 @@ def build_directory(self): def edit(self, spec, prefix): makefile = join_path(self.build_directory, "Makefile") - filter_file(r"^CXX\s*=.*", "CXX=%s" % spack_cxx, makefile) + filter_file(r"^CXX\s*=.*", f"CXX={spack_cxx}", makefile) # If the group is not a user account, the installation will fail, # so remove the -o $ (USER) -g $ (USER) parameter. filter_file(r"^INSTALL=.*", "INSTALL=install", makefile) @property def install_targets(self): - return ["install", "prefix={0}".format(self.prefix)] + return ["install", f"prefix={self.prefix}"] diff --git a/var/spack/repos/builtin/packages/at-spi2-atk/package.py b/var/spack/repos/builtin/packages/at-spi2-atk/package.py index 27e875f9f65c30..6e2f492112ce25 100644 --- a/var/spack/repos/builtin/packages/at-spi2-atk/package.py +++ b/var/spack/repos/builtin/packages/at-spi2-atk/package.py @@ -27,4 +27,4 @@ class AtSpi2Atk(MesonPackage): def url_for_version(self, version): """Handle gnome's version-based custom URLs.""" url = "http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk" - return url + "/%s/at-spi2-atk-%s.tar.xz" % (version.up_to(2), version) + return url + f"/{version.up_to(2)}/at-spi2-atk-{version}.tar.xz" diff --git a/var/spack/repos/builtin/packages/at-spi2-core/package.py b/var/spack/repos/builtin/packages/at-spi2-core/package.py index f1bf5a61c86fca..ec8cbd5e23c68b 100644 --- a/var/spack/repos/builtin/packages/at-spi2-core/package.py +++ b/var/spack/repos/builtin/packages/at-spi2-core/package.py @@ -45,7 +45,7 @@ def patch(self): def url_for_version(self, version): """Handle gnome's version-based custom URLs.""" url = "http://ftp.gnome.org/pub/gnome/sources/at-spi2-core" - return url + "/%s/at-spi2-core-%s.tar.xz" % (version.up_to(2), version) + return url + f"/{version.up_to(2)}/at-spi2-core-{version}.tar.xz" def setup_run_environment(self, env): env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0")) diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py index 41dec1c587080d..52849669ecca01 100644 --- a/var/spack/repos/builtin/packages/atk/package.py +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -43,7 +43,7 @@ class Atk(Package): def url_for_version(self, version): """Handle gnome's version-based custom URLs.""" url = "http://ftp.gnome.org/pub/gnome/sources/atk" - return url + "/%s/atk-%s.tar.xz" % (version.up_to(2), version) + return url + f"/{version.up_to(2)}/atk-{version}.tar.xz" def setup_run_environment(self, env): env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0")) @@ -64,7 +64,7 @@ def install(self, spec, prefix): @when("@:2.27") def install(self, spec, prefix): - configure("--prefix={0}".format(prefix)) + configure(f"--prefix={prefix}") make() if self.run_tests: make("check") diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index d23a16cb1ba16b..ecc6379b570c62 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -109,11 +109,11 @@ def install(self, spec, prefix): # Lapack resource to provide full lapack build. Note that # ATLAS only provides a few LAPACK routines natively. - options.append("--with-netlib-lapack-tarfile=%s" % self.stage[1].archive_file) + options.append(f"--with-netlib-lapack-tarfile={self.stage[1].archive_file}") with working_dir("spack-build", create=True): configure = Executable("../configure") - configure("--prefix=%s" % prefix, *options) + configure(f"--prefix={prefix}", *options) make() make("check") make("ptcheck") @@ -147,7 +147,7 @@ def install_test(self): source_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.c") blessed_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.output") - include_flags = ["-I%s" % self.spec.prefix.include] + include_flags = [f"-I{self.spec.prefix.include}"] link_flags = self.spec["atlas"].libs.ld_flags.split() output = compile_c_and_execute(source_file, include_flags, link_flags) diff --git a/var/spack/repos/builtin/packages/atom-dft/package.py b/var/spack/repos/builtin/packages/atom-dft/package.py index 9015067428fb15..3f8c5e7756303a 100644 --- a/var/spack/repos/builtin/packages/atom-dft/package.py +++ b/var/spack/repos/builtin/packages/atom-dft/package.py @@ -24,8 +24,8 @@ def edit(self, spec, prefix): @property def build_targets(self): return [ - "XMLF90_ROOT=%s" % self.spec["xmlf90"].prefix, - "GRIDXC_ROOT=%s" % self.spec["libgridxc"].prefix, + f"XMLF90_ROOT={self.spec['xmlf90'].prefix}", + f"GRIDXC_ROOT={self.spec['libgridxc'].prefix}", "FC=fc", ] diff --git a/var/spack/repos/builtin/packages/atompaw/package.py b/var/spack/repos/builtin/packages/atompaw/package.py index 7cc4b4d417fc0f..f0ea750583910a 100644 --- a/var/spack/repos/builtin/packages/atompaw/package.py +++ b/var/spack/repos/builtin/packages/atompaw/package.py @@ -49,8 +49,8 @@ def configure_args(self): spec = self.spec linalg = spec["lapack"].libs + spec["blas"].libs return [ - "--with-linalg-libs=%s" % linalg.ld_flags, + f"--with-linalg-libs={linalg.ld_flags}", "--enable-libxc", - "--with-libxc-incs=-I%s" % spec["libxc"].prefix.include, - "--with-libxc-libs=-L%s -lxcf90 -lxc" % spec["libxc"].prefix.lib, + f"--with-libxc-incs=-I{spec['libxc'].prefix.include}", + f"--with-libxc-libs=-L{spec['libxc'].prefix.lib} -lxcf90 -lxc", ] diff --git a/var/spack/repos/builtin/packages/audacious/package.py b/var/spack/repos/builtin/packages/audacious/package.py index 4cce09e0fcf23f..1d6634780b5870 100644 --- a/var/spack/repos/builtin/packages/audacious/package.py +++ b/var/spack/repos/builtin/packages/audacious/package.py @@ -28,7 +28,7 @@ class Audacious(AutotoolsPackage): def patch(self): search_path_args = " ".join(self.autoreconf_search_path_args) - search_path_str = "-I m4 {0}".format(search_path_args) + search_path_str = f"-I m4 {search_path_args}" filter_file("-I m4", search_path_str, "autogen.sh") def autoreconf(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py index e0e002d6fcef81..2c5cfa5c0d531e 100644 --- a/var/spack/repos/builtin/packages/augustus/package.py +++ b/var/spack/repos/builtin/packages/augustus/package.py @@ -69,7 +69,7 @@ def edit(self, spec, prefix): filter_file("g++", spack_cxx, "makefile", string=True) filter_file( "g++ -I/usr/include/boost", - "{0} -I{1}".format(spack_cxx, self.spec["boost"].prefix.include), + f"{spack_cxx} -I{self.spec['boost'].prefix.include}", "src/subdir.mk", string=True, ) @@ -101,7 +101,7 @@ def edit(self, spec, prefix): with working_dir(join_path("auxprogs", "filterBam", "src")): makefile = FileFilter("Makefile") - makefile.filter("BAMTOOLS = .*", "BAMTOOLS = {0}".format(bamtools)) + makefile.filter("BAMTOOLS = .*", f"BAMTOOLS = {bamtools}") makefile.filter("INCLUDES = *", "INCLUDES = -I$(BAMTOOLS)/include/bamtools ") if "bamtools@2.5:" in spec: makefile.filter( @@ -113,32 +113,30 @@ def edit(self, spec, prefix): ) with working_dir(join_path("auxprogs", "bam2hints")): makefile = FileFilter("Makefile") - makefile.filter("/usr/include/bamtools", "{0}/include/bamtools".format(bamtools)) + makefile.filter("/usr/include/bamtools", f"{bamtools}/include/bamtools") if "bamtools@2.5:" in spec: makefile.filter( - "LIBS = -lbamtools -lz", - "LIBS = {0}/lib64" "/libbamtools.a -lz".format(bamtools), + "LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib64/libbamtools.a -lz" ) if "bamtools@:2.4" in spec: makefile.filter( - "LIBS = -lbamtools -lz", - "LIBS = {0}/lib/bamtools" "/libbamtools.a -lz".format(bamtools), + "LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib/bamtools/libbamtools.a -lz" ) if self.version < Version("3.4.0"): with working_dir(join_path("auxprogs", "bam2wig")): makefile = FileFilter("Makefile") # point tools to spack installations - makefile.filter("BCFTOOLS=.*$", "BCFTOOLS={0}/include".format(bcftools)) - makefile.filter("SAMTOOLS=.*$", "SAMTOOLS={0}/include".format(samtools)) - makefile.filter("HTSLIB=.*$", "HTSLIB={0}/include".format(htslib)) + makefile.filter("BCFTOOLS=.*$", f"BCFTOOLS={bcftools}/include") + makefile.filter("SAMTOOLS=.*$", f"SAMTOOLS={samtools}/include") + makefile.filter("HTSLIB=.*$", f"HTSLIB={htslib}/include") # fix bad linking dirs makefile.filter("$(SAMTOOLS)/libbam.a", "$(SAMTOOLS)/../lib/libbam.a", string=True) makefile.filter("$(HTSLIB)/libhts.a", "$(HTSLIB)/../lib/libhts.a", string=True) with working_dir(join_path("auxprogs", "checkTargetSortedness")): makefile = FileFilter("Makefile") - makefile.filter("SAMTOOLS.*=.*$", "SAMTOOLS={0}/include".format(samtools)) + makefile.filter("SAMTOOLS.*=.*$", f"SAMTOOLS={samtools}/include") makefile.filter("LIBS=-lbam", "LIBS=$(SAMTOOLS)/../lib/libbam.a", string=True) else: mysql = self.spec["mysql-client"].prefix @@ -147,12 +145,12 @@ def edit(self, spec, prefix): with working_dir("src"): makefile = FileFilter("Makefile") - makefile.filter(r"/usr/include/mysql\+\+", "{0}/include/mysql++".format(mysqlpp)) + makefile.filter(r"/usr/include/mysql\+\+", f"{mysqlpp}/include/mysql++") if "^mariadb-c-client" in spec: - makefile.filter("/usr/include/mysql", "{0}/include/mariadb".format(mysql)) + makefile.filter("/usr/include/mysql", f"{mysql}/include/mariadb") else: - makefile.filter("/usr/include/mysql", "{0}/include/mysql".format(mysql)) - makefile.filter("/usr/include/lpsolve", "{0}/include/lpsolve".format(lpsolve)) + makefile.filter("/usr/include/mysql", f"{mysql}/include/mysql") + makefile.filter("/usr/include/lpsolve", f"{lpsolve}/include/lpsolve") def install(self, spec, prefix): install_tree("bin", join_path(self.spec.prefix, "bin")) @@ -163,12 +161,12 @@ def install(self, spec, prefix): def filter_sbang(self): with working_dir(self.prefix.scripts): pattern = "^#!.*" - repl = "#!{0}".format(self.spec["perl"].command.path) + repl = f"#!{self.spec['perl'].command.path}" files = glob.glob("*.pl") for file in files: filter_file(pattern, repl, *files, backup=False) - repl = "#!{0}".format(self.spec["python"].command.path) + repl = f"#!{self.spec['python'].command.path}" files = glob.glob("*.py") for file in files: filter_file(pattern, repl, *files, backup=False) diff --git a/var/spack/repos/builtin/packages/authd/package.py b/var/spack/repos/builtin/packages/authd/package.py index b2cee813c1eae0..dbb290839bc916 100644 --- a/var/spack/repos/builtin/packages/authd/package.py +++ b/var/spack/repos/builtin/packages/authd/package.py @@ -20,4 +20,4 @@ def setup_run_environment(self, env): env.prepend_path("PATH", self.prefix.sbin) def install(self, spec, prefix): - make("prefix={0}".format(prefix), "install") + make(f"prefix={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/autodock-vina/package.py b/var/spack/repos/builtin/packages/autodock-vina/package.py index dadf50ea054ab3..8ca01804d8c0dc 100644 --- a/var/spack/repos/builtin/packages/autodock-vina/package.py +++ b/var/spack/repos/builtin/packages/autodock-vina/package.py @@ -44,10 +44,10 @@ def edit(self, spec, prefix): with working_dir(self.build_directory): makefile = FileFilter("Makefile") makefile.filter( - "BOOST_INCLUDE = .*", "BOOST_INCLUDE = %s" % self.spec["boost"].prefix.include + "BOOST_INCLUDE = .*", f"BOOST_INCLUDE = {self.spec['boost'].prefix.include}" ) makefile.filter("C_PLATFORM=.*", "C_PLATFORM=-pthread") - makefile.filter("GPP=.*", "GPP=%s" % spack_cxx) + makefile.filter("GPP=.*", f"GPP={spack_cxx}") def build(self, spec, prefix): with working_dir(self.build_directory): diff --git a/var/spack/repos/builtin/packages/autogen/package.py b/var/spack/repos/builtin/packages/autogen/package.py index 2ecc434106eec3..54b088beb599c6 100644 --- a/var/spack/repos/builtin/packages/autogen/package.py +++ b/var/spack/repos/builtin/packages/autogen/package.py @@ -36,7 +36,7 @@ def configure_args(self): ] if "+xml" in spec: - args.append("--with-libxml2={0}".format(spec["libxml2"].prefix)) + args.append(f"--with-libxml2={spec['libxml2'].prefix}") else: args.append("--without-libxml2") diff --git a/var/spack/repos/builtin/packages/avizo/package.py b/var/spack/repos/builtin/packages/avizo/package.py index 42c201e780ed0a..43364919cd757f 100644 --- a/var/spack/repos/builtin/packages/avizo/package.py +++ b/var/spack/repos/builtin/packages/avizo/package.py @@ -24,25 +24,25 @@ class Avizo(Package): version( "2020.1", sha256="9321aaa276567eebf116e268353c33a4c930d768d22793f921338e1d8cefe991", - url="file://{0}/Avizo-20201-Linux64-gcc48.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-20201-Linux64-gcc48.bin", expand=False, ) version( "2019.4", sha256="a637720535bcbe254ab56368004a9544c64ec36186373fa24f26cee279685248", - url="file://{0}/Avizo-20194-Linux64-gcc48.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-20194-Linux64-gcc48.bin", expand=False, ) version( "2019.3", sha256="be109df81e2f7238f234862367841dae05e76cc62218c1f36b1d9bc9514ce5f7", - url="file://{0}/Avizo-20193-Linux64-gcc48.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-20193-Linux64-gcc48.bin", expand=False, ) version( "9.7.0", sha256="9c9b9e81957387f4218df0c5adbb80717e9ae80ab3ca6ff8da523f7f499dcc5b", - url="file://{0}/Avizo-970-Linux64-gcc44.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-970-Linux64-gcc44.bin", expand=False, ) @@ -67,15 +67,11 @@ def setup_run_environment(self, env): def install(self, spec, prefix): ver = self.version.joined sh = which("sh") - sh( - "Avizo-{0}-Linux64-gcc{1}.bin".format(ver, self.gcc_ver[self.version.string]), - "--noexec", - "--keep", - ) + sh(f"Avizo-{ver}-Linux64-gcc{self.gcc_ver[self.version.string]}.bin", "--noexec", "--keep") with working_dir("Avizo"): avizo_tar = tarfile.open( - name="Avizo-{0}-Linux64-gcc{1}.tar.bz2".format( + name="Avizo-{}-Linux64-gcc{}.tar.bz2".format( self.version, self.gcc_ver[self.version.string] ) ) From 81172f9251ff0b3409b07d5b9d13b214766ff1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20L=C3=B6nnemark?= Date: Thu, 26 Oct 2023 21:11:43 +0200 Subject: [PATCH 358/806] curl: Fix librtmp variant (#40713) * rtmpdump: New package * curl: Fix librtmp variant Add the previously missing dependency required for rtmp support. The variant has been broken since its addition in PR #25166. Fixes one of the two issues reported in #26887. --- .../repos/builtin/packages/curl/package.py | 1 + .../packages/rtmpdump/missing-include.patch | 23 ++ .../builtin/packages/rtmpdump/package.py | 38 +++ .../rtmpdump/rtmpdump-fix-chunk-size.patch | 48 ++++ .../rtmpdump/rtmpdump-openssl-1.1-v2.patch | 248 ++++++++++++++++++ .../rtmpdump-swf_vertification_type_2.patch | 14 + ...dump-swf_vertification_type_2_part_2.patch | 22 ++ 7 files changed, 394 insertions(+) create mode 100644 var/spack/repos/builtin/packages/rtmpdump/missing-include.patch create mode 100644 var/spack/repos/builtin/packages/rtmpdump/package.py create mode 100644 var/spack/repos/builtin/packages/rtmpdump/rtmpdump-fix-chunk-size.patch create mode 100644 var/spack/repos/builtin/packages/rtmpdump/rtmpdump-openssl-1.1-v2.patch create mode 100644 var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2.patch create mode 100644 var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2_part_2.patch diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index 46894046df60a4..362b559ab63aa0 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -305,6 +305,7 @@ class Curl(NMakePackage, AutotoolsPackage): depends_on("libssh2", when="+libssh2") depends_on("libssh", when="+libssh") depends_on("krb5", when="+gssapi") + depends_on("rtmpdump", when="+librtmp") # https://github.com/curl/curl/pull/9054 patch("easy-lock-sched-header.patch", when="@7.84.0") diff --git a/var/spack/repos/builtin/packages/rtmpdump/missing-include.patch b/var/spack/repos/builtin/packages/rtmpdump/missing-include.patch new file mode 100644 index 00000000000000..4325ed07381f54 --- /dev/null +++ b/var/spack/repos/builtin/packages/rtmpdump/missing-include.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/828082 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include "rtmp_sys.h" + #include "log.h" +diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c +index 32b2eed..e3669e3 100644 +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "rtmp_sys.h" + #include "log.h" diff --git a/var/spack/repos/builtin/packages/rtmpdump/package.py b/var/spack/repos/builtin/packages/rtmpdump/package.py new file mode 100644 index 00000000000000..a868e6e3d0d8c9 --- /dev/null +++ b/var/spack/repos/builtin/packages/rtmpdump/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2023 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 Rtmpdump(MakefilePackage): + """rtmpdump is a toolkit for RTMP streams.""" + + homepage = "https://rtmpdump.mplayerhq.hu/" + git = "https://git.ffmpeg.org/rtmpdump.git" + + maintainers("tobbez") + + license("GPL-2.0-or-later") + + version("2021-02-19", commit="f1b83c10d8beb43fcc70a6e88cf4325499f25857") + + variant("tls", default="openssl", description="TLS backend", values=("gnutls", "openssl")) + + depends_on("openssl@:3", when="tls=openssl") + depends_on("gnutls", when="tls=gnutls") + depends_on("zlib-api") + + patch("missing-include.patch") + patch("rtmpdump-fix-chunk-size.patch") + patch("rtmpdump-openssl-1.1-v2.patch") + patch("rtmpdump-swf_vertification_type_2.patch") + patch("rtmpdump-swf_vertification_type_2_part_2.patch") + + @property + def build_targets(self): + return [f"CRYPTO={self.spec.variants['tls'].value.upper()}"] + + def install(self, spec, prefix): + make("install", f"prefix={prefix}", "sbindir=$(bindir)") diff --git a/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-fix-chunk-size.patch b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-fix-chunk-size.patch new file mode 100644 index 00000000000000..1c6cfdc6261075 --- /dev/null +++ b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-fix-chunk-size.patch @@ -0,0 +1,48 @@ +https://git.alpinelinux.org/aports/commit/main/rtmpdump/fix-chunk-size.patch?id=bf39fb1177ee77eee6c214a7393cc0054958ce08 +https://git.alpinelinux.org/aports/commit/main/rtmpdump/fix-chunk-size.patch?id=69bc162319b12e9b6c6d3ea345dbf7c218753594 +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index a2863b0..ac1b3be 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -2077,6 +2077,29 @@ RTMP_SendClientBW(RTMP *r) + } + + static int ++SendClientChunkSize(RTMP *r, int chunkSize) ++{ ++ RTMPPacket packet; ++ char pbuf[256], *pend = pbuf + sizeof(pbuf); ++ int ret; ++ ++ packet.m_nChannel = 0x02; /* control channel (invoke) */ ++ packet.m_headerType = RTMP_PACKET_SIZE_LARGE; ++ packet.m_packetType = RTMP_PACKET_TYPE_CHUNK_SIZE; ++ packet.m_nTimeStamp = 0; ++ packet.m_nInfoField2 = 0; ++ packet.m_hasAbsTimestamp = 0; ++ packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE; ++ ++ packet.m_nBodySize = 4; ++ ++ AMF_EncodeInt32(packet.m_body, pend, chunkSize); ++ ret = RTMP_SendPacket(r, &packet, FALSE); ++ r->m_outChunkSize = chunkSize; ++ return ret; ++} ++ ++static int + SendBytesReceived(RTMP *r) + { + RTMPPacket packet; +@@ -3349,6 +3372,11 @@ HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet) + r->m_inChunkSize = AMF_DecodeInt32(packet->m_body); + RTMP_Log(RTMP_LOGDEBUG, "%s, received: chunk size change to %d", __FUNCTION__, + r->m_inChunkSize); ++ if (r->Link.protocol & RTMP_FEATURE_WRITE) ++ { ++ RTMP_Log(RTMP_LOGDEBUG, "%s, updating outChunkSize too", __FUNCTION__); ++ SendClientChunkSize(r, r->m_inChunkSize); ++ } + } + } + diff --git a/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-openssl-1.1-v2.patch b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-openssl-1.1-v2.patch new file mode 100644 index 00000000000000..146243bd111188 --- /dev/null +++ b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-openssl-1.1-v2.patch @@ -0,0 +1,248 @@ +https://raw.githubusercontent.com/xbmc/inputstream.rtmp/master/depends/common/librtmp/0003-openssl-1.1.patch +See also https://github.com/xbmc/inputstream.rtmp/pull/46 +--- a/librtmp/dh.h ++++ b/librtmp/dh.h +@@ -253,20 +253,42 @@ + if (!dh) + goto failed; + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + MP_new(dh->g); + + if (!dh->g) + goto failed; ++#else ++ BIGNUM *g = NULL; ++ MP_new(g); ++ if (!g) ++ goto failed; ++#endif + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ ++#else ++ BIGNUM* p = NULL; ++ DH_get0_pqg(dh, (BIGNUM const**)&p, NULL, NULL); ++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */ ++#endif + if (!res) + { + goto failed; + } + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + MP_set_w(dh->g, 2); /* base 2 */ ++#else ++ MP_set_w(g, 2); /* base 2 */ ++ DH_set0_pqg(dh, p, NULL, g); ++#endif + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + dh->length = nKeyBits; ++#else ++ DH_set_length(dh, nKeyBits); ++#endif + return dh; + + failed: +@@ -293,12 +315,24 @@ + MP_gethex(q1, Q1024, res); + assert(res); + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + res = isValidPublicKey(dh->pub_key, dh->p, q1); ++#else ++ BIGNUM const* pub_key = NULL; ++ BIGNUM const* p = NULL; ++ DH_get0_key(dh, &pub_key, NULL); ++ DH_get0_pqg(dh, &p, NULL, NULL); ++ res = isValidPublicKey((BIGNUM*)pub_key, (BIGNUM*)p, q1); ++#endif + if (!res) + { ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + MP_free(dh->pub_key); + MP_free(dh->priv_key); + dh->pub_key = dh->priv_key = 0; ++#else ++ DH_free(dh); ++#endif + } + + MP_free(q1); +@@ -314,15 +348,29 @@ + DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + { + int len; ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + if (!dh || !dh->pub_key) ++#else ++ BIGNUM const* pub_key = NULL; ++ DH_get0_key(dh, &pub_key, NULL); ++ if (!dh || !pub_key) ++#endif + return 0; + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + len = MP_bytes(dh->pub_key); ++#else ++ len = MP_bytes(pub_key); ++#endif + if (len <= 0 || len > (int) nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); ++#else ++ MP_setbin(pub_key, pubkey + (nPubkeyLen - len), len); ++#endif + return 1; + } + +@@ -364,7 +412,13 @@ + MP_gethex(q1, Q1024, len); + assert(len); + ++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + if (isValidPublicKey(pubkeyBn, dh->p, q1)) ++#else ++ BIGNUM const* p = NULL; ++ DH_get0_pqg(dh, &p, NULL, NULL); ++ if (isValidPublicKey(pubkeyBn, (BIGNUM*)p, q1)) ++#endif + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; +--- a/librtmp/handshake.h ++++ b/librtmp/handshake.h +@@ -31,9 +31,9 @@ + #define SHA256_DIGEST_LENGTH 32 + #endif + #define HMAC_CTX sha2_context +-#define HMAC_setup(ctx, key, len) sha2_hmac_starts(&ctx, (unsigned char *)key, len, 0) +-#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig) ++#define HMAC_setup(ctx, key, len) sha2_hmac_starts(ctx, (unsigned char *)key, len, 0) ++#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(ctx, dig) + + typedef arc4_context * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(arc4_context)) +@@ -50,9 +50,9 @@ + #endif + #undef HMAC_CTX + #define HMAC_CTX struct hmac_sha256_ctx +-#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(&ctx, len, key) +-#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(&ctx, len, buf) +-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig) ++#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(ctx, len, key) ++#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(ctx, len, buf) ++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(ctx, SHA256_DIGEST_LENGTH, dig) + #define HMAC_close(ctx) + + typedef struct arcfour_ctx* RC4_handle; +@@ -64,14 +64,23 @@ + + #else /* USE_OPENSSL */ + #include ++#include + #include + #include + #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) + #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 + #endif +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define HMAC_setup(ctx, key, len) HMAC_CTX_init(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#else ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#endif ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_cleanup(ctx) ++#else ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx) ++#endif + + typedef RC4_KEY * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +@@ -117,7 +126,7 @@ + { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; +- HMAC_CTX ctx; ++ HMAC_CTX* ctx = NULL; + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); +@@ -266,7 +275,7 @@ + size_t keylen, uint8_t *digest) + { + unsigned int digestLen; +- HMAC_CTX ctx; ++ HMAC_CTX* ctx = NULL; + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -37,9 +37,9 @@ + #define SHA256_DIGEST_LENGTH 32 + #endif + #define HMAC_CTX sha2_context +-#define HMAC_setup(ctx, key, len) sha2_hmac_starts(&ctx, (unsigned char *)key, len, 0) +-#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig) ++#define HMAC_setup(ctx, key, len) sha2_hmac_starts(ctx, (unsigned char *)key, len, 0) ++#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(ctx, dig) + #define HMAC_close(ctx) + #elif defined(USE_GNUTLS) + #include +@@ -48,19 +48,27 @@ + #endif + #undef HMAC_CTX + #define HMAC_CTX struct hmac_sha256_ctx +-#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(&ctx, len, key) +-#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(&ctx, len, buf) +-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig) ++#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(ctx, len, key) ++#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(ctx, len, buf) ++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(ctx, SHA256_DIGEST_LENGTH, dig) + #define HMAC_close(ctx) + #else /* USE_OPENSSL */ + #include + #include + #include + #include +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen); +-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define HMAC_setup(ctx, key, len) HMAC_CTX_init(ctx); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0) ++#else ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#endif ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define HMAC_close(ctx) HMAC_CTX_cleanup(ctx) ++#else ++#define HMAC_close(ctx) HMAC_CTX_reset(ctx); HMAC_CTX_free(ctx) ++#endif + #endif + + extern void RTMP_TLS_Init(); +@@ -289,7 +297,7 @@ + struct info + { + z_stream *zs; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + int first; + int zlib; + int size; diff --git a/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2.patch b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2.patch new file mode 100644 index 00000000000000..cc7637d84943af --- /dev/null +++ b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/669574 +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index 5311a8a..79fefae 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -2854,7 +2854,7 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet) + if (nType == 0x1A) + { + RTMP_Log(RTMP_LOGDEBUG, "%s, SWFVerification ping received: ", __FUNCTION__); +- if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x01) ++ if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x02) + { + RTMP_Log(RTMP_LOGERROR, + "%s: SWFVerification Type %d request not supported! Patches welcome...", diff --git a/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2_part_2.patch b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2_part_2.patch new file mode 100644 index 00000000000000..ade0d9baa79a46 --- /dev/null +++ b/var/spack/repos/builtin/packages/rtmpdump/rtmpdump-swf_vertification_type_2_part_2.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/669574 +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index df2cb27..b72dc64 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -2857,14 +2857,14 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet) + if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x01) + { + RTMP_Log(RTMP_LOGERROR, +- "%s: SWFVerification Type %d request not supported! Patches welcome...", ++ "%s: SWFVerification Type %d request not supported, attempting to use SWFVerification Type 1! Patches welcome...", + __FUNCTION__, packet->m_body[2]); + } + #ifdef CRYPTO + /*RTMP_LogHex(packet.m_body, packet.m_nBodySize); */ + + /* respond with HMAC SHA256 of decompressed SWF, key is the 30byte player key, also the last 30 bytes of the server handshake are applied */ +- else if (r->Link.SWFSize) ++ if (r->Link.SWFSize) + { + RTMP_SendCtrl(r, 0x1B, 0, 0); + } From b4b25dec6418e18742b3faaf2e665e5c193146fb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 26 Oct 2023 15:25:56 -0500 Subject: [PATCH 359/806] PythonPackage: allow archive_files to be overridden (#40694) --- lib/spack/spack/build_systems/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index c370178d7032b6..7f71cbae7058f0 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -425,7 +425,7 @@ class PythonPipBuilder(BaseBuilder): legacy_long_methods = ("install_options", "global_options", "config_settings") #: Names associated with package attributes in the old build-system format - legacy_attributes = ("build_directory", "install_time_test_callbacks") + legacy_attributes = ("archive_files", "build_directory", "install_time_test_callbacks") #: Callback names for install-time test install_time_test_callbacks = ["test"] From d64f3127265c3d4617de736910acc59b682e9157 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 26 Oct 2023 18:10:16 -0400 Subject: [PATCH 360/806] dataTransferKit: add v3.1.1, v3.1.0 (#40556) * Update DataTransferKit for 3.1.1 release * Require Trilinos-14 for 3.1.0 and higher --- .../repos/builtin/packages/datatransferkit/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/datatransferkit/package.py b/var/spack/repos/builtin/packages/datatransferkit/package.py index 1829e2414df090..7e0d050069d0cd 100644 --- a/var/spack/repos/builtin/packages/datatransferkit/package.py +++ b/var/spack/repos/builtin/packages/datatransferkit/package.py @@ -11,7 +11,7 @@ class Datatransferkit(CMakePackage): parallel solution transfer services for multiphysics simulations""" homepage = "https://datatransferkit.readthedoc.io" - url = "https://github.com/ORNL-CEES/DataTransferKit/archive/3.1-rc3.tar.gz" + url = "https://github.com/ORNL-CEES/DataTransferKit/archive/3.1.1.tar.gz" git = "https://github.com/ORNL-CEES/DataTransferKit.git" tags = ["e4s"] @@ -19,6 +19,8 @@ class Datatransferkit(CMakePackage): maintainers("Rombur") version("master", branch="master", submodules=True) + version("3.1.1", commit="bfb7673cc233c26a6a541cbf096f37f26df1e5fb", submodules=True) + version("3.1.0", commit="60a4cbd0a55505e0450f1ac979e1eef8966dc03f", submodules=True) version("3.1-rc3", commit="691d5a1540f7cd42141a3b3d2a7c8370cbc3560a", submodules=True) version("3.1-rc2", commit="1abc1a43b33dffc7a16d7497b4185d09d865e36a", submodules=True) @@ -37,7 +39,8 @@ class Datatransferkit(CMakePackage): depends_on("trilinos+intrepid2+shards~dtk") depends_on("trilinos+openmp", when="+openmp") depends_on("trilinos+stratimikos+belos", when="@master") - depends_on("trilinos@13:", when="@3.1-rc2:") + depends_on("trilinos@13:13.4.1", when="@3.1-rc2:3.1-rc3") + depends_on("trilinos@14:", when="@3.1.0:") def cmake_args(self): spec = self.spec From c3f5ee54d42ef1f7e62a65cde6377edcb33a014f Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:12:10 -0500 Subject: [PATCH 361/806] ldak: add v5.2 & add maintainer (#40710) * ldak: update to 5.2, add maintainer * ldak: use compiler.openmp_flag --- .../repos/builtin/packages/ldak/package.py | 73 ++++++++++++++----- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/ldak/package.py b/var/spack/repos/builtin/packages/ldak/package.py index 022a3beacbe10e..1fbb7de0900b16 100644 --- a/var/spack/repos/builtin/packages/ldak/package.py +++ b/var/spack/repos/builtin/packages/ldak/package.py @@ -12,31 +12,68 @@ class Ldak(Package): homepage = "https://dougspeed.com/ldak/" url = "https://dougspeed.com/wp-content/uploads/source.zip" - version("5.1", sha256="ae3eb8c2ef31af210e138336fd6edcd0e3a26ea9bae89fd6c0c6ea33e3a1517e") + maintainers("snehring") - variant("mkl", default=False, description="Use MKL") + version("5.2", sha256="ba3de4eb4f2d664b3c2a54bef2eb66d1a498ac423179e97a5795d010161b1805") + version( + "5.1", + sha256="ae3eb8c2ef31af210e138336fd6edcd0e3a26ea9bae89fd6c0c6ea33e3a1517e", + deprecated=True, + ) + + variant("glpk", default=False, description="Use glpk instead of vendored qsopt") depends_on("zlib-api") depends_on("blas") depends_on("lapack") - depends_on("mkl", when="+mkl") - - for t in ["aarch64", "arm", "ppc", "ppc64", "ppc64le", "ppcle", "sparc", "sparc64", "x86"]: - conflicts("target={0}:".format(t), msg="libspot is available linux x86_64 only") - - def setup_build_environment(self, env): - env.append_flags("LDLIBS", "-lm") - env.append_flags("LDLIBS", "-lz") - libs = (self.spec["lapack"].libs + self.spec["blas"].libs).ld_flags - env.append_flags("LDLIBS", libs) - if self.spec.platform == "darwin": - env.append_flags("LDLIBS", "libqsopt.mac.a") + depends_on("openblas threads=openmp", when="^openblas") + depends_on("intel-mkl threads=openmp", when="^intel-mkl") + depends_on("intel-oneapi-mkl threads=openmp", when="^intel-oneapi-mkl") + depends_on("glpk", when="+glpk") + + requires("target=x86_64:", when="~glpk", msg="bundled qsopt is only for x86_64") + requires( + "^mkl", + "^openblas", + policy="one_of", + msg="Only mkl or openblas are supported for blas/lapack with ldak", + ) + conflicts("platform=cray", when="~glpk", msg="bundled qsopt only for linux or mac") + + phases = ["build", "install"] + + def build(self, spec, prefix): + libs = [ + "-lm", + (self.spec["lapack"].libs + self.spec["blas"].libs).link_flags, + self.spec["zlib-api"].libs.link_flags, + ] + includes = [ + (self.spec["lapack"].headers + self.spec["blas"].headers).include_flags, + self.spec["zlib-api"].headers.include_flags, + ] + + if self.spec.satisfies("~glpk"): + if self.spec.satisfies("platform=darwin"): + libs.append("libqsopt.mac.a") + else: + libs.append("libqsopt.linux.a") else: - env.append_flags("LDLIBS", "libqsopt.linux.a") + includes.append(self.spec["glpk"].headers.include_flags) + libs.append(self.spec["glpk"].libs.link_flags) + if self.spec.satisfies("^mkl"): + filter_file("#define MKL.*", "#define MKL 1", "ldak.c") + if self.spec.satisfies("^openblas"): + filter_file("#define MKL.*", "#define MKL 2", "ldak.c") + filter_file("#if MKL==2", "#if MKL==2\n#include \n", "ldak.c") + if self.spec.satisfies("+glpk"): + filter_file("#define MET.*", "#define MET 1", "ldak.c") + filter_file('#include"glpk.h"', "#include", "ldak.c") + filter_file(r"weights\[", "tally3[", "weightfuns.c") + cc = Executable(spack_cc) + args = ["ldak.c", self.compiler.openmp_flag, "-o", "ldak"] + includes + libs + cc(*args) def install(self, spec, prefix): - if self.spec.satisfies("~mkl"): - filter_file("#define MKL.*", "#define MKL 0", "ldak.c") - make("ldak") mkdirp(prefix.bin) install("ldak", prefix.bin.ldak) From 546695f19305ef8a29f15be4289f5862f386a096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Bederi=C3=A1n?= <4043375+zzzoom@users.noreply.github.com> Date: Thu, 26 Oct 2023 19:13:27 -0300 Subject: [PATCH 362/806] itk: misc fixes (#39832) * itk: patch missing include for newer compilers * itk: The package doesn't use MPI * itk: package requires the high-level hdf5 api * itk: patch url with ?full_index=1 * itk: point to 4041 commit in master * itk: don't constrain hdf5 with ~mpi --- var/spack/repos/builtin/packages/itk/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/itk/package.py b/var/spack/repos/builtin/packages/itk/package.py index bd20a28d3dc7c5..d0123b60f6a4ab 100644 --- a/var/spack/repos/builtin/packages/itk/package.py +++ b/var/spack/repos/builtin/packages/itk/package.py @@ -58,13 +58,18 @@ class Itk(CMakePackage): depends_on("expat") depends_on("fftw-api") depends_on("googletest") - depends_on("hdf5+cxx") + depends_on("hdf5+cxx+hl") depends_on("jpeg") depends_on("libpng") depends_on("libtiff") - depends_on("mpi") depends_on("zlib-api") + patch( + "https://github.com/InsightSoftwareConsortium/ITK/commit/9a719a0d2f5f489eeb9351b0ef913c3693147a4f.patch?full_index=1", + sha256="ec1f7fa71f2b7f05d9632c6b0321e7d436fff86fca92c60c12839b13ea79bd70", + when="@5.2.0:5.3.0", + ) + def cmake_args(self): use_mkl = "^mkl" in self.spec args = [ From 8959d65577cfa49a23e5330c5d4fcab50b4d1d47 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 26 Oct 2023 17:48:20 -0500 Subject: [PATCH 363/806] plasma: add version 23.8.2 (#40728) --- var/spack/repos/builtin/packages/plasma/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/plasma/package.py b/var/spack/repos/builtin/packages/plasma/package.py index 6b92413fd7f598..5cccfe3ff4e6b5 100644 --- a/var/spack/repos/builtin/packages/plasma/package.py +++ b/var/spack/repos/builtin/packages/plasma/package.py @@ -19,11 +19,13 @@ class Plasma(CMakePackage): homepage = "https://github.com/icl-utk-edu/plasma/" url = "https://github.com/icl-utk-edu/plasma/releases/download/21.8.29/plasma-21.8.29.tar.gz" git = "https://github.com/icl-utk-edu/plasma" + maintainers("luszczek") tags = ["e4s"] version("develop", git=git) + version("23.8.2", sha256="2db34de0575f3e3d16531bdcf1caddef146f68e71335977a3e8ec193003ab943") version("22.9.29", sha256="78827898b7e3830eee2e388823b9180858279f77c5eda5aa1be173765c53ade5") version("21.8.29", sha256="e0bb4d9143c8540f9f46cbccac9ed0cbea12500a864e6954fce2fe94ea057a10") version("20.9.20", sha256="2144a77b739f8dd2f0dbe5b64d94cde0e916f55c4eb170facd168c0db7fc7970") From feda52f800ac14f033e3cd7792cf534f31be032f Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 26 Oct 2023 23:12:20 -0700 Subject: [PATCH 364/806] akantu: use f-strings (#40466) Co-authored-by: Nicolas Richart --- var/spack/repos/builtin/packages/akantu/package.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/akantu/package.py b/var/spack/repos/builtin/packages/akantu/package.py index 2952f9bb4a1688..bba92edcc8e396 100644 --- a/var/spack/repos/builtin/packages/akantu/package.py +++ b/var/spack/repos/builtin/packages/akantu/package.py @@ -65,10 +65,8 @@ def cmake_args(self): "-DAKANTU_HEAT_TRANSFER:BOOL=ON", "-DAKANTU_SOLID_MECHANICS:BOOL=ON", "-DAKANTU_STRUCTURAL_MECHANICS:BOOL=OFF", - "-DAKANTU_PARALLEL:BOOL={0}".format("ON" if spec.satisfies("+mpi") else "OFF"), - "-DAKANTU_PYTHON_INTERFACE:BOOL={0}".format( - "ON" if spec.satisfies("+python") else "OFF" - ), + f"-DAKANTU_PARALLEL:BOOL={'ON' if spec.satisfies('+mpi') else 'OFF'}", + f"-DAKANTU_PYTHON_INTERFACE:BOOL={'ON' if spec.satisfies('+python') else 'OFF'}", ] if spec.satisfies("@:3.0"): @@ -84,14 +82,14 @@ def cmake_args(self): solvers = [] if spec.satisfies("external_solvers=mumps"): solvers.append("Mumps") - args.append("-DMUMPS_DIR:PATH=${0}".format(spec["mumps"].prefix)) + args.append(f"-DMUMPS_DIR:PATH=${spec['mumps'].prefix}") if spec.satisfies("external_solvers=petsc"): solvers.append("PETSc") if len(solvers) > 0: args.extend( [ - "-DAKANTU_IMPLICIT_SOLVER:STRING={0}".format("+".join(solvers)), + f"-DAKANTU_IMPLICIT_SOLVER:STRING={'+'.join(solvers)}", "-DAKANTU_IMPLICIT:BOOL=ON", ] ) From 37f48aff8bda58ca89d92c925a4fae86208a8bc5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 27 Oct 2023 08:29:02 +0200 Subject: [PATCH 365/806] gromacs: fix version branch in intel fftw (#40489) --- var/spack/repos/builtin/packages/gromacs/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index e280234a0e45fa..d516add3779a1f 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -618,7 +618,7 @@ def cmake_args(self): # fftw-api@3 is provided by intel-mkl or intel-parllel-studio # we use the mkl interface of gromacs options.append("-DGMX_FFT_LIBRARY=mkl") - if not self.spec["mkl"].satisfies("@2023:"): + if self.spec.satisfies("@:2022"): options.append( "-DMKL_INCLUDE_DIR={0}".format(self.spec["mkl"].headers.directories[0]) ) From af13d16c2c2fda32e47f7300b31d805df64f8581 Mon Sep 17 00:00:00 2001 From: dmt4 Date: Fri, 27 Oct 2023 07:55:57 +0100 Subject: [PATCH 366/806] Fixes and options for package spglib (#40684) * Fix cmake_args for spglib v2.1.0+ * Add option to build fortran interface in package spglib * fix style as sugested by ci/prechecks/style * Enable fortran variant from v1.16.4 as suggested Co-authored-by: Rocco Meli --------- Co-authored-by: Rocco Meli --- var/spack/repos/builtin/packages/spglib/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py index 2715f3f3c0295b..1d00091c13158c 100644 --- a/var/spack/repos/builtin/packages/spglib/package.py +++ b/var/spack/repos/builtin/packages/spglib/package.py @@ -48,10 +48,15 @@ class Spglib(CMakePackage): version("1.10.0", sha256="117fff308731784bea2ddaf3d076f0ecbf3981b31ea1c1bfd5ce4f057a5325b1") variant("openmp", default=True, description="Build with OpenMP support", when="@1.16.2:") + variant("fortran", default=True, description="Build Fortran interface", when="@1.16.4:") @property def libs(self): return find_libraries("libsymspg", root=self.prefix, shared=True, recursive=True) def cmake_args(self): - return [self.define_from_variant("USE_OMP", "openmp")] + pfx = "SPGLIB_" if self.spec.satisfies("@2.1.0:") else "" + return [ + self.define_from_variant(pfx + "USE_OMP", "openmp"), + self.define_from_variant(pfx + "WITH_Fortran", "fortran"), + ] From 51275df0b13da8bef1db50d2451c741bfee292bf Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 27 Oct 2023 09:43:01 +0200 Subject: [PATCH 367/806] ci: spack compiler find should list extra config scopes (#40727) otherwise it detected pre-configured compilers in an potentially different way. --- share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 579153bdfdc395..e5475a7bdc6ed5 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -140,8 +140,13 @@ default: - spack --version - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME} - spack env activate --without-view . - - spack compiler find - export SPACK_CI_CONFIG_ROOT="${SPACK_ROOT}/share/spack/gitlab/cloud_pipelines/configs" + - spack + --config-scope "${SPACK_CI_CONFIG_ROOT}" + --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}" + --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" + ${CI_STACK_CONFIG_SCOPES} + compiler find - spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))" < "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" - spack config add -f "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" From 9b8fb413c3df05223edd400d2518475d65e6ba13 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 27 Oct 2023 09:51:12 +0200 Subject: [PATCH 368/806] gromacs: default to external blas & lapack (#40490) * gromacs: default to external blas & lapack * drop vendored lapack/blas altogether --- .../repos/builtin/packages/gromacs/package.py | 36 +++++-------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index d516add3779a1f..7a4147a6eecab8 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -142,8 +142,6 @@ class Gromacs(CMakePackage, CudaPackage): msg="GMX_RELAXED_DOUBLE_PRECISION option removed for GROMACS 2021.", ) variant("hwloc", default=True, description="Use the hwloc portable hardware locality library") - variant("lapack", default=False, description="Enables an external LAPACK library") - variant("blas", default=False, description="Enables an external BLAS library") variant("cycle_subcounters", default=False, description="Enables cycle subcounters") variant("cp2k", default=False, description="CP2K QM/MM interface integration") @@ -151,16 +149,6 @@ class Gromacs(CMakePackage, CudaPackage): "+cp2k", when="@:2021", msg="CP2K QM/MM support have been introduced in GROMACS 2022" ) conflicts("+shared", when="+cp2k", msg="Enabling CP2K requires static build") - conflicts( - "~lapack", - when="+cp2k", - msg="GROMACS and CP2K should use the same lapack, please disable bundled lapack", - ) - conflicts( - "~blas", - when="+cp2k", - msg="GROMACS and CP2K should use the same blas, please disable bundled blas", - ) conflicts("%intel", when="@2022:", msg="GROMACS %intel support was removed in version 2022") conflicts("%gcc@:8", when="@2023:", msg="GROMACS requires GCC 9 or later since version 2023") conflicts( @@ -255,8 +243,8 @@ class Gromacs(CMakePackage, CudaPackage): depends_on("cmake@3.16.0:3", type="build", when="%fj") depends_on("cuda", when="+cuda") depends_on("sycl", when="+sycl") - depends_on("lapack", when="+lapack") - depends_on("blas", when="+blas") + depends_on("lapack") + depends_on("blas") depends_on("gcc", when="%oneapi ~intel_provided_gcc") depends_on("gcc", when="%intel ~intel_provided_gcc") @@ -504,21 +492,13 @@ def cmake_args(self): if "+cuda" in self.spec: options.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix) - if "+lapack" in self.spec: - options.append("-DGMX_EXTERNAL_LAPACK:BOOL=ON") - if self.spec["lapack"].libs: - options.append( - "-DGMX_LAPACK_USER={0}".format(self.spec["lapack"].libs.joined(";")) - ) - else: - options.append("-DGMX_EXTERNAL_LAPACK:BOOL=OFF") + options.append("-DGMX_EXTERNAL_LAPACK:BOOL=ON") + if self.spec["lapack"].libs: + options.append("-DGMX_LAPACK_USER={0}".format(self.spec["lapack"].libs.joined(";"))) - if "+blas" in self.spec: - options.append("-DGMX_EXTERNAL_BLAS:BOOL=ON") - if self.spec["blas"].libs: - options.append("-DGMX_BLAS_USER={0}".format(self.spec["blas"].libs.joined(";"))) - else: - options.append("-DGMX_EXTERNAL_BLAS:BOOL=OFF") + options.append("-DGMX_EXTERNAL_BLAS:BOOL=ON") + if self.spec["blas"].libs: + options.append("-DGMX_BLAS_USER={0}".format(self.spec["blas"].libs.joined(";"))) if "+cp2k" in self.spec: options.append("-DGMX_CP2K:BOOL=ON") From 1bf758a784890d3f85d08f9646c4b21c5ab4ddc0 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Fri, 27 Oct 2023 06:29:15 -0500 Subject: [PATCH 369/806] strumpack: add version 7.2.0 (#40732) --- var/spack/repos/builtin/packages/strumpack/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/strumpack/package.py b/var/spack/repos/builtin/packages/strumpack/package.py index 15133630a80d59..fce0c4cd175f29 100644 --- a/var/spack/repos/builtin/packages/strumpack/package.py +++ b/var/spack/repos/builtin/packages/strumpack/package.py @@ -29,6 +29,7 @@ class Strumpack(CMakePackage, CudaPackage, ROCmPackage): test_requires_compiler = True version("master", branch="master") + version("7.2.0", sha256="6988c00c3213f13e53d75fb474102358f4fecf07a4b4304b7123d86fdc784639") version("7.1.3", sha256="c951f38ee7af20da3ff46429e38fcebd57fb6f12619b2c56040d6da5096abcb0") version("7.1.2", sha256="262a0193fa1682d0eaa90363f739e0be7a778d5deeb80e4d4ae12446082a39cc") version("7.1.1", sha256="56481a22955c2eeb40932777233fc227347743c75683d996cb598617dd2a8635") From 3fff8be929b8ce18e8e5e40344c05c415ebd23d2 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Karnad <46030335+iamashwin99@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:24:44 +0200 Subject: [PATCH 370/806] octopus: split netcdf-c and netcdf-fortran dependency (#40685) --- var/spack/repos/builtin/packages/octopus/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py index 5ce974edfa63e0..8a88711dad900e 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -93,13 +93,14 @@ class Octopus(AutotoolsPackage, CudaPackage): depends_on("libxc@2:4", when="@8:9") depends_on("libxc@5.1.0:", when="@10:") depends_on("libxc@5.1.0:", when="@develop") + depends_on("netcdf-fortran", when="+netcdf") # NetCDF fortran lib without mpi variant with when("+mpi"): # list all the parallel dependencies depends_on("fftw@3:+mpi+openmp", when="@8:9") # FFT library depends_on("fftw-api@3:+mpi+openmp", when="@10:") depends_on("libvdwxc+mpi", when="+libvdwxc") depends_on("arpack-ng+mpi", when="+arpack") depends_on("elpa+mpi", when="+elpa") - depends_on("netcdf-fortran ^netcdf-c+mpi", when="+netcdf") + depends_on("netcdf-c+mpi", when="+netcdf") # Link dependency of NetCDF fortran lib depends_on("berkeleygw@2.1+mpi", when="+berkeleygw") with when("~mpi"): # list all the serial dependencies @@ -108,7 +109,7 @@ class Octopus(AutotoolsPackage, CudaPackage): depends_on("libvdwxc~mpi", when="+libvdwxc") depends_on("arpack-ng~mpi", when="+arpack") depends_on("elpa~mpi", when="+elpa") - depends_on("netcdf-fortran ^netcdf-c~~mpi", when="+netcdf") + depends_on("netcdf-c~~mpi", when="+netcdf") # Link dependency of NetCDF fortran lib depends_on("berkeleygw@2.1~mpi", when="+berkeleygw") depends_on("etsf-io", when="+etsf-io") From 195f96507642d13697dcdaccb9ea31792da7726c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 27 Oct 2023 15:30:04 +0200 Subject: [PATCH 371/806] OCI buildcache (#38358) Credits to @ChristianKniep for advocating the idea of OCI image layers being identical to spack buildcache tarballs. With this you can configure an OCI registry as a buildcache: ```console $ spack mirror add my_registry oci://user/image # Dockerhub $ spack mirror add my_registry oci://ghcr.io/haampie/spack-test # GHCR $ spack mirror set --push --oci-username ... --oci-password ... my_registry # set login credentials ``` which should result in this config: ```yaml mirrors: my_registry: url: oci://ghcr.io/haampie/spack-test push: access_pair: [, ] ``` It can be used like any other registry ``` spack buildcache push my_registry [specs...] ``` It will upload the Spack tarballs in parallel, as well as manifest + config files s.t. the binaries are compatible with `docker pull` or `skopeo copy`. In fact, a base image can be added to get a _runnable_ image: ```console $ spack buildcache push --base-image ubuntu:23.04 my_registry python Pushed ... as [image]:python-3.11.2-65txfcpqbmpawclvtasuog4yzmxwaoia.spack $ docker run --rm -it [image]:python-3.11.2-65txfcpqbmpawclvtasuog4yzmxwaoia.spack ``` which should really be a game changer for sharing binaries. Further, all content-addressable blobs that are downloaded and verified will be cached in Spack's download cache. This should make repeated `push` commands faster, as well as `push` followed by a separate `update-index` command. An end to end example of how to use this in Github Actions is here: **https://github.com/haampie/spack-oci-buildcache-example** TODO: - [x] Generate environment modifications in config so PATH is set up - [x] Enrich config with Spack's `spec` json (this is allowed in the OCI specification) - [x] When ^ is done, add logic to create an index in say `:index` by fetching all config files (using OCI distribution discovery API) - [x] Add logic to use object storage in an OCI registry in `spack install`. - [x] Make the user pick the base image for generated OCI images. - [x] Update buildcache install logic to deal with absolute paths in tarballs - [x] Merge with `spack buildcache` command - [x] Merge #37441 (included here) - [x] Merge #39077 (included here) - [x] #39187 + #39285 - [x] #39341 - [x] Not a blocker: #35737 fixes correctness run env for the generated container images NOTE: 1. `oci://` is unfortunately taken, so it's being abused in this PR to mean "oci type mirror". `skopeo` uses `docker://` which I'd like to avoid, given that classical docker v1 registries are not supported. 2. this is currently `https`-only, given that basic auth is used to login. I _could_ be convinced to allow http, but I'd prefer not to, given that for a `spack buildcache push` command multiple domains can be involved (auth server, source of base image, destination registry). Right now, no urllib http handler is added, so redirects to https and auth servers with http urls will simply result in a hard failure. CAVEATS: 1. Signing is not implemented in this PR. `gpg --clearsign` is not the nicest solution, since (a) the spec.json is merged into the image config, which must be valid json, and (b) it would be better to sign the manifest (referencing both config/spec file and tarball) using more conventional image signing tools 2. `spack.binary_distribution.push` is not yet implemented for the OCI buildcache, only `spack buildcache push` is. This is because I'd like to always push images + deps to the registry, so that it's `docker pull`-able, whereas in `spack ci` we really wanna push an individual package without its deps to say `pr-xyz`, while its deps reside in some `develop` buildcache. 3. The `push -j ...` flag only works for OCI buildcache, not for others --- lib/spack/docs/binary_caches.rst | 125 ++++ lib/spack/docs/conf.py | 1 + lib/spack/spack/binary_distribution.py | 421 +++++++++--- lib/spack/spack/cmd/buildcache.py | 493 ++++++++++++-- lib/spack/spack/cmd/common/arguments.py | 4 +- lib/spack/spack/cmd/mirror.py | 12 +- lib/spack/spack/fetch_strategy.py | 30 + lib/spack/spack/mirror.py | 58 +- lib/spack/spack/oci/__init__.py | 4 + lib/spack/spack/oci/image.py | 228 +++++++ lib/spack/spack/oci/oci.py | 381 +++++++++++ lib/spack/spack/oci/opener.py | 442 ++++++++++++ lib/spack/spack/parser.py | 21 +- lib/spack/spack/spec.py | 3 +- lib/spack/spack/stage.py | 12 +- lib/spack/spack/test/cmd/buildcache.py | 6 +- lib/spack/spack/test/conftest.py | 19 + lib/spack/spack/test/oci/image.py | 101 +++ lib/spack/spack/test/oci/integration_test.py | 148 ++++ lib/spack/spack/test/oci/mock_registry.py | 410 +++++++++++ lib/spack/spack/test/oci/urlopen.py | 672 +++++++++++++++++++ lib/spack/spack/util/crypto.py | 90 +-- share/spack/spack-completion.bash | 10 +- share/spack/spack-completion.fish | 30 +- 24 files changed, 3479 insertions(+), 242 deletions(-) create mode 100644 lib/spack/spack/oci/__init__.py create mode 100644 lib/spack/spack/oci/image.py create mode 100644 lib/spack/spack/oci/oci.py create mode 100644 lib/spack/spack/oci/opener.py create mode 100644 lib/spack/spack/test/oci/image.py create mode 100644 lib/spack/spack/test/oci/integration_test.py create mode 100644 lib/spack/spack/test/oci/mock_registry.py create mode 100644 lib/spack/spack/test/oci/urlopen.py diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst index 280d957c086e56..5f11dd6bd6ab55 100644 --- a/lib/spack/docs/binary_caches.rst +++ b/lib/spack/docs/binary_caches.rst @@ -156,6 +156,131 @@ List of popular build caches * `Extreme-scale Scientific Software Stack (E4S) `_: `build cache `_ +----------------------------------------- +OCI / Docker V2 registries as build cache +----------------------------------------- + +Spack can also use OCI or Docker V2 registries such as Dockerhub, Quay.io, +Github Packages, GitLab Container Registry, JFrog Artifactory, and others +as build caches. This is a convenient way to share binaries using public +infrastructure, or to cache Spack built binaries in Github Actions and +GitLab CI. + +To get started, configure an OCI mirror using ``oci://`` as the scheme, +and optionally specify a username and password (or personal access token): + +.. code-block:: console + + $ spack mirror add --oci-username username --oci-password password my_registry oci://example.com/my_image + +Spack follows the naming conventions of Docker, with Dockerhub as the default +registry. To use Dockerhub, you can omit the registry domain: + +.. code-block:: console + + $ spack mirror add --oci-username username --oci-password password my_registry oci://username/my_image + +From here, you can use the mirror as any other build cache: + +.. code-block:: console + + $ spack buildcache push my_registry # push to the registry + $ spack install # install from the registry + +A unique feature of buildcaches on top of OCI registries is that it's incredibly +easy to generate get a runnable container image with the binaries installed. This +is a great way to make applications available to users without requiring them to +install Spack -- all you need is Docker, Podman or any other OCI-compatible container +runtime. + +To produce container images, all you need to do is add the ``--base-image`` flag +when pushing to the build cache: + +.. code-block:: console + + $ spack buildcache push --base-image ubuntu:20.04 my_registry ninja + Pushed to example.com/my_image:ninja-1.11.1-yxferyhmrjkosgta5ei6b4lqf6bxbscz.spack + + $ docker run -it example.com/my_image:ninja-1.11.1-yxferyhmrjkosgta5ei6b4lqf6bxbscz.spack + root@e4c2b6f6b3f4:/# ninja --version + 1.11.1 + +If ``--base-image`` is not specified, distroless images are produced. In practice, +you won't be able to run these as containers, since they don't come with libc and +other system dependencies. However, they are still compatible with tools like +``skopeo``, ``podman``, and ``docker`` for pulling and pushing. + +.. note:: + The docker ``overlayfs2`` storage driver is limited to 128 layers, above which a + ``max depth exceeded`` error may be produced when pulling the image. There + are `alternative drivers `_. + +------------------------------------ +Using a buildcache in GitHub Actions +------------------------------------ + +GitHub Actions is a popular CI/CD platform for building and testing software, +but each CI job has limited resources, making from source builds too slow for +many applications. Spack build caches can be used to share binaries between CI +runs, speeding up CI significantly. + +A typical workflow is to include a ``spack.yaml`` environment in your repository +that specifies the packages to install: + +.. code-block:: yaml + + spack: + specs: [pkg-x, pkg-y] + packages: + all: + require: target=x86_64_v2 + mirrors: + github_packages: oci://ghcr.io// + +And a GitHub action that sets up Spack, installs packages from the build cache +or from sources, and pushes newly built binaries to the build cache: + +.. code-block:: yaml + + name: Install Spack packages + + on: push + + env: + SPACK_COLOR: always + + jobs: + example: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Spack + run: | + git clone --depth=1 https://github.com/spack/spack.git + echo "$PWD/spack/bin/" >> "$GITHUB_PATH" + + - name: Concretize + run: spack -e . concretize + + - name: Install + run: spack -e . install --no-check-signature --fail-fast + + - name: Push to buildcache + run: | + spack -e . mirror set --oci-username --oci-password "${{ secrets.GITHUB_TOKEN }}" github_packages + spack -e . buildcache push --base-image ubuntu:22.04 --unsigned --update-index github_packages + if: always() + +The first time this action runs, it will build the packages from source and +push them to the build cache. Subsequent runs will pull the binaries from the +build cache. The concretizer will ensure that prebuilt binaries are favored +over source builds. + +The build cache entries appear in the GitHub Packages section of your repository, +and contain instructions for pulling and running them with ``docker`` or ``podman``. + ---------- Relocation ---------- diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index f1bde9c9fbdfd0..250a600e7f75ec 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -204,6 +204,7 @@ def setup(sphinx): ("py:class", "clingo.Control"), ("py:class", "six.moves.urllib.parse.ParseResult"), ("py:class", "TextIO"), + ("py:class", "hashlib._Hash"), # Spack classes that are private and we don't want to expose ("py:class", "spack.provider_index._IndexBase"), ("py:class", "spack.repo._PrependFileLoader"), diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 7484fee09793c2..af04dfefb07113 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -5,11 +5,13 @@ import codecs import collections +import errno import hashlib import io import itertools import json import os +import pathlib import re import shutil import sys @@ -31,6 +33,7 @@ import llnl.util.tty as tty from llnl.util.filesystem import BaseDirectoryVisitor, mkdirp, visit_directory_tree +import spack.caches import spack.cmd import spack.config as config import spack.database as spack_db @@ -38,6 +41,9 @@ import spack.hooks import spack.hooks.sbang import spack.mirror +import spack.oci.image +import spack.oci.oci +import spack.oci.opener import spack.platforms import spack.relocate as relocate import spack.repo @@ -471,14 +477,18 @@ def _fetch_and_cache_index(self, mirror_url, cache_entry={}): FetchIndexError """ # TODO: get rid of this request, handle 404 better - if not web_util.url_exists( + scheme = urllib.parse.urlparse(mirror_url).scheme + + if scheme != "oci" and not web_util.url_exists( url_util.join(mirror_url, _build_cache_relative_path, "index.json") ): return False - etag = cache_entry.get("etag", None) - if etag: - fetcher = EtagIndexFetcher(mirror_url, etag) + if scheme == "oci": + # TODO: Actually etag and OCI are not mutually exclusive... + fetcher = OCIIndexFetcher(mirror_url, cache_entry.get("index_hash", None)) + elif cache_entry.get("etag"): + fetcher = EtagIndexFetcher(mirror_url, cache_entry["etag"]) else: fetcher = DefaultIndexFetcher( mirror_url, local_hash=cache_entry.get("index_hash", None) @@ -622,21 +632,14 @@ def build_cache_prefix(prefix): def buildinfo_file_name(prefix): - """ - Filename of the binary package meta-data file - """ - return os.path.join(prefix, ".spack/binary_distribution") + """Filename of the binary package meta-data file""" + return os.path.join(prefix, ".spack", "binary_distribution") def read_buildinfo_file(prefix): - """ - Read buildinfo file - """ - filename = buildinfo_file_name(prefix) - with open(filename, "r") as inputfile: - content = inputfile.read() - buildinfo = syaml.load(content) - return buildinfo + """Read buildinfo file""" + with open(buildinfo_file_name(prefix), "r") as f: + return syaml.load(f) class BuildManifestVisitor(BaseDirectoryVisitor): @@ -819,18 +822,6 @@ def tarball_path_name(spec, ext): return os.path.join(tarball_directory_name(spec), tarball_name(spec, ext)) -def checksum_tarball(file): - # calculate sha256 hash of tar file - block_size = 65536 - hasher = hashlib.sha256() - with open(file, "rb") as tfile: - buf = tfile.read(block_size) - while len(buf) > 0: - hasher.update(buf) - buf = tfile.read(block_size) - return hasher.hexdigest() - - def select_signing_key(key=None): if key is None: keys = spack.util.gpg.signing_keys() @@ -1147,14 +1138,17 @@ def gzip_compressed_tarfile(path): # compresslevel=6 gzip default: llvm takes 4mins, roughly 2.1GB # compresslevel=9 python default: llvm takes 12mins, roughly 2.1GB # So we follow gzip. - with open(path, "wb") as fileobj, closing( - GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=fileobj) - ) as gzip_file, tarfile.TarFile(name="", mode="w", fileobj=gzip_file) as tar: - yield tar + with open(path, "wb") as f, ChecksumWriter(f) as inner_checksum, closing( + GzipFile(filename="", mode="wb", compresslevel=6, mtime=0, fileobj=inner_checksum) + ) as gzip_file, ChecksumWriter(gzip_file) as outer_checksum, tarfile.TarFile( + name="", mode="w", fileobj=outer_checksum + ) as tar: + yield tar, inner_checksum, outer_checksum -def _tarinfo_name(p: str): - return p.lstrip("/") +def _tarinfo_name(absolute_path: str, *, _path=pathlib.PurePath) -> str: + """Compute tarfile entry name as the relative path from the (system) root.""" + return _path(*_path(absolute_path).parts[1:]).as_posix() def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None: @@ -1234,8 +1228,88 @@ def tarfile_of_spec_prefix(tar: tarfile.TarFile, prefix: str) -> None: dir_stack.extend(reversed(new_dirs)) # we pop, so reverse to stay alphabetical +class ChecksumWriter(io.BufferedIOBase): + """Checksum writer computes a checksum while writing to a file.""" + + myfileobj = None + + def __init__(self, fileobj, algorithm=hashlib.sha256): + self.fileobj = fileobj + self.hasher = algorithm() + self.length = 0 + + def hexdigest(self): + return self.hasher.hexdigest() + + def write(self, data): + if isinstance(data, (bytes, bytearray)): + length = len(data) + else: + data = memoryview(data) + length = data.nbytes + + if length > 0: + self.fileobj.write(data) + self.hasher.update(data) + + self.length += length + + return length + + def read(self, size=-1): + raise OSError(errno.EBADF, "read() on write-only object") + + def read1(self, size=-1): + raise OSError(errno.EBADF, "read1() on write-only object") + + def peek(self, n): + raise OSError(errno.EBADF, "peek() on write-only object") + + @property + def closed(self): + return self.fileobj is None + + def close(self): + fileobj = self.fileobj + if fileobj is None: + return + self.fileobj.close() + self.fileobj = None + + def flush(self): + self.fileobj.flush() + + def fileno(self): + return self.fileobj.fileno() + + def rewind(self): + raise OSError("Can't rewind while computing checksum") + + def readable(self): + return False + + def writable(self): + return True + + def seekable(self): + return True + + def tell(self): + return self.fileobj.tell() + + def seek(self, offset, whence=io.SEEK_SET): + # In principle forward seek is possible with b"0" padding, + # but this is not implemented. + if offset == 0 and whence == io.SEEK_CUR: + return + raise OSError("Can't seek while computing checksum") + + def readline(self, size=-1): + raise OSError(errno.EBADF, "readline() on write-only object") + + def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict): - with gzip_compressed_tarfile(tarfile_path) as tar: + with gzip_compressed_tarfile(tarfile_path) as (tar, inner_checksum, outer_checksum): # Tarball the install prefix tarfile_of_spec_prefix(tar, binaries_dir) @@ -1247,6 +1321,8 @@ def _do_create_tarball(tarfile_path: str, binaries_dir: str, buildinfo: dict): tarinfo.mode = 0o644 tar.addfile(tarinfo, io.BytesIO(bstring)) + return inner_checksum.hexdigest(), outer_checksum.hexdigest() + class PushOptions(NamedTuple): #: Overwrite existing tarball/metadata files in buildcache @@ -1322,13 +1398,9 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option # create info for later relocation and create tar buildinfo = get_buildinfo_dict(spec) - _do_create_tarball(tarfile_path, binaries_dir, buildinfo) - - # get the sha256 checksum of the tarball - checksum = checksum_tarball(tarfile_path) + checksum, _ = _do_create_tarball(tarfile_path, binaries_dir, buildinfo) # add sha256 checksum to spec.json - with open(spec_file, "r") as inputfile: content = inputfile.read() if spec_file.endswith(".json"): @@ -1371,10 +1443,21 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option return None +class NotInstalledError(spack.error.SpackError): + """Raised when a spec is not installed but picked to be packaged.""" + + def __init__(self, specs: List[Spec]): + super().__init__( + "Cannot push non-installed packages", + ", ".join(s.cformat("{name}{@version}{/hash:7}") for s in specs), + ) + + def specs_to_be_packaged( specs: List[Spec], root: bool = True, dependencies: bool = True ) -> List[Spec]: """Return the list of nodes to be packaged, given a list of specs. + Raises NotInstalledError if a spec is not installed but picked to be packaged. Args: specs: list of root specs to be processed @@ -1382,19 +1465,35 @@ def specs_to_be_packaged( dependencies: include the dependencies of each spec in the nodes """ + if not root and not dependencies: return [] - elif dependencies: - nodes = traverse.traverse_nodes(specs, root=root, deptype="all") - else: - nodes = set(specs) - # Limit to installed non-externals. - packageable = lambda n: not n.external and n.installed - - # Mass install check + # Filter packageable roots with spack.store.STORE.db.read_transaction(): - return list(filter(packageable, nodes)) + if root: + # Error on uninstalled roots, when roots are requested + uninstalled_roots = list(s for s in specs if not s.installed) + if uninstalled_roots: + raise NotInstalledError(uninstalled_roots) + roots = specs + else: + roots = [] + + if dependencies: + # Error on uninstalled deps, when deps are requested + deps = list( + traverse.traverse_nodes( + specs, deptype="all", order="breadth", root=False, key=traverse.by_dag_hash + ) + ) + uninstalled_deps = list(s for s in deps if not s.installed) + if uninstalled_deps: + raise NotInstalledError(uninstalled_deps) + else: + deps = [] + + return [s for s in itertools.chain(roots, deps) if not s.external] def push(spec: Spec, mirror_url: str, options: PushOptions): @@ -1502,8 +1601,6 @@ def download_tarball(spec, unsigned=False, mirrors_for_spec=None): tarball = tarball_path_name(spec, ".spack") specfile_prefix = tarball_name(spec, ".spec") - mirrors_to_try = [] - # Note on try_first and try_next: # mirrors_for_spec mostly likely came from spack caching remote # mirror indices locally and adding their specs to a local data @@ -1516,63 +1613,116 @@ def download_tarball(spec, unsigned=False, mirrors_for_spec=None): try_first = [i["mirror_url"] for i in mirrors_for_spec] if mirrors_for_spec else [] try_next = [i.fetch_url for i in configured_mirrors if i.fetch_url not in try_first] - for url in try_first + try_next: - mirrors_to_try.append( - { - "specfile": url_util.join(url, _build_cache_relative_path, specfile_prefix), - "spackfile": url_util.join(url, _build_cache_relative_path, tarball), - } - ) + mirrors = try_first + try_next tried_to_verify_sigs = [] # Assumes we care more about finding a spec file by preferred ext # than by mirrory priority. This can be made less complicated as # we remove support for deprecated spec formats and buildcache layouts. - for ext in ["json.sig", "json"]: - for mirror_to_try in mirrors_to_try: - specfile_url = "{0}.{1}".format(mirror_to_try["specfile"], ext) - spackfile_url = mirror_to_try["spackfile"] - local_specfile_stage = try_fetch(specfile_url) - if local_specfile_stage: - local_specfile_path = local_specfile_stage.save_filename - signature_verified = False - - if ext.endswith(".sig") and not unsigned: - # If we found a signed specfile at the root, try to verify - # the signature immediately. We will not download the - # tarball if we could not verify the signature. - tried_to_verify_sigs.append(specfile_url) - signature_verified = try_verify(local_specfile_path) - if not signature_verified: - tty.warn("Failed to verify: {0}".format(specfile_url)) - - if unsigned or signature_verified or not ext.endswith(".sig"): - # We will download the tarball in one of three cases: - # 1. user asked for --no-check-signature - # 2. user didn't ask for --no-check-signature, but we - # found a spec.json.sig and verified the signature already - # 3. neither of the first two cases are true, but this file - # is *not* a signed json (not a spec.json.sig file). That - # means we already looked at all the mirrors and either didn't - # find any .sig files or couldn't verify any of them. But it - # is still possible to find an old style binary package where - # the signature is a detached .asc file in the outer archive - # of the tarball, and in that case, the only way to know is to - # download the tarball. This is a deprecated use case, so if - # something goes wrong during the extraction process (can't - # verify signature, checksum doesn't match) we will fail at - # that point instead of trying to download more tarballs from - # the remaining mirrors, looking for one we can use. - tarball_stage = try_fetch(spackfile_url) - if tarball_stage: - return { - "tarball_stage": tarball_stage, - "specfile_stage": local_specfile_stage, - "signature_verified": signature_verified, - } + for try_signed in (True, False): + for mirror in mirrors: + # If it's an OCI index, do things differently, since we cannot compose URLs. + parsed = urllib.parse.urlparse(mirror) + + # TODO: refactor this to some "nice" place. + if parsed.scheme == "oci": + ref = spack.oci.image.ImageReference.from_string(mirror[len("oci://") :]).with_tag( + spack.oci.image.default_tag(spec) + ) + + # Fetch the manifest + try: + response = spack.oci.opener.urlopen( + urllib.request.Request( + url=ref.manifest_url(), + headers={"Accept": "application/vnd.oci.image.manifest.v1+json"}, + ) + ) + except Exception: + continue + + # Download the config = spec.json and the relevant tarball + try: + manifest = json.loads(response.read()) + spec_digest = spack.oci.image.Digest.from_string(manifest["config"]["digest"]) + tarball_digest = spack.oci.image.Digest.from_string( + manifest["layers"][-1]["digest"] + ) + except Exception: + continue + + with spack.oci.oci.make_stage( + ref.blob_url(spec_digest), spec_digest, keep=True + ) as local_specfile_stage: + try: + local_specfile_stage.fetch() + local_specfile_stage.check() + except Exception: + continue + local_specfile_stage.cache_local() + + with spack.oci.oci.make_stage( + ref.blob_url(tarball_digest), tarball_digest, keep=True + ) as tarball_stage: + try: + tarball_stage.fetch() + tarball_stage.check() + except Exception: + continue + tarball_stage.cache_local() + + return { + "tarball_stage": tarball_stage, + "specfile_stage": local_specfile_stage, + "signature_verified": False, + } - local_specfile_stage.destroy() + else: + ext = "json.sig" if try_signed else "json" + specfile_path = url_util.join(mirror, _build_cache_relative_path, specfile_prefix) + specfile_url = f"{specfile_path}.{ext}" + spackfile_url = url_util.join(mirror, _build_cache_relative_path, tarball) + local_specfile_stage = try_fetch(specfile_url) + if local_specfile_stage: + local_specfile_path = local_specfile_stage.save_filename + signature_verified = False + + if try_signed and not unsigned: + # If we found a signed specfile at the root, try to verify + # the signature immediately. We will not download the + # tarball if we could not verify the signature. + tried_to_verify_sigs.append(specfile_url) + signature_verified = try_verify(local_specfile_path) + if not signature_verified: + tty.warn("Failed to verify: {0}".format(specfile_url)) + + if unsigned or signature_verified or not try_signed: + # We will download the tarball in one of three cases: + # 1. user asked for --no-check-signature + # 2. user didn't ask for --no-check-signature, but we + # found a spec.json.sig and verified the signature already + # 3. neither of the first two cases are true, but this file + # is *not* a signed json (not a spec.json.sig file). That + # means we already looked at all the mirrors and either didn't + # find any .sig files or couldn't verify any of them. But it + # is still possible to find an old style binary package where + # the signature is a detached .asc file in the outer archive + # of the tarball, and in that case, the only way to know is to + # download the tarball. This is a deprecated use case, so if + # something goes wrong during the extraction process (can't + # verify signature, checksum doesn't match) we will fail at + # that point instead of trying to download more tarballs from + # the remaining mirrors, looking for one we can use. + tarball_stage = try_fetch(spackfile_url) + if tarball_stage: + return { + "tarball_stage": tarball_stage, + "specfile_stage": local_specfile_stage, + "signature_verified": signature_verified, + } + + local_specfile_stage.destroy() # Falling through the nested loops meeans we exhaustively searched # for all known kinds of spec files on all mirrors and did not find @@ -1805,7 +1955,7 @@ def _extract_inner_tarball(spec, filename, extract_to, unsigned, remote_checksum ) # compute the sha256 checksum of the tarball - local_checksum = checksum_tarball(tarfile_path) + local_checksum = spack.util.crypto.checksum(hashlib.sha256, tarfile_path) expected = remote_checksum["hash"] # if the checksums don't match don't install @@ -1866,6 +2016,7 @@ def extract_tarball(spec, download_result, unsigned=False, force=False, timer=ti spec_dict = sjson.load(content) bchecksum = spec_dict["binary_cache_checksum"] + filename = download_result["tarball_stage"].save_filename signature_verified = download_result["signature_verified"] tmpdir = None @@ -1898,7 +2049,7 @@ def extract_tarball(spec, download_result, unsigned=False, force=False, timer=ti ) # compute the sha256 checksum of the tarball - local_checksum = checksum_tarball(tarfile_path) + local_checksum = spack.util.crypto.checksum(hashlib.sha256, tarfile_path) expected = bchecksum["hash"] # if the checksums don't match don't install @@ -2457,7 +2608,7 @@ def get_remote_hash(self): return None return remote_hash.decode("utf-8") - def conditional_fetch(self): + def conditional_fetch(self) -> FetchIndexResult: # Do an intermediate fetch for the hash # and a conditional fetch for the contents @@ -2471,12 +2622,12 @@ def conditional_fetch(self): try: response = self.urlopen(urllib.request.Request(url_index, headers=self.headers)) except urllib.error.URLError as e: - raise FetchIndexError("Could not fetch index from {}".format(url_index), e) + raise FetchIndexError("Could not fetch index from {}".format(url_index), e) from e try: result = codecs.getreader("utf-8")(response).read() except ValueError as e: - return FetchCacheError("Remote index {} is invalid".format(url_index), e) + raise FetchIndexError("Remote index {} is invalid".format(url_index), e) from e computed_hash = compute_hash(result) @@ -2508,7 +2659,7 @@ def __init__(self, url, etag, urlopen=web_util.urlopen): self.etag = etag self.urlopen = urlopen - def conditional_fetch(self): + def conditional_fetch(self) -> FetchIndexResult: # Just do a conditional fetch immediately url = url_util.join(self.url, _build_cache_relative_path, "index.json") headers = { @@ -2539,3 +2690,59 @@ def conditional_fetch(self): data=result, fresh=False, ) + + +class OCIIndexFetcher: + def __init__(self, url: str, local_hash, urlopen=None) -> None: + self.local_hash = local_hash + + # Remove oci:// prefix + assert url.startswith("oci://") + self.ref = spack.oci.image.ImageReference.from_string(url[6:]) + self.urlopen = urlopen or spack.oci.opener.urlopen + + def conditional_fetch(self) -> FetchIndexResult: + """Download an index from an OCI registry type mirror.""" + url_manifest = self.ref.with_tag(spack.oci.image.default_index_tag).manifest_url() + try: + response = self.urlopen( + urllib.request.Request( + url=url_manifest, + headers={"Accept": "application/vnd.oci.image.manifest.v1+json"}, + ) + ) + except urllib.error.URLError as e: + raise FetchIndexError( + "Could not fetch manifest from {}".format(url_manifest), e + ) from e + + try: + manifest = json.loads(response.read()) + except Exception as e: + raise FetchIndexError("Remote index {} is invalid".format(url_manifest), e) from e + + # Get first blob hash, which should be the index.json + try: + index_digest = spack.oci.image.Digest.from_string(manifest["layers"][0]["digest"]) + except Exception as e: + raise FetchIndexError("Remote index {} is invalid".format(url_manifest), e) from e + + # Fresh? + if index_digest.digest == self.local_hash: + return FetchIndexResult(etag=None, hash=None, data=None, fresh=True) + + # Otherwise fetch the blob / index.json + response = self.urlopen( + urllib.request.Request( + url=self.ref.blob_url(index_digest), + headers={"Accept": "application/vnd.oci.image.layer.v1.tar+gzip"}, + ) + ) + + result = codecs.getreader("utf-8")(response).read() + + # Make sure the blob we download has the advertised hash + if compute_hash(result) != index_digest.digest: + raise FetchIndexError(f"Remote index {url_manifest} is invalid") + + return FetchIndexResult(etag=None, hash=index_digest.digest, data=result, fresh=False) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 13e77927add9ad..94cce16030be32 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -3,16 +3,19 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import argparse +import copy import glob +import hashlib import json +import multiprocessing.pool import os import shutil import sys import tempfile -from typing import List +import urllib.request +from typing import Dict, List, Optional, Tuple import llnl.util.tty as tty -import llnl.util.tty.color as clr from llnl.string import plural from llnl.util.lang import elide_list @@ -22,17 +25,37 @@ import spack.config import spack.environment as ev import spack.error +import spack.hash_types as ht import spack.mirror +import spack.oci.oci +import spack.oci.opener import spack.relocate import spack.repo import spack.spec +import spack.stage import spack.store +import spack.user_environment import spack.util.crypto import spack.util.url as url_util import spack.util.web as web_util +from spack.build_environment import determine_number_of_jobs from spack.cmd import display_specs +from spack.oci.image import ( + Digest, + ImageReference, + default_config, + default_index_tag, + default_manifest, + default_tag, + tag_is_spec, +) +from spack.oci.oci import ( + copy_missing_layers_with_retry, + get_manifest_and_config_with_retry, + upload_blob_with_retry, + upload_manifest_with_retry, +) from spack.spec import Spec, save_dependency_specfiles -from spack.stage import Stage description = "create, download and install binary packages" section = "packaging" @@ -58,7 +81,9 @@ def setup_parser(subparser: argparse.ArgumentParser): push_sign.add_argument( "--key", "-k", metavar="key", type=str, default=None, help="key for signing" ) - push.add_argument("mirror", type=str, help="mirror name, path, or URL") + push.add_argument( + "mirror", type=arguments.mirror_name_or_url, help="mirror name, path, or URL" + ) push.add_argument( "--update-index", "--rebuild-index", @@ -84,7 +109,10 @@ def setup_parser(subparser: argparse.ArgumentParser): action="store_true", help="stop pushing on first failure (default is best effort)", ) - arguments.add_common_arguments(push, ["specs"]) + push.add_argument( + "--base-image", default=None, help="specify the base image for the buildcache. " + ) + arguments.add_common_arguments(push, ["specs", "jobs"]) push.set_defaults(func=push_fn) install = subparsers.add_parser("install", help=install_fn.__doc__) @@ -268,7 +296,22 @@ def _matching_specs(specs: List[Spec]) -> List[Spec]: return [spack.cmd.disambiguate_spec(s, ev.active_environment(), installed=any) for s in specs] -def push_fn(args: argparse.Namespace): +def _format_spec(spec: Spec) -> str: + return spec.cformat("{name}{@version}{/hash:7}") + + +def _progress(i: int, total: int): + if total > 1: + digits = len(str(total)) + return f"[{i+1:{digits}}/{total}] " + return "" + + +def _make_pool(): + return multiprocessing.pool.Pool(determine_number_of_jobs(parallel=True)) + + +def push_fn(args): """create a binary package and push it to a mirror""" if args.spec_file: tty.warn( @@ -281,63 +324,80 @@ def push_fn(args: argparse.Namespace): else: specs = spack.cmd.require_active_env("buildcache push").all_specs() - mirror = arguments.mirror_name_or_url(args.mirror) - if args.allow_root: tty.warn( "The flag `--allow-root` is the default in Spack 0.21, will be removed in Spack 0.22" ) - url = mirror.push_url + # Check if this is an OCI image. + try: + image_ref = spack.oci.oci.image_from_mirror(args.mirror) + except ValueError: + image_ref = None + + # For OCI images, we require dependencies to be pushed for now. + if image_ref: + if "dependencies" not in args.things_to_install: + tty.die("Dependencies must be pushed for OCI images.") + if not args.unsigned: + tty.warn( + "Code signing is currently not supported for OCI images. " + "Use --unsigned to silence this warning." + ) + # This is a list of installed, non-external specs. specs = bindist.specs_to_be_packaged( specs, root="package" in args.things_to_install, dependencies="dependencies" in args.things_to_install, ) + url = args.mirror.push_url + # When pushing multiple specs, print the url once ahead of time, as well as how # many specs are being pushed. if len(specs) > 1: tty.info(f"Selected {len(specs)} specs to push to {url}") - skipped = [] failed = [] - # tty printing - color = clr.get_color_when() - format_spec = lambda s: s.format("{name}{@version}{/hash:7}", color=color) - total_specs = len(specs) - digits = len(str(total_specs)) - - for i, spec in enumerate(specs): - try: - bindist.push_or_raise( - spec, - url, - bindist.PushOptions( - force=args.force, - unsigned=args.unsigned, - key=args.key, - regenerate_index=args.update_index, - ), - ) - - if total_specs > 1: - msg = f"[{i+1:{digits}}/{total_specs}] Pushed {format_spec(spec)}" - else: - msg = f"Pushed {format_spec(spec)} to {url}" + # TODO: unify this logic in the future. + if image_ref: + with tempfile.TemporaryDirectory( + dir=spack.stage.get_stage_root() + ) as tmpdir, _make_pool() as pool: + skipped = _push_oci(args, image_ref, specs, tmpdir, pool) + else: + skipped = [] + + for i, spec in enumerate(specs): + try: + bindist.push_or_raise( + spec, + url, + bindist.PushOptions( + force=args.force, + unsigned=args.unsigned, + key=args.key, + regenerate_index=args.update_index, + ), + ) - tty.info(msg) + msg = f"{_progress(i, len(specs))}Pushed {_format_spec(spec)}" + if len(specs) == 1: + msg += f" to {url}" + tty.info(msg) - except bindist.NoOverwriteException: - skipped.append(format_spec(spec)) + except bindist.NoOverwriteException: + skipped.append(_format_spec(spec)) - # Catch any other exception unless the fail fast option is set - except Exception as e: - if args.fail_fast or isinstance(e, (bindist.PickKeyException, bindist.NoKeyException)): - raise - failed.append((format_spec(spec), e)) + # Catch any other exception unless the fail fast option is set + except Exception as e: + if args.fail_fast or isinstance( + e, (bindist.PickKeyException, bindist.NoKeyException) + ): + raise + failed.append((_format_spec(spec), e)) if skipped: if len(specs) == 1: @@ -364,6 +424,341 @@ def push_fn(args: argparse.Namespace): ), ) + # Update the index if requested + # TODO: remove update index logic out of bindist; should be once after all specs are pushed + # not once per spec. + if image_ref and len(skipped) < len(specs) and args.update_index: + with tempfile.TemporaryDirectory( + dir=spack.stage.get_stage_root() + ) as tmpdir, _make_pool() as pool: + _update_index_oci(image_ref, tmpdir, pool) + + +def _get_spack_binary_blob(image_ref: ImageReference) -> Optional[spack.oci.oci.Blob]: + """Get the spack tarball layer digests and size if it exists""" + try: + manifest, config = get_manifest_and_config_with_retry(image_ref) + + return spack.oci.oci.Blob( + compressed_digest=Digest.from_string(manifest["layers"][-1]["digest"]), + uncompressed_digest=Digest.from_string(config["rootfs"]["diff_ids"][-1]), + size=manifest["layers"][-1]["size"], + ) + except Exception: + return None + + +def _push_single_spack_binary_blob(image_ref: ImageReference, spec: spack.spec.Spec, tmpdir: str): + filename = os.path.join(tmpdir, f"{spec.dag_hash()}.tar.gz") + + # Create an oci.image.layer aka tarball of the package + compressed_tarfile_checksum, tarfile_checksum = spack.oci.oci.create_tarball(spec, filename) + + blob = spack.oci.oci.Blob( + Digest.from_sha256(compressed_tarfile_checksum), + Digest.from_sha256(tarfile_checksum), + os.path.getsize(filename), + ) + + # Upload the blob + upload_blob_with_retry(image_ref, file=filename, digest=blob.compressed_digest) + + # delete the file + os.unlink(filename) + + return blob + + +def _retrieve_env_dict_from_config(config: dict) -> dict: + """Retrieve the environment variables from the image config file. + Sets a default value for PATH if it is not present. + + Args: + config (dict): The image config file. + + Returns: + dict: The environment variables. + """ + env = {"PATH": "/bin:/usr/bin"} + + if "Env" in config.get("config", {}): + for entry in config["config"]["Env"]: + key, value = entry.split("=", 1) + env[key] = value + return env + + +def _archspec_to_gooarch(spec: spack.spec.Spec) -> str: + name = spec.target.family.name + name_map = {"aarch64": "arm64", "x86_64": "amd64"} + return name_map.get(name, name) + + +def _put_manifest( + base_images: Dict[str, Tuple[dict, dict]], + checksums: Dict[str, spack.oci.oci.Blob], + spec: spack.spec.Spec, + image_ref: ImageReference, + tmpdir: str, +): + architecture = _archspec_to_gooarch(spec) + + dependencies = list( + reversed( + list( + s + for s in spec.traverse(order="topo", deptype=("link", "run"), root=True) + if not s.external + ) + ) + ) + + base_manifest, base_config = base_images[architecture] + env = _retrieve_env_dict_from_config(base_config) + + spack.user_environment.environment_modifications_for_specs(spec).apply_modifications(env) + + # Create an oci.image.config file + config = copy.deepcopy(base_config) + + # Add the diff ids of the dependencies + for s in dependencies: + config["rootfs"]["diff_ids"].append(str(checksums[s.dag_hash()].uncompressed_digest)) + + # Set the environment variables + config["config"]["Env"] = [f"{k}={v}" for k, v in env.items()] + + # From the OCI v1.0 spec: + # > Any extra fields in the Image JSON struct are considered implementation + # > specific and MUST be ignored by any implementations which are unable to + # > interpret them. + # We use this to store the Spack spec, so we can use it to create an index. + spec_dict = spec.to_dict(hash=ht.dag_hash) + spec_dict["buildcache_layout_version"] = 1 + spec_dict["binary_cache_checksum"] = { + "hash_algorithm": "sha256", + "hash": checksums[spec.dag_hash()].compressed_digest.digest, + } + config.update(spec_dict) + + config_file = os.path.join(tmpdir, f"{spec.dag_hash()}.config.json") + + with open(config_file, "w") as f: + json.dump(config, f, separators=(",", ":")) + + config_file_checksum = Digest.from_sha256( + spack.util.crypto.checksum(hashlib.sha256, config_file) + ) + + # Upload the config file + upload_blob_with_retry(image_ref, file=config_file, digest=config_file_checksum) + + oci_manifest = { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "schemaVersion": 2, + "config": { + "mediaType": base_manifest["config"]["mediaType"], + "digest": str(config_file_checksum), + "size": os.path.getsize(config_file), + }, + "layers": [ + *(layer for layer in base_manifest["layers"]), + *( + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": str(checksums[s.dag_hash()].compressed_digest), + "size": checksums[s.dag_hash()].size, + } + for s in dependencies + ), + ], + "annotations": {"org.opencontainers.image.description": spec.format()}, + } + + image_ref_for_spec = image_ref.with_tag(default_tag(spec)) + + # Finally upload the manifest + upload_manifest_with_retry(image_ref_for_spec, oci_manifest=oci_manifest) + + # delete the config file + os.unlink(config_file) + + return image_ref_for_spec + + +def _push_oci( + args, + image_ref: ImageReference, + installed_specs_with_deps: List[Spec], + tmpdir: str, + pool: multiprocessing.pool.Pool, +) -> List[str]: + """Push specs to an OCI registry + + Args: + args: The command line arguments. + image_ref: The image reference. + installed_specs_with_deps: The installed specs to push, excluding externals, + including deps, ordered from roots to leaves. + + Returns: + List[str]: The list of skipped specs (already in the buildcache). + """ + + # Reverse the order + installed_specs_with_deps = list(reversed(installed_specs_with_deps)) + + # The base image to use for the package. When not set, we use + # the OCI registry only for storage, and do not use any base image. + base_image_ref: Optional[ImageReference] = ( + ImageReference.from_string(args.base_image) if args.base_image else None + ) + + # Spec dag hash -> blob + checksums: Dict[str, spack.oci.oci.Blob] = {} + + # arch -> (manifest, config) + base_images: Dict[str, Tuple[dict, dict]] = {} + + # Specs not uploaded because they already exist + skipped = [] + + if not args.force: + tty.info("Checking for existing specs in the buildcache") + to_be_uploaded = [] + + tags_to_check = (image_ref.with_tag(default_tag(s)) for s in installed_specs_with_deps) + available_blobs = pool.map(_get_spack_binary_blob, tags_to_check) + + for spec, maybe_blob in zip(installed_specs_with_deps, available_blobs): + if maybe_blob is not None: + checksums[spec.dag_hash()] = maybe_blob + skipped.append(_format_spec(spec)) + else: + to_be_uploaded.append(spec) + else: + to_be_uploaded = installed_specs_with_deps + + if not to_be_uploaded: + return skipped + + tty.info( + f"{len(to_be_uploaded)} specs need to be pushed to {image_ref.domain}/{image_ref.name}" + ) + + # Upload blobs + new_blobs = pool.starmap( + _push_single_spack_binary_blob, ((image_ref, spec, tmpdir) for spec in to_be_uploaded) + ) + + # And update the spec to blob mapping + for spec, blob in zip(to_be_uploaded, new_blobs): + checksums[spec.dag_hash()] = blob + + # Copy base image layers, probably fine to do sequentially. + for spec in to_be_uploaded: + architecture = _archspec_to_gooarch(spec) + # Get base image details, if we don't have them yet + if architecture in base_images: + continue + if base_image_ref is None: + base_images[architecture] = (default_manifest(), default_config(architecture, "linux")) + else: + base_images[architecture] = copy_missing_layers_with_retry( + base_image_ref, image_ref, architecture + ) + + # Upload manifests + tty.info("Uploading manifests") + pushed_image_ref = pool.starmap( + _put_manifest, + ((base_images, checksums, spec, image_ref, tmpdir) for spec in to_be_uploaded), + ) + + # Print the image names of the top-level specs + for spec, ref in zip(to_be_uploaded, pushed_image_ref): + tty.info(f"Pushed {_format_spec(spec)} to {ref}") + + return skipped + + +def _config_from_tag(image_ref: ImageReference, tag: str) -> Optional[dict]: + # Don't allow recursion here, since Spack itself always uploads + # vnd.oci.image.manifest.v1+json, not vnd.oci.image.index.v1+json + _, config = get_manifest_and_config_with_retry(image_ref.with_tag(tag), tag, recurse=0) + + # Do very basic validation: if "spec" is a key in the config, it + # must be a Spec object too. + return config if "spec" in config else None + + +def _update_index_oci( + image_ref: ImageReference, tmpdir: str, pool: multiprocessing.pool.Pool +) -> None: + response = spack.oci.opener.urlopen(urllib.request.Request(url=image_ref.tags_url())) + spack.oci.opener.ensure_status(response, 200) + tags = json.load(response)["tags"] + + # Fetch all image config files in parallel + spec_dicts = pool.starmap( + _config_from_tag, ((image_ref, tag) for tag in tags if tag_is_spec(tag)) + ) + + # Populate the database + db_root_dir = os.path.join(tmpdir, "db_root") + db = bindist.BuildCacheDatabase(db_root_dir) + + for spec_dict in spec_dicts: + spec = Spec.from_dict(spec_dict) + db.add(spec, directory_layout=None) + db.mark(spec, "in_buildcache", True) + + # Create the index.json file + index_json_path = os.path.join(tmpdir, "index.json") + with open(index_json_path, "w") as f: + db._write_to_file(f) + + # Create an empty config.json file + empty_config_json_path = os.path.join(tmpdir, "config.json") + with open(empty_config_json_path, "wb") as f: + f.write(b"{}") + + # Upload the index.json file + index_shasum = Digest.from_sha256(spack.util.crypto.checksum(hashlib.sha256, index_json_path)) + upload_blob_with_retry(image_ref, file=index_json_path, digest=index_shasum) + + # Upload the config.json file + empty_config_digest = Digest.from_sha256( + spack.util.crypto.checksum(hashlib.sha256, empty_config_json_path) + ) + upload_blob_with_retry(image_ref, file=empty_config_json_path, digest=empty_config_digest) + + # Push a manifest file that references the index.json file as a layer + # Notice that we push this as if it is an image, which it of course is not. + # When the ORAS spec becomes official, we can use that instead of a fake image. + # For now we just use the OCI image spec, so that we don't run into issues with + # automatic garbage collection of blobs that are not referenced by any image manifest. + oci_manifest = { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "schemaVersion": 2, + # Config is just an empty {} file for now, and irrelevant + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": str(empty_config_digest), + "size": os.path.getsize(empty_config_json_path), + }, + # The buildcache index is the only layer, and is not a tarball, we lie here. + "layers": [ + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": str(index_shasum), + "size": os.path.getsize(index_json_path), + } + ], + } + + upload_manifest_with_retry(image_ref.with_tag(default_index_tag), oci_manifest) + def install_fn(args): """install from a binary package""" @@ -522,7 +917,7 @@ def copy_buildcache_file(src_url, dest_url, local_path=None): local_path = os.path.join(tmpdir, os.path.basename(src_url)) try: - temp_stage = Stage(src_url, path=os.path.dirname(local_path)) + temp_stage = spack.stage.Stage(src_url, path=os.path.dirname(local_path)) try: temp_stage.create() temp_stage.fetch() @@ -616,6 +1011,20 @@ def manifest_copy(manifest_file_list): def update_index(mirror: spack.mirror.Mirror, update_keys=False): + # Special case OCI images for now. + try: + image_ref = spack.oci.oci.image_from_mirror(mirror) + except ValueError: + image_ref = None + + if image_ref: + with tempfile.TemporaryDirectory( + dir=spack.stage.get_stage_root() + ) as tmpdir, _make_pool() as pool: + _update_index_oci(image_ref, tmpdir, pool) + return + + # Otherwise, assume a normal mirror. url = mirror.push_url bindist.generate_package_index(url_util.join(url, bindist.build_cache_relative_path())) diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index 2b343923c5f9e9..9aa3edac479f50 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -543,7 +543,7 @@ def add_concretizer_args(subparser): ) -def add_s3_connection_args(subparser, add_help): +def add_connection_args(subparser, add_help): subparser.add_argument( "--s3-access-key-id", help="ID string to use to connect to this S3 mirror" ) @@ -559,6 +559,8 @@ def add_s3_connection_args(subparser, add_help): subparser.add_argument( "--s3-endpoint-url", help="endpoint URL to use to connect to this S3 mirror" ) + subparser.add_argument("--oci-username", help="username to use to connect to this OCI mirror") + subparser.add_argument("--oci-password", help="password to use to connect to this OCI mirror") def use_buildcache(cli_arg_value): diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 6edae785a01769..1036dcbe917e35 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -111,7 +111,7 @@ def setup_parser(subparser): "and source use `--type binary --type source` (default)" ), ) - arguments.add_s3_connection_args(add_parser, False) + arguments.add_connection_args(add_parser, False) # Remove remove_parser = sp.add_parser("remove", aliases=["rm"], help=mirror_remove.__doc__) remove_parser.add_argument("name", help="mnemonic name for mirror", metavar="mirror") @@ -141,7 +141,7 @@ def setup_parser(subparser): default=spack.config.default_modify_scope(), help="configuration scope to modify", ) - arguments.add_s3_connection_args(set_url_parser, False) + arguments.add_connection_args(set_url_parser, False) # Set set_parser = sp.add_parser("set", help=mirror_set.__doc__) @@ -170,7 +170,7 @@ def setup_parser(subparser): default=spack.config.default_modify_scope(), help="configuration scope to modify", ) - arguments.add_s3_connection_args(set_parser, False) + arguments.add_connection_args(set_parser, False) # List list_parser = sp.add_parser("list", help=mirror_list.__doc__) @@ -192,6 +192,8 @@ def mirror_add(args): or args.s3_profile or args.s3_endpoint_url or args.type + or args.oci_username + or args.oci_password ): connection = {"url": args.url} if args.s3_access_key_id and args.s3_access_key_secret: @@ -202,6 +204,8 @@ def mirror_add(args): connection["profile"] = args.s3_profile if args.s3_endpoint_url: connection["endpoint_url"] = args.s3_endpoint_url + if args.oci_username and args.oci_password: + connection["access_pair"] = [args.oci_username, args.oci_password] if args.type: connection["binary"] = "binary" in args.type connection["source"] = "source" in args.type @@ -235,6 +239,8 @@ def _configure_mirror(args): changes["profile"] = args.s3_profile if args.s3_endpoint_url: changes["endpoint_url"] = args.s3_endpoint_url + if args.oci_username and args.oci_password: + changes["access_pair"] = [args.oci_username, args.oci_password] # argparse cannot distinguish between --binary and --no-binary when same dest :( # notice that set-url does not have these args, so getattr diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index aa96bbbe5106d9..a7b3d25043e5b9 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -28,6 +28,7 @@ import os.path import re import shutil +import urllib.error import urllib.parse from typing import List, Optional @@ -41,6 +42,7 @@ import spack.config import spack.error +import spack.oci.opener import spack.url import spack.util.crypto as crypto import spack.util.git @@ -537,6 +539,34 @@ def fetch(self): tty.msg("Using cached archive: {0}".format(path)) +class OCIRegistryFetchStrategy(URLFetchStrategy): + def __init__(self, url=None, checksum=None, **kwargs): + super().__init__(url, checksum, **kwargs) + + self._urlopen = kwargs.get("_urlopen", spack.oci.opener.urlopen) + + @_needs_stage + def fetch(self): + file = self.stage.save_filename + tty.msg(f"Fetching {self.url}") + + try: + response = self._urlopen(self.url) + except urllib.error.URLError as e: + # clean up archive on failure. + if self.archive_file: + os.remove(self.archive_file) + if os.path.lexists(file): + os.remove(file) + raise FailedDownloadError(self.url, f"Failed to fetch {self.url}: {e}") from e + + if os.path.lexists(file): + os.remove(file) + + with open(file, "wb") as f: + shutil.copyfileobj(response, f) + + class VCSFetchStrategy(FetchStrategy): """Superclass for version control system fetch strategies. diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 32037502c580a1..d5425772cdd3be 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -18,7 +18,7 @@ import sys import traceback import urllib.parse -from typing import Optional, Union +from typing import List, Optional, Union import llnl.url import llnl.util.tty as tty @@ -27,18 +27,18 @@ import spack.caches import spack.config import spack.error -import spack.fetch_strategy as fs +import spack.fetch_strategy import spack.mirror +import spack.oci.image import spack.spec import spack.util.path import spack.util.spack_json as sjson import spack.util.spack_yaml as syaml import spack.util.url as url_util -from spack.util.spack_yaml import syaml_dict -from spack.version import VersionList +import spack.version #: What schemes do we support -supported_url_schemes = ("file", "http", "https", "sftp", "ftp", "s3", "gs") +supported_url_schemes = ("file", "http", "https", "sftp", "ftp", "s3", "gs", "oci") def _url_or_path_to_url(url_or_path: str) -> str: @@ -230,12 +230,12 @@ def _get_value(self, attribute: str, direction: str): value = self._data.get(direction, {}) # Return top-level entry if only a URL was set. - if isinstance(value, str): - return self._data.get(attribute, None) + if isinstance(value, str) or attribute not in value: + return self._data.get(attribute) - return self._data.get(direction, {}).get(attribute, None) + return value[attribute] - def get_url(self, direction: str): + def get_url(self, direction: str) -> str: if direction not in ("fetch", "push"): raise ValueError(f"direction must be either 'fetch' or 'push', not {direction}") @@ -255,18 +255,21 @@ def get_url(self, direction: str): elif "url" in info: url = info["url"] - return _url_or_path_to_url(url) if url else None + if not url: + raise ValueError(f"Mirror {self.name} has no URL configured") - def get_access_token(self, direction: str): + return _url_or_path_to_url(url) + + def get_access_token(self, direction: str) -> Optional[str]: return self._get_value("access_token", direction) - def get_access_pair(self, direction: str): + def get_access_pair(self, direction: str) -> Optional[List]: return self._get_value("access_pair", direction) - def get_profile(self, direction: str): + def get_profile(self, direction: str) -> Optional[str]: return self._get_value("profile", direction) - def get_endpoint_url(self, direction: str): + def get_endpoint_url(self, direction: str) -> Optional[str]: return self._get_value("endpoint_url", direction) @@ -330,7 +333,7 @@ def from_json(stream, name=None): raise sjson.SpackJSONError("error parsing JSON mirror collection:", str(e)) from e def to_dict(self, recursive=False): - return syaml_dict( + return syaml.syaml_dict( sorted( ((k, (v.to_dict() if recursive else v)) for (k, v) in self._mirrors.items()), key=operator.itemgetter(0), @@ -372,7 +375,7 @@ def __len__(self): def _determine_extension(fetcher): - if isinstance(fetcher, fs.URLFetchStrategy): + if isinstance(fetcher, spack.fetch_strategy.URLFetchStrategy): if fetcher.expand_archive: # If we fetch with a URLFetchStrategy, use URL's archive type ext = llnl.url.determine_url_file_extension(fetcher.url) @@ -437,6 +440,19 @@ def __iter__(self): yield self.cosmetic_path +class OCIImageLayout: + """Follow the OCI Image Layout Specification to archive blobs + + Paths are of the form `blobs//` + """ + + def __init__(self, digest: spack.oci.image.Digest) -> None: + self.storage_path = os.path.join("blobs", digest.algorithm, digest.digest) + + def __iter__(self): + yield self.storage_path + + def mirror_archive_paths(fetcher, per_package_ref, spec=None): """Returns a ``MirrorReference`` object which keeps track of the relative storage path of the resource associated with the specified ``fetcher``.""" @@ -482,7 +498,7 @@ def get_all_versions(specs): for version in pkg_cls.versions: version_spec = spack.spec.Spec(pkg_cls.name) - version_spec.versions = VersionList([version]) + version_spec.versions = spack.version.VersionList([version]) version_specs.append(version_spec) return version_specs @@ -521,7 +537,7 @@ def get_matching_versions(specs, num_versions=1): # Generate only versions that satisfy the spec. if spec.concrete or v.intersects(spec.versions): s = spack.spec.Spec(pkg.name) - s.versions = VersionList([v]) + s.versions = spack.version.VersionList([v]) s.variants = spec.variants.copy() # This is needed to avoid hanging references during the # concretization phase @@ -591,14 +607,14 @@ def add(mirror: Mirror, scope=None): """Add a named mirror in the given scope""" mirrors = spack.config.get("mirrors", scope=scope) if not mirrors: - mirrors = syaml_dict() + mirrors = syaml.syaml_dict() if mirror.name in mirrors: tty.die("Mirror with name {} already exists.".format(mirror.name)) items = [(n, u) for n, u in mirrors.items()] items.insert(0, (mirror.name, mirror.to_dict())) - mirrors = syaml_dict(items) + mirrors = syaml.syaml_dict(items) spack.config.set("mirrors", mirrors, scope=scope) @@ -606,7 +622,7 @@ def remove(name, scope): """Remove the named mirror in the given scope""" mirrors = spack.config.get("mirrors", scope=scope) if not mirrors: - mirrors = syaml_dict() + mirrors = syaml.syaml_dict() if name not in mirrors: tty.die("No mirror with name %s" % name) diff --git a/lib/spack/spack/oci/__init__.py b/lib/spack/spack/oci/__init__.py new file mode 100644 index 00000000000000..af304aecb70f37 --- /dev/null +++ b/lib/spack/spack/oci/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2013-2023 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) diff --git a/lib/spack/spack/oci/image.py b/lib/spack/spack/oci/image.py new file mode 100644 index 00000000000000..1954bf013d6142 --- /dev/null +++ b/lib/spack/spack/oci/image.py @@ -0,0 +1,228 @@ +# Copyright 2013-2023 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) + +import re +import urllib.parse +from typing import Optional, Union + +import spack.spec + +# all the building blocks +alphanumeric = r"[a-z0-9]+" +separator = r"(?:[._]|__|[-]+)" +localhost = r"localhost" +domainNameComponent = r"(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])" +optionalPort = r"(?::[0-9]+)?" +tag = r"[\w][\w.-]{0,127}" +digestPat = r"[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][0-9a-fA-F]{32,}" +ipv6address = r"\[(?:[a-fA-F0-9:]+)\]" + +# domain name +domainName = rf"{domainNameComponent}(?:\.{domainNameComponent})*" +host = rf"(?:{domainName}|{ipv6address})" +domainAndPort = rf"{host}{optionalPort}" + +# image name +pathComponent = rf"{alphanumeric}(?:{separator}{alphanumeric})*" +remoteName = rf"{pathComponent}(?:\/{pathComponent})*" +namePat = rf"(?:{domainAndPort}\/)?{remoteName}" + +# Regex for a full image reference, with 3 groups: name, tag, digest +referencePat = re.compile(rf"^({namePat})(?::({tag}))?(?:@({digestPat}))?$") + +# Regex for splitting the name into domain and path components +anchoredNameRegexp = re.compile(rf"^(?:({domainAndPort})\/)?({remoteName})$") + + +def ensure_sha256_checksum(oci_blob: str): + """Validate that the reference is of the format sha256: + Return the checksum if valid, raise ValueError otherwise.""" + if ":" not in oci_blob: + raise ValueError(f"Invalid OCI blob format: {oci_blob}") + alg, checksum = oci_blob.split(":", 1) + if alg != "sha256": + raise ValueError(f"Unsupported OCI blob checksum algorithm: {alg}") + if len(checksum) != 64: + raise ValueError(f"Invalid OCI blob checksum length: {len(checksum)}") + return checksum + + +class Digest: + """Represents a digest in the format :. + Currently only supports sha256 digests.""" + + __slots__ = ["algorithm", "digest"] + + def __init__(self, *, algorithm: str, digest: str) -> None: + self.algorithm = algorithm + self.digest = digest + + def __eq__(self, __value: object) -> bool: + if not isinstance(__value, Digest): + return NotImplemented + return self.algorithm == __value.algorithm and self.digest == __value.digest + + @classmethod + def from_string(cls, string: str) -> "Digest": + return cls(algorithm="sha256", digest=ensure_sha256_checksum(string)) + + @classmethod + def from_sha256(cls, digest: str) -> "Digest": + return cls(algorithm="sha256", digest=digest) + + def __str__(self) -> str: + return f"{self.algorithm}:{self.digest}" + + +class ImageReference: + """A parsed image of the form domain/name:tag[@digest]. + The digest is optional, and domain and tag are automatically + filled out with defaults when parsed from string.""" + + __slots__ = ["domain", "name", "tag", "digest"] + + def __init__( + self, *, domain: str, name: str, tag: str = "latest", digest: Optional[Digest] = None + ): + self.domain = domain + self.name = name + self.tag = tag + self.digest = digest + + @classmethod + def from_string(cls, string) -> "ImageReference": + match = referencePat.match(string) + if not match: + raise ValueError(f"Invalid image reference: {string}") + + image, tag, digest = match.groups() + + assert isinstance(image, str) + assert isinstance(tag, (str, type(None))) + assert isinstance(digest, (str, type(None))) + + match = anchoredNameRegexp.match(image) + + # This can never happen, since the regex is implied + # by the regex above. It's just here to make mypy happy. + assert match, f"Invalid image reference: {string}" + + domain, name = match.groups() + + assert isinstance(domain, (str, type(None))) + assert isinstance(name, str) + + # Fill out defaults like docker would do... + # Based on github.com/distribution/distribution: allow short names like "ubuntu" + # and "user/repo" to be interpreted as "library/ubuntu" and "user/repo:latest + # Not sure if Spack should follow Docker, but it's what people expect... + if not domain: + domain = "index.docker.io" + name = f"library/{name}" + elif ( + "." not in domain + and ":" not in domain + and domain != "localhost" + and domain == domain.lower() + ): + name = f"{domain}/{name}" + domain = "index.docker.io" + + if not tag: + tag = "latest" + + # sha256 is currently the only algorithm that + # we implement, even though the spec allows for more + if isinstance(digest, str): + digest = Digest.from_string(digest) + + return cls(domain=domain, name=name, tag=tag, digest=digest) + + def manifest_url(self) -> str: + digest_or_tag = self.digest or self.tag + return f"https://{self.domain}/v2/{self.name}/manifests/{digest_or_tag}" + + def blob_url(self, digest: Union[str, Digest]) -> str: + if isinstance(digest, str): + digest = Digest.from_string(digest) + return f"https://{self.domain}/v2/{self.name}/blobs/{digest}" + + def with_digest(self, digest: Union[str, Digest]) -> "ImageReference": + if isinstance(digest, str): + digest = Digest.from_string(digest) + return ImageReference(domain=self.domain, name=self.name, tag=self.tag, digest=digest) + + def with_tag(self, tag: str) -> "ImageReference": + return ImageReference(domain=self.domain, name=self.name, tag=tag, digest=self.digest) + + def uploads_url(self, digest: Optional[Digest] = None) -> str: + url = f"https://{self.domain}/v2/{self.name}/blobs/uploads/" + if digest: + url += f"?digest={digest}" + return url + + def tags_url(self) -> str: + return f"https://{self.domain}/v2/{self.name}/tags/list" + + def endpoint(self, path: str = "") -> str: + return urllib.parse.urljoin(f"https://{self.domain}/v2/", path) + + def __str__(self) -> str: + s = f"{self.domain}/{self.name}" + if self.tag: + s += f":{self.tag}" + if self.digest: + s += f"@{self.digest}" + return s + + def __eq__(self, __value: object) -> bool: + if not isinstance(__value, ImageReference): + return NotImplemented + return ( + self.domain == __value.domain + and self.name == __value.name + and self.tag == __value.tag + and self.digest == __value.digest + ) + + +def _ensure_valid_tag(tag: str) -> str: + """Ensure a tag is valid for an OCI registry.""" + sanitized = re.sub(r"[^\w.-]", "_", tag) + if len(sanitized) > 128: + return sanitized[:64] + sanitized[-64:] + return sanitized + + +def default_tag(spec: "spack.spec.Spec") -> str: + """Return a valid, default image tag for a spec.""" + return _ensure_valid_tag(f"{spec.name}-{spec.version}-{spec.dag_hash()}.spack") + + +#: Default OCI index tag +default_index_tag = "index.spack" + + +def tag_is_spec(tag: str) -> bool: + """Check if a tag is likely a Spec""" + return tag.endswith(".spack") and tag != default_index_tag + + +def default_config(architecture: str, os: str): + return { + "architecture": architecture, + "os": os, + "rootfs": {"type": "layers", "diff_ids": []}, + "config": {"Env": []}, + } + + +def default_manifest(): + return { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "schemaVersion": 2, + "config": {"mediaType": "application/vnd.oci.image.config.v1+json"}, + "layers": [], + } diff --git a/lib/spack/spack/oci/oci.py b/lib/spack/spack/oci/oci.py new file mode 100644 index 00000000000000..4e5e196cd10db9 --- /dev/null +++ b/lib/spack/spack/oci/oci.py @@ -0,0 +1,381 @@ +# Copyright 2013-2023 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) + +import hashlib +import json +import os +import time +import urllib.error +import urllib.parse +import urllib.request +from http.client import HTTPResponse +from typing import NamedTuple, Tuple +from urllib.request import Request + +import llnl.util.tty as tty + +import spack.binary_distribution +import spack.config +import spack.error +import spack.fetch_strategy +import spack.mirror +import spack.oci.opener +import spack.repo +import spack.spec +import spack.stage +import spack.traverse +import spack.util.crypto + +from .image import Digest, ImageReference + + +class Blob(NamedTuple): + compressed_digest: Digest + uncompressed_digest: Digest + size: int + + +def create_tarball(spec: spack.spec.Spec, tarfile_path): + buildinfo = spack.binary_distribution.get_buildinfo_dict(spec) + return spack.binary_distribution._do_create_tarball(tarfile_path, spec.prefix, buildinfo) + + +def _log_upload_progress(digest: Digest, size: int, elapsed: float): + elapsed = max(elapsed, 0.001) # guard against division by zero + tty.info(f"Uploaded {digest} ({elapsed:.2f}s, {size / elapsed / 1024 / 1024:.2f} MB/s)") + + +def with_query_param(url: str, param: str, value: str) -> str: + """Add a query parameter to a URL + + Args: + url: The URL to add the parameter to. + param: The parameter name. + value: The parameter value. + + Returns: + The URL with the parameter added. + """ + parsed = urllib.parse.urlparse(url) + query = urllib.parse.parse_qs(parsed.query) + if param in query: + query[param].append(value) + else: + query[param] = [value] + return urllib.parse.urlunparse( + parsed._replace(query=urllib.parse.urlencode(query, doseq=True)) + ) + + +def upload_blob( + ref: ImageReference, + file: str, + digest: Digest, + force: bool = False, + small_file_size: int = 0, + _urlopen: spack.oci.opener.MaybeOpen = None, +) -> bool: + """Uploads a blob to an OCI registry + + We only do monolithic uploads, even though it's very simple to do chunked. + Observed problems with chunked uploads: + (1) it's slow, many sequential requests, (2) some registries set an *unknown* + max chunk size, and the spec doesn't say how to obtain it + + Args: + ref: The image reference. + file: The file to upload. + digest: The digest of the file. + force: Whether to force upload the blob, even if it already exists. + small_file_size: For files at most this size, attempt + to do a single POST request instead of POST + PUT. + Some registries do no support single requests, and others + do not specify what size they support in single POST. + For now this feature is disabled by default (0KB) + + Returns: + True if the blob was uploaded, False if it already existed. + """ + _urlopen = _urlopen or spack.oci.opener.urlopen + + # Test if the blob already exists, if so, early exit. + if not force and blob_exists(ref, digest, _urlopen): + return False + + start = time.time() + + with open(file, "rb") as f: + file_size = os.fstat(f.fileno()).st_size + + # For small blobs, do a single POST request. + # The spec says that registries MAY support this + if file_size <= small_file_size: + request = Request( + url=ref.uploads_url(digest), + method="POST", + data=f, + headers={ + "Content-Type": "application/octet-stream", + "Content-Length": str(file_size), + }, + ) + else: + request = Request( + url=ref.uploads_url(), method="POST", headers={"Content-Length": "0"} + ) + + response = _urlopen(request) + + # Created the blob in one go. + if response.status == 201: + _log_upload_progress(digest, file_size, time.time() - start) + return True + + # Otherwise, do another PUT request. + spack.oci.opener.ensure_status(response, 202) + assert "Location" in response.headers + + # Can be absolute or relative, joining handles both + upload_url = with_query_param( + ref.endpoint(response.headers["Location"]), "digest", str(digest) + ) + f.seek(0) + + response = _urlopen( + Request( + url=upload_url, + method="PUT", + data=f, + headers={ + "Content-Type": "application/octet-stream", + "Content-Length": str(file_size), + }, + ) + ) + + spack.oci.opener.ensure_status(response, 201) + + # print elapsed time and # MB/s + _log_upload_progress(digest, file_size, time.time() - start) + return True + + +def upload_manifest( + ref: ImageReference, + oci_manifest: dict, + tag: bool = True, + _urlopen: spack.oci.opener.MaybeOpen = None, +): + """Uploads a manifest/index to a registry + + Args: + ref: The image reference. + oci_manifest: The OCI manifest or index. + tag: When true, use the tag, otherwise use the digest, + this is relevant for multi-arch images, where the + tag is an index, referencing the manifests by digest. + + Returns: + The digest and size of the uploaded manifest. + """ + _urlopen = _urlopen or spack.oci.opener.urlopen + + data = json.dumps(oci_manifest, separators=(",", ":")).encode() + digest = Digest.from_sha256(hashlib.sha256(data).hexdigest()) + size = len(data) + + if not tag: + ref = ref.with_digest(digest) + + response = _urlopen( + Request( + url=ref.manifest_url(), + method="PUT", + data=data, + headers={"Content-Type": oci_manifest["mediaType"]}, + ) + ) + + spack.oci.opener.ensure_status(response, 201) + return digest, size + + +def image_from_mirror(mirror: spack.mirror.Mirror) -> ImageReference: + """Given an OCI based mirror, extract the URL and image name from it""" + url = mirror.push_url + if not url.startswith("oci://"): + raise ValueError(f"Mirror {mirror} is not an OCI mirror") + return ImageReference.from_string(url[6:]) + + +def blob_exists( + ref: ImageReference, digest: Digest, _urlopen: spack.oci.opener.MaybeOpen = None +) -> bool: + """Checks if a blob exists in an OCI registry""" + try: + _urlopen = _urlopen or spack.oci.opener.urlopen + response = _urlopen(Request(url=ref.blob_url(digest), method="HEAD")) + return response.status == 200 + except urllib.error.HTTPError as e: + if e.getcode() == 404: + return False + raise + + +def copy_missing_layers( + src: ImageReference, + dst: ImageReference, + architecture: str, + _urlopen: spack.oci.opener.MaybeOpen = None, +) -> Tuple[dict, dict]: + """Copy image layers from src to dst for given architecture. + + Args: + src: The source image reference. + dst: The destination image reference. + architecture: The architecture (when referencing an index) + + Returns: + Tuple of manifest and config of the base image. + """ + _urlopen = _urlopen or spack.oci.opener.urlopen + manifest, config = get_manifest_and_config(src, architecture, _urlopen=_urlopen) + + # Get layer digests + digests = [Digest.from_string(layer["digest"]) for layer in manifest["layers"]] + + # Filter digests that are don't exist in the registry + missing_digests = [ + digest for digest in digests if not blob_exists(dst, digest, _urlopen=_urlopen) + ] + + if not missing_digests: + return manifest, config + + # Pull missing blobs, push them to the registry + with spack.stage.StageComposite.from_iterable( + make_stage(url=src.blob_url(digest), digest=digest, _urlopen=_urlopen) + for digest in missing_digests + ) as stages: + stages.fetch() + stages.check() + stages.cache_local() + + for stage, digest in zip(stages, missing_digests): + # No need to check existince again, force=True. + upload_blob( + dst, file=stage.save_filename, force=True, digest=digest, _urlopen=_urlopen + ) + + return manifest, config + + +#: OCI manifest content types (including docker type) +manifest_content_type = [ + "application/vnd.oci.image.manifest.v1+json", + "application/vnd.docker.distribution.manifest.v2+json", +] + +#: OCI index content types (including docker type) +index_content_type = [ + "application/vnd.oci.image.index.v1+json", + "application/vnd.docker.distribution.manifest.list.v2+json", +] + +#: All OCI manifest / index content types +all_content_type = manifest_content_type + index_content_type + + +def get_manifest_and_config( + ref: ImageReference, + architecture="amd64", + recurse=3, + _urlopen: spack.oci.opener.MaybeOpen = None, +) -> Tuple[dict, dict]: + """Recursively fetch manifest and config for a given image reference + with a given architecture. + + Args: + ref: The image reference. + architecture: The architecture (when referencing an index) + recurse: How many levels of index to recurse into. + + Returns: + A tuple of (manifest, config)""" + + _urlopen = _urlopen or spack.oci.opener.urlopen + + # Get manifest + response: HTTPResponse = _urlopen( + Request(url=ref.manifest_url(), headers={"Accept": ", ".join(all_content_type)}) + ) + + # Recurse when we find an index + if response.headers["Content-Type"] in index_content_type: + if recurse == 0: + raise Exception("Maximum recursion depth reached while fetching OCI manifest") + + index = json.load(response) + manifest_meta = next( + manifest + for manifest in index["manifests"] + if manifest["platform"]["architecture"] == architecture + ) + + return get_manifest_and_config( + ref.with_digest(manifest_meta["digest"]), + architecture=architecture, + recurse=recurse - 1, + _urlopen=_urlopen, + ) + + # Otherwise, require a manifest + if response.headers["Content-Type"] not in manifest_content_type: + raise Exception(f"Unknown content type {response.headers['Content-Type']}") + + manifest = json.load(response) + + # Download, verify and cache config file + config_digest = Digest.from_string(manifest["config"]["digest"]) + with make_stage(ref.blob_url(config_digest), config_digest, _urlopen=_urlopen) as stage: + stage.fetch() + stage.check() + stage.cache_local() + with open(stage.save_filename, "rb") as f: + config = json.load(f) + + return manifest, config + + +#: Same as upload_manifest, but with retry wrapper +upload_manifest_with_retry = spack.oci.opener.default_retry(upload_manifest) + +#: Same as upload_blob, but with retry wrapper +upload_blob_with_retry = spack.oci.opener.default_retry(upload_blob) + +#: Same as get_manifest_and_config, but with retry wrapper +get_manifest_and_config_with_retry = spack.oci.opener.default_retry(get_manifest_and_config) + +#: Same as copy_missing_layers, but with retry wrapper +copy_missing_layers_with_retry = spack.oci.opener.default_retry(copy_missing_layers) + + +def make_stage( + url: str, digest: Digest, keep: bool = False, _urlopen: spack.oci.opener.MaybeOpen = None +) -> spack.stage.Stage: + _urlopen = _urlopen or spack.oci.opener.urlopen + fetch_strategy = spack.fetch_strategy.OCIRegistryFetchStrategy( + url, checksum=digest.digest, _urlopen=_urlopen + ) + # Use blobs// as the cache path, which follows + # the OCI Image Layout Specification. What's missing though, + # is the `oci-layout` and `index.json` files, which are + # required by the spec. + return spack.stage.Stage( + fetch_strategy, + mirror_paths=spack.mirror.OCIImageLayout(digest), + name=digest.digest, + keep=keep, + ) diff --git a/lib/spack/spack/oci/opener.py b/lib/spack/spack/oci/opener.py new file mode 100644 index 00000000000000..792598578d3204 --- /dev/null +++ b/lib/spack/spack/oci/opener.py @@ -0,0 +1,442 @@ +# Copyright 2013-2023 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) + +"""All the logic for OCI fetching and authentication""" + +import base64 +import json +import re +import time +import urllib.error +import urllib.parse +import urllib.request +from enum import Enum, auto +from http.client import HTTPResponse +from typing import Callable, Dict, Iterable, List, NamedTuple, Optional, Tuple +from urllib.request import Request + +import llnl.util.lang + +import spack.config +import spack.mirror +import spack.parser +import spack.repo +import spack.util.web + +from .image import ImageReference + + +def _urlopen(): + opener = create_opener() + + def dispatch_open(fullurl, data=None, timeout=None): + timeout = timeout or spack.config.get("config:connect_timeout", 10) + return opener.open(fullurl, data, timeout) + + return dispatch_open + + +OpenType = Callable[..., HTTPResponse] +MaybeOpen = Optional[OpenType] + +#: Opener that automatically uses OCI authentication based on mirror config +urlopen: OpenType = llnl.util.lang.Singleton(_urlopen) + + +SP = r" " +OWS = r"[ \t]*" +BWS = OWS +HTAB = r"\t" +VCHAR = r"\x21-\x7E" +tchar = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]" +token = rf"{tchar}+" +obs_text = r"\x80-\xFF" +qdtext = rf"[{HTAB}{SP}\x21\x23-\x5B\x5D-\x7E{obs_text}]" +quoted_pair = rf"\\([{HTAB}{SP}{VCHAR}{obs_text}])" +quoted_string = rf'"(?:({qdtext}*)|{quoted_pair})*"' + + +class TokenType(spack.parser.TokenBase): + AUTH_PARAM = rf"({token}){BWS}={BWS}({token}|{quoted_string})" + # TOKEN68 = r"([A-Za-z0-9\-._~+/]+=*)" # todo... support this? + TOKEN = rf"{tchar}+" + EQUALS = rf"{BWS}={BWS}" + COMMA = rf"{OWS},{OWS}" + SPACE = r" +" + EOF = r"$" + ANY = r"." + + +TOKEN_REGEXES = [rf"(?P<{token}>{token.regex})" for token in TokenType] + +ALL_TOKENS = re.compile("|".join(TOKEN_REGEXES)) + + +class State(Enum): + CHALLENGE = auto() + AUTH_PARAM_LIST_START = auto() + AUTH_PARAM = auto() + NEXT_IN_LIST = auto() + AUTH_PARAM_OR_SCHEME = auto() + + +def tokenize(input: str): + scanner = ALL_TOKENS.scanner(input) # type: ignore[attr-defined] + + for match in iter(scanner.match, None): # type: ignore[var-annotated] + yield spack.parser.Token( + TokenType.__members__[match.lastgroup], # type: ignore[attr-defined] + match.group(), # type: ignore[attr-defined] + match.start(), # type: ignore[attr-defined] + match.end(), # type: ignore[attr-defined] + ) + + +class Challenge: + __slots__ = ["scheme", "params"] + + def __init__( + self, scheme: Optional[str] = None, params: Optional[List[Tuple[str, str]]] = None + ) -> None: + self.scheme = scheme or "" + self.params = params or [] + + def __repr__(self) -> str: + return f"Challenge({self.scheme}, {self.params})" + + def __eq__(self, other: object) -> bool: + return ( + isinstance(other, Challenge) + and self.scheme == other.scheme + and self.params == other.params + ) + + +def parse_www_authenticate(input: str): + """Very basic parsing of www-authenticate parsing (RFC7235 section 4.1) + Notice: this omits token68 support.""" + + # auth-scheme = token + # auth-param = token BWS "=" BWS ( token / quoted-string ) + # challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ] + # WWW-Authenticate = 1#challenge + + challenges: List[Challenge] = [] + + _unquote = re.compile(quoted_pair).sub + unquote = lambda s: _unquote(r"\1", s[1:-1]) + + mode: State = State.CHALLENGE + tokens = tokenize(input) + + current_challenge = Challenge() + + def extract_auth_param(input: str) -> Tuple[str, str]: + key, value = input.split("=", 1) + key = key.rstrip() + value = value.lstrip() + if value.startswith('"'): + value = unquote(value) + return key, value + + while True: + token: spack.parser.Token = next(tokens) + + if mode == State.CHALLENGE: + if token.kind == TokenType.EOF: + raise ValueError(token) + elif token.kind == TokenType.TOKEN: + current_challenge.scheme = token.value + mode = State.AUTH_PARAM_LIST_START + else: + raise ValueError(token) + + elif mode == State.AUTH_PARAM_LIST_START: + if token.kind == TokenType.EOF: + challenges.append(current_challenge) + break + elif token.kind == TokenType.COMMA: + # Challenge without param list, followed by another challenge. + challenges.append(current_challenge) + current_challenge = Challenge() + mode = State.CHALLENGE + elif token.kind == TokenType.SPACE: + # A space means it must be followed by param list + mode = State.AUTH_PARAM + else: + raise ValueError(token) + + elif mode == State.AUTH_PARAM: + if token.kind == TokenType.EOF: + raise ValueError(token) + elif token.kind == TokenType.AUTH_PARAM: + key, value = extract_auth_param(token.value) + current_challenge.params.append((key, value)) + mode = State.NEXT_IN_LIST + else: + raise ValueError(token) + + elif mode == State.NEXT_IN_LIST: + if token.kind == TokenType.EOF: + challenges.append(current_challenge) + break + elif token.kind == TokenType.COMMA: + mode = State.AUTH_PARAM_OR_SCHEME + else: + raise ValueError(token) + + elif mode == State.AUTH_PARAM_OR_SCHEME: + if token.kind == TokenType.EOF: + raise ValueError(token) + elif token.kind == TokenType.TOKEN: + challenges.append(current_challenge) + current_challenge = Challenge(token.value) + mode = State.AUTH_PARAM_LIST_START + elif token.kind == TokenType.AUTH_PARAM: + key, value = extract_auth_param(token.value) + current_challenge.params.append((key, value)) + mode = State.NEXT_IN_LIST + + return challenges + + +class RealmServiceScope(NamedTuple): + realm: str + service: str + scope: str + + +class UsernamePassword(NamedTuple): + username: str + password: str + + +def get_bearer_challenge(challenges: List[Challenge]) -> Optional[RealmServiceScope]: + # Find a challenge that we can handle (currently only Bearer) + challenge = next((c for c in challenges if c.scheme == "Bearer"), None) + + if challenge is None: + return None + + # Get realm / service / scope from challenge + realm = next((v for k, v in challenge.params if k == "realm"), None) + service = next((v for k, v in challenge.params if k == "service"), None) + scope = next((v for k, v in challenge.params if k == "scope"), None) + + if realm is None or service is None or scope is None: + return None + + return RealmServiceScope(realm, service, scope) + + +class OCIAuthHandler(urllib.request.BaseHandler): + def __init__(self, credentials_provider: Callable[[str], Optional[UsernamePassword]]): + """ + Args: + credentials_provider: A function that takes a domain and may return a UsernamePassword. + """ + self.credentials_provider = credentials_provider + + # Cached bearer tokens for a given domain. + self.cached_tokens: Dict[str, str] = {} + + def obtain_bearer_token(self, registry: str, challenge: RealmServiceScope, timeout) -> str: + # See https://docs.docker.com/registry/spec/auth/token/ + + query = urllib.parse.urlencode( + {"service": challenge.service, "scope": challenge.scope, "client_id": "spack"} + ) + + parsed = urllib.parse.urlparse(challenge.realm)._replace( + query=query, fragment="", params="" + ) + + # Don't send credentials over insecure transport. + if parsed.scheme != "https": + raise ValueError( + f"Cannot login to {registry} over insecure {parsed.scheme} connection" + ) + + request = Request(urllib.parse.urlunparse(parsed)) + + # I guess we shouldn't cache this, since we don't know + # the context in which it's used (may depend on config) + pair = self.credentials_provider(registry) + + if pair is not None: + encoded = base64.b64encode(f"{pair.username}:{pair.password}".encode("utf-8")).decode( + "utf-8" + ) + request.add_unredirected_header("Authorization", f"Basic {encoded}") + + # Do a GET request. + response = self.parent.open(request, timeout=timeout) + + # Read the response and parse the JSON + response_json = json.load(response) + + # Get the token from the response + token = response_json["token"] + + # Remember the last obtained token for this registry + # Note: we should probably take into account realm, service and scope + # so we can store multiple tokens for the same registry. + self.cached_tokens[registry] = token + + return token + + def https_request(self, req: Request): + # Eagerly add the bearer token to the request if no + # auth header is set yet, to avoid 401s in multiple + # requests to the same registry. + + # Use has_header, not .headers, since there are two + # types of headers (redirected and unredirected) + if req.has_header("Authorization"): + return req + + parsed = urllib.parse.urlparse(req.full_url) + token = self.cached_tokens.get(parsed.netloc) + + if not token: + return req + + req.add_unredirected_header("Authorization", f"Bearer {token}") + return req + + def http_error_401(self, req: Request, fp, code, msg, headers): + # Login failed, avoid infinite recursion where we go back and + # forth between auth server and registry + if hasattr(req, "login_attempted"): + raise urllib.error.HTTPError( + req.full_url, code, f"Failed to login to {req.full_url}: {msg}", headers, fp + ) + + # On 401 Unauthorized, parse the WWW-Authenticate header + # to determine what authentication is required + if "WWW-Authenticate" not in headers: + raise urllib.error.HTTPError( + req.full_url, + code, + "Cannot login to registry, missing WWW-Authenticate header", + headers, + fp, + ) + + header_value = headers["WWW-Authenticate"] + + try: + challenge = get_bearer_challenge(parse_www_authenticate(header_value)) + except ValueError as e: + raise urllib.error.HTTPError( + req.full_url, + code, + f"Cannot login to registry, malformed WWW-Authenticate header: {header_value}", + headers, + fp, + ) from e + + # If there is no bearer challenge, we can't handle it + if not challenge: + raise urllib.error.HTTPError( + req.full_url, + code, + f"Cannot login to registry, unsupported authentication scheme: {header_value}", + headers, + fp, + ) + + # Get the token from the auth handler + try: + token = self.obtain_bearer_token( + registry=urllib.parse.urlparse(req.get_full_url()).netloc, + challenge=challenge, + timeout=req.timeout, + ) + except ValueError as e: + raise urllib.error.HTTPError( + req.full_url, + code, + f"Cannot login to registry, failed to obtain bearer token: {e}", + headers, + fp, + ) from e + + # Add the token to the request + req.add_unredirected_header("Authorization", f"Bearer {token}") + setattr(req, "login_attempted", True) + + return self.parent.open(req, timeout=req.timeout) + + +def credentials_from_mirrors( + domain: str, *, mirrors: Optional[Iterable[spack.mirror.Mirror]] = None +) -> Optional[UsernamePassword]: + """Filter out OCI registry credentials from a list of mirrors.""" + + mirrors = mirrors or spack.mirror.MirrorCollection().values() + + for mirror in mirrors: + # Prefer push credentials over fetch. Unlikely that those are different + # but our config format allows it. + for direction in ("push", "fetch"): + pair = mirror.get_access_pair(direction) + if pair is None: + continue + url = mirror.get_url(direction) + if not url.startswith("oci://"): + continue + try: + parsed = ImageReference.from_string(url[6:]) + except ValueError: + continue + if parsed.domain == domain: + return UsernamePassword(*pair) + return None + + +def create_opener(): + """Create an opener that can handle OCI authentication.""" + opener = urllib.request.OpenerDirector() + for handler in [ + urllib.request.UnknownHandler(), + urllib.request.HTTPSHandler(), + spack.util.web.SpackHTTPDefaultErrorHandler(), + urllib.request.HTTPRedirectHandler(), + urllib.request.HTTPErrorProcessor(), + OCIAuthHandler(credentials_from_mirrors), + ]: + opener.add_handler(handler) + return opener + + +def ensure_status(response: HTTPResponse, status: int): + """Raise an error if the response status is not the expected one.""" + if response.status == status: + return + + raise urllib.error.HTTPError( + response.geturl(), response.status, response.reason, response.info(), None + ) + + +def default_retry(f, retries: int = 3, sleep=None): + sleep = sleep or time.sleep + + def wrapper(*args, **kwargs): + for i in range(retries): + try: + return f(*args, **kwargs) + except urllib.error.HTTPError as e: + # Retry on internal server errors, and rate limit errors + # Potentially this could take into account the Retry-After header + # if registries support it + if i + 1 != retries and (500 <= e.code < 600 or e.code == 429): + # Exponential backoff + sleep(2**i) + continue + raise + + return wrapper diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py index 7e3532e9488ea2..55eee4f1544586 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -66,7 +66,6 @@ import spack.error import spack.spec -import spack.variant import spack.version IS_WINDOWS = sys.platform == "win32" @@ -164,7 +163,7 @@ class Token: __slots__ = "kind", "value", "start", "end" def __init__( - self, kind: TokenType, value: str, start: Optional[int] = None, end: Optional[int] = None + self, kind: TokenBase, value: str, start: Optional[int] = None, end: Optional[int] = None ): self.kind = kind self.value = value @@ -264,8 +263,8 @@ def tokens(self) -> List[Token]: return list(filter(lambda x: x.kind != TokenType.WS, tokenize(self.literal_str))) def next_spec( - self, initial_spec: Optional[spack.spec.Spec] = None - ) -> Optional[spack.spec.Spec]: + self, initial_spec: Optional["spack.spec.Spec"] = None + ) -> Optional["spack.spec.Spec"]: """Return the next spec parsed from text. Args: @@ -298,7 +297,7 @@ def next_spec( return root_spec - def all_specs(self) -> List[spack.spec.Spec]: + def all_specs(self) -> List["spack.spec.Spec"]: """Return all the specs that remain to be parsed""" return list(iter(self.next_spec, None)) @@ -313,7 +312,9 @@ def __init__(self, ctx): self.has_compiler = False self.has_version = False - def parse(self, initial_spec: Optional[spack.spec.Spec] = None) -> Optional[spack.spec.Spec]: + def parse( + self, initial_spec: Optional["spack.spec.Spec"] = None + ) -> Optional["spack.spec.Spec"]: """Parse a single spec node from a stream of tokens Args: @@ -414,7 +415,7 @@ class FileParser: def __init__(self, ctx): self.ctx = ctx - def parse(self, initial_spec: spack.spec.Spec) -> spack.spec.Spec: + def parse(self, initial_spec: "spack.spec.Spec") -> "spack.spec.Spec": """Parse a spec tree from a specfile. Args: @@ -437,7 +438,7 @@ def parse(self, initial_spec: spack.spec.Spec) -> spack.spec.Spec: return initial_spec -def parse(text: str) -> List[spack.spec.Spec]: +def parse(text: str) -> List["spack.spec.Spec"]: """Parse text into a list of strings Args: @@ -450,8 +451,8 @@ def parse(text: str) -> List[spack.spec.Spec]: def parse_one_or_raise( - text: str, initial_spec: Optional[spack.spec.Spec] = None -) -> spack.spec.Spec: + text: str, initial_spec: Optional["spack.spec.Spec"] = None +) -> "spack.spec.Spec": """Parse exactly one spec from text and return it, or raise Args: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 07b3e56c7d608a..3f3056d0fac0f0 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -75,6 +75,7 @@ import spack.deptypes as dt import spack.error import spack.hash_types as ht +import spack.parser import spack.patch import spack.paths import spack.platforms @@ -1318,8 +1319,6 @@ def __init__( self.external_path = external_path self.external_module = external_module """ - import spack.parser - # Copy if spec_like is a Spec. if isinstance(spec_like, Spec): self._dup(spec_like) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 690a45e7c5106e..03689c39bacfd6 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -37,6 +37,7 @@ import spack.fetch_strategy as fs import spack.mirror import spack.paths +import spack.resource import spack.spec import spack.stage import spack.util.lock @@ -455,6 +456,7 @@ def fetch(self, mirror_only=False, err_msg=None): mirror_urls = [ url_util.join(mirror.fetch_url, rel_path) for mirror in spack.mirror.MirrorCollection(source=True).values() + if not mirror.fetch_url.startswith("oci://") for rel_path in self.mirror_paths ] @@ -658,8 +660,14 @@ def destroy(self): class ResourceStage(Stage): - def __init__(self, url_or_fetch_strategy, root, resource, **kwargs): - super().__init__(url_or_fetch_strategy, **kwargs) + def __init__( + self, + fetch_strategy: fs.FetchStrategy, + root: Stage, + resource: spack.resource.Resource, + **kwargs, + ): + super().__init__(fetch_strategy, **kwargs) self.root_stage = root self.resource = resource diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index 6c9b8c4cf552cb..55ec605913b3f4 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -326,4 +326,8 @@ def fake_push(node, push_url, options): buildcache(*buildcache_create_args) - assert packages_to_push == expected + # Order is not guaranteed, so we can't just compare lists + assert set(packages_to_push) == set(expected) + + # Ensure no duplicates + assert len(set(packages_to_push)) == len(packages_to_push) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index c4b3df92edf17f..3505d7213046f2 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -31,6 +31,7 @@ import spack.binary_distribution import spack.caches +import spack.cmd.buildcache import spack.compilers import spack.config import spack.database @@ -1948,3 +1949,21 @@ def pytest_runtest_setup(item): not_on_windows_marker = item.get_closest_marker(name="not_on_windows") if not_on_windows_marker and sys.platform == "win32": pytest.skip(*not_on_windows_marker.args) + + +@pytest.fixture(scope="function") +def disable_parallel_buildcache_push(monkeypatch): + class MockPool: + def map(self, func, args): + return [func(a) for a in args] + + def starmap(self, func, args): + return [func(*a) for a in args] + + def __enter__(self): + return self + + def __exit__(self, *args): + pass + + monkeypatch.setattr(spack.cmd.buildcache, "_make_pool", MockPool) diff --git a/lib/spack/spack/test/oci/image.py b/lib/spack/spack/test/oci/image.py new file mode 100644 index 00000000000000..17899d1f4385f7 --- /dev/null +++ b/lib/spack/spack/test/oci/image.py @@ -0,0 +1,101 @@ +# Copyright 2013-2023 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) + +import re + +import pytest + +import spack.spec +from spack.oci.image import Digest, ImageReference, default_tag, tag + + +@pytest.mark.parametrize( + "image_ref, expected", + [ + ( + f"example.com:1234/a/b/c:tag@sha256:{'a'*64}", + ("example.com:1234", "a/b/c", "tag", Digest.from_sha256("a" * 64)), + ), + ("example.com:1234/a/b/c:tag", ("example.com:1234", "a/b/c", "tag", None)), + ("example.com:1234/a/b/c", ("example.com:1234", "a/b/c", "latest", None)), + ( + f"example.com:1234/a/b/c@sha256:{'a'*64}", + ("example.com:1234", "a/b/c", "latest", Digest.from_sha256("a" * 64)), + ), + # ipv4 + ("1.2.3.4:1234/a/b/c:tag", ("1.2.3.4:1234", "a/b/c", "tag", None)), + # ipv6 + ("[2001:db8::1]:1234/a/b/c:tag", ("[2001:db8::1]:1234", "a/b/c", "tag", None)), + # Follow docker rules for parsing + ("ubuntu:22.04", ("index.docker.io", "library/ubuntu", "22.04", None)), + ("myname/myimage:abc", ("index.docker.io", "myname/myimage", "abc", None)), + ("myname:1234/myimage:abc", ("myname:1234", "myimage", "abc", None)), + ("localhost/myimage:abc", ("localhost", "myimage", "abc", None)), + ("localhost:1234/myimage:abc", ("localhost:1234", "myimage", "abc", None)), + ], +) +def test_name_parsing(image_ref, expected): + x = ImageReference.from_string(image_ref) + assert (x.domain, x.name, x.tag, x.digest) == expected + + +@pytest.mark.parametrize( + "image_ref", + [ + # wrong order of tag and sha + f"example.com:1234/a/b/c@sha256:{'a'*64}:tag", + # double tag + "example.com:1234/a/b/c:tag:tag", + # empty tag + "example.com:1234/a/b/c:", + # empty digest + "example.com:1234/a/b/c@sha256:", + # unsupport digest algorithm + f"example.com:1234/a/b/c@sha512:{'a'*128}", + # invalid digest length + f"example.com:1234/a/b/c@sha256:{'a'*63}", + # whitespace + "example.com:1234/a/b/c :tag", + "example.com:1234/a/b/c: tag", + "example.com:1234/a/b/c:tag ", + " example.com:1234/a/b/c:tag", + # broken ipv4 + "1.2..3:1234/a/b/c:tag", + ], +) +def test_parsing_failure(image_ref): + with pytest.raises(ValueError): + ImageReference.from_string(image_ref) + + +def test_digest(): + valid_digest = "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" + + # Test string roundtrip + assert str(Digest.from_string(f"sha256:{valid_digest}")) == f"sha256:{valid_digest}" + + # Invalid digest length + with pytest.raises(ValueError): + Digest.from_string("sha256:abcdef") + + # Missing algorithm + with pytest.raises(ValueError): + Digest.from_string(valid_digest) + + +@pytest.mark.parametrize( + "spec", + [ + # Standard case + "short-name@=1.2.3", + # Unsupported characters in git version + f"git-version@{1:040x}=develop", + # Too long of a name + f"{'too-long':x<256}@=1.2.3", + ], +) +def test_default_tag(spec: str): + """Make sure that computed image tags are valid.""" + assert re.fullmatch(tag, default_tag(spack.spec.Spec(spec))) diff --git a/lib/spack/spack/test/oci/integration_test.py b/lib/spack/spack/test/oci/integration_test.py new file mode 100644 index 00000000000000..b2f9366c3a5fbf --- /dev/null +++ b/lib/spack/spack/test/oci/integration_test.py @@ -0,0 +1,148 @@ +# Copyright 2013-2023 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) + +# These are slow integration tests that do concretization, install, tarballing +# and compression. They still use an in-memory OCI registry. + +import hashlib +import json +import os +from contextlib import contextmanager + +import spack.oci.opener +from spack.binary_distribution import gzip_compressed_tarfile +from spack.main import SpackCommand +from spack.oci.image import Digest, ImageReference, default_config, default_manifest +from spack.oci.oci import blob_exists, get_manifest_and_config, upload_blob, upload_manifest +from spack.test.oci.mock_registry import DummyServer, InMemoryOCIRegistry, create_opener + +buildcache = SpackCommand("buildcache") +mirror = SpackCommand("mirror") + + +@contextmanager +def oci_servers(*servers: DummyServer): + old_opener = spack.oci.opener.urlopen + spack.oci.opener.urlopen = create_opener(*servers).open + yield + spack.oci.opener.urlopen = old_opener + + +def test_buildcache_push_command(mutable_database, disable_parallel_buildcache_push): + with oci_servers(InMemoryOCIRegistry("example.com")): + mirror("add", "oci-test", "oci://example.com/image") + + # Push the package(s) to the OCI registry + buildcache("push", "--update-index", "oci-test", "mpileaks^mpich") + + # Remove mpileaks from the database + matches = mutable_database.query_local("mpileaks^mpich") + assert len(matches) == 1 + spec = matches[0] + spec.package.do_uninstall() + + # Reinstall mpileaks from the OCI registry + buildcache("install", "--unsigned", "mpileaks^mpich") + + # Now it should be installed again + assert spec.installed + + # And let's check that the bin/mpileaks executable is there + assert os.path.exists(os.path.join(spec.prefix, "bin", "mpileaks")) + + +def test_buildcache_push_with_base_image_command( + mutable_database, tmpdir, disable_parallel_buildcache_push +): + """Test that we can push a package with a base image to an OCI registry. + + This test is a bit involved, cause we have to create a small base image.""" + + registry_src = InMemoryOCIRegistry("src.example.com") + registry_dst = InMemoryOCIRegistry("dst.example.com") + + base_image = ImageReference.from_string("src.example.com/my-base-image:latest") + + with oci_servers(registry_src, registry_dst): + mirror("add", "oci-test", "oci://dst.example.com/image") + + # TODO: simplify creation of images... + # We create a rootfs.tar.gz, a config file and a manifest file, + # and upload those. + + config, manifest = default_config(architecture="amd64", os="linux"), default_manifest() + + # Create a small rootfs + rootfs = tmpdir.join("rootfs") + rootfs.ensure(dir=True) + rootfs.join("bin").ensure(dir=True) + rootfs.join("bin", "sh").ensure(file=True) + + # Create a tarball of it. + tarball = tmpdir.join("base.tar.gz") + with gzip_compressed_tarfile(tarball) as (tar, tar_gz_checksum, tar_checksum): + tar.add(rootfs, arcname=".") + + tar_gz_digest = Digest.from_sha256(tar_gz_checksum.hexdigest()) + tar_digest = Digest.from_sha256(tar_checksum.hexdigest()) + + # Save the config file + config["rootfs"]["diff_ids"] = [str(tar_digest)] + config_file = tmpdir.join("config.json") + with open(config_file, "w") as f: + f.write(json.dumps(config)) + + config_digest = Digest.from_sha256( + hashlib.sha256(open(config_file, "rb").read()).hexdigest() + ) + + # Register the layer in the manifest + manifest["layers"].append( + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": str(tar_gz_digest), + "size": tarball.size(), + } + ) + manifest["config"]["digest"] = str(config_digest) + manifest["config"]["size"] = config_file.size() + + # Upload the layer and config file + upload_blob(base_image, tarball, tar_gz_digest) + upload_blob(base_image, config_file, config_digest) + + # Upload the manifest + upload_manifest(base_image, manifest) + + # END TODO + + # Finally... use it as a base image + buildcache("push", "--base-image", str(base_image), "oci-test", "mpileaks^mpich") + + # Figure out what tag was produced + tag = next(tag for _, tag in registry_dst.manifests.keys() if tag.startswith("mpileaks-")) + assert tag is not None + + # Fetch the manifest and config + dst_image = ImageReference.from_string(f"dst.example.com/image:{tag}") + retrieved_manifest, retrieved_config = get_manifest_and_config(dst_image) + + # Check that the base image layer is first. + assert retrieved_manifest["layers"][0]["digest"] == str(tar_gz_digest) + assert retrieved_config["rootfs"]["diff_ids"][0] == str(tar_digest) + + # And also check that we have layers for each link-run dependency + matches = mutable_database.query_local("mpileaks^mpich") + assert len(matches) == 1 + spec = matches[0] + + num_runtime_deps = len(list(spec.traverse(root=True, deptype=("link", "run")))) + + # One base layer + num_runtime_deps + assert len(retrieved_manifest["layers"]) == 1 + num_runtime_deps + + # And verify that all layers including the base layer are present + for layer in retrieved_manifest["layers"]: + assert blob_exists(dst_image, digest=Digest.from_string(layer["digest"])) diff --git a/lib/spack/spack/test/oci/mock_registry.py b/lib/spack/spack/test/oci/mock_registry.py new file mode 100644 index 00000000000000..ec3e85c333ab7e --- /dev/null +++ b/lib/spack/spack/test/oci/mock_registry.py @@ -0,0 +1,410 @@ +# Copyright 2013-2023 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) + + +import base64 +import email.message +import hashlib +import io +import json +import re +import urllib.error +import urllib.parse +import urllib.request +import uuid +from typing import Callable, Dict, List, Optional, Pattern, Tuple +from urllib.request import Request + +from spack.oci.image import Digest +from spack.oci.opener import OCIAuthHandler + + +class MockHTTPResponse(io.IOBase): + """This is a mock HTTP response, which implements part of http.client.HTTPResponse""" + + def __init__(self, status, reason, headers=None, body=None): + self.msg = None + self.version = 11 + self.url = None + self.headers = email.message.EmailMessage() + self.status = status + self.code = status + self.reason = reason + self.debuglevel = 0 + self._body = body + + if headers is not None: + for key, value in headers.items(): + self.headers[key] = value + + @classmethod + def with_json(cls, status, reason, headers=None, body=None): + """Create a mock HTTP response with JSON string as body""" + body = io.BytesIO(json.dumps(body).encode("utf-8")) + return cls(status, reason, headers, body) + + def read(self, *args, **kwargs): + return self._body.read(*args, **kwargs) + + def getheader(self, name, default=None): + self.headers.get(name, default) + + def getheaders(self): + return self.headers.items() + + def fileno(self): + return 0 + + def getcode(self): + return self.status + + def info(self): + return self.headers + + +class MiddlewareError(Exception): + """Thrown in a handler to return a response early.""" + + def __init__(self, response: MockHTTPResponse): + self.response = response + + +class Router: + """This class is a small router for requests to the OCI registry. + + It is used to dispatch requests to a handler, and middleware can be + used to transform requests, as well as return responses early + (e.g. for authentication).""" + + def __init__(self) -> None: + self.routes: List[Tuple[str, Pattern, Callable]] = [] + self.middleware: List[Callable[[Request], Request]] = [] + + def handle(self, req: Request) -> MockHTTPResponse: + """Dispatch a request to a handler.""" + result = urllib.parse.urlparse(req.full_url) + + # Apply middleware + try: + for handler in self.middleware: + req = handler(req) + except MiddlewareError as e: + return e.response + + for method, path_regex, handler in self.routes: + if method != req.get_method(): + continue + match = re.fullmatch(path_regex, result.path) + if not match: + continue + + return handler(req, **match.groupdict()) + + return MockHTTPResponse(404, "Not found") + + def register(self, method, path: str, handler: Callable): + self.routes.append((method, re.compile(path), handler)) + + def add_middleware(self, handler: Callable[[Request], Request]): + self.middleware.append(handler) + + +class DummyServer: + def __init__(self, domain: str) -> None: + # The domain of the server, e.g. "registry.example.com" + self.domain = domain + + # List of (method, url) tuples + self.requests: List[Tuple[str, str]] = [] + + # Dispatches requests to handlers + self.router = Router() + + # Always install a request logger + self.router.add_middleware(self.log_request) + + def handle(self, req: Request) -> MockHTTPResponse: + return self.router.handle(req) + + def log_request(self, req: Request): + path = urllib.parse.urlparse(req.full_url).path + self.requests.append((req.get_method(), path)) + return req + + def clear_log(self): + self.requests = [] + + +class InMemoryOCIRegistry(DummyServer): + """This implements the basic OCI registry API, but in memory. + + It supports two types of blob uploads: + 1. POST + PUT: the client first starts a session with POST, then does a large PUT request + 2. POST: the client does a single POST request with the whole blob + + Option 2 is not supported by all registries, so we allow to disable it, + with allow_single_post=False. + + A third option is to use the chunked upload, but this is not implemented here, because + it's typically a major performance hit in upload speed, so we're not using it in Spack.""" + + def __init__(self, domain: str, allow_single_post: bool = True) -> None: + super().__init__(domain) + self.router.register("GET", r"/v2/", self.index) + self.router.register("HEAD", r"/v2/(?P.+)/blobs/(?P.+)", self.head_blob) + self.router.register("POST", r"/v2/(?P.+)/blobs/uploads/", self.start_session) + self.router.register("PUT", r"/upload", self.put_session) + self.router.register("PUT", r"/v2/(?P.+)/manifests/(?P.+)", self.put_manifest) + self.router.register("GET", r"/v2/(?P.+)/manifests/(?P.+)", self.get_manifest) + self.router.register("GET", r"/v2/(?P.+)/blobs/(?P.+)", self.get_blob) + self.router.register("GET", r"/v2/(?P.+)/tags/list", self.list_tags) + + # If True, allow single POST upload, not all registries support this + self.allow_single_post = allow_single_post + + # Used for POST + PUT upload. This is a map from session ID to image name + self.sessions: Dict[str, str] = {} + + # Set of sha256:... digests that are known to the registry + self.blobs: Dict[str, bytes] = {} + + # Map from (name, tag) to manifest + self.manifests: Dict[Tuple[str, str], Dict] = {} + + def index(self, req: Request): + return MockHTTPResponse.with_json(200, "OK", body={}) + + def head_blob(self, req: Request, name: str, digest: str): + if digest in self.blobs: + return MockHTTPResponse(200, "OK", headers={"Content-Length": "1234"}) + return MockHTTPResponse(404, "Not found") + + def get_blob(self, req: Request, name: str, digest: str): + if digest in self.blobs: + return MockHTTPResponse(200, "OK", body=io.BytesIO(self.blobs[digest])) + return MockHTTPResponse(404, "Not found") + + def start_session(self, req: Request, name: str): + id = str(uuid.uuid4()) + self.sessions[id] = name + + # Check if digest is present (single monolithic upload) + result = urllib.parse.urlparse(req.full_url) + query = urllib.parse.parse_qs(result.query) + + if self.allow_single_post and "digest" in query: + return self.handle_upload( + req, name=name, digest=Digest.from_string(query["digest"][0]) + ) + + return MockHTTPResponse(202, "Accepted", headers={"Location": f"/upload?uuid={id}"}) + + def put_session(self, req: Request): + # Do the upload. + result = urllib.parse.urlparse(req.full_url) + query = urllib.parse.parse_qs(result.query) + + # uuid param should be preserved, and digest should be present + assert "uuid" in query and len(query["uuid"]) == 1 + assert "digest" in query and len(query["digest"]) == 1 + + id = query["uuid"][0] + assert id in self.sessions + + name, digest = self.sessions[id], Digest.from_string(query["digest"][0]) + + response = self.handle_upload(req, name=name, digest=digest) + + # End the session + del self.sessions[id] + + return response + + def put_manifest(self, req: Request, name: str, ref: str): + # In requests, Python runs header.capitalize(). + content_type = req.get_header("Content-type") + assert content_type in ( + "application/vnd.oci.image.manifest.v1+json", + "application/vnd.oci.image.index.v1+json", + ) + + index_or_manifest = json.loads(self._require_data(req)) + + # Verify that we have all blobs (layers for manifest, manifests for index) + if content_type == "application/vnd.oci.image.manifest.v1+json": + for layer in index_or_manifest["layers"]: + assert layer["digest"] in self.blobs, "Missing blob while uploading manifest" + + else: + for manifest in index_or_manifest["manifests"]: + assert ( + name, + manifest["digest"], + ) in self.manifests, "Missing manifest while uploading index" + + self.manifests[(name, ref)] = index_or_manifest + + return MockHTTPResponse( + 201, "Created", headers={"Location": f"/v2/{name}/manifests/{ref}"} + ) + + def get_manifest(self, req: Request, name: str, ref: str): + if (name, ref) not in self.manifests: + return MockHTTPResponse(404, "Not found") + + manifest_or_index = self.manifests[(name, ref)] + + return MockHTTPResponse.with_json( + 200, + "OK", + headers={"Content-type": manifest_or_index["mediaType"]}, + body=manifest_or_index, + ) + + def _require_data(self, req: Request) -> bytes: + """Extract request.data, it's type remains a mystery""" + assert req.data is not None + + if hasattr(req.data, "read"): + return req.data.read() + elif isinstance(req.data, bytes): + return req.data + + raise ValueError("req.data should be bytes or have a read() method") + + def handle_upload(self, req: Request, name: str, digest: Digest): + """Verify the digest, save the blob, return created status""" + data = self._require_data(req) + assert hashlib.sha256(data).hexdigest() == digest.digest + self.blobs[str(digest)] = data + return MockHTTPResponse(201, "Created", headers={"Location": f"/v2/{name}/blobs/{digest}"}) + + def list_tags(self, req: Request, name: str): + # List all tags, exclude digests. + tags = [_tag for _name, _tag in self.manifests.keys() if _name == name and ":" not in _tag] + tags.sort() + return MockHTTPResponse.with_json(200, "OK", body={"tags": tags}) + + +class DummyServerUrllibHandler(urllib.request.BaseHandler): + """Glue between urllib and DummyServer, routing requests to + the correct mock server for a given domain.""" + + def __init__(self) -> None: + self.servers: Dict[str, DummyServer] = {} + + def add_server(self, domain: str, api: DummyServer): + self.servers[domain] = api + return self + + def https_open(self, req: Request): + domain = urllib.parse.urlparse(req.full_url).netloc + + if domain not in self.servers: + return MockHTTPResponse(404, "Not found") + + return self.servers[domain].handle(req) + + +class InMemoryOCIRegistryWithAuth(InMemoryOCIRegistry): + """This is another in-memory OCI registry, but it requires authentication.""" + + def __init__( + self, domain, token: Optional[str], realm: str, allow_single_post: bool = True + ) -> None: + super().__init__(domain, allow_single_post) + self.token = token # token to accept + self.realm = realm # url to the authorization server + self.router.add_middleware(self.authenticate) + + def authenticate(self, req: Request): + # Any request needs an Authorization header + authorization = req.get_header("Authorization") + + if authorization is None: + raise MiddlewareError(self.unauthorized()) + + # Ensure that the token is correct + assert authorization.startswith("Bearer ") + token = authorization[7:] + + if token != self.token: + raise MiddlewareError(self.unauthorized()) + + return req + + def unauthorized(self): + return MockHTTPResponse( + 401, + "Unauthorized", + { + "www-authenticate": f'Bearer realm="{self.realm}",' + f'service="{self.domain}",' + 'scope="repository:spack-registry:pull,push"' + }, + ) + + +class MockBearerTokenServer(DummyServer): + """Simulates a basic server that hands out bearer tokens + at the /login endpoint for the following services: + public.example.com, which doesn't require Basic Auth + private.example.com, which requires Basic Auth, with user:pass + """ + + def __init__(self, domain: str) -> None: + super().__init__(domain) + self.router.register("GET", "/login", self.login) + + def login(self, req: Request): + url = urllib.parse.urlparse(req.full_url) + query_params = urllib.parse.parse_qs(url.query) + + # Verify query params, from the www-authenticate header + assert query_params["client_id"] == ["spack"] + assert len(query_params["service"]) == 1 + assert query_params["scope"] == ["repository:spack-registry:pull,push"] + + service = query_params["service"][0] + + if service == "public.example.com": + return self.public_auth(req) + elif service == "private.example.com": + return self.private_auth(req) + + return MockHTTPResponse(404, "Not found") + + def public_auth(self, req: Request): + # No need to login with username and password for the public registry + assert req.get_header("Authorization") is None + return MockHTTPResponse.with_json(200, "OK", body={"token": "public_token"}) + + def private_auth(self, req: Request): + # For the private registry we need to login with username and password + auth_value = req.get_header("Authorization") + + if ( + auth_value is None + or not auth_value.startswith("Basic ") + or base64.b64decode(auth_value[6:]) != b"user:pass" + ): + return MockHTTPResponse(401, "Unauthorized") + + return MockHTTPResponse.with_json(200, "OK", body={"token": "private_token"}) + + +def create_opener(*servers: DummyServer, credentials_provider=None): + """Creates a mock opener, that can be used to fake requests to a list + of servers.""" + opener = urllib.request.OpenerDirector() + handler = DummyServerUrllibHandler() + for server in servers: + handler.add_server(server.domain, server) + opener.add_handler(handler) + opener.add_handler(urllib.request.HTTPDefaultErrorHandler()) + opener.add_handler(urllib.request.HTTPErrorProcessor()) + if credentials_provider is not None: + opener.add_handler(OCIAuthHandler(credentials_provider)) + return opener diff --git a/lib/spack/spack/test/oci/urlopen.py b/lib/spack/spack/test/oci/urlopen.py new file mode 100644 index 00000000000000..16efdfe12d9673 --- /dev/null +++ b/lib/spack/spack/test/oci/urlopen.py @@ -0,0 +1,672 @@ +# Copyright 2013-2023 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) + + +import hashlib +import json +import urllib.error +import urllib.parse +import urllib.request +from urllib.request import Request + +import pytest + +import spack.mirror +from spack.oci.image import Digest, ImageReference, default_config, default_manifest +from spack.oci.oci import ( + copy_missing_layers, + get_manifest_and_config, + image_from_mirror, + upload_blob, + upload_manifest, +) +from spack.oci.opener import ( + Challenge, + RealmServiceScope, + UsernamePassword, + credentials_from_mirrors, + default_retry, + get_bearer_challenge, + parse_www_authenticate, +) +from spack.test.oci.mock_registry import ( + DummyServer, + DummyServerUrllibHandler, + InMemoryOCIRegistry, + InMemoryOCIRegistryWithAuth, + MiddlewareError, + MockBearerTokenServer, + MockHTTPResponse, + create_opener, +) + + +def test_parse_www_authenticate(): + """Test parsing of valid WWW-Authenticate header, check whether it's + decomposed into a list of challenges with correct scheme and parameters + according to RFC 7235 section 4.1""" + www_authenticate = 'Bearer realm="https://spack.io/authenticate",service="spack-registry",scope="repository:spack-registry:pull,push"' + assert parse_www_authenticate(www_authenticate) == [ + Challenge( + "Bearer", + [ + ("realm", "https://spack.io/authenticate"), + ("service", "spack-registry"), + ("scope", "repository:spack-registry:pull,push"), + ], + ) + ] + + assert parse_www_authenticate("Bearer") == [Challenge("Bearer")] + assert parse_www_authenticate("MethodA, MethodB,MethodC") == [ + Challenge("MethodA"), + Challenge("MethodB"), + Challenge("MethodC"), + ] + + assert parse_www_authenticate( + 'Digest realm="Digest Realm", nonce="1234567890", algorithm=MD5, qop="auth"' + ) == [ + Challenge( + "Digest", + [ + ("realm", "Digest Realm"), + ("nonce", "1234567890"), + ("algorithm", "MD5"), + ("qop", "auth"), + ], + ) + ] + + assert parse_www_authenticate( + r'Newauth realm="apps", type=1, title="Login to \"apps\"", Basic realm="simple"' + ) == [ + Challenge("Newauth", [("realm", "apps"), ("type", "1"), ("title", 'Login to "apps"')]), + Challenge("Basic", [("realm", "simple")]), + ] + + +@pytest.mark.parametrize( + "invalid_str", + [ + # Not comma separated + "SchemeA SchemeB SchemeC", + # Unexpected eof + "SchemeA, SchemeB, SchemeC, ", + # Invalid auth param or scheme + r"Scheme x=y, ", + # Unexpected eof + "Scheme key=", + # Invalid token + r'"Bearer"', + # Invalid token + r'Scheme"xyz"', + # No auth param + r"Scheme ", + ], +) +def test_invalid_www_authenticate(invalid_str): + with pytest.raises(ValueError): + parse_www_authenticate(invalid_str) + + +def test_get_bearer_challenge(): + """Test extracting Bearer challenge from a list of challenges""" + + # Only an incomplete bearer challenge, missing service and scope, not usable. + assert ( + get_bearer_challenge( + [ + Challenge("Bearer", [("realm", "https://spack.io/authenticate")]), + Challenge("Basic", [("realm", "simple")]), + Challenge( + "Digest", + [ + ("realm", "Digest Realm"), + ("nonce", "1234567890"), + ("algorithm", "MD5"), + ("qop", "auth"), + ], + ), + ] + ) + is None + ) + + # Multiple challenges, should pick the bearer one. + assert get_bearer_challenge( + [ + Challenge( + "Dummy", + [("realm", "https://example.com/"), ("service", "service"), ("scope", "scope")], + ), + Challenge( + "Bearer", + [ + ("realm", "https://spack.io/authenticate"), + ("service", "spack-registry"), + ("scope", "repository:spack-registry:pull,push"), + ], + ), + ] + ) == RealmServiceScope( + "https://spack.io/authenticate", "spack-registry", "repository:spack-registry:pull,push" + ) + + +@pytest.mark.parametrize( + "image_ref,token", + [ + ("public.example.com/spack-registry:latest", "public_token"), + ("private.example.com/spack-registry:latest", "private_token"), + ], +) +def test_automatic_oci_authentication(image_ref, token): + image = ImageReference.from_string(image_ref) + + def credentials_provider(domain: str): + return UsernamePassword("user", "pass") if domain == "private.example.com" else None + + opener = create_opener( + InMemoryOCIRegistryWithAuth( + image.domain, token=token, realm="https://auth.example.com/login" + ), + MockBearerTokenServer("auth.example.com"), + credentials_provider=credentials_provider, + ) + + # Run this twice, as it will triggers a code path that caches the bearer token + assert opener.open(image.endpoint()).status == 200 + assert opener.open(image.endpoint()).status == 200 + + +def test_wrong_credentials(): + """Test that when wrong credentials are rejected by the auth server, we + get a 401 error.""" + credentials_provider = lambda domain: UsernamePassword("wrong", "wrong") + image = ImageReference.from_string("private.example.com/image") + opener = create_opener( + InMemoryOCIRegistryWithAuth( + image.domain, token="something", realm="https://auth.example.com/login" + ), + MockBearerTokenServer("auth.example.com"), + credentials_provider=credentials_provider, + ) + + with pytest.raises(urllib.error.HTTPError) as e: + opener.open(image.endpoint()) + + assert e.value.getcode() == 401 + + +def test_wrong_bearer_token_returned_by_auth_server(): + """When the auth server returns a wrong bearer token, we should get a 401 error + when the request we attempt fails. We shouldn't go in circles getting a 401 from + the registry, then a non-working token from the auth server, then a 401 from the + registry, etc.""" + image = ImageReference.from_string("private.example.com/image") + opener = create_opener( + InMemoryOCIRegistryWithAuth( + image.domain, + token="other_token_than_token_server_provides", + realm="https://auth.example.com/login", + ), + MockBearerTokenServer("auth.example.com"), + credentials_provider=lambda domain: UsernamePassword("user", "pass"), + ) + + with pytest.raises(urllib.error.HTTPError) as e: + opener.open(image.endpoint()) + + assert e.value.getcode() == 401 + + +class TrivialAuthServer(DummyServer): + """A trivial auth server that hands out a bearer token at GET /login.""" + + def __init__(self, domain: str, token: str) -> None: + super().__init__(domain) + self.router.register("GET", "/login", self.login) + self.token = token + + def login(self, req: Request): + return MockHTTPResponse.with_json(200, "OK", body={"token": self.token}) + + +def test_registry_with_short_lived_bearer_tokens(): + """An issued bearer token is mostly opaque to the client, but typically + it embeds a short-lived expiration date. To speed up requests to a registry, + it's good not to authenticate on every request, but to cache the bearer token, + however: we have to deal with the case of an expired bearer token. + + Here we test that when the bearer token expires, we authenticate again, and + when the token is still valid, we don't re-authenticate.""" + + image = ImageReference.from_string("private.example.com/image") + credentials_provider = lambda domain: UsernamePassword("user", "pass") + + auth_server = TrivialAuthServer("auth.example.com", token="token") + registry_server = InMemoryOCIRegistryWithAuth( + image.domain, token="token", realm="https://auth.example.com/login" + ) + urlopen = create_opener( + registry_server, auth_server, credentials_provider=credentials_provider + ).open + + # First request, should work with token "token" + assert urlopen(image.endpoint()).status == 200 + + # Invalidate the token on the registry + registry_server.token = "new_token" + auth_server.token = "new_token" + + # Second request: reusing the cached token should fail + # but in the background we will get a new token from the auth server + assert urlopen(image.endpoint()).status == 200 + + # Subsequent requests should work with the same token, let's do two more + assert urlopen(image.endpoint()).status == 200 + assert urlopen(image.endpoint()).status == 200 + + # And finally, we should see that we've issues exactly two requests to the auth server + assert auth_server.requests == [("GET", "/login"), ("GET", "/login")] + + # Whereas we've done more requests to the registry + assert registry_server.requests == [ + ("GET", "/v2/"), # 1: without bearer token + ("GET", "/v2/"), # 2: retry with bearer token + ("GET", "/v2/"), # 3: with incorrect bearer token + ("GET", "/v2/"), # 4: retry with new bearer token + ("GET", "/v2/"), # 5: with recyled correct bearer token + ("GET", "/v2/"), # 6: with recyled correct bearer token + ] + + +class InMemoryRegistryWithUnsupportedAuth(InMemoryOCIRegistry): + """A registry that does set a WWW-Authenticate header, but + with a challenge we don't support.""" + + def __init__(self, domain: str, allow_single_post: bool = True, www_authenticate=None) -> None: + self.www_authenticate = www_authenticate + super().__init__(domain, allow_single_post) + self.router.add_middleware(self.unsupported_auth_method) + + def unsupported_auth_method(self, req: Request): + headers = {} + if self.www_authenticate: + headers["WWW-Authenticate"] = self.www_authenticate + raise MiddlewareError(MockHTTPResponse(401, "Unauthorized", headers=headers)) + + +@pytest.mark.parametrize( + "www_authenticate,error_message", + [ + # missing service and scope + ('Bearer realm="https://auth.example.com/login"', "unsupported authentication scheme"), + # we don't do basic auth + ('Basic realm="https://auth.example.com/login"', "unsupported authentication scheme"), + # multiple unsupported challenges + ( + "CustomChallenge method=unsupported, OtherChallenge method=x,param=y", + "unsupported authentication scheme", + ), + # no challenge + (None, "missing WWW-Authenticate header"), + # malformed challenge, missing quotes + ("Bearer realm=https://auth.example.com", "malformed WWW-Authenticate header"), + # http instead of https + ('Bearer realm="http://auth.example.com",scope=x,service=y', "insecure http connection"), + ], +) +def test_auth_method_we_cannot_handle_is_error(www_authenticate, error_message): + # We can only handle WWW-Authenticate with a Bearer challenge + image = ImageReference.from_string("private.example.com/image") + urlopen = create_opener( + InMemoryRegistryWithUnsupportedAuth(image.domain, www_authenticate=www_authenticate), + TrivialAuthServer("auth.example.com", token="token"), + credentials_provider=lambda domain: UsernamePassword("user", "pass"), + ).open + + with pytest.raises(urllib.error.HTTPError, match=error_message) as e: + urlopen(image.endpoint()) + assert e.value.getcode() == 401 + + +# Parametrize over single POST vs POST + PUT. +@pytest.mark.parametrize("client_single_request", [True, False]) +@pytest.mark.parametrize("server_single_request", [True, False]) +def test_oci_registry_upload(tmpdir, client_single_request, server_single_request): + opener = urllib.request.OpenerDirector() + opener.add_handler( + DummyServerUrllibHandler().add_server( + "example.com", InMemoryOCIRegistry(server_single_request) + ) + ) + opener.add_handler(urllib.request.HTTPDefaultErrorHandler()) + opener.add_handler(urllib.request.HTTPErrorProcessor()) + + # Create a small blob + blob = tmpdir.join("blob") + blob.write("Hello world!") + + image = ImageReference.from_string("example.com/image:latest") + digest = Digest.from_sha256(hashlib.sha256(blob.read_binary()).hexdigest()) + + # Set small file size larger than the blob iff we're doing single request + small_file_size = 1024 if client_single_request else 0 + + # Upload once, should actually upload + assert upload_blob( + ref=image, + file=blob.strpath, + digest=digest, + small_file_size=small_file_size, + _urlopen=opener.open, + ) + + # Second time should exit as it exists + assert not upload_blob( + ref=image, + file=blob.strpath, + digest=digest, + small_file_size=small_file_size, + _urlopen=opener.open, + ) + + # Force upload should upload again + assert upload_blob( + ref=image, + file=blob.strpath, + digest=digest, + force=True, + small_file_size=small_file_size, + _urlopen=opener.open, + ) + + +def test_copy_missing_layers(tmpdir, config): + """Test copying layers from one registry to another. + Creates 3 blobs, 1 config and 1 manifest in registry A + and copies layers to registry B. Then checks that all + layers are present in registry B. Finally it runs the copy + again and checks that no new layers are uploaded.""" + + # NOTE: config fixture is used to disable default source mirrors + # which are used in Stage(...). Otherwise this test doesn't really + # rely on globals. + + src = ImageReference.from_string("a.example.com/image:x") + dst = ImageReference.from_string("b.example.com/image:y") + + src_registry = InMemoryOCIRegistry(src.domain) + dst_registry = InMemoryOCIRegistry(dst.domain) + + urlopen = create_opener(src_registry, dst_registry).open + + # TODO: make it a bit easier to create bunch of blobs + config + manifest? + + # Create a few blobs and a config file + blobs = [tmpdir.join(f"blob{i}") for i in range(3)] + + for i, blob in enumerate(blobs): + blob.write(f"Blob {i}") + + digests = [ + Digest.from_sha256(hashlib.sha256(blob.read_binary()).hexdigest()) for blob in blobs + ] + + config = default_config(architecture="amd64", os="linux") + configfile = tmpdir.join("config.json") + configfile.write(json.dumps(config)) + config_digest = Digest.from_sha256(hashlib.sha256(configfile.read_binary()).hexdigest()) + + for blob, digest in zip(blobs, digests): + upload_blob(src, blob.strpath, digest, _urlopen=urlopen) + upload_blob(src, configfile.strpath, config_digest, _urlopen=urlopen) + + # Then create a manifest referencing them + manifest = default_manifest() + + for blob, digest in zip(blobs, digests): + manifest["layers"].append( + { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": str(digest), + "size": blob.size(), + } + ) + + manifest["config"] = { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": str(config_digest), + "size": configfile.size(), + } + + upload_manifest(src, manifest, _urlopen=urlopen) + + # Finally, copy the image from src to dst + copy_missing_layers(src, dst, architecture="amd64", _urlopen=urlopen) + + # Check that all layers (not config) were copied and identical + assert len(dst_registry.blobs) == len(blobs) + for blob, digest in zip(blobs, digests): + assert dst_registry.blobs.get(str(digest)) == blob.read_binary() + + is_upload = lambda method, path: method == "POST" and path == "/v2/image/blobs/uploads/" + is_exists = lambda method, path: method == "HEAD" and path.startswith("/v2/image/blobs/") + + # Check that exactly 3 uploads were initiated, and that we don't do + # double existence checks when uploading. + assert sum(is_upload(method, path) for method, path in dst_registry.requests) == 3 + assert sum(is_exists(method, path) for method, path in dst_registry.requests) == 3 + + # Check that re-uploading skips existing layers. + dst_registry.clear_log() + copy_missing_layers(src, dst, architecture="amd64", _urlopen=urlopen) + + # Check that no uploads were initiated, only existence checks were done. + assert sum(is_upload(method, path) for method, path in dst_registry.requests) == 0 + assert sum(is_exists(method, path) for method, path in dst_registry.requests) == 3 + + +def test_image_from_mirror(): + mirror = spack.mirror.Mirror("oci://example.com/image") + assert image_from_mirror(mirror) == ImageReference.from_string("example.com/image") + + +def test_image_reference_str(): + """Test that with_digest() works with Digest and str.""" + digest_str = f"sha256:{1234:064x}" + digest = Digest.from_string(digest_str) + + img = ImageReference.from_string("example.com/image") + + assert str(img.with_digest(digest)) == f"example.com/image:latest@{digest}" + assert str(img.with_digest(digest_str)) == f"example.com/image:latest@{digest}" + assert str(img.with_tag("hello")) == "example.com/image:hello" + assert str(img.with_tag("hello").with_digest(digest)) == f"example.com/image:hello@{digest}" + + +@pytest.mark.parametrize( + "image", + [ + # white space issue + " example.com/image", + # not alpha-numeric + "hello#world:latest", + ], +) +def test_image_reference_invalid(image): + with pytest.raises(ValueError, match="Invalid image reference"): + ImageReference.from_string(image) + + +def test_default_credentials_provider(): + """The default credentials provider uses a collection of configured + mirrors.""" + + mirrors = [ + # OCI mirror with push credentials + spack.mirror.Mirror( + {"url": "oci://a.example.com/image", "push": {"access_pair": ["user.a", "pass.a"]}} + ), + # Not an OCI mirror + spack.mirror.Mirror( + {"url": "https://b.example.com/image", "access_pair": ["user.b", "pass.b"]} + ), + # No credentials + spack.mirror.Mirror("oci://c.example.com/image"), + # Top-level credentials + spack.mirror.Mirror( + {"url": "oci://d.example.com/image", "access_pair": ["user.d", "pass.d"]} + ), + # Dockerhub short reference + spack.mirror.Mirror( + {"url": "oci://user/image", "access_pair": ["dockerhub_user", "dockerhub_pass"]} + ), + # Localhost (not a dockerhub short reference) + spack.mirror.Mirror( + {"url": "oci://localhost/image", "access_pair": ["user.localhost", "pass.localhost"]} + ), + ] + + assert credentials_from_mirrors("a.example.com", mirrors=mirrors) == UsernamePassword( + "user.a", "pass.a" + ) + assert credentials_from_mirrors("b.example.com", mirrors=mirrors) is None + assert credentials_from_mirrors("c.example.com", mirrors=mirrors) is None + assert credentials_from_mirrors("d.example.com", mirrors=mirrors) == UsernamePassword( + "user.d", "pass.d" + ) + assert credentials_from_mirrors("index.docker.io", mirrors=mirrors) == UsernamePassword( + "dockerhub_user", "dockerhub_pass" + ) + assert credentials_from_mirrors("localhost", mirrors=mirrors) == UsernamePassword( + "user.localhost", "pass.localhost" + ) + + +def test_manifest_index(tmpdir): + """Test obtaining manifest + config from a registry + that has an index""" + urlopen = create_opener(InMemoryOCIRegistry("registry.example.com")).open + + img = ImageReference.from_string("registry.example.com/image") + + # Create two config files and manifests, for different architectures + manifest_descriptors = [] + manifest_and_config = {} + for arch in ("amd64", "arm64"): + file = tmpdir.join(f"config_{arch}.json") + config = default_config(architecture=arch, os="linux") + file.write(json.dumps(config)) + config_digest = Digest.from_sha256(hashlib.sha256(file.read_binary()).hexdigest()) + assert upload_blob(img, file, config_digest, _urlopen=urlopen) + manifest = { + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": str(config_digest), + "size": file.size(), + }, + "layers": [], + } + manifest_digest, manifest_size = upload_manifest( + img, manifest, tag=False, _urlopen=urlopen + ) + + manifest_descriptors.append( + { + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "platform": {"architecture": arch, "os": "linux"}, + "digest": str(manifest_digest), + "size": manifest_size, + } + ) + + manifest_and_config[arch] = (manifest, config) + + # And a single index. + index = { + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.index.v1+json", + "manifests": manifest_descriptors, + } + + upload_manifest(img, index, tag=True, _urlopen=urlopen) + + # Check that we fetcht the correct manifest and config for each architecture + for arch in ("amd64", "arm64"): + assert ( + get_manifest_and_config(img, architecture=arch, _urlopen=urlopen) + == manifest_and_config[arch] + ) + + # Also test max recursion + with pytest.raises(Exception, match="Maximum recursion depth reached"): + get_manifest_and_config(img, architecture="amd64", recurse=0, _urlopen=urlopen) + + +class BrokenServer(DummyServer): + """Dummy server that returns 500 and 429 errors twice before succeeding""" + + def __init__(self, domain: str) -> None: + super().__init__(domain) + self.router.register("GET", r"/internal-server-error/", self.internal_server_error_twice) + self.router.register("GET", r"/rate-limit/", self.rate_limit_twice) + self.router.register("GET", r"/not-found/", self.not_found) + self.count_500 = 0 + self.count_429 = 0 + + def internal_server_error_twice(self, request: Request): + self.count_500 += 1 + if self.count_500 < 3: + return MockHTTPResponse(500, "Internal Server Error") + else: + return MockHTTPResponse(200, "OK") + + def rate_limit_twice(self, request: Request): + self.count_429 += 1 + if self.count_429 < 3: + return MockHTTPResponse(429, "Rate Limit Exceeded") + else: + return MockHTTPResponse(200, "OK") + + def not_found(self, request: Request): + return MockHTTPResponse(404, "Not Found") + + +@pytest.mark.parametrize( + "url,max_retries,expect_failure,expect_requests", + [ + # 500s should be retried + ("https://example.com/internal-server-error/", 2, True, 2), + ("https://example.com/internal-server-error/", 5, False, 3), + # 429s should be retried + ("https://example.com/rate-limit/", 2, True, 2), + ("https://example.com/rate-limit/", 5, False, 3), + # 404s shouldn't be retried + ("https://example.com/not-found/", 3, True, 1), + ], +) +def test_retry(url, max_retries, expect_failure, expect_requests): + server = BrokenServer("example.com") + urlopen = create_opener(server).open + sleep_time = [] + dont_sleep = lambda t: sleep_time.append(t) # keep track of sleep times + + try: + response = default_retry(urlopen, retries=max_retries, sleep=dont_sleep)(url) + except urllib.error.HTTPError as e: + if not expect_failure: + assert False, f"Unexpected HTTPError: {e}" + else: + if expect_failure: + assert False, "Expected HTTPError, but none was raised" + assert response.status == 200 + + assert len(server.requests) == expect_requests + assert sleep_time == [2**i for i in range(expect_requests - 1)] diff --git a/lib/spack/spack/util/crypto.py b/lib/spack/spack/util/crypto.py index 8eebcc92bc383a..2765a6042e26f4 100644 --- a/lib/spack/spack/util/crypto.py +++ b/lib/spack/spack/util/crypto.py @@ -4,10 +4,12 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import hashlib -from typing import Any, Callable, Dict # novm +from typing import BinaryIO, Callable, Dict, Optional import llnl.util.tty as tty +HashFactory = Callable[[], "hashlib._Hash"] + #: Set of hash algorithms that Spack can use, mapped to digest size in bytes hashes = {"sha256": 32, "md5": 16, "sha1": 20, "sha224": 28, "sha384": 48, "sha512": 64} # Note: keys are ordered by popularity for earliest return in ``hash_key in version_dict`` checks. @@ -23,7 +25,7 @@ #: cache of hash functions generated -_hash_functions: Dict[str, Callable[[], Any]] = {} +_hash_functions: Dict[str, HashFactory] = {} class DeprecatedHash: @@ -44,55 +46,57 @@ def __call__(self, disable_alert=False): return hashlib.new(self.hash_alg) -def hash_fun_for_algo(algo): +def hash_fun_for_algo(algo: str) -> HashFactory: """Get a function that can perform the specified hash algorithm.""" - hash_gen = _hash_functions.get(algo) - if hash_gen is None: - if algo in _deprecated_hash_algorithms: - try: - hash_gen = DeprecatedHash(algo, tty.debug, disable_security_check=False) - - # call once to get a ValueError if usedforsecurity is needed - hash_gen(disable_alert=True) - except ValueError: - # Some systems may support the 'usedforsecurity' option - # so try with that (but display a warning when it is used) - hash_gen = DeprecatedHash(algo, tty.warn, disable_security_check=True) - else: - hash_gen = getattr(hashlib, algo) - _hash_functions[algo] = hash_gen - - return hash_gen - - -def hash_algo_for_digest(hexdigest): + fun = _hash_functions.get(algo) + if fun: + return fun + elif algo not in _deprecated_hash_algorithms: + _hash_functions[algo] = getattr(hashlib, algo) + else: + try: + deprecated_fun = DeprecatedHash(algo, tty.debug, disable_security_check=False) + + # call once to get a ValueError if usedforsecurity is needed + deprecated_fun(disable_alert=True) + except ValueError: + # Some systems may support the 'usedforsecurity' option + # so try with that (but display a warning when it is used) + deprecated_fun = DeprecatedHash(algo, tty.warn, disable_security_check=True) + _hash_functions[algo] = deprecated_fun + return _hash_functions[algo] + + +def hash_algo_for_digest(hexdigest: str) -> str: """Gets name of the hash algorithm for a hex digest.""" - bytes = len(hexdigest) / 2 - if bytes not in _size_to_hash: - raise ValueError("Spack knows no hash algorithm for this digest: %s" % hexdigest) - return _size_to_hash[bytes] + algo = _size_to_hash.get(len(hexdigest) // 2) + if algo is None: + raise ValueError(f"Spack knows no hash algorithm for this digest: {hexdigest}") + return algo -def hash_fun_for_digest(hexdigest): +def hash_fun_for_digest(hexdigest: str) -> HashFactory: """Gets a hash function corresponding to a hex digest.""" return hash_fun_for_algo(hash_algo_for_digest(hexdigest)) -def checksum(hashlib_algo, filename, **kwargs): - """Returns a hex digest of the filename generated using an - algorithm from hashlib. - """ - block_size = kwargs.get("block_size", 2**20) +def checksum_stream(hashlib_algo: HashFactory, fp: BinaryIO, *, block_size: int = 2**20) -> str: + """Returns a hex digest of the stream generated using given algorithm from hashlib.""" hasher = hashlib_algo() - with open(filename, "rb") as file: - while True: - data = file.read(block_size) - if not data: - break - hasher.update(data) + while True: + data = fp.read(block_size) + if not data: + break + hasher.update(data) return hasher.hexdigest() +def checksum(hashlib_algo: HashFactory, filename: str, *, block_size: int = 2**20) -> str: + """Returns a hex digest of the filename generated using an algorithm from hashlib.""" + with open(filename, "rb") as f: + return checksum_stream(hashlib_algo, f, block_size=block_size) + + class Checker: """A checker checks files against one particular hex digest. It will automatically determine what hashing algorithm @@ -115,18 +119,18 @@ class Checker: a 1MB (2**20 bytes) buffer. """ - def __init__(self, hexdigest, **kwargs): + def __init__(self, hexdigest: str, **kwargs) -> None: self.block_size = kwargs.get("block_size", 2**20) self.hexdigest = hexdigest - self.sum = None + self.sum: Optional[str] = None self.hash_fun = hash_fun_for_digest(hexdigest) @property - def hash_name(self): + def hash_name(self) -> str: """Get the name of the hash function this Checker is using.""" return self.hash_fun().name.lower() - def check(self, filename): + def check(self, filename: str) -> bool: """Read the file with the specified name and check its checksum against self.hexdigest. Return True if they match, False otherwise. Actual checksum is stored in self.sum. diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 890948892a1a7d..84b6c3dc1ff3f4 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -571,7 +571,7 @@ _spack_buildcache() { _spack_buildcache_push() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --key -k --update-index --rebuild-index --spec-file --only --fail-fast" + SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image -j --jobs" else _mirrors fi @@ -580,7 +580,7 @@ _spack_buildcache_push() { _spack_buildcache_create() { if $list_options then - SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --key -k --update-index --rebuild-index --spec-file --only --fail-fast" + SPACK_COMPREPLY="-h --help -f --force --allow-root -a --unsigned -u --key -k --update-index --rebuild-index --spec-file --only --fail-fast --base-image -j --jobs" else _mirrors fi @@ -1391,7 +1391,7 @@ _spack_mirror_destroy() { _spack_mirror_add() { if $list_options then - SPACK_COMPREPLY="-h --help --scope --type --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" + SPACK_COMPREPLY="-h --help --scope --type --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url --oci-username --oci-password" else _mirrors fi @@ -1418,7 +1418,7 @@ _spack_mirror_rm() { _spack_mirror_set_url() { if $list_options then - SPACK_COMPREPLY="-h --help --push --fetch --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" + SPACK_COMPREPLY="-h --help --push --fetch --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url --oci-username --oci-password" else _mirrors fi @@ -1427,7 +1427,7 @@ _spack_mirror_set_url() { _spack_mirror_set() { if $list_options then - SPACK_COMPREPLY="-h --help --push --fetch --type --url --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url" + SPACK_COMPREPLY="-h --help --push --fetch --type --url --scope --s3-access-key-id --s3-access-key-secret --s3-access-token --s3-profile --s3-endpoint-url --oci-username --oci-password" else _mirrors fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index a09cdfa83716ea..ee9011e11c4857 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -696,7 +696,7 @@ complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -f -a complete -c spack -n '__fish_spack_using_command buildcache' -s h -l help -d 'show this help message and exit' # spack buildcache push -set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force a/allow-root u/unsigned k/key= update-index spec-file= only= fail-fast +set -g __fish_spack_optspecs_spack_buildcache_push h/help f/force a/allow-root u/unsigned k/key= update-index spec-file= only= fail-fast base-image= j/jobs= complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache push' -f -k -a '(__fish_spack_specs)' complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command buildcache push' -s h -l help -d 'show this help message and exit' @@ -716,9 +716,13 @@ complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -f complete -c spack -n '__fish_spack_using_command buildcache push' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies' complete -c spack -n '__fish_spack_using_command buildcache push' -l fail-fast -f -a fail_fast complete -c spack -n '__fish_spack_using_command buildcache push' -l fail-fast -d 'stop pushing on first failure (default is best effort)' +complete -c spack -n '__fish_spack_using_command buildcache push' -l base-image -r -f -a base_image +complete -c spack -n '__fish_spack_using_command buildcache push' -l base-image -r -d 'specify the base image for the buildcache. ' +complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs -r -f -a jobs +complete -c spack -n '__fish_spack_using_command buildcache push' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack buildcache create -set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force a/allow-root u/unsigned k/key= update-index spec-file= only= fail-fast +set -g __fish_spack_optspecs_spack_buildcache_create h/help f/force a/allow-root u/unsigned k/key= update-index spec-file= only= fail-fast base-image= j/jobs= complete -c spack -n '__fish_spack_using_command_pos_remainder 1 buildcache create' -f -k -a '(__fish_spack_specs)' complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command buildcache create' -s h -l help -d 'show this help message and exit' @@ -738,6 +742,10 @@ complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r - complete -c spack -n '__fish_spack_using_command buildcache create' -l only -r -d 'select the buildcache mode. The default is to build a cache for the package along with all its dependencies. Alternatively, one can decide to build a cache for only the package or only the dependencies' complete -c spack -n '__fish_spack_using_command buildcache create' -l fail-fast -f -a fail_fast complete -c spack -n '__fish_spack_using_command buildcache create' -l fail-fast -d 'stop pushing on first failure (default is best effort)' +complete -c spack -n '__fish_spack_using_command buildcache create' -l base-image -r -f -a base_image +complete -c spack -n '__fish_spack_using_command buildcache create' -l base-image -r -d 'specify the base image for the buildcache. ' +complete -c spack -n '__fish_spack_using_command buildcache create' -s j -l jobs -r -f -a jobs +complete -c spack -n '__fish_spack_using_command buildcache create' -s j -l jobs -r -d 'explicitly set number of parallel jobs' # spack buildcache install set -g __fish_spack_optspecs_spack_buildcache_install h/help f/force m/multiple u/unsigned o/otherarch @@ -2139,7 +2147,7 @@ complete -c spack -n '__fish_spack_using_command mirror destroy' -l mirror-url - complete -c spack -n '__fish_spack_using_command mirror destroy' -l mirror-url -r -d 'find mirror to destroy by url' # spack mirror add -set -g __fish_spack_optspecs_spack_mirror_add h/help scope= type= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= +set -g __fish_spack_optspecs_spack_mirror_add h/help scope= type= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= oci-username= oci-password= complete -c spack -n '__fish_spack_using_command_pos 0 mirror add' -f complete -c spack -n '__fish_spack_using_command mirror add' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command mirror add' -s h -l help -d 'show this help message and exit' @@ -2157,6 +2165,10 @@ complete -c spack -n '__fish_spack_using_command mirror add' -l s3-profile -r -f complete -c spack -n '__fish_spack_using_command mirror add' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror' complete -c spack -n '__fish_spack_using_command mirror add' -l s3-endpoint-url -r -f -a s3_endpoint_url complete -c spack -n '__fish_spack_using_command mirror add' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror' +complete -c spack -n '__fish_spack_using_command mirror add' -l oci-username -r -f -a oci_username +complete -c spack -n '__fish_spack_using_command mirror add' -l oci-username -r -d 'username to use to connect to this OCI mirror' +complete -c spack -n '__fish_spack_using_command mirror add' -l oci-password -r -f -a oci_password +complete -c spack -n '__fish_spack_using_command mirror add' -l oci-password -r -d 'password to use to connect to this OCI mirror' # spack mirror remove set -g __fish_spack_optspecs_spack_mirror_remove h/help scope= @@ -2175,7 +2187,7 @@ complete -c spack -n '__fish_spack_using_command mirror rm' -l scope -r -f -a '_ complete -c spack -n '__fish_spack_using_command mirror rm' -l scope -r -d 'configuration scope to modify' # spack mirror set-url -set -g __fish_spack_optspecs_spack_mirror_set_url h/help push fetch scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= +set -g __fish_spack_optspecs_spack_mirror_set_url h/help push fetch scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= oci-username= oci-password= complete -c spack -n '__fish_spack_using_command_pos 0 mirror set-url' -f -a '(__fish_spack_mirrors)' complete -c spack -n '__fish_spack_using_command mirror set-url' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command mirror set-url' -s h -l help -d 'show this help message and exit' @@ -2195,9 +2207,13 @@ complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-profile - complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror' complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-endpoint-url -r -f -a s3_endpoint_url complete -c spack -n '__fish_spack_using_command mirror set-url' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror' +complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-username -r -f -a oci_username +complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-username -r -d 'username to use to connect to this OCI mirror' +complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-password -r -f -a oci_password +complete -c spack -n '__fish_spack_using_command mirror set-url' -l oci-password -r -d 'password to use to connect to this OCI mirror' # spack mirror set -set -g __fish_spack_optspecs_spack_mirror_set h/help push fetch type= url= scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= +set -g __fish_spack_optspecs_spack_mirror_set h/help push fetch type= url= scope= s3-access-key-id= s3-access-key-secret= s3-access-token= s3-profile= s3-endpoint-url= oci-username= oci-password= complete -c spack -n '__fish_spack_using_command_pos 0 mirror set' -f -a '(__fish_spack_mirrors)' complete -c spack -n '__fish_spack_using_command mirror set' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command mirror set' -s h -l help -d 'show this help message and exit' @@ -2221,6 +2237,10 @@ complete -c spack -n '__fish_spack_using_command mirror set' -l s3-profile -r -f complete -c spack -n '__fish_spack_using_command mirror set' -l s3-profile -r -d 'S3 profile name to use to connect to this S3 mirror' complete -c spack -n '__fish_spack_using_command mirror set' -l s3-endpoint-url -r -f -a s3_endpoint_url complete -c spack -n '__fish_spack_using_command mirror set' -l s3-endpoint-url -r -d 'endpoint URL to use to connect to this S3 mirror' +complete -c spack -n '__fish_spack_using_command mirror set' -l oci-username -r -f -a oci_username +complete -c spack -n '__fish_spack_using_command mirror set' -l oci-username -r -d 'username to use to connect to this OCI mirror' +complete -c spack -n '__fish_spack_using_command mirror set' -l oci-password -r -f -a oci_password +complete -c spack -n '__fish_spack_using_command mirror set' -l oci-password -r -d 'password to use to connect to this OCI mirror' # spack mirror list set -g __fish_spack_optspecs_spack_mirror_list h/help scope= From 069762cd37c2a4b2913dcee80aafed3605bb8a10 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Fri, 27 Oct 2023 13:40:44 -0400 Subject: [PATCH 372/806] External finding: update default paths; treat .bat as executable on Windows (#39850) .bat or .exe files can be considered executable on Windows. This PR expands the regex for detectable packages to allow for the detection of packages that vendor .bat wrappers (intel mpi for example). Additional changes: * Outside of Windows, when searching for executables `path_hints=None` was used to indicate that default path hints should be provided, and `[]` was taken to mean that no defaults should be chosen (in that case, nothing is searched); behavior on Windows has now been updated to match. * Above logic for handling of `path_hints=[]` has also been extended to library search (for both Linux and Windows). * All exceptions for external packages were documented as timeout errors: this commit adds a distinction for other types of errors in warning messages to the user. --- lib/spack/spack/detection/path.py | 96 ++++++++++++++++------------ lib/spack/spack/test/cmd/external.py | 43 +------------ lib/spack/spack/test/detection.py | 30 +++++++++ lib/spack/spack/util/path.py | 2 +- 4 files changed, 89 insertions(+), 82 deletions(-) create mode 100644 lib/spack/spack/test/detection.py diff --git a/lib/spack/spack/detection/path.py b/lib/spack/spack/detection/path.py index 4de703ac97b0f3..6531ed62da0ef5 100644 --- a/lib/spack/spack/detection/path.py +++ b/lib/spack/spack/detection/path.py @@ -39,12 +39,21 @@ DETECTION_TIMEOUT = 120 -def common_windows_package_paths() -> List[str]: +def common_windows_package_paths(pkg_cls=None) -> List[str]: + """Get the paths for common package installation location on Windows + that are outside the PATH + Returns [] on unix + """ + if sys.platform != "win32": + return [] paths = WindowsCompilerExternalPaths.find_windows_compiler_bundled_packages() paths.extend(find_win32_additional_install_paths()) paths.extend(WindowsKitExternalPaths.find_windows_kit_bin_paths()) paths.extend(WindowsKitExternalPaths.find_windows_kit_reg_installed_roots_paths()) paths.extend(WindowsKitExternalPaths.find_windows_kit_reg_sdk_paths()) + if pkg_cls: + paths.extend(compute_windows_user_path_for_package(pkg_cls)) + paths.extend(compute_windows_program_path_for_package(pkg_cls)) return paths @@ -62,8 +71,6 @@ def executables_in_path(path_hints: List[str]) -> Dict[str, str]: path_hints: list of paths to be searched. If None the list will be constructed based on the PATH environment variable. """ - if sys.platform == "win32": - path_hints.extend(common_windows_package_paths()) search_paths = llnl.util.filesystem.search_paths_for_executables(*path_hints) return path_to_dict(search_paths) @@ -88,30 +95,42 @@ def libraries_in_ld_and_system_library_path( DYLD_LIBRARY_PATH, and DYLD_FALLBACK_LIBRARY_PATH environment variables as well as the standard system library paths. """ - path_hints = ( - path_hints - or spack.util.environment.get_path("LD_LIBRARY_PATH") + default_lib_search_paths = ( + spack.util.environment.get_path("LD_LIBRARY_PATH") + spack.util.environment.get_path("DYLD_LIBRARY_PATH") + spack.util.environment.get_path("DYLD_FALLBACK_LIBRARY_PATH") + spack.util.ld_so_conf.host_dynamic_linker_search_paths() ) + path_hints = path_hints if path_hints is not None else default_lib_search_paths + search_paths = llnl.util.filesystem.search_paths_for_libraries(*path_hints) return path_to_dict(search_paths) -def libraries_in_windows_paths(path_hints: List[str]) -> Dict[str, str]: - path_hints.extend(spack.util.environment.get_path("PATH")) - search_paths = llnl.util.filesystem.search_paths_for_libraries(*path_hints) +def libraries_in_windows_paths(path_hints: Optional[List[str]] = None) -> Dict[str, str]: + """Get the paths of all libraries available from the system PATH paths. + + For more details, see `libraries_in_ld_and_system_library_path` regarding + return type and contents. + + Args: + path_hints: list of paths to be searched. If None the list will be + constructed based on the set of PATH environment + variables as well as the standard system library paths. + """ + search_hints = ( + path_hints if path_hints is not None else spack.util.environment.get_path("PATH") + ) + search_paths = llnl.util.filesystem.search_paths_for_libraries(*search_hints) # on Windows, some libraries (.dlls) are found in the bin directory or sometimes # at the search root. Add both of those options to the search scheme - search_paths.extend(llnl.util.filesystem.search_paths_for_executables(*path_hints)) - search_paths.extend(WindowsKitExternalPaths.find_windows_kit_lib_paths()) - search_paths.extend(WindowsKitExternalPaths.find_windows_kit_bin_paths()) - search_paths.extend(WindowsKitExternalPaths.find_windows_kit_reg_installed_roots_paths()) - search_paths.extend(WindowsKitExternalPaths.find_windows_kit_reg_sdk_paths()) - # SDK and WGL should be handled by above, however on occasion the WDK is in an atypical - # location, so we handle that case specifically. - search_paths.extend(WindowsKitExternalPaths.find_windows_driver_development_kit_paths()) + search_paths.extend(llnl.util.filesystem.search_paths_for_executables(*search_hints)) + if path_hints is None: + # if no user provided path was given, add defaults to the search + search_paths.extend(WindowsKitExternalPaths.find_windows_kit_lib_paths()) + # SDK and WGL should be handled by above, however on occasion the WDK is in an atypical + # location, so we handle that case specifically. + search_paths.extend(WindowsKitExternalPaths.find_windows_driver_development_kit_paths()) return path_to_dict(search_paths) @@ -125,19 +144,8 @@ def _group_by_prefix(paths: Set[str]) -> Dict[str, Set[str]]: class Finder: """Inspects the file-system looking for packages. Guesses places where to look using PATH.""" - def path_hints( - self, *, pkg: "spack.package_base.PackageBase", initial_guess: Optional[List[str]] = None - ) -> List[str]: - """Returns the list of paths to be searched. - - Args: - pkg: package being detected - initial_guess: initial list of paths from caller - """ - result = initial_guess or [] - result.extend(compute_windows_user_path_for_package(pkg)) - result.extend(compute_windows_program_path_for_package(pkg)) - return result + def default_path_hints(self) -> List[str]: + return [] def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]: """Returns the list of patterns used to match candidate files. @@ -245,6 +253,8 @@ def find( Args: pkg_name: package being detected initial_guess: initial list of paths to search from the caller + if None, default paths are searched. If this + is an empty list, nothing will be searched. """ import spack.repo @@ -252,13 +262,18 @@ def find( patterns = self.search_patterns(pkg=pkg_cls) if not patterns: return [] - path_hints = self.path_hints(pkg=pkg_cls, initial_guess=initial_guess) - candidates = self.candidate_files(patterns=patterns, paths=path_hints) + if initial_guess is None: + initial_guess = self.default_path_hints() + initial_guess.extend(common_windows_package_paths(pkg_cls)) + candidates = self.candidate_files(patterns=patterns, paths=initial_guess) result = self.detect_specs(pkg=pkg_cls, paths=candidates) return result class ExecutablesFinder(Finder): + def default_path_hints(self) -> List[str]: + return spack.util.environment.get_path("PATH") + def search_patterns(self, *, pkg: "spack.package_base.PackageBase") -> List[str]: result = [] if hasattr(pkg, "executables") and hasattr(pkg, "platform_executables"): @@ -298,7 +313,7 @@ def candidate_files(self, *, patterns: List[str], paths: List[str]) -> List[str] libraries_by_path = ( libraries_in_ld_and_system_library_path(path_hints=paths) if sys.platform != "win32" - else libraries_in_windows_paths(paths) + else libraries_in_windows_paths(path_hints=paths) ) patterns = [re.compile(x) for x in patterns] result = [] @@ -334,21 +349,16 @@ def by_path( # TODO: Packages should be able to define both .libraries and .executables in the future # TODO: determine_spec_details should get all relevant libraries and executables in one call executables_finder, libraries_finder = ExecutablesFinder(), LibrariesFinder() - - executables_path_guess = ( - spack.util.environment.get_path("PATH") if path_hints is None else path_hints - ) - libraries_path_guess = [] if path_hints is None else path_hints detected_specs_by_package: Dict[str, Tuple[concurrent.futures.Future, ...]] = {} result = collections.defaultdict(list) with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor: for pkg in packages_to_search: executable_future = executor.submit( - executables_finder.find, pkg_name=pkg, initial_guess=executables_path_guess + executables_finder.find, pkg_name=pkg, initial_guess=path_hints ) library_future = executor.submit( - libraries_finder.find, pkg_name=pkg, initial_guess=libraries_path_guess + libraries_finder.find, pkg_name=pkg, initial_guess=path_hints ) detected_specs_by_package[pkg] = executable_future, library_future @@ -359,9 +369,13 @@ def by_path( if detected: _, unqualified_name = spack.repo.partition_package_name(pkg_name) result[unqualified_name].extend(detected) - except Exception: + except concurrent.futures.TimeoutError: llnl.util.tty.debug( f"[EXTERNAL DETECTION] Skipping {pkg_name}: timeout reached" ) + except Exception as e: + llnl.util.tty.debug( + f"[EXTERNAL DETECTION] Skipping {pkg_name}: exception occured {e}" + ) return result diff --git a/lib/spack/spack/test/cmd/external.py b/lib/spack/spack/test/cmd/external.py index e94d6efe5c4d4d..e9a387aac03e66 100644 --- a/lib/spack/spack/test/cmd/external.py +++ b/lib/spack/spack/test/cmd/external.py @@ -28,21 +28,12 @@ def _mock_search(path_hints=None): return _factory -@pytest.fixture -def _platform_executables(monkeypatch): - def _win_exe_ext(): - return ".bat" - - monkeypatch.setattr(spack.util.path, "win_exe_ext", _win_exe_ext) - - def define_plat_exe(exe): if sys.platform == "win32": exe += ".bat" return exe -@pytest.mark.xfail(sys.platform == "win32", reason="https://github.com/spack/spack/pull/39850") def test_find_external_single_package(mock_executable): cmake_path = mock_executable("cmake", output="echo cmake version 1.foo") search_dir = cmake_path.parent.parent @@ -54,7 +45,7 @@ def test_find_external_single_package(mock_executable): assert len(detected_spec) == 1 and detected_spec[0].spec == Spec("cmake@1.foo") -def test_find_external_two_instances_same_package(mock_executable, _platform_executables): +def test_find_external_two_instances_same_package(mock_executable): # Each of these cmake instances is created in a different prefix # In Windows, quoted strings are echo'd with quotes includes # we need to avoid that for proper regex. @@ -236,32 +227,7 @@ def test_list_detectable_packages(mutable_config, mutable_mock_repo): assert external.returncode == 0 -@pytest.mark.xfail(sys.platform == "win32", reason="https://github.com/spack/spack/pull/39850") -def test_packages_yaml_format(mock_executable, mutable_config, monkeypatch, _platform_executables): - # Prepare an environment to detect a fake gcc - gcc_exe = mock_executable("gcc", output="echo 4.2.1") - prefix = os.path.dirname(gcc_exe) - monkeypatch.setenv("PATH", prefix) - - # Find the external spec - external("find", "gcc") - - # Check entries in 'packages.yaml' - packages_yaml = spack.config.get("packages") - assert "gcc" in packages_yaml - assert "externals" in packages_yaml["gcc"] - externals = packages_yaml["gcc"]["externals"] - assert len(externals) == 1 - external_gcc = externals[0] - assert external_gcc["spec"] == "gcc@4.2.1 languages=c" - assert external_gcc["prefix"] == os.path.dirname(prefix) - assert "extra_attributes" in external_gcc - extra_attributes = external_gcc["extra_attributes"] - assert "prefix" not in extra_attributes - assert extra_attributes["compilers"]["c"] == str(gcc_exe) - - -def test_overriding_prefix(mock_executable, mutable_config, monkeypatch, _platform_executables): +def test_overriding_prefix(mock_executable, mutable_config, monkeypatch): gcc_exe = mock_executable("gcc", output="echo 4.2.1") search_dir = gcc_exe.parent @@ -282,10 +248,7 @@ def _determine_variants(cls, exes, version_str): assert gcc.external_path == os.path.sep + os.path.join("opt", "gcc", "bin") -@pytest.mark.xfail(sys.platform == "win32", reason="https://github.com/spack/spack/pull/39850") -def test_new_entries_are_reported_correctly( - mock_executable, mutable_config, monkeypatch, _platform_executables -): +def test_new_entries_are_reported_correctly(mock_executable, mutable_config, monkeypatch): # Prepare an environment to detect a fake gcc gcc_exe = mock_executable("gcc", output="echo 4.2.1") prefix = os.path.dirname(gcc_exe) diff --git a/lib/spack/spack/test/detection.py b/lib/spack/spack/test/detection.py new file mode 100644 index 00000000000000..6218bc87578f7c --- /dev/null +++ b/lib/spack/spack/test/detection.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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) +import collections + +import spack.detection +import spack.spec + + +def test_detection_update_config(mutable_config): + # mock detected package + detected_packages = collections.defaultdict(list) + detected_packages["cmake"] = [ + spack.detection.common.DetectedPackage( + spec=spack.spec.Spec("cmake@3.27.5"), prefix="/usr/bin" + ) + ] + + # update config for new package + spack.detection.common.update_configuration(detected_packages) + # Check entries in 'packages.yaml' + packages_yaml = spack.config.get("packages") + assert "cmake" in packages_yaml + assert "externals" in packages_yaml["cmake"] + externals = packages_yaml["cmake"]["externals"] + assert len(externals) == 1 + external_gcc = externals[0] + assert external_gcc["spec"] == "cmake@3.27.5" + assert external_gcc["prefix"] == "/usr/bin" diff --git a/lib/spack/spack/util/path.py b/lib/spack/spack/util/path.py index a46443c0831189..e2aee48df1e2cd 100644 --- a/lib/spack/spack/util/path.py +++ b/lib/spack/spack/util/path.py @@ -98,7 +98,7 @@ def replacements(): def win_exe_ext(): - return ".exe" + return r"(?:\.bat|\.exe)" def sanitize_filename(filename: str) -> str: From f2963e41ba04300c77912a76edce4224f80cc382 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:08:33 -0700 Subject: [PATCH 373/806] mgard@2020-10-01 %oneapi@2023: turn of c++11-narrowing via cxxflags (#40743) --- var/spack/repos/builtin/packages/mgard/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/mgard/package.py b/var/spack/repos/builtin/packages/mgard/package.py index b58f4c0bba0aa6..411dd0c9b9c6e2 100644 --- a/var/spack/repos/builtin/packages/mgard/package.py +++ b/var/spack/repos/builtin/packages/mgard/package.py @@ -59,6 +59,12 @@ class Mgard(CMakePackage, CudaPackage): ) conflicts("%gcc@:7", when="@2022-11-18:", msg="requires std::optional and other c++17 things") + def flag_handler(self, name, flags): + if name == "cxxflags": + if self.spec.satisfies("@2020-10-01 %oneapi@2023:"): + flags.append("-Wno-error=c++11-narrowing") + return (flags, None, None) + def cmake_args(self): spec = self.spec args = ["-DBUILD_TESTING=OFF"] From ed7274a4d0d4b3d2657eb3aaeafae30f7e098d6d Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:15:11 -0700 Subject: [PATCH 374/806] e4s ci stacks: add exago specs (#40712) * e4s ci: add exago +cuda, +rocm builds * exago: rename 5-18-2022-snapshot to snapshot.5-18-2022 * disable exago +rocm for non-external rocm ci install * note that hiop +rocm fails to find hip libraries when they are spack-installed --- share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml | 1 + .../gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 3 +++ var/spack/repos/builtin/packages/exago/package.py | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 95f8d37e0436bc..718f1d23d336b2 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -199,6 +199,7 @@ spack: - caliper +cuda cuda_arch=70 - chai ~benchmarks ~tests +cuda cuda_arch=70 ^umpire ~shared - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=70 + - exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=70 ~ipopt ^hiop@1.0.0 ~sparse +mpi +raja ~rocm +cuda cuda_arch=70 #^raja@0.14.0 - flecsi +cuda cuda_arch=70 - ginkgo +cuda cuda_arch=70 - heffte +cuda cuda_arch=70 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index c11dcf6ae1a551..b30236a717453f 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -250,6 +250,7 @@ spack: - caliper +rocm amdgpu_target=gfx908 - chai ~benchmarks +rocm amdgpu_target=gfx908 - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908 + - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 - gasnet +rocm amdgpu_target=gfx908 - ginkgo +rocm amdgpu_target=gfx908 - heffte +rocm amdgpu_target=gfx908 @@ -290,6 +291,7 @@ spack: - caliper +rocm amdgpu_target=gfx90a - chai ~benchmarks +rocm amdgpu_target=gfx90a - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a + - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a - gasnet +rocm amdgpu_target=gfx90a - ginkgo +rocm amdgpu_target=gfx90a - heffte +rocm amdgpu_target=gfx90a diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index ea9bd5fe70b72f..eb689234552cab 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -205,6 +205,7 @@ spack: - cusz +cuda cuda_arch=80 - dealii +cuda cuda_arch=80 - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error + - exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=80 ~ipopt ^hiop@1.0.0 ~sparse +mpi +raja ~rocm +cuda cuda_arch=80 #^raja@0.14.0 - flecsi +cuda cuda_arch=80 - ginkgo +cuda cuda_arch=80 - heffte +cuda cuda_arch=80 @@ -327,6 +328,7 @@ spack: - paraview +rocm amdgpu_target=gfx908 # - vtk-m ~openmp +rocm amdgpu_target=gfx908 # vtk-m: https://github.com/spack/spack/issues/40268 # -- + # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx908 # hiop: CMake Error at cmake/FindHiopHipLibraries.cmake:23 (find_package) # - lbann ~cuda +rocm amdgpu_target=gfx908 # aluminum: https://github.com/spack/spack/issues/38807 # - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898 @@ -367,6 +369,7 @@ spack: - paraview +rocm amdgpu_target=gfx90a # - vtk-m ~openmp +rocm amdgpu_target=gfx90a # vtk-m: https://github.com/spack/spack/issues/40268 # -- + # - exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^hiop@1.0.0 ~sparse +mpi +raja +rocm amdgpu_target=gfx90a # hiop: CMake Error at cmake/FindHiopHipLibraries.cmake:23 (find_package) # - lbann ~cuda +rocm amdgpu_target=gfx90a # aluminum: https://github.com/spack/spack/issues/38807 # - papi +rocm amdgpu_target=gfx90a # papi: https://github.com/spack/spack/issues/27898 diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index ab48bab3776b86..8db0f7f16fbefe 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -50,7 +50,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): version("main", branch="main", submodules=True) version("develop", branch="develop", submodules=True) version( - "5-18-2022-snapshot", + "snapshot.5-18-2022", tag="5-18-2022-snapshot", commit="3eb58335db71bb72341153a7867eb607402067ca", submodules=True, From 9e01199e130784ff36268d409a441941658072f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 27 Oct 2023 20:33:48 +0100 Subject: [PATCH 375/806] hipsycl: restrict compatibility with llvm for v0.8.0 (#40736) --- var/spack/repos/builtin/packages/hipsycl/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/hipsycl/package.py b/var/spack/repos/builtin/packages/hipsycl/package.py index e8a5ba9201dd06..b6b30c2e5cfa7a 100644 --- a/var/spack/repos/builtin/packages/hipsycl/package.py +++ b/var/spack/repos/builtin/packages/hipsycl/package.py @@ -39,6 +39,9 @@ class Hipsycl(CMakePackage): depends_on("python@3:") depends_on("llvm@8: +clang", when="~cuda") depends_on("llvm@9: +clang", when="+cuda") + # hipSYCL 0.8.0 supported only LLVM 8-10: + # (https://github.com/AdaptiveCpp/AdaptiveCpp/blob/v0.8.0/CMakeLists.txt#L29-L37) + depends_on("llvm@8:10", when="@0.8.0") # https://github.com/OpenSYCL/OpenSYCL/pull/918 was introduced after 0.9.4 conflicts("^llvm@16:", when="@:0.9.4") # LLVM PTX backend requires cuda7:10.1 (https://tinyurl.com/v82k5qq) From 148dce96edaee62889a17579dc373afbd080e498 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Fri, 27 Oct 2023 19:58:50 -0400 Subject: [PATCH 376/806] MSVC: detection from registry (#38500) Typically MSVC is detected via the VSWhere program. However, this may not be available, or may be installed in an unpredictable location. This PR adds an additional approach via Windows Registry queries to determine VS install location root. Additionally: * Construct vs_install_paths after class-definition time (move it to variable-access time). * Skip over keys for which a user does not have read permissions when performing searches (previously the presence of these keys would have caused an error, regardless of whether they were needed). * Extend helper functionality with option for regex matching on registry keys vs. exact string matching. * Some internal refactoring: remove boolean parameters in some cases where the function was always called with the same value (e.g. `find_subkey`) --- lib/spack/spack/detection/common.py | 2 +- .../spack/operating_systems/windows_os.py | 107 ++++++++++------ lib/spack/spack/util/windows_registry.py | 114 +++++++++++++++--- 3 files changed, 168 insertions(+), 55 deletions(-) diff --git a/lib/spack/spack/detection/common.py b/lib/spack/spack/detection/common.py index 0e873c3f555095..6fba021b336b0c 100644 --- a/lib/spack/spack/detection/common.py +++ b/lib/spack/spack/detection/common.py @@ -269,7 +269,7 @@ def find_windows_compiler_root_paths() -> List[str]: At the moment simply returns location of VS install paths from VSWhere But should be extended to include more information as relevant""" - return list(winOs.WindowsOs.vs_install_paths) + return list(winOs.WindowsOs().vs_install_paths) @staticmethod def find_windows_compiler_cmake_paths() -> List[str]: diff --git a/lib/spack/spack/operating_systems/windows_os.py b/lib/spack/spack/operating_systems/windows_os.py index 0c3930e99c48f1..fa767d71fb1c22 100755 --- a/lib/spack/spack/operating_systems/windows_os.py +++ b/lib/spack/spack/operating_systems/windows_os.py @@ -5,10 +5,12 @@ import glob import os +import pathlib import platform import subprocess from spack.error import SpackError +from spack.util import windows_registry as winreg from spack.version import Version from ._operating_system import OperatingSystem @@ -31,43 +33,6 @@ class WindowsOs(OperatingSystem): 10. """ - # Find MSVC directories using vswhere - comp_search_paths = [] - vs_install_paths = [] - root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles") - if root: - try: - extra_args = {"encoding": "mbcs", "errors": "strict"} - paths = subprocess.check_output( # type: ignore[call-overload] # novermin - [ - os.path.join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"), - "-prerelease", - "-requires", - "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", - "-property", - "installationPath", - "-products", - "*", - ], - **extra_args, - ).strip() - vs_install_paths = paths.split("\n") - msvc_paths = [os.path.join(path, "VC", "Tools", "MSVC") for path in vs_install_paths] - for p in msvc_paths: - comp_search_paths.extend(glob.glob(os.path.join(p, "*", "bin", "Hostx64", "x64"))) - if os.getenv("ONEAPI_ROOT"): - comp_search_paths.extend( - glob.glob( - os.path.join( - str(os.getenv("ONEAPI_ROOT")), "compiler", "*", "windows", "bin" - ) - ) - ) - except (subprocess.CalledProcessError, OSError, UnicodeDecodeError): - pass - if comp_search_paths: - compiler_search_paths = comp_search_paths - def __init__(self): plat_ver = windows_version() if plat_ver < Version("10"): @@ -76,3 +41,71 @@ def __init__(self): def __str__(self): return self.name + + @property + def vs_install_paths(self): + vs_install_paths = [] + root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles") + if root: + try: + extra_args = {"encoding": "mbcs", "errors": "strict"} + paths = subprocess.check_output( # type: ignore[call-overload] # novermin + [ + os.path.join(root, "Microsoft Visual Studio", "Installer", "vswhere.exe"), + "-prerelease", + "-requires", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "-property", + "installationPath", + "-products", + "*", + ], + **extra_args, + ).strip() + vs_install_paths = paths.split("\n") + except (subprocess.CalledProcessError, OSError, UnicodeDecodeError): + pass + return vs_install_paths + + @property + def msvc_paths(self): + return [os.path.join(path, "VC", "Tools", "MSVC") for path in self.vs_install_paths] + + @property + def compiler_search_paths(self): + # First Strategy: Find MSVC directories using vswhere + _compiler_search_paths = [] + for p in self.msvc_paths: + _compiler_search_paths.extend(glob.glob(os.path.join(p, "*", "bin", "Hostx64", "x64"))) + if os.getenv("ONEAPI_ROOT"): + _compiler_search_paths.extend( + glob.glob( + os.path.join(str(os.getenv("ONEAPI_ROOT")), "compiler", "*", "windows", "bin") + ) + ) + # Second strategy: Find MSVC via the registry + msft = winreg.WindowsRegistryView( + "SOFTWARE\\WOW6432Node\\Microsoft", winreg.HKEY.HKEY_LOCAL_MACHINE + ) + vs_entries = msft.find_subkeys(r"VisualStudio_.*") + vs_paths = [] + + def clean_vs_path(path): + path = path.split(",")[0].lstrip("@") + return str((pathlib.Path(path).parent / "..\\..").resolve()) + + for entry in vs_entries: + try: + val = entry.get_subkey("Capabilities").get_value("ApplicationDescription").value + vs_paths.append(clean_vs_path(val)) + except FileNotFoundError as e: + if hasattr(e, "winerror"): + if e.winerror == 2: + pass + else: + raise + else: + raise + + _compiler_search_paths.extend(vs_paths) + return _compiler_search_paths diff --git a/lib/spack/spack/util/windows_registry.py b/lib/spack/spack/util/windows_registry.py index 5cc0edd8bf5271..cfc16724563287 100644 --- a/lib/spack/spack/util/windows_registry.py +++ b/lib/spack/spack/util/windows_registry.py @@ -8,6 +8,7 @@ """ import os +import re import sys from contextlib import contextmanager @@ -68,8 +69,19 @@ def _gather_subkey_info(self): sub_keys, _, _ = winreg.QueryInfoKey(self.hkey) for i in range(sub_keys): sub_name = winreg.EnumKey(self.hkey, i) - sub_handle = winreg.OpenKeyEx(self.hkey, sub_name, access=winreg.KEY_READ) - self._keys.append(RegistryKey(os.path.join(self.path, sub_name), sub_handle)) + try: + sub_handle = winreg.OpenKeyEx(self.hkey, sub_name, access=winreg.KEY_READ) + self._keys.append(RegistryKey(os.path.join(self.path, sub_name), sub_handle)) + except OSError as e: + if hasattr(e, "winerror"): + if e.winerror == 5: + # This is a permission error, we can't read this key + # move on + pass + else: + raise + else: + raise def _gather_value_info(self): """Compose all values for this key into a dict of form value name: RegistryValue Object""" @@ -161,6 +173,15 @@ def __init__(self, key, root_key=HKEY.HKEY_CURRENT_USER): self.root = root_key self._reg = None + class KeyMatchConditions: + @staticmethod + def regex_matcher(subkey_name): + return lambda x: re.match(subkey_name, x.name) + + @staticmethod + def name_matcher(subkey_name): + return lambda x: subkey_name == x.name + @contextmanager def invalid_reg_ref_error_handler(self): try: @@ -193,6 +214,10 @@ def _valid_reg_check(self): return False return True + def _regex_match_subkeys(self, subkey): + r_subkey = re.compile(subkey) + return [key for key in self.get_subkeys() if r_subkey.match(key.name)] + @property def reg(self): if not self._reg: @@ -218,51 +243,106 @@ def get_subkeys(self): with self.invalid_reg_ref_error_handler(): return self.reg.subkeys + def get_matching_subkeys(self, subkey_name): + """Returns all subkeys regex matching subkey name + + Note: this method obtains only direct subkeys of the given key and does not + desced to transtitve subkeys. For this behavior, see `find_matching_subkeys`""" + self._regex_match_subkeys(subkey_name) + def get_values(self): if not self._valid_reg_check(): raise RegistryError("Cannot query values from invalid key %s" % self.key) with self.invalid_reg_ref_error_handler(): return self.reg.values - def _traverse_subkeys(self, stop_condition): + def _traverse_subkeys(self, stop_condition, collect_all_matching=False): """Perform simple BFS of subkeys, returning the key that successfully triggers the stop condition. Args: stop_condition: lambda or function pointer that takes a single argument a key and returns a boolean value based on that key + collect_all_matching: boolean value, if True, the traversal collects and returns + all keys meeting stop condition. If false, once stop + condition is met, the key that triggered the condition ' + is returned. Return: the key if stop_condition is triggered, or None if not """ + collection = [] if not self._valid_reg_check(): raise RegistryError("Cannot query values from invalid key %s" % self.key) with self.invalid_reg_ref_error_handler(): queue = self.reg.subkeys for key in queue: if stop_condition(key): - return key + if collect_all_matching: + collection.append(key) + else: + return key queue.extend(key.subkeys) - return None + return collection if collection else None + + def _find_subkey_s(self, search_key, collect_all_matching=False): + """Retrieve one or more keys regex matching `search_key`. + One key will be returned unless `collect_all_matching` is enabled, + in which case call matches are returned. + + Args: + search_key (str): regex string represeting a subkey name structure + to be matched against. + Cannot be provided alongside `direct_subkey` + collect_all_matching (bool): No-op if `direct_subkey` is specified + Return: + the desired subkey as a RegistryKey object, or none + """ + return self._traverse_subkeys(search_key, collect_all_matching=collect_all_matching) - def find_subkey(self, subkey_name, recursive=True): - """If non recursive, this method is the same as get subkey with error handling - Otherwise perform a BFS of subkeys until desired key is found + def find_subkey(self, subkey_name): + """Perform a BFS of subkeys until desired key is found Returns None or RegistryKey object corresponding to requested key name Args: - subkey_name (str): string representing subkey to be searched for - recursive (bool): optional argument, if True, subkey need not be a direct - sub key of this registry entry, and this method will - search all subkeys recursively. - Default is True + subkey_name (str) Return: the desired subkey as a RegistryKey object, or none + + For more details, see the WindowsRegistryView._find_subkey_s method docstring """ + return self._find_subkey_s( + WindowsRegistryView.KeyMatchConditions.name_matcher(subkey_name) + ) - if not recursive: - return self.get_subkey(subkey_name) + def find_matching_subkey(self, subkey_name): + """Perform a BFS of subkeys until a key matching subkey name regex is found + Returns None or the first RegistryKey object corresponding to requested key name - else: - return self._traverse_subkeys(lambda x: x.name == subkey_name) + Args: + subkey_name (str) + Return: + the desired subkey as a RegistryKey object, or none + + For more details, see the WindowsRegistryView._find_subkey_s method docstring + """ + return self._find_subkey_s( + WindowsRegistryView.KeyMatchConditions.regex_matcher(subkey_name) + ) + + def find_subkeys(self, subkey_name): + """Exactly the same as find_subkey, except this function tries to match + a regex to multiple keys + + Args: + subkey_name (str) + Return: + the desired subkeys as a list of RegistryKey object, or none + + For more details, see the WindowsRegistryView._find_subkey_s method docstring + """ + kwargs = {"collect_all_matching": True} + return self._find_subkey_s( + WindowsRegistryView.KeyMatchConditions.regex_matcher(subkey_name), **kwargs + ) def find_value(self, val_name, recursive=True): """ From a1d3e0002cf68ea0ba6c2ec0d6aa0e47a2c0da30 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 28 Oct 2023 06:17:32 -0500 Subject: [PATCH 377/806] py-numpy: add v1.26 (#40057) --- .../builtin/packages/dxt-explorer/package.py | 2 +- .../repos/builtin/packages/py-gpaw/package.py | 2 +- .../builtin/packages/py-numpy/package.py | 175 +++++++++++++----- .../repos/builtin/packages/py-pip/package.py | 2 + .../repos/builtin/packages/py-pyfr/package.py | 2 +- .../builtin/packages/py-pyzmq/package.py | 3 + .../builtin/packages/py-scipy/package.py | 170 +++++++---------- .../builtin/packages/py-tomopy/package.py | 2 +- 8 files changed, 202 insertions(+), 156 deletions(-) diff --git a/var/spack/repos/builtin/packages/dxt-explorer/package.py b/var/spack/repos/builtin/packages/dxt-explorer/package.py index 4f7df14c186af9..90ef64818346c4 100644 --- a/var/spack/repos/builtin/packages/dxt-explorer/package.py +++ b/var/spack/repos/builtin/packages/dxt-explorer/package.py @@ -26,5 +26,5 @@ class DxtExplorer(PythonPackage): depends_on("darshan-util", type=("run")) - depends_on("python@3.6:", type=("build", "run")) + depends_on("py-setuptools", type="build") depends_on("py-pandas", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-gpaw/package.py b/var/spack/repos/builtin/packages/py-gpaw/package.py index 0f5072e927c534..f6759fb279ea53 100644 --- a/var/spack/repos/builtin/packages/py-gpaw/package.py +++ b/var/spack/repos/builtin/packages/py-gpaw/package.py @@ -35,7 +35,7 @@ class PyGpaw(PythonPackage): depends_on("py-ase@3.19.0:", type=("build", "run"), when="@20.1.0") depends_on("py-ase@3.20.1:", type=("build", "run"), when="@20.10.0") depends_on("py-ase@3.21.0:", type=("build", "run"), when="@21.1.0") - depends_on("py-numpy +blas +lapack", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) depends_on("py-scipy", type=("build", "run")) depends_on("libxc@3:4.3.4") depends_on("blas") diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index e5ffea879c4cd7..8ee118d98e917e 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -5,16 +5,13 @@ import platform import subprocess +from typing import Tuple from spack.package import * class PyNumpy(PythonPackage): - """NumPy is the fundamental package for scientific computing with Python. - It contains among other things: a powerful N-dimensional array object, - sophisticated (broadcasting) functions, tools for integrating C/C++ and - Fortran code, and useful linear algebra, Fourier transform, and random - number capabilities""" + """Fundamental package for array computing in Python.""" homepage = "https://numpy.org/" pypi = "numpy/numpy-1.23.0.tar.gz" @@ -23,6 +20,8 @@ class PyNumpy(PythonPackage): maintainers("adamjstewart", "rgommers") version("main", branch="main") + version("1.26.1", sha256="c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe") + version("1.26.0", sha256="f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf") version("1.25.2", sha256="fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760") version("1.25.1", sha256="9a3a9f3a61480cc086117b426a8bd86869c213fc4072e606f01c4e4b66eb92bf") version("1.25.0", sha256="f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19") @@ -87,11 +86,8 @@ class PyNumpy(PythonPackage): version("1.14.6", sha256="1250edf6f6c43e1d7823f0967416bc18258bb271dc536298eb0ea00a9e45b80a") version("1.14.5", sha256="a4a433b3a264dbc9aa9c7c241e87c0358a503ea6394f8737df1683c7c9a102ac") - variant("blas", default=True, description="Build with BLAS support") - variant("lapack", default=True, description="Build with LAPACK support") - - # Based on wheel availability on PyPI - depends_on("python@3.9:3.11", when="@1.25:", type=("build", "link", "run")) + depends_on("python@3.9:3.12", when="@1.26:", type=("build", "link", "run")) + depends_on("python@3.9:3.11", when="@1.25", type=("build", "link", "run")) depends_on("python@3.8:3.11", when="@1.23.2:1.24", type=("build", "link", "run")) depends_on("python@3.8:3.10", when="@1.22:1.23.1", type=("build", "link", "run")) depends_on("python@:3.10", when="@1.21.2:1.21", type=("build", "link", "run")) @@ -99,19 +95,30 @@ class PyNumpy(PythonPackage): depends_on("python@:3.8", when="@1.17.3:1.19.2", type=("build", "link", "run")) depends_on("python@:3.7", when="@1.14.5:1.17.2", type=("build", "link", "run")) + depends_on("py-cython@0.29.34:3", when="@1.26:", type="build") + depends_on("py-cython@0.29.34:2", when="@1.25", type="build") + depends_on("py-cython@0.29.30:2", when="@1.22.4:1.24", type="build") + depends_on("py-cython@0.29.24:2", when="@1.21.2:1.22.3", type="build") + depends_on("py-cython@0.29.21:2", when="@1.19.1:1.21.1", type="build") + depends_on("py-cython@0.29.14:2", when="@1.18.1:1.19.0", type="build") + depends_on("py-cython@0.29.13:2", when="@1.18.0", type="build") + depends_on("py-pyproject-metadata@0.7.1:", when="@1.26:", type="build") + depends_on("py-tomli@1:", when="@1.26: ^python@:3.10", type="build") + depends_on("py-setuptools@60:", when="@1.26: ^python@3.12:", type="build") # https://github.com/spack/spack/pull/32078 - depends_on("py-setuptools@:63", type=("build", "run")) + depends_on("py-setuptools@:63", when="@:1.25", type=("build", "run")) depends_on("py-setuptools@:59", when="@:1.22.1", type=("build", "run")) - # Check pyproject.toml for updates to the required cython version - depends_on("py-cython@0.29.34:2", when="@1.25:", type="build") - depends_on("py-cython@0.29.13:2", when="@1.18.0:", type="build") - depends_on("py-cython@0.29.14:2", when="@1.18.1:", type="build") - depends_on("py-cython@0.29.21:2", when="@1.19.1:", type="build") - depends_on("py-cython@0.29.24:2", when="@1.21.2:", type="build") - depends_on("py-cython@0.29.30:2", when="@1.22.4:", type="build") - depends_on("blas", when="+blas") - depends_on("lapack", when="+lapack") + depends_on("py-colorama", when="@1.26: platform=windows", type="build") + + # Required to use --config-settings + depends_on("py-pip@23.1:", when="@1.26:", type="build") + # meson is vendored, ninja and pkgconfig are not + depends_on("ninja@1.8.2:", when="@1.26:", type="build") + depends_on("pkgconfig", when="@1.26:", type="build") + depends_on("blas") + depends_on("lapack") + # test_requirements.txt depends_on("py-nose@1.0.0:", when="@:1.14", type="test") depends_on("py-pytest", when="@1.15:", type="test") depends_on("py-hypothesis", when="@1.19:", type="test") @@ -145,13 +152,21 @@ class PyNumpy(PythonPackage): when="@1.22.0:1.22.3", ) - # version 1.21.0 runs into an infinit loop during printing + # meson.build + # https://docs.scipy.org/doc/scipy/dev/toolchain.html#compilers + conflicts("%gcc@:8.3", when="@1.26:", msg="NumPy requires GCC >= 8.4") + conflicts("%gcc@:4.7", msg="NumPy requires GCC >= 4.8") + conflicts( + "%msvc@:19.19", + when="@1.26:", + msg="NumPy requires at least vc142 (default with Visual Studio 2019) " + "when building with MSVC", + ) + + # version 1.21.0 runs into an infinite loop during printing # (e.g. print(numpy.ones(1000)) when compiled with gcc 11 conflicts("%gcc@11:", when="@1.21.0") - # GCC 4.8 is the minimum version that works - conflicts("%gcc@:4.7", msg="GCC 4.8+ required") - # NVHPC support added in https://github.com/numpy/numpy/pull/17344 conflicts("%nvhpc", when="@:1.19") @@ -159,6 +174,10 @@ class PyNumpy(PythonPackage): conflicts("%intel", when="@1.23.0:1.23.3") conflicts("%oneapi", when="@1.23.0:1.23.3") + @property + def archive_files(self): + return [join_path(self.stage.source_path, "build", "meson-logs", "meson-log.txt")] + def url_for_version(self, version): url = "https://files.pythonhosted.org/packages/source/n/numpy/numpy-{}.{}" if version >= Version("1.23"): @@ -193,16 +212,68 @@ def flag_handler(self, name, flags): return (flags, None, None) - @run_before("install") - def set_blas_lapack(self): - # https://numpy.org/devdocs/user/building.html - # https://github.com/numpy/numpy/blob/master/site.cfg.example + def blas_lapack_pkg_config(self) -> Tuple[str, str]: + """Convert library names to pkg-config names. - # Skip if no BLAS/LAPACK requested + Returns: + The names of the blas and lapack libs that pkg-config should search for. + """ spec = self.spec - if "+blas" not in spec and "+lapack" not in spec: - return + blas = spec["blas"].libs.names[0] + lapack = spec["lapack"].libs.names[0] + + if spec["blas"].name in ["intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"]: + blas = "mkl-dynamic-lp64-seq" + if spec["lapack"].name in ["intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"]: + lapack = "mkl-dynamic-lp64-seq" + + if spec["blas"].name in ["blis", "amdblis"]: + blas = "blis" + + if spec["blas"].name == "cray-libsci": + blas = "libsci" + + if spec["lapack"].name == "cray-libsci": + lapack = "libsci" + + if "armpl" in blas: + if "_mp" in blas: + blas = "armpl-dynamic-lp64-omp" + else: + blas = "armpl-dynamic-lp64-seq" + + if "armpl" in lapack: + if "_mp" in lapack: + lapack = "armpl-dynamic-lp64-omp" + else: + lapack = "armpl-dynamic-lp64-seq" + + return blas, lapack + + @when("@1.26:") + def config_settings(self, spec, prefix): + blas, lapack = self.blas_lapack_pkg_config() + return { + "builddir": "build", + "compile-args": f"-j{make_jobs}", + "setup-args": { + # https://scipy.github.io/devdocs/building/blas_lapack.html + "-Dblas": blas, + "-Dlapack": lapack, + # https://numpy.org/doc/stable/reference/simd/build-options.html + # TODO: get this working in CI + # "-Dcpu-baseline": "native", + # "-Dcpu-dispatch": "none", + }, + } + + def blas_lapack_site_cfg(self) -> None: + """Write a site.cfg file to configure BLAS/LAPACK.""" + spec = self.spec + + # https://numpy.org/doc/1.25/user/building.html + # https://github.com/numpy/numpy/blob/v1.25.2/site.cfg.example def write_library_dirs(f, dirs): f.write("library_dirs = {0}\n".format(dirs)) if not ( @@ -211,17 +282,11 @@ def write_library_dirs(f, dirs): ): f.write("rpath = {0}\n".format(dirs)) - blas_libs = LibraryList([]) - blas_headers = HeaderList([]) - if "+blas" in spec: - blas_libs = spec["blas"].libs - blas_headers = spec["blas"].headers + blas_libs = spec["blas"].libs + blas_headers = spec["blas"].headers - lapack_libs = LibraryList([]) - lapack_headers = HeaderList([]) - if "+lapack" in spec: - lapack_libs = spec["lapack"].libs - lapack_headers = spec["lapack"].headers + lapack_libs = spec["lapack"].libs + lapack_headers = spec["lapack"].headers lapackblas_libs = lapack_libs + blas_libs lapackblas_headers = lapack_headers + blas_headers @@ -334,15 +399,25 @@ def write_library_dirs(f, dirs): write_library_dirs(f, lapack_lib_dirs) f.write("include_dirs = {0}\n".format(lapack_header_dirs)) + @when("@:1.25") + @run_before("install") + def set_blas_lapack(self): + self.blas_lapack_site_cfg() + + @when("@1.26:") + def setup_build_environment(self, env): + # https://github.com/scipy/scipy/issues/19357 + if self.spec.satisfies("%apple-clang@15:"): + env.append_flags("LDFLAGS", "-Wl,-ld_classic") + + @when("@:1.25") def setup_build_environment(self, env): # Tell numpy which BLAS/LAPACK libraries we want to use. - # https://github.com/numpy/numpy/pull/13132 - # https://numpy.org/devdocs/user/building.html#accelerated-blas-lapack-libraries spec = self.spec - # https://numpy.org/devdocs/user/building.html#blas - if "blas" not in spec: - blas = "" - elif ( + # https://github.com/numpy/numpy/pull/13132 + # https://numpy.org/doc/1.25/user/building.html#accelerated-blas-lapack-libraries + # https://numpy.org/doc/1.25/user/building.html#blas + if ( spec["blas"].name == "intel-mkl" or spec["blas"].name == "intel-parallel-studio" or spec["blas"].name == "intel-oneapi-mkl" @@ -361,10 +436,8 @@ def setup_build_environment(self, env): env.set("NPY_BLAS_ORDER", blas) - # https://numpy.org/devdocs/user/building.html#lapack - if "lapack" not in spec: - lapack = "" - elif ( + # https://numpy.org/doc/1.25/user/building.html#lapack + if ( spec["lapack"].name == "intel-mkl" or spec["lapack"].name == "intel-parallel-studio" or spec["lapack"].name == "intel-oneapi-mkl" diff --git a/var/spack/repos/builtin/packages/py-pip/package.py b/var/spack/repos/builtin/packages/py-pip/package.py index 52d290d0b549c8..dfa85d55bc055e 100644 --- a/var/spack/repos/builtin/packages/py-pip/package.py +++ b/var/spack/repos/builtin/packages/py-pip/package.py @@ -15,6 +15,8 @@ class PyPip(Package, PythonExtension): url = "https://files.pythonhosted.org/packages/py3/p/pip/pip-20.2-py3-none-any.whl" list_url = "https://pypi.org/simple/pip/" + tags = ["build-tools"] + maintainers("adamjstewart", "pradyunsg") version( diff --git a/var/spack/repos/builtin/packages/py-pyfr/package.py b/var/spack/repos/builtin/packages/py-pyfr/package.py index 7cbfe6ab71f67d..9f81ef7597fa51 100644 --- a/var/spack/repos/builtin/packages/py-pyfr/package.py +++ b/var/spack/repos/builtin/packages/py-pyfr/package.py @@ -41,7 +41,7 @@ class PyPyfr(PythonPackage, CudaPackage, ROCmPackage): depends_on("py-h5py@2.10:", type=("build", "run")) depends_on("py-mako@1.0.0:", type=("build", "run")) depends_on("py-mpi4py@3.1.0:", type=("build", "run")) - depends_on("py-numpy@1.20:+blas", type=("build", "run")) + depends_on("py-numpy@1.20:", type=("build", "run")) depends_on("py-platformdirs@2.2.0:", type=("build", "run")) depends_on("py-pytools@2016.2.1:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-pyzmq/package.py b/var/spack/repos/builtin/packages/py-pyzmq/package.py index 4850dddc08ec8e..bf60b4be57d91b 100644 --- a/var/spack/repos/builtin/packages/py-pyzmq/package.py +++ b/var/spack/repos/builtin/packages/py-pyzmq/package.py @@ -45,6 +45,9 @@ class PyPyzmq(PythonPackage): # pyproject.toml depends_on("py-setuptools", type="build") + # https://github.com/zeromq/pyzmq/issues/1278 + # https://github.com/zeromq/pyzmq/pull/1317 + depends_on("py-setuptools@:59", when="@17:18.0", type="build") depends_on("py-packaging", type="build") # setup.py diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 4a07657d80d7bb..51f89f7d4cdf92 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -3,16 +3,11 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import glob -import os - from spack.package import * class PyScipy(PythonPackage): - """SciPy (pronounced "Sigh Pie") is a Scientific Library for Python. - It provides many user-friendly and efficient numerical routines such - as routines for numerical integration and optimization.""" + """Fundamental algorithms for scientific computing in Python.""" homepage = "https://www.scipy.org/" pypi = "scipy/scipy-1.10.1.tar.gz" @@ -20,7 +15,9 @@ class PyScipy(PythonPackage): maintainers("adamjstewart", "rgommers") - version("master", branch="master") + version("main", branch="main") + version("master", branch="master", deprecated=True) + version("1.11.3", sha256="bba4d955f54edd61899776bad459bf7326e14b9fa1c552181f0479cc60a568cd") version("1.11.2", sha256="b29318a5e39bd200ca4381d80b065cdf3076c7d7281c5e36569e99273867f61d") version("1.11.1", sha256="fb5b492fa035334fd249f0973cc79ecad8b09c604b42a127a677b45a9a3d4289") version("1.11.0", sha256="f9b0248cb9d08eead44cde47cbf6339f1e9aa0dfde28f5fb27950743e317bd5d") @@ -65,22 +62,18 @@ class PyScipy(PythonPackage): depends_on("python@:3.8", when="@1.3.2:1.5.3", type=("build", "link", "run")) depends_on("python@:3.7", when="@1.1:1.3.1", type=("build", "link", "run")) - # TODO: remove once pip build supports BLAS/LAPACK specification - # https://github.com/mesonbuild/meson-python/pull/167 - depends_on("py-build", when="@1.9:", type="build") - - depends_on("py-meson-python@0.12.1:0.13", when="@1.11:", type="build") - depends_on("py-meson-python@0.11:0.12", when="@1.10.1:1.10", type="build") - depends_on("py-meson-python@0.11", when="@1.10.0", type="build") - depends_on("py-meson-python@0.9:", when="@1.9.2:1.9", type="build") - depends_on("py-meson-python@0.8.1:", when="@1.9.1", type="build") - depends_on("py-meson-python@0.7", when="@1.9.0", type="build") - depends_on("meson@0.62.2", when="@1.9.0:1.9.1", type="build") + depends_on("py-meson-python@0.12.1:", when="@1.11:", type="build") + depends_on("py-meson-python@0.11:", when="@1.10:", type="build") + depends_on("py-meson-python@0.9:", when="@1.9.2:", type="build") + depends_on("py-meson-python@0.8.1:", when="@1.9.1:", type="build") + depends_on("py-meson-python@0.7:", when="@1.9:", type="build") + depends_on("meson", when="@1.9.0:1.9.1", type="build") depends_on("py-cython@0.29.35:2", when="@1.11:", type="build") depends_on("py-cython@0.29.32:2", when="@1.9.2:", type="build") depends_on("py-cython@0.29.21:2", when="@1.9:", type="build") depends_on("py-cython@0.29.18:2", when="@1.7:", type="build") - depends_on("py-pybind11@2.10.4:2.10", when="@1.11:", type=("build", "link")) + depends_on("py-pybind11@2.10.4:2.11.0", when="@1.11.3:", type=("build", "link")) + depends_on("py-pybind11@2.10.4:2.10", when="@1.11.0:1.11.2", type=("build", "link")) depends_on("py-pybind11@2.10.1", when="@1.10", type=("build", "link")) depends_on("py-pybind11@2.4.3:2.10", when="@1.9.1:1.9", type=("build", "link")) depends_on("py-pybind11@2.4.3:2.9", when="@1.9.0", type=("build", "link")) @@ -90,14 +83,11 @@ class PyScipy(PythonPackage): depends_on("py-pybind11@2.4.3:", when="@1.5:1.6.1", type=("build", "link")) depends_on("py-pybind11@2.4.0:", when="@1.4.1:1.4", type=("build", "link")) depends_on("py-pybind11@2.2.4:", when="@1.4.0", type=("build", "link")) - depends_on("py-pythran@0.12:0.13", when="@1.11:", type="build") - depends_on("py-pythran@0.12", when="@1.10", type="build") - depends_on("py-pythran@0.9.12:0.12", when="@1.9.2:1.9", type="build") - depends_on("py-pythran@0.9.12:0.11", when="@1.9.0:1.9.1", type="build") - depends_on("py-pythran@0.10", when="@1.8", type="build") - depends_on("py-pythran@0.9.12:0.9", when="@1.7.2:1.7", type="build") - depends_on("py-pythran@0.9.11", when="@1.7.0:1.7.1", type="build") - depends_on("py-wheel@:0.40", when="@1.11:", type="build") + depends_on("py-pythran@0.12:", when="@1.10:", type="build") + depends_on("py-pythran@0.10:", when="@1.8", type="build") + depends_on("py-pythran@0.9.12:", when="@1.7.2:", type="build") + depends_on("py-pythran@0.9.11:", when="@1.7:", type="build") + depends_on("py-wheel@:0.40", when="@1.11.0:1.11.2", type="build") depends_on("py-wheel@:0.38", when="@1.10", type="build") depends_on("py-wheel@:0.37", when="@:1.9", type="build") depends_on("pkgconfig", when="@1.9:", type="build") @@ -105,43 +95,53 @@ class PyScipy(PythonPackage): depends_on("py-setuptools@:59", when="@1.8", type="build") depends_on("py-setuptools@:57", when="@1.7", type="build") depends_on("py-setuptools@:51.0.0", when="@1.6", type="build") - depends_on("py-numpy@1.21.6:1.27+blas+lapack", when="@1.11:", type=("build", "link", "run")) - depends_on("py-numpy@1.19.5:1.26+blas+lapack", when="@1.10", type=("build", "link", "run")) - depends_on("py-numpy@1.18.5:1.25+blas+lapack", when="@1.9", type=("build", "link", "run")) - depends_on("py-numpy@1.17.3:1.24+blas+lapack", when="@1.8", type=("build", "link", "run")) - depends_on( - "py-numpy@1.16.5:1.22+blas+lapack", when="@1.6.2:1.7", type=("build", "link", "run") - ) - depends_on("py-numpy@1.16.5:+blas+lapack", when="@1.6:1.6.1", type=("build", "link", "run")) - depends_on("py-numpy@1.14.5:+blas+lapack", when="@1.5.0:1.5", type=("build", "link", "run")) - depends_on("py-numpy@1.13.3:+blas+lapack", when="@1.3:1.4", type=("build", "link", "run")) - depends_on("py-numpy@1.8.2:+blas+lapack", when="@:1.2", type=("build", "link", "run")) + depends_on("py-numpy@1.21.6:1.27", when="@1.11:", type=("build", "link", "run")) + depends_on("py-numpy@1.19.5:1.26", when="@1.10", type=("build", "link", "run")) + depends_on("py-numpy@1.18.5:1.25", when="@1.9", type=("build", "link", "run")) + depends_on("py-numpy@1.17.3:1.24", when="@1.8", type=("build", "link", "run")) + depends_on("py-numpy@1.16.5:1.22", when="@1.6:1.7", type=("build", "link", "run")) + depends_on("py-numpy@1.14.5:1.21", when="@1.5", type=("build", "link", "run")) + depends_on("py-numpy@1.13.3:1.21", when="@1.3:1.4", type=("build", "link", "run")) + depends_on("py-numpy@1.8.2:1.20", when="@:1.2", type=("build", "link", "run")) depends_on("py-pytest", type="test") - # NOTE: scipy should use the same BLAS/LAPACK as numpy. - # For scipy 1.8 and older, this is achieved by calling the set_blas_lapack() - # and setup_build_environment() from numpy in the scipy spec. - depends_on("blas") - depends_on("lapack") + # Required to use --config-settings + depends_on("py-pip@23.1:", when="@1.9:", type="build") # https://docs.scipy.org/doc/scipy/dev/toolchain.html#other-libraries depends_on("lapack@3.7.1:", when="@1.9:") depends_on("lapack@3.4.1:", when="@1.2:") + depends_on("lapack") + depends_on("blas") + # meson.build # https://docs.scipy.org/doc/scipy/dev/toolchain.html#compilers - conflicts("%gcc@:7", when="@1.10:") - conflicts("%gcc@:4.7", when="@:1.9") - conflicts("%apple-clang@:9", when="@1.10:") - conflicts("%msvc@:19.19", when="@1.10:") + conflicts("%gcc@:7", when="@1.10:", msg="SciPy requires GCC >= 8.0") + conflicts("%gcc@:4.7", when="@:1.9", msg="SciPy requires GCC >= 4.8") + conflicts( + "%msvc@:19.19", + when="@1.10:", + msg="SciPy requires at least vc142 (default with Visual Studio 2019) " + "when building with MSVC", + ) - # https://github.com/scipy/scipy/pull/11324 - conflicts("@1.4.0:1.4.1", when="target=ppc64le:") + # https://github.com/scipy/scipy/issues/19352 + conflicts("^py-cython@3.0.3") # https://github.com/mesonbuild/meson/pull/10909#issuecomment-1282241479 # Intel OneAPI ifx claims to support -fvisibility, but this does not work. # Meson adds this flag for all Python extensions which include Fortran code. conflicts("%oneapi@:2023.0", when="@1.9:") + # error: expected unqualified-id (exact compiler versions unknown) + conflicts("%apple-clang@15:", when="@:1.9") + + # https://docs.scipy.org/doc//scipy-1.10.1/release.1.7.3.html + conflicts("platform=darwin target=aarch64:", when="@:1.7.2") + + # https://github.com/scipy/scipy/pull/11324 + conflicts("@1.4.0:1.4.1", when="target=ppc64le:") + # https://github.com/scipy/scipy/issues/12860 patch( "https://git.sagemath.org/sage.git/plain/build/pkgs/scipy/patches/extern_decls.patch?id=711fe05025795e44b84233e065d240859ccae5bd", @@ -155,12 +155,6 @@ class PyScipy(PythonPackage): def archive_files(self): return [join_path(self.stage.source_path, "build", "meson-logs", "meson-log.txt")] - @run_before("install") - def set_blas_lapack(self): - # Pick up BLAS/LAPACK from numpy - if self.spec.satisfies("@:1.8"): - self.spec["py-numpy"].package.set_blas_lapack() - @run_before("install") def set_fortran_compiler(self): if self.compiler.f77 is None or self.compiler.fc is None: @@ -200,53 +194,27 @@ def setup_build_environment(self, env): if self.spec.satisfies("@:1.8"): self.spec["py-numpy"].package.setup_build_environment(env) - # TODO: remove once pip build supports BLAS/LAPACK specification - # https://github.com/mesonbuild/meson-python/pull/167 + # https://github.com/scipy/scipy/issues/19357 + if self.spec.satisfies("%apple-clang@15:"): + env.append_flags("LDFLAGS", "-Wl,-ld_classic") + @when("@1.9:") - def install(self, spec, prefix): - blas = spec["blas"].libs.names[0] - lapack = spec["lapack"].libs.names[0] - if spec["blas"].name in ["intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"]: - blas = "mkl-dynamic-lp64-seq" - if spec["lapack"].name in ["intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"]: - lapack = "mkl-dynamic-lp64-seq" - if spec["blas"].name in ["blis", "amdblis"]: - blas = "blis" - if "armpl" in blas: - if "_mp" in blas: - blas = "armpl-dynamic-lp64-omp" - else: - blas = "armpl-dynamic-lp64-seq" - if "armpl" in lapack: - if "_mp" in lapack: - lapack = "armpl-dynamic-lp64-omp" - else: - lapack = "armpl-dynamic-lp64-seq" - - args = [ - "setup", - "build", - "-Dblas=" + blas, - "-Dlapack=" + lapack, - "--prefix=" + join_path(os.getcwd(), "build-install"), - "-Ddebug=false", - "-Doptimization=2", - ] - meson = which("meson") - meson(*args) - args = [ - "-m", - "build", - "--wheel", - "-Cbuilddir=build", - "--no-isolation", - "--skip-dependency-check", - "-Ccompile-args=-j%s" % make_jobs, - ".", - ] - python(*args) - args = std_pip_args + ["--prefix=" + prefix, glob.glob(join_path("dist", "scipy*.whl"))[0]] - pip(*args) + def config_settings(self, spec, prefix): + blas, lapack = self.spec["py-numpy"].package.blas_lapack_pkg_config() + return { + "builddir": "build", + "compile-args": f"-j{make_jobs}", + "setup-args": { + # http://scipy.github.io/devdocs/building/blas_lapack.html + "-Dblas": blas, + "-Dlapack": lapack, + }, + } + + @when("@:1.8") + @run_before("install") + def set_blas_lapack(self): + self.spec["py-numpy"].package.blas_lapack_site_cfg() @run_after("install") @on_package_attributes(run_tests=True) diff --git a/var/spack/repos/builtin/packages/py-tomopy/package.py b/var/spack/repos/builtin/packages/py-tomopy/package.py index b99e60ef91cb3e..59a1c0f1b32d49 100644 --- a/var/spack/repos/builtin/packages/py-tomopy/package.py +++ b/var/spack/repos/builtin/packages/py-tomopy/package.py @@ -34,7 +34,7 @@ class PyTomopy(PythonPackage): # Note: The module name of py-scikit-build is skbuild: depends_on("py-scikit-build", type=("build")) depends_on("py-scikit-image@0.17:", type=("build", "run")) - depends_on("py-numpy+blas", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) depends_on("py-pyfftw", type=("build", "run"), when="@1.0:1.9") depends_on("py-scipy", type=("build", "run")) depends_on("py-setuptools", type="build") From f8aa66b62ef3262856ecb4de383b6dc09540a2ab Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Sat, 28 Oct 2023 14:51:55 +0200 Subject: [PATCH 378/806] py-comm: add 0.1.4 (#40669) --- var/spack/repos/builtin/packages/py-comm/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-comm/package.py b/var/spack/repos/builtin/packages/py-comm/package.py index fd195b1f4f7644..5e82ade2c04fd2 100644 --- a/var/spack/repos/builtin/packages/py-comm/package.py +++ b/var/spack/repos/builtin/packages/py-comm/package.py @@ -12,7 +12,10 @@ class PyComm(PythonPackage): homepage = "https://github.com/ipython/comm" pypi = "comm/comm-0.1.3.tar.gz" + version("0.1.4", sha256="354e40a59c9dd6db50c5cc6b4acc887d82e9603787f83b68c01a80a923984d15") version("0.1.3", sha256="a61efa9daffcfbe66fd643ba966f846a624e4e6d6767eda9cf6e993aadaab93e") depends_on("py-hatchling@1.10:", type="build") - depends_on("py-traitlets@5.3:", type=("build", "run")) + + depends_on("py-traitlets@4:", when="@0.1.4:", type=("build", "run")) + depends_on("py-traitlets@5.3:", when="@0.1.3", type=("build", "run")) From 7da4b3569f155c436c8932fbcb8626ba576bcc26 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Sat, 28 Oct 2023 14:55:49 +0200 Subject: [PATCH 379/806] py-bluepyemodel: opensourcing with dependencies (#40592) * py-bluepyemodel: new package with dependencies * py-morphio: add MPI as dependency to avoid failing builds * Formatting * py-bluepyefe: no need to set NEURON_INIT_MPI * py-morphio: unifurcation branch is ancient history * py-bluepyopt: only set NEURON_INIT_MPI with +neuron * py-efel: get rid of old version * py-morph{-tool,io}: rename develop to master to match branch * py-bluepyefe: unset PMI_RANK is also neuron-related * py-bluepyopt: PMI_RANK is also neuron-related * Implement review remarks * py-morph-tool, py-neurom: small fixes * py-morphio: reword dependencies --- .../builtin/packages/py-bluepyefe/package.py | 25 ++++++++++++ .../packages/py-bluepyemodel/package.py | 36 +++++++++++++++++ .../builtin/packages/py-bluepyopt/package.py | 37 ++++++++++++++++++ .../packages/py-bluepyopt/pmi_rank.patch | 17 ++++++++ .../packages/py-currentscape/package.py | 23 +++++++++++ .../repos/builtin/packages/py-efel/package.py | 24 ++++++++++++ .../builtin/packages/py-morph-tool/package.py | 39 +++++++++++++++++++ .../builtin/packages/py-morphio/package.py | 30 ++++++++++++++ .../builtin/packages/py-neurom/package.py | 35 +++++++++++++++++ 9 files changed, 266 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-bluepyefe/package.py create mode 100644 var/spack/repos/builtin/packages/py-bluepyemodel/package.py create mode 100644 var/spack/repos/builtin/packages/py-bluepyopt/package.py create mode 100644 var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch create mode 100644 var/spack/repos/builtin/packages/py-currentscape/package.py create mode 100644 var/spack/repos/builtin/packages/py-efel/package.py create mode 100644 var/spack/repos/builtin/packages/py-morph-tool/package.py create mode 100644 var/spack/repos/builtin/packages/py-morphio/package.py create mode 100644 var/spack/repos/builtin/packages/py-neurom/package.py diff --git a/var/spack/repos/builtin/packages/py-bluepyefe/package.py b/var/spack/repos/builtin/packages/py-bluepyefe/package.py new file mode 100644 index 00000000000000..8a15e4edf9e2c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyefe/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 PyBluepyefe(PythonPackage): + """Blue Brain Python E-feature extraction""" + + homepage = "https://github.com/BlueBrain/BluePyEfe" + pypi = "bluepyefe/bluepyefe-2.2.18.tar.gz" + git = "https://github.com/BlueBrain/BluePyEfe.git" + + version("2.2.18", sha256="bfb50c6482433ec2ffb4b65b072d2778bd89ae50d92dd6830969222aabb30275") + + depends_on("py-setuptools", type="build") + + depends_on("py-numpy@:1.23", type=("build", "run")) + depends_on("py-neo", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) + depends_on("py-efel", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-h5py", type=("build", "run")) + depends_on("py-igor", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-bluepyemodel/package.py b/var/spack/repos/builtin/packages/py-bluepyemodel/package.py new file mode 100644 index 00000000000000..f865b9791b622b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyemodel/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2023 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 PyBluepyemodel(PythonPackage): + """Python library to optimize and evaluate electrical models.""" + + homepage = "https://github.com/BlueBrain/BluePyEModel" + pypi = "bluepyemodel/bluepyemodel-0.0.46.tar.gz" + + version("0.0.46", sha256="ad4c125e491f3337fcc341a4f389b8a616d883ce50fd77d9fb0ea6e13be5da61") + + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", type="build") + + depends_on("py-numpy", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-pandas", type=("build", "run")) + depends_on("py-ipyparallel@6.3:", type=("build", "run")) + depends_on("py-tqdm", type=("build", "run")) + depends_on("py-pyyaml", type=("build", "run")) + depends_on("py-gitpython", type=("build", "run")) + depends_on("py-bluepyopt@1.12.12:", type=("build", "run")) + depends_on("py-bluepyefe@2.2.0:", type=("build", "run")) + depends_on("py-neurom@3.0:3", type=("build", "run")) + depends_on("py-efel@3.1:", type=("build", "run")) + depends_on("py-configparser", type=("build", "run")) + depends_on("py-morph-tool@2.8:", type=("build", "run")) + depends_on("py-fasteners@0.16:", type=("build", "run")) + depends_on("neuron+python@8.0:", type=("build", "run")) + depends_on("py-jinja2@3.0.3", when="@0.0.11:", type=("build", "run")) + depends_on("py-currentscape@0.0.11:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/package.py b/var/spack/repos/builtin/packages/py-bluepyopt/package.py new file mode 100644 index 00000000000000..ccc39f913558fe --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyopt/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2023 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 PyBluepyopt(PythonPackage): + """Bluebrain Python Optimisation Library""" + + homepage = "https://github.com/BlueBrain/BluePyOpt" + pypi = "bluepyopt/bluepyopt-1.9.27.tar.gz" + + # NOTE : while adding new release check pmi_rank.patch compatibility + version("1.14.4", sha256="7567fd736053250ca06030f67ad93c607b100c2b98df8dc588c26b64cb3e171c") + + # patch required to avoid hpe-mpi linked mechanism library + patch("pmi_rank.patch") + + variant("scoop", default=False, description="Use BluePyOpt together with py-scoop") + + depends_on("py-setuptools", type="build") + depends_on("py-numpy@1.6:", type=("build", "run")) + depends_on("py-pandas@0.18:", type=("build", "run")) + depends_on("py-deap@1.3.3:", type=("build", "run")) + depends_on("py-efel@2.13:", type=("build", "run")) + depends_on("py-ipyparallel", type=("build", "run")) + depends_on("py-pickleshare@0.7.3:", type=("build", "run")) + depends_on("py-jinja2@2.8:", type=("build", "run")) + depends_on("py-future", type=("build", "run")) + depends_on("py-pebble@4.6:", type=("build", "run")) + depends_on("py-scoop@0.7:", type=("build", "run"), when="+scoop") + depends_on("neuron@7.4:", type=("build", "run")) + + def setup_run_environment(self, env): + env.unset("PMI_RANK") + env.set("NEURON_INIT_MPI", "0") diff --git a/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch b/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch new file mode 100644 index 00000000000000..21a73849b28683 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bluepyopt/pmi_rank.patch @@ -0,0 +1,17 @@ +diff --git a/bluepyopt/ephys/simulators.py b/bluepyopt/ephys/simulators.py +index e71ad8b..3c93237 100644 +--- a/bluepyopt/ephys/simulators.py ++++ b/bluepyopt/ephys/simulators.py +@@ -89,6 +89,12 @@ class NrnSimulator(object): + NrnSimulator._nrn_disable_banner() + self.banner_disabled = True + ++ # certain mpi libraries (hpe-mpt) use PMI_RANK env variable to initialize ++ # MPI before calling MPI_Init (which is undesirable). Unset this variable ++ # if exist to avoid issue with loading neuron and mechanism library. ++ if 'PMI_RANK' in os.environ: ++ os.environ.pop("PMI_RANK") ++ + import neuron # NOQA + + return neuron diff --git a/var/spack/repos/builtin/packages/py-currentscape/package.py b/var/spack/repos/builtin/packages/py-currentscape/package.py new file mode 100644 index 00000000000000..eb6d75be89c8ab --- /dev/null +++ b/var/spack/repos/builtin/packages/py-currentscape/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 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 PyCurrentscape(PythonPackage): + """Module to easily plot the currents in electrical neuron models.""" + + homepage = "https://github.com/BlueBrain/Currentscape" + git = "https://github.com/BlueBrain/Currentscape.git" + pypi = "currentscape/currentscape-1.0.12.tar.gz" + + version("1.0.12", sha256="d83c5a58074e4d612553472a487e5d1d2854dc4d5c161817c6bafdf4a5988011") + + depends_on("py-setuptools", type=("build", "run")) + depends_on("py-setuptools-scm", type=("build",)) + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) + depends_on("py-palettable", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-efel/package.py b/var/spack/repos/builtin/packages/py-efel/package.py new file mode 100644 index 00000000000000..a33749b9af75eb --- /dev/null +++ b/var/spack/repos/builtin/packages/py-efel/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2023 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 PyEfel(PythonPackage): + """The Electrophys Feature Extract Library (eFEL) allows + neuroscientists to automatically extract features from time series data + recorded from neurons (both in vitro and in silico). + Examples are the action potential width and amplitude in + voltage traces recorded during whole-cell patch clamp experiments. + The user of the library provides a set of traces and selects the + features to be calculated. The library will then extract the requested + features and return the values to the user.""" + + homepage = "https://github.com/BlueBrain/eFEL" + pypi = "efel/efel-3.0.80.tar.gz" + + version("5.2.0", sha256="ed2c5efe22a4c703a4d9e47775b939009e1456713ac896898ebabf177c60b1dc") + + depends_on("py-setuptools", type="build") + depends_on("py-numpy@1.6:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-morph-tool/package.py b/var/spack/repos/builtin/packages/py-morph-tool/package.py new file mode 100644 index 00000000000000..7927b468c07edf --- /dev/null +++ b/var/spack/repos/builtin/packages/py-morph-tool/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2023 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 PyMorphTool(PythonPackage): + """Python morphology manipulation toolkit""" + + homepage = "https://github.com/BlueBrain/morph-tool" + git = "https://github.com/BlueBrain/morph-tool.git" + pypi = "morph-tool/morph-tool-2.9.1.tar.gz" + + version("master", branch="master") + version("2.9.1", sha256="305e9456c8047726588b23dfa070eb95ccbe5573e9fea3e0a83dc93eacdf61dc") + version("2.9.0", sha256="c60d4010e17ddcc3f53c864c374fffee05713c8f8fd2ba4eed7706041ce1fa47") + + variant("nrn", default=False, description="Enable additional neuron support") + variant("plot", default=False, description="Enable additional plotly support") + variant("parallel", default=False, description="Enable additional parallel support") + + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", type="build") + + depends_on("py-click@6.7:", type=("build", "run")) + depends_on("py-deprecation@2.1.0:", type=("build", "run")) + depends_on("py-more-itertools@8.6.0:", type=("build", "run")) + depends_on("py-morphio@3", type=("build", "run")) + depends_on("py-neurom@3", type=("build", "run")) + depends_on("py-numpy@1.14:", type=("build", "run")) + depends_on("py-pandas@1.0.3:", type=("build", "run")) + depends_on("py-xmltodict@0.12.0:", type=("build", "run")) + + depends_on("py-plotly@4.1.0:", type=("build", "run"), when="+plot") + depends_on("py-dask+bag@2.19.0:", type=("build", "run"), when="+parallel") + depends_on("neuron+python@7.8:", type=("build", "run"), when="+nrn") + depends_on("py-bluepyopt@1.9.37:", type=("build", "run"), when="+nrn") diff --git a/var/spack/repos/builtin/packages/py-morphio/package.py b/var/spack/repos/builtin/packages/py-morphio/package.py new file mode 100644 index 00000000000000..a5a9fee7deaf3c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-morphio/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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) + +import sys + +from spack.package import * + + +class PyMorphio(PythonPackage): + """Python library for reading / writing morphology files""" + + homepage = "https://github.com/BlueBrain/MorphIO" + git = "https://github.com/BlueBrain/MorphIO.git" + pypi = "morphio/MorphIO-3.3.2.tar.gz" + + version("master", branch="master", submodules=True) + + version("3.3.6", sha256="0f2e55470d92a3d89f2141ae905ee104fd16257b93dafb90682d90171de2f4e6") + + depends_on("py-setuptools@24.2:", type="build") + depends_on("py-setuptools-scm", type="build") + + depends_on("ninja", type="build") + depends_on("cmake@3.2:", type="build") + depends_on("py-numpy@1.14.1:", type=("build", "run")) + depends_on("py-h5py@3", when="platform=windows", type=("build", "run")) + if sys.platform != "win32": + depends_on("hdf5") diff --git a/var/spack/repos/builtin/packages/py-neurom/package.py b/var/spack/repos/builtin/packages/py-neurom/package.py new file mode 100644 index 00000000000000..19bad5fc7b94c7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-neurom/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2023 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 PyNeurom(PythonPackage): + """Python library neuron morphology analysis""" + + homepage = "https://github.com/BlueBrain/NeuroM" + git = "https://github.com/BlueBrain/NeuroM.git" + pypi = "neurom/neurom-2.2.1.tar.gz" + + version("master", branch="master") + version("3.2.4", sha256="a584e0979b54deee906dd716ea90de20773e20b527d83960d0fe655b0905eb4a") + + variant("plotly", default=False, description="Enable plotly support") + + depends_on("py-setuptools@42:", type=("build", "run")) + depends_on("py-setuptools-scm", type="build") + depends_on("python@3.8:", type=("build", "run")) + + depends_on("py-click@7.0:", type=("build", "run")) + depends_on("py-matplotlib@3.2.1:", type=("build", "run")) + depends_on("py-morphio@3.3.6:", type=("build", "run")) + depends_on("py-numpy@1.8.0:", type=("build", "run")) + depends_on("py-pandas@1.0.5:", type=("build", "run")) + depends_on("py-pyyaml@3.10:", type=("build", "run")) + depends_on("py-scipy@1.2.0:", type=("build", "run")) + depends_on("py-tqdm@4.8.4:", type=("build", "run")) + + depends_on("py-plotly@3.6.0:", type=("build", "run"), when="+plotly") + depends_on("py-psutil@5.5.1:", type=("build", "run"), when="+plotly") From 28d617c1c8d45ba632d32a3ed89324765366a1c2 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Sat, 28 Oct 2023 09:02:19 -0400 Subject: [PATCH 380/806] New version of py-langsmith (#40674) Co-authored-by: Benjamin Meyers --- var/spack/repos/builtin/packages/py-langsmith/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-langsmith/package.py b/var/spack/repos/builtin/packages/py-langsmith/package.py index a152c9903d01ce..e5c8363487b6e3 100644 --- a/var/spack/repos/builtin/packages/py-langsmith/package.py +++ b/var/spack/repos/builtin/packages/py-langsmith/package.py @@ -11,6 +11,7 @@ class PyLangsmith(PythonPackage): pypi = "langsmith/langsmith-0.0.10.tar.gz" + version("0.0.11", sha256="7c1be28257d6c7279c85f81e6d8359d1006af3b1238fc198d13ca75c8fe421c8") version("0.0.10", sha256="11e5db0d8e29ee5583cabd872eeece8ce50738737b1f52f316ac984f4a1a58c5") version("0.0.7", sha256="2f18e51cfd4e42f2b3cf00fa87e9d03012eb7269cdafd8e7c0cf7aa828dcc03e") From 21f3240e087db134d16e518bb716e33b4b7b359e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lacroix?= Date: Sat, 28 Oct 2023 15:03:02 +0200 Subject: [PATCH 381/806] NCCL: Add version 2.19.3-1 (#40704) --- var/spack/repos/builtin/packages/nccl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/nccl/package.py b/var/spack/repos/builtin/packages/nccl/package.py index 21db9dad2cb739..51f10ca7eec3a7 100644 --- a/var/spack/repos/builtin/packages/nccl/package.py +++ b/var/spack/repos/builtin/packages/nccl/package.py @@ -17,6 +17,7 @@ class Nccl(MakefilePackage, CudaPackage): maintainers("adamjstewart") libraries = ["libnccl.so"] + version("2.19.3-1", sha256="1c5474553afedb88e878c772f13d6f90b9226b3f2971dfa6f873adb9443100c2") version("2.18.5-1", sha256="16ac98f3e926c024ce48e10ab220e19ce734adc48c423cfd55ad6f509bd1179f") version("2.18.3-1", sha256="6477d83c9edbb34a0ebce6d751a1b32962bc6415d75d04972b676c6894ceaef9") version("2.18.1-1", sha256="0e4ede5cf8df009bff5aeb3a9f194852c03299ae5664b5a425b43358e7a9eef2") From 9f95945cb518c16f8d910b0450b78ec2dc520398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Sat, 28 Oct 2023 15:05:37 +0200 Subject: [PATCH 382/806] py-generateds: new package (#40555) * [add] py-generateds: new package * py-generateds: Update from review Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * py-generateds: add versions 2.41.5, 2.42.1, 2.42.2, 2.43.1 and 2.43.2 --------- Co-authored-by: LydDeb Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --- .../builtin/packages/py-generateds/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-generateds/package.py diff --git a/var/spack/repos/builtin/packages/py-generateds/package.py b/var/spack/repos/builtin/packages/py-generateds/package.py new file mode 100644 index 00000000000000..bcf82787cf4dd3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-generateds/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2023 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 PyGenerateds(PythonPackage): + """Generate Python data structures and XML parser from Xschema.""" + + homepage = "http://www.davekuhlman.org/generateDS.html" + pypi = "generateDS/generateDS-2.41.4.tar.gz" + + maintainers("LydDeb") + + version("2.43.2", sha256="e86f033f4d93414dd5b04cab9544a68b8f46d559073d85cd0990266b7b9ec09e") + version("2.43.1", sha256="2d3d71b42a09ba153bc51d2204324d04e384d0f15e41bdba881ee2daff9bbd68") + version("2.42.2", sha256="1d322aa7e074c262062b068660dd0c53bbdb0bb2b30152bb9e0074bd29fd365a") + version("2.42.1", sha256="87e4654449d34150802ca0cfb2330761382510d1385880f4d607cd34466abc2d") + version("2.41.5", sha256="8800c09454bb22f8f80f2ee138072d4e58bd5b6c14dbdf0a2a7ca13f06ba72e4") + version("2.41.4", sha256="804592eef573fa514741528a0bf9998f0c57ee29960c87f54608011f1fc722ea") + + depends_on("py-setuptools", type="build") + depends_on("py-six", type=("build", "run")) + depends_on("py-lxml", type=("build", "run")) + depends_on("py-requests@2.21:", type=("build", "run")) From 64ec6e7d8e0138d17eb93a2436edfe88ece07123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Sat, 28 Oct 2023 15:06:48 +0200 Subject: [PATCH 383/806] py-moarchiving: new package (#40558) * [add] py-moarchiving: new package * py-moarchiving: update from review: description, variant default value is False, switch when and type --------- Co-authored-by: LydDeb --- .../packages/py-moarchiving/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-moarchiving/package.py diff --git a/var/spack/repos/builtin/packages/py-moarchiving/package.py b/var/spack/repos/builtin/packages/py-moarchiving/package.py new file mode 100644 index 00000000000000..a43a9c9efad260 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-moarchiving/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 PyMoarchiving(PythonPackage): + """ + Biobjective Archive class with hypervolume indicator and uncrowded + hypervolume improvement computation. + """ + + homepage = "https://github.com/CMA-ES/moarchiving" + pypi = "moarchiving/moarchiving-0.6.0.tar.gz" + + maintainers("LydDeb") + + version("0.6.0", sha256="705ded992d399bc1ac703e68391bded6f64e1bde81b2bb25061eaa6208b5b29a") + + variant("arbitrary_precision", default=False, description="Build with Fraction support") + + depends_on("py-setuptools", type="build") + depends_on("py-fraction", when="+arbitrary_precision", type=("build", "run")) From 361d973f97154d2d1f6924c8ca05795b3222279d Mon Sep 17 00:00:00 2001 From: Jerome Soumagne Date: Sat, 28 Oct 2023 12:05:50 -0500 Subject: [PATCH 384/806] mercury: add v2.3.1 (#40749) --- var/spack/repos/builtin/packages/mercury/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mercury/package.py b/var/spack/repos/builtin/packages/mercury/package.py index 1c531277d79ce9..a2cdad6f1b6874 100644 --- a/var/spack/repos/builtin/packages/mercury/package.py +++ b/var/spack/repos/builtin/packages/mercury/package.py @@ -17,6 +17,7 @@ class Mercury(CMakePackage): tags = ["e4s"] version("master", branch="master", submodules=True) + version("2.3.1", sha256="36182d49f2db7e2b075240cab4aaa1d4ec87a7756450c87643ededd1e6f16104") version("2.3.0", sha256="e9e62ce1bb2fd482f0e85ad75fa255d9750c6fed50ba441a03de93b3b8eae742") version("2.2.0", sha256="e66490cf63907c3959bbb2932b5aaf51d96a481b17f0935f409f3a862eff97f6") version("2.1.0", sha256="9a58437161e9273b1b1c484d2f1a477a89eea9afe84575415025d47656f3761b") From a1282337c0a7d833197f3b1b75d9b00cb02dc76a Mon Sep 17 00:00:00 2001 From: Aoba Date: Mon, 30 Oct 2023 00:56:27 +0800 Subject: [PATCH 385/806] Add liggght patched for newer compiler (#38685) * Add liggght patched for newer compiler Add C++ 17 support Add Clang and Oneapi support * Add maintainers * Fix format in liggghts * Fix maintainers before versions Co-authored-by: Alec Scott * Fix style and user to usr * Update package.py --------- Co-authored-by: Alec Scott --- .../builtin/packages/liggghts/cpp-17.patch | 75 ++++++ .../makefile-llvm-based-compiler.patch | 21 ++ .../builtin/packages/liggghts/makefile.patch | 240 ++++++++++++++++++ .../builtin/packages/liggghts/package.py | 20 +- 4 files changed, 350 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/liggghts/cpp-17.patch create mode 100644 var/spack/repos/builtin/packages/liggghts/makefile-llvm-based-compiler.patch create mode 100644 var/spack/repos/builtin/packages/liggghts/makefile.patch diff --git a/var/spack/repos/builtin/packages/liggghts/cpp-17.patch b/var/spack/repos/builtin/packages/liggghts/cpp-17.patch new file mode 100644 index 00000000000000..73c4bffdd0f0de --- /dev/null +++ b/var/spack/repos/builtin/packages/liggghts/cpp-17.patch @@ -0,0 +1,75 @@ +diff --git a/src/math_vector.h b/src/math_vector.h +index 2b8704af..79c0cedd 100644 +--- a/src/math_vector.h ++++ b/src/math_vector.h +@@ -94,7 +94,7 @@ inline void vec_neg(vector &dest) { // -a + dest[2] = -dest[2]; } + + inline void vec_norm(vector &dest) { // a/|a| +- register double f = sqrt(vec_dot(dest, dest)); ++ double f = sqrt(vec_dot(dest, dest)); + dest[0] /= f; + dest[1] /= f; + dest[2] /= f; } +@@ -222,7 +222,7 @@ inline void form_subtr(shape &dest, form &src) { // m_a-m_b + dest[3] -= src[3]; dest[4] -= src[4]; dest[5] -= src[5]; } + + inline int form_inv(form &m_inv, form &m) { // m^-1 +- register double det = form_det(m); ++ double det = form_det(m); + if (fzero(det)) return 0; + m_inv[0] = (m[1]*m[2]-m[3]*m[3])/det; + m_inv[1] = (m[0]*m[2]-m[4]*m[4])/det; +@@ -377,7 +377,7 @@ inline void form4_unit(form4 &dest) { + dest[0] = dest[1] = dest[2] = dest[3] = 1.0; } + + inline double form4_det(form4 &m) { +- register double f = m[6]*m[7]-m[5]*m[8]; ++ double f = m[6]*m[7]-m[5]*m[8]; + return m[0]*( + m[1]*(m[2]*m[3]-m[4]*m[4])+ + m[5]*(2.0*m[4]*m[7]-m[2]*m[5])-m[3]*m[7]*m[7])+f*f+ +@@ -387,7 +387,7 @@ inline double form4_det(form4 &m) { + m[9]*(m[4]*m[4]-m[2]*m[3])); } + + inline int form4_inv(form4 &m_inv, form4 &m) { +- register double det = form4_det(m); ++ double det = form4_det(m); + if (fzero(det)) return 0; + m_inv[0] = (m[1]*(m[2]*m[3]-m[4]*m[4])+ + m[5]*(2.0*m[4]*m[7]-m[2]*m[5])-m[3]*m[7]*m[7])/det; +diff --git a/src/pair.cpp b/src/pair.cpp +index c0889f72..8c212715 100644 +--- a/src/pair.cpp ++++ b/src/pair.cpp +@@ -566,7 +566,7 @@ void Pair::init_tables_disp(double cut_lj_global) + } + + rsq = rsq_lookup.f; +- register double x2 = g2*rsq, a2 = 1.0/x2; ++ double x2 = g2*rsq, a2 = 1.0/x2; + x2 = a2*exp(-x2); + + rdisptable[i] = rsq_lookup.f; +@@ -612,7 +612,7 @@ void Pair::init_tables_disp(double cut_lj_global) + if (rsq_lookup.f < (cut_lj_globalsq = cut_lj_global * cut_lj_global)) { + rsq_lookup.f = cut_lj_globalsq; + +- register double x2 = g2*rsq, a2 = 1.0/x2; ++ double x2 = g2*rsq, a2 = 1.0/x2; + x2 = a2*exp(-x2); + f_tmp = g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq; + e_tmp = g6*((a2+1.0)*a2+0.5)*x2; +diff --git a/src/utils.h b/src/utils.h +index fab00e9b..5a122627 100644 +--- a/src/utils.h ++++ b/src/utils.h +@@ -67,7 +67,7 @@ namespace Utils { + + inline std::string int_to_string(int a) + { +- return static_cast< std::ostringstream & >(( std::ostringstream() << std::dec << a ) ).str(); ++ return static_cast< std::ostringstream & >(( std::ostringstream().flush() << std::dec << a ) ).str(); + } + + inline std::string double_to_string(double dbl) diff --git a/var/spack/repos/builtin/packages/liggghts/makefile-llvm-based-compiler.patch b/var/spack/repos/builtin/packages/liggghts/makefile-llvm-based-compiler.patch new file mode 100644 index 00000000000000..a5c26300a34392 --- /dev/null +++ b/var/spack/repos/builtin/packages/liggghts/makefile-llvm-based-compiler.patch @@ -0,0 +1,21 @@ +diff --git a/src/MAKE/Makefile.auto b/src/MAKE/Makefile.auto +index 239f886..8f42e73 100644 +--- a/src/MAKE/Makefile.auto ++++ b/src/MAKE/Makefile.auto +@@ -816,12 +816,14 @@ ifeq ($(USE_VTK), "ON") + endif + endif + endif +- open_bracket := ( +- close_bracket := ) ++ open_bracket := (" ++ close_bracket := ") ++ message := message + space := + space += + VTK_TMP := $(subst $(open_bracket),$(space),$(VTK_TMP)) + VTK_TMP := $(subst $(close_bracket),$(space),$(VTK_TMP)) ++ VTK_TMP := $(subst $(message),$(space),$(VTK_TMP)) + VTK_MAJOR_VERSION := $(patsubst "%",%,$(word $(words $(VTK_TMP)),$(VTK_TMP))) + ifeq ($(AUTO_DEBUG),1) + $(shell $(ECHO) "#vtk_major_version: $(VTK_MAJOR_VERSION)" >> $(AUTO_LOG_FILE)) diff --git a/var/spack/repos/builtin/packages/liggghts/makefile.patch b/var/spack/repos/builtin/packages/liggghts/makefile.patch new file mode 100644 index 00000000000000..370e4b8dad21f0 --- /dev/null +++ b/var/spack/repos/builtin/packages/liggghts/makefile.patch @@ -0,0 +1,240 @@ +diff --git a/src/MAKE/Makefile.auto b/src/MAKE/Makefile.auto +index dde9e72..239f886 100644 +--- a/src/MAKE/Makefile.auto ++++ b/src/MAKE/Makefile.auto +@@ -440,12 +440,12 @@ ifeq ($(USE_MPI), "ON") + TMP_INC = -I$(MPI_INC) + endif + # We assume that the compiler supports #pragma message +- TMP := $(shell $(ECHO) '\#include \n \#if defined(MPICH) \n \#pragma message "MPICH" \n \#elif defined(OPEN_MPI) \n \#pragma message "OpenMPI" \n \#else \n \#pragma message "Unknown" \n \#endif' > $(TMPFILE) && $(MPICXX) $(OPT_LVL) $(PROF_FLAG) $(TMP_INC) -xc++ -E $(TMPFILE) 2> /dev/null | grep pragma | grep -m 1 message || echo -1) ++ TMP := $(shell $(ECHO) '#include \n #if defined(MPICH) \n #pragma message "MPICH" \n #elif defined(OPEN_MPI) \n #pragma message "OpenMPI" \n #else \n #pragma message "Unknown" \n #endif' > $(TMPFILE) && $(MPICXX) $(OPT_LVL) $(PROF_FLAG) $(TMP_INC) -xc++ -E $(TMPFILE) 2> /dev/null | grep pragma | grep -m 1 message || echo -1) + # See if compilation has worked out + ifeq ($(TMP), -1) + # Maybe it failed because of the optimization as -Og is not known + ifeq ($(USE_DEBUG), "ON") +- TMP := $(shell $(ECHO) '\#include \n \#if defined(MPICH) \n \#pragma message "MPICH" \n \#elif defined(OPEN_MPI) \n \#pragma message "OpenMPI" \n \#else \n \#pragma message "Unknown" \n \#endif' > $(TMPFILE) && $(MPICXX) -O0 -g $(PROF_FLAG) $(TMP_INC) -xc++ -E $(TMPFILE) 2> /dev/null | grep pragma | grep -m 1 message || echo -1) ++ TMP := $(shell $(ECHO) '#include \n #if defined(MPICH) \n #pragma message "MPICH" \n #elif defined(OPEN_MPI) \n #pragma message "OpenMPI" \n #else \n #pragma message "Unknown" \n #endif' > $(TMPFILE) && $(MPICXX) -O0 -g $(PROF_FLAG) $(TMP_INC) -xc++ -E $(TMPFILE) 2> /dev/null | grep pragma | grep -m 1 message || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile a simple MPI example (testing with -Og and -O0). Test was done with MPI_INC="$(TMP_INC)" and MPICXX="$(MPICXX)"') + else +@@ -566,7 +566,7 @@ else + $(shell $(ECHO) "#Compiling with mpi stubs" >> $(AUTO_LOG_FILE)) + $(shell $(ECHO) "#Command: $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE)") + endif +- TMP := $(shell $(ECHO) '\#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile a simple c++ example. Please make sure that you have run "make stubs" before compiling LIGGGHTS itself. Test was done with CXX=$(CXX), EXTRA_INC=$(EXTRA_INC), EXTRA_LIB=$(EXTRA_LIB) and EXTRA_ADDLIBS=$(EXTRA_ADDLIBS).') + endif +@@ -595,7 +595,7 @@ endif + HAVE_MATH_SPECIAL_FUNCS = 0 + # For c++17 this is included without any further defines + ifeq ($(CXXVERSION),17) +- TMP := $(shell $(ECHO) '\#include \n int main(){ std::beta(1,1); }' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){ std::beta(1,1); }' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP),0) + HAVE_MATH_SPECIAL_FUNCS = 1 + endif +@@ -604,14 +604,14 @@ ifeq ($(CXXVERSION),17) + else + # For c++11 we need to check if ISO 29124:2010 is supported + ifeq ($(CXXVERSION),11) +- TMP := $(shell $(ECHO) '\#define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1 \n \#include \n \#if !defined(__STDCPP_MATH_SPEC_FUNCS__) || __STDCPP_MATH_SPEC_FUNCS__ < 201003L \n \#error "STOP" \n \#endif \n int main(){ std::beta(1,1); }' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#define __STDCPP_WANT_MATH_SPEC_FUNCS__ 1 \n #include \n #if !defined(__STDCPP_MATH_SPEC_FUNCS__) || __STDCPP_MATH_SPEC_FUNCS__ < 201003L \n #error "STOP" \n #endif \n int main(){ std::beta(1,1); }' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP),0) + HAVE_MATH_SPECIAL_FUNCS = 1 + endif + endif + endif + ifeq ($(HAVE_MATH_SPECIAL_FUNCS),0) +- TMP := $(shell $(ECHO) '\#include \n int main(){ std::tr1::beta(1,1); }' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){ std::tr1::beta(1,1); }' > $(TMPFILE) && $(CXX) $(EXTRA_INC) $(EXTRA_LIB) $(EXTRA_ADDLIBS) -xc++ $(LDFLAGS) $(CCFLAGS) -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + HAVE_TR1_CMATH = 0 + ifeq ($(TMP),0) + HAVE_TR1_CMATH = 1 +@@ -729,7 +729,7 @@ ifeq ($(USE_VTK), "ON") + $(shell $(ECHO) "#vtk major version detection" >> $(AUTO_LOG_FILE)) + endif + # note we assume here that our compiler supports #pragma message +- VTK_TMP := $(shell $(ECHO) '\#include \n \#define XSTR(x) STR(x) \n \#define STR(x) \#x \n \#pragma message XSTR(VTK_MAJOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) ++ VTK_TMP := $(shell $(ECHO) '#include \n #define XSTR(x) STR(x) \n #define STR(x) #x \n #pragma message XSTR(VTK_MAJOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) + ifeq ($(AUTO_DEBUG),1) + $(shell $(ECHO) "#vtk major version detection result: $(VTK_TMP)" >> $(AUTO_LOG_FILE)) + endif +@@ -744,7 +744,7 @@ ifeq ($(USE_VTK), "ON") + ifeq ($(VTK_INC),-I) + VTK_INC = + endif +- VTK_TMP := $(shell $(ECHO) '\#include \n \#define XSTR(x) STR(x) \n \#define STR(x) \#x \n \#pragma message XSTR(VTK_MAJOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) ++ VTK_TMP := $(shell $(ECHO) '#include \n #define XSTR(x) STR(x) \n #define STR(x) #x \n #pragma message XSTR(VTK_MAJOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) + ifeq ($(AUTO_DEBUG),1) + $(shell $(ECHO) "#vtk major version detection result (lib): $(VTK_TMP)" >> $(AUTO_LOG_FILE)) + endif +@@ -797,7 +797,7 @@ ifeq ($(USE_VTK), "ON") + # At this stage we now have VTK downloaded. Next we need to compile it + $(info VTK has been downloaded and will be compiled now. This can take several minutes.) + OBJDIR := $(PWD) +- TMP := $(shell $(ECHO) '\#!/bin/bash \n cd "$(OBJDIR)/$(LIB_PATH)/vtk" \n mkdir -p build \n cd src \n git checkout $(VTK_VERSION_TAG) &>> $(AUTO_LOG_FILE) \n cd ../build \n cmake -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=../install -DModule_vtkIOMPIParallel:BOOL=ON -DVTK_Group_MPI:BOOL=ON -DVTK_Group_Rendering:BOOL=OFF -DVTK_RENDERING_BACKEND:STRING=None -DVTK_USE_X:BOOL=OFF -DModule_vtkIOMPIImage:BOOL=ON -DModule_vtkParallelMPI:BOOL=ON ../src &>> $(AUTO_LOG_FILE) \n make &>> $(AUTO_LOG_FILE) \n make install &>> $(AUTO_LOG_FILE)' > $(TMPFILE)) ++ TMP := $(shell $(ECHO) '#!/bin/bash \n cd "$(OBJDIR)/$(LIB_PATH)/vtk" \n mkdir -p build \n cd src \n git checkout $(VTK_VERSION_TAG) &>> $(AUTO_LOG_FILE) \n cd ../build \n cmake -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX=../install -DModule_vtkIOMPIParallel:BOOL=ON -DVTK_Group_MPI:BOOL=ON -DVTK_Group_Rendering:BOOL=OFF -DVTK_RENDERING_BACKEND:STRING=None -DVTK_USE_X:BOOL=OFF -DModule_vtkIOMPIImage:BOOL=ON -DModule_vtkParallelMPI:BOOL=ON ../src &>> $(AUTO_LOG_FILE) \n make &>> $(AUTO_LOG_FILE) \n make install &>> $(AUTO_LOG_FILE)' > $(TMPFILE)) + TMP := $(shell bash $(TMPFILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Compilation of vtk failed. Please install it manually') +@@ -807,7 +807,7 @@ ifeq ($(USE_VTK), "ON") + ifeq ($(VTK_INC),-I) + VTK_INC = + endif +- VTK_TMP := $(shell $(ECHO) '\#include \n \#define XSTR(x) STR(x) \n \#define STR(x) \#x \n \#pragma message XSTR(VTK_MAJOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) ++ VTK_TMP := $(shell $(ECHO) '#include \n #define XSTR(x) STR(x) \n #define STR(x) #x \n #pragma message XSTR(VTK_MAJOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) + ifeq ($(AUTO_DEBUG),1) + $(shell $(ECHO) "#vtk major version detection result (lib): $(VTK_TMP)" >> $(AUTO_LOG_FILE)) + endif +@@ -826,7 +826,7 @@ ifeq ($(USE_VTK), "ON") + ifeq ($(AUTO_DEBUG),1) + $(shell $(ECHO) "#vtk_major_version: $(VTK_MAJOR_VERSION)" >> $(AUTO_LOG_FILE)) + endif +- VTK_TMP := $(shell $(ECHO) '\#include \n \#define XSTR(x) STR(x) \n \#define STR(x) \#x \n \#pragma message XSTR(VTK_MINOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) ++ VTK_TMP := $(shell $(ECHO) '#include \n #define XSTR(x) STR(x) \n #define STR(x) #x \n #pragma message XSTR(VTK_MINOR_VERSION)' > $(TMPFILE) && $(CXX) -Wno-deprecated -E $(VTK_INC) -xc++ $(TMPFILE) 2>> $(AUTO_LOG_FILE) | tee -a $(AUTO_LOG_FILE) | grep "pragma" | grep "message" || echo -1) + ifeq ($(VTK_TMP), -1) + $(error Could not obtain VTK_MINOR_VERSION) + endif +@@ -885,7 +885,7 @@ ifeq ($(USE_VTK), "ON") + VTK_LIB = + endif + endif +- TMP := $(shell $(ECHO) '\#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtkCommon$(VTK_APPENDIX_5) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtkCommon$(VTK_APPENDIX_5) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + ifeq ($(VTK_LIB_SET), 0) + VTK_LIB := -L$(dir $(shell find $(VTK_BASE_PATH)/lib* -name 'libvtkCommon.so' | tail -n 1)) +@@ -893,7 +893,7 @@ ifeq ($(USE_VTK), "ON") + VTK_LIB = + endif + endif +- TMP := $(shell $(ECHO) '\#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtkCommon $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtkCommon $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not determine suitable appendix of VTK library with VTK_INC="$(VTK_INC)", VTK_LIB="$(VTK_LIB)" and VTK_APPENDIX="$(VTK_APPENDIX)"') + else +@@ -924,7 +924,7 @@ ifeq ($(USE_VTK), "ON") + $(shell $(ECHO) "#vtk_lib: $(VTK_LIB)" >> $(AUTO_LOG_FILE)) + $(shell $(ECHO) "#appendix command: $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtksys$(VTK_APPENDIX) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE)" >> $(AUTO_LOG_FILE)) + endif +- TMP := $(shell $(ECHO) '\#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtksys$(VTK_APPENDIX) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtksys$(VTK_APPENDIX) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + ifeq ($(AUTO_DEBUG),1) + $(shell $(ECHO) "#attempting without appendix" >> $(AUTO_LOG_FILE)) +@@ -935,7 +935,7 @@ ifeq ($(USE_VTK), "ON") + VTK_LIB = + endif + endif +- TMP := $(shell $(ECHO) '\#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtksys $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) -lvtksys $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not determine suitable appendix of VTK library with VTK_INC="$(VTK_INC)", VTK_LIB="$(VTK_LIB)" and VTK_APPENDIX="$(VTK_APPENDIX)"') + else +@@ -1025,9 +1025,9 @@ ifeq ($(USE_VTK), "ON") + $(shell $(ECHO) "#vtk_addlibs: $(VTK_ADDLIBS)" >> $(AUTO_LOG_FILE)) + $(shell $(ECHO) "#vtk_rpath: $(VTK_RPATH)" >> $(AUTO_LOG_FILE)) + $(shell $(ECHO) "#vtk compile test:" >> $(AUTO_LOG_FILE)) +- TMP := $(shell $(ECHO) "\#include \n int main(){}" > $(TMPFILE) && $(CXX) $(VTK_RPATH) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) $(VTK_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) &>> $(AUTO_LOG_FILE)) ++ TMP := $(shell $(ECHO) "#include \n int main(){}" > $(TMPFILE) && $(CXX) $(VTK_RPATH) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) $(VTK_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) &>> $(AUTO_LOG_FILE)) + endif +- TMP := $(shell $(ECHO) '\#include \n int main(){}' > $(TMPFILE) && $(CXX) $(VTK_RPATH) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) $(VTK_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n int main(){}' > $(TMPFILE) && $(CXX) $(VTK_RPATH) $(EXTRA_LIB) $(VTK_LIB) $(VTK_INC) $(EXTRA_ADDLIBS) $(VTK_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile VTK example with VTK_INC="$(VTK_INC)", VTK_LIB="$(VTK_LIB)" and VTK_ADDLIBS="$(VTK_ADDLIBS)"') + endif +@@ -1057,7 +1057,7 @@ ifeq ($(USE_SUPERQUADRICS), "ON") + ifeq ($(REQUIRE_BOOST),1) + BOOST_INC ?= $(BOOST_INC_USR) + # Include test +- TMP := $(shell $(ECHO) '\#include "boost/math/special_functions/beta.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(BOOST_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "boost/math/special_functions/beta.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(BOOST_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile boost example with BOOST_INC="$(BOOST_INC)" as boost/math/special_functions/beta.hpp could not be found') + endif +@@ -1082,7 +1082,7 @@ ifeq ($(USE_JPG), "ON") + $(shell $(ECHO) "#JPG_ADDLIBS: $(JPG_ADDLIBS)" >> $(AUTO_LOG_FILE)) + $(shell $(ECHO) "jpg compile test:" >> $(AUTO_LOG_FILE)) + endif +- TMP := $(shell $(ECHO) '\#include \n \#include \n \#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(JPG_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n #include \n #include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(JPG_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile jpg example with JPG_INC="$(JPG_INC)"') + endif +@@ -1090,7 +1090,7 @@ ifeq ($(USE_JPG), "ON") + $(shell $(ECHO) "jpg link test:" >> $(AUTO_LOG_FILE)) + endif + # Linking test +- TMP := $(shell $(ECHO) '\#include \n \#include \n \#include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(JPG_LIB) $(JPG_INC) $(EXTRA_ADDLIBS) $(JPG_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include \n #include \n #include \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(JPG_LIB) $(JPG_INC) $(EXTRA_ADDLIBS) $(JPG_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2>> $(AUTO_LOG_FILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile and link jpg example with JPG_INC="$(JPG_INC)", JPG_LIB="$(JPG_LIB)" and JPG_ADDLIBS="$(JPG_ADDLIBS)"') + endif +@@ -1119,7 +1119,7 @@ ifeq ($(USE_CONVEX), "ON") + CONVEX_ADDLIBS += -lccd + # Test settings + # Link test +- TMP := $(shell $(ECHO) '\#include "ccd/ccd.h" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(CONVEX_LIB) $(CONVEX_INC) $(EXTRA_ADDLIBS) $(CONVEX_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "ccd/ccd.h" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(CONVEX_LIB) $(CONVEX_INC) $(EXTRA_ADDLIBS) $(CONVEX_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + # Automatic download and compilation if AUTODOWNLOAD_CONVEX is set + ifeq ($(TMP), -1) + ifeq ($(AUTOINSTALL_CONVEX), "ON") +@@ -1168,7 +1168,7 @@ ifeq ($(USE_CONVEX), "ON") + endif + # At this stage we now have libccd downloaded. Next we need to compile it + OBJDIR := $(PWD) +- TMP := $(shell $(ECHO) '\#!/bin/bash \n cd "$(OBJDIR)/$(LIB_PATH)/libccd/src" \n make PREFIX="$(PWD)/../../" USE_DOUBLE=yes &> /dev/null' > $(TMPFILE)) ++ TMP := $(shell $(ECHO) '#!/bin/bash \n cd "$(OBJDIR)/$(LIB_PATH)/libccd/src" \n make PREFIX="$(PWD)/../../" USE_DOUBLE=yes &> /dev/null' > $(TMPFILE)) + TMP := $(shell bash $(TMPFILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Compilation of libccd failed. Please install it manually') +@@ -1178,12 +1178,12 @@ ifeq ($(USE_CONVEX), "ON") + endif + endif + # Include test +- TMP := $(shell $(ECHO) '\#include "ccd/ccd.h" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(CONVEX_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -E $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "ccd/ccd.h" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(CONVEX_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -E $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile Convex (libccd) example with CONVEX_INC="$(CONVEX_INC)"') + endif + # Link test +- TMP := $(shell $(ECHO) '\#include "ccd/ccd.h" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(CONVEX_LIB) $(CONVEX_INC) $(EXTRA_ADDLIBS) $(CONVEX_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "ccd/ccd.h" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(CONVEX_LIB) $(CONVEX_INC) $(EXTRA_ADDLIBS) $(CONVEX_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile and link Convex (libccd) example with CONVEX_INC="$(CONVEX_INC)", CONVEX_LIB="$(CONVEX_LIB)" and CONVEX_ADDLIBS="$(CONVEX_ADDLIBS)"') + endif +@@ -1210,7 +1210,7 @@ ifeq ($(USE_MFEM), "ON") + MFEM_LIB ?= -L$(LIB_PATH)/mfem + MFEM_ADDLIBS += -lmfem + # Link test +- TMP := $(shell $(ECHO) '\#include "mfem.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(MFEM_INC) $(MFEM_LIB) $(EXTRA_ADDLIBS) $(MFEM_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "mfem.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(MFEM_INC) $(MFEM_LIB) $(EXTRA_ADDLIBS) $(MFEM_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + ifeq ($(AUTOINSTALL_MFEM), "ON") + $(info 'Could not compile MFEM example. As AUTOINSTALL_MFEM is set to "ON". MFEM will now be automatically downloaded to ../lib/mfem') +@@ -1257,7 +1257,7 @@ ifeq ($(USE_MFEM), "ON") + # At this stage we now have MFEM downloaded. Next we need to compile it + TMP := $(shell ls $(LIB_PATH)/mfem/libmfem.a && echo 0 || echo -1) + ifeq ($(TMP), -1) +- TMP := $(shell $(ECHO) '\#!/bin/bash \n cd $(LIB_PATH)/mfem \n make config \n make all -j 4' > $(TMPFILE)) ++ TMP := $(shell $(ECHO) '#!/bin/bash \n cd $(LIB_PATH)/mfem \n make config \n make all -j 4' > $(TMPFILE)) + TMP := $(shell bash $(TMPFILE) && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Compilation of MFEM failed. Please install it manually') +@@ -1270,12 +1270,12 @@ ifeq ($(USE_MFEM), "ON") + + + # Include test +- TMP := $(shell $(ECHO) '\#include "mfem.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(MFEM_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "mfem.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(MFEM_INC) $(EXTRA_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile MFEM example with MFEM_INC="$(MFEM_INC)"') + endif + # Link test +- TMP := $(shell $(ECHO) '\#include "mfem.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(MFEM_INC) $(MFEM_LIB) $(EXTRA_ADDLIBS) $(MFEM_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) ++ TMP := $(shell $(ECHO) '#include "mfem.hpp" \n int main(){}' > $(TMPFILE) && $(CXX) $(EXTRA_LIB) $(MFEM_INC) $(MFEM_LIB) $(EXTRA_ADDLIBS) $(MFEM_ADDLIBS) $(CCFLAGS) -xc++ -o /dev/null $(TMPFILE) 2> /dev/null && echo 0 || echo -1) + ifeq ($(TMP), -1) + $(error 'Could not compile and link MFEM example. Test was done with MFEM_INC="$(MFEM_INC)", MFEM_LIB="$(MFEM_LIB)" and MFEM_ADDLIBS="$(MFEM_ADDLIBS)"') + endif diff --git a/var/spack/repos/builtin/packages/liggghts/package.py b/var/spack/repos/builtin/packages/liggghts/package.py index d9487bea4553ff..dac43ff3655115 100644 --- a/var/spack/repos/builtin/packages/liggghts/package.py +++ b/var/spack/repos/builtin/packages/liggghts/package.py @@ -16,6 +16,8 @@ class Liggghts(MakefilePackage): url = "https://github.com/CFDEMproject/LIGGGHTS-PUBLIC/archive/3.8.0.tar.gz" git = "ssh://git@github.com/CFDEMproject/LIGGGHTS-PUBLIC.git" + maintainers("SofiaXu") + version("3.8.0", sha256="9cb2e6596f584463ac2f80e3ff7b9588b7e3638c44324635b6329df87b90ab03") variant("mpi", default=True, description="Enable MPI support") @@ -28,7 +30,13 @@ class Liggghts(MakefilePackage): depends_on("mpi", when="+mpi") depends_on("jpeg", when="+jpeg") depends_on("zlib-api", when="+gzip") - + # patch for makefile test code + patch("makefile.patch") + # patch for clang and oneapi + patch("makefile-llvm-based-compiler.patch", when="%clang") + patch("makefile-llvm-based-compiler.patch", when="%oneapi") + # C++17 support + patch("cpp-17.patch") build_directory = "src" build_targets = ["auto"] @@ -55,9 +63,9 @@ def edit(self, spec, prefix): if "+mpi" in spec: mpi = spec["mpi"] - makefile.filter(r"^#(MPICXX_USER=).*", r"\1{0}".format(mpi.mpicxx)) - makefile.filter(r"^#(MPI_INC_USER=).*", r"\1{0}".format(mpi.prefix.include)) - makefile.filter(r"^#(MPI_LIB_USER=).*", r"\1{0}".format(mpi.prefix.lib)) + makefile.filter(r"^#(MPICXX_USR=).*", r"\1{0}".format(mpi.mpicxx)) + makefile.filter(r"^#(MPI_INC_USR=).*", r"\1{0}".format(mpi.prefix.include)) + makefile.filter(r"^#(MPI_LIB_USR=).*", r"\1{0}".format(mpi.prefix.lib)) else: makefile.filter(r"^(USE_MPI = ).*", r'\1"OFF"') # Set path to C++ compiler. @@ -70,8 +78,8 @@ def edit(self, spec, prefix): if "+jpeg" in spec: jpeg = spec["jpeg"] makefile.filter(r"^(USE_JPG = ).*", r'\1"ON"') - makefile.filter(r"^#(JPG_INC_USER=-I).*", r"\1{0}".format(jpeg.prefix.include)) - makefile.filter(r"^#(JPG_LIB_USER=-L).*", r"\1{0}".format(jpeg.prefix.lib)) + makefile.filter(r"^#(JPG_INC_USR=-I).*", r"\1{0}".format(jpeg.prefix.include)) + makefile.filter(r"^#(JPG_LIB_USR=-L).*", r"\1{0}".format(jpeg.prefix.lib)) if "+gzip" in spec: makefile.filter(r"^(USE_GZIP = ).*", r'\1"ON"') From 2e097b4cbd7faea06114405ce28077dd8a2a5ad2 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sun, 29 Oct 2023 19:45:23 +0100 Subject: [PATCH 386/806] py-numcodecs: fix broken sse / avx2 variables (#40754) --- var/spack/repos/builtin/packages/py-numcodecs/package.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-numcodecs/package.py b/var/spack/repos/builtin/packages/py-numcodecs/package.py index badf48b465bf8f..6d466c19175c48 100644 --- a/var/spack/repos/builtin/packages/py-numcodecs/package.py +++ b/var/spack/repos/builtin/packages/py-numcodecs/package.py @@ -49,10 +49,11 @@ def setup_build_environment(self, env): # This package likes to compile natively by checking cpu features and then setting flags # -msse2 and -mavx2, which we want to avoid in Spack. This could go away if the package # supports external libraries. - if "avx2" not in self.spec.target.features: - env.set("DISABLE_NUMCODECS_AVX2", "1") - if "sse2" not in self.spec.target.features: - env.set("DISABLE_NUMCODECS_SSE2", "1") + if self.spec.satisfies("target=x86_64:"): + if "avx2" not in self.spec.target.features: + env.set("DISABLE_NUMCODECS_AVX2", "1") + if "sse2" not in self.spec.target.features: + env.set("DISABLE_NUMCODECS_SSE2", "1") def flag_handler(self, name, flags): if name == "cflags": From 2a797f90b431d33f609dc1d92b2908f5734f4d50 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 29 Oct 2023 20:01:27 -0500 Subject: [PATCH 387/806] acts: add v28.1.0:30.3.2 (#40723) * acts: new version from 28.1.0 to 30.3.1 * acts: new version 30.3.2 * acts: new variant +podio --- var/spack/repos/builtin/packages/acts/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 9b06fd3d444360..0acd01140221d8 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -40,6 +40,18 @@ class Acts(CMakePackage, CudaPackage): # Supported Acts versions version("main", branch="main") version("master", branch="main", deprecated=True) # For compatibility + version("30.3.2", commit="76826f208f5929d8326798c87263f2563d0ae7e9", submodules=True) + version("30.3.1", commit="bbee459dd93855417d5717d53cbbb2bace7de2bb", submodules=True) + version("30.3.0", commit="311acb9ab41c2d79a4b90b193e5b25297182d670", submodules=True) + version("30.2.0", commit="264b0a3214cbf8ca013623fc196e2d90d647c58f", submodules=True) + version("30.1.1", commit="3d43492b2775e62051e9ad31f06b91d6e2357ab9", submodules=True) + version("30.1.0", commit="60d9eec916f6c81373858c8d99d821861d7efeb8", submodules=True) + version("30.0.0", commit="00fa3fabac86a1e65198d4b94dd263b1c731a84c", submodules=True) + version("29.2.0", commit="b2d65308399d8f653fa8bdd73a2a203c58608358", submodules=True) + version("29.1.0", commit="4681c3b142db469b00ca03e92e6b237f7c89d141", submodules=True) + version("29.0.0", commit="9c6e4597af39f826e17d46850fdb407a48817ba6", submodules=True) + version("28.2.0", commit="c612e7c625f961330e383fb7856cc7398dd82881", submodules=True) + version("28.1.0", commit="08e51b5f93c0d09f2d1e7e4f062e715072ec3e9b", submodules=True) version("28.0.0", commit="0d8aa418c00e8f79bab2cf88234f3433670b447c", submodules=True) version("27.1.0", commit="219480220738318fbedb943cac85415687d75b66", submodules=True) version("27.0.0", commit="4d7029bd4e9285fcda2770aef6d78a7f833cb14f", submodules=True) @@ -214,6 +226,7 @@ class Acts(CMakePackage, CudaPackage): variant("mlpack", default=False, description="Build MLpack plugin", when="@25:") variant("onnx", default=False, description="Build ONNX plugin") variant("odd", default=False, description="Build the Open Data Detector", when="@19.1:") + variant("podio", default=False, description="Build Podio plugin", when="@30.3:") variant( "profilecpu", default=False, @@ -300,6 +313,8 @@ class Acts(CMakePackage, CudaPackage): depends_on("mlpack@3.1.1:", when="+mlpack") depends_on("nlohmann-json @3.9.1:", when="@0.14: +json") depends_on("podio @0.6:", when="@25: +edm4hep") + depends_on("podio @0.16:", when="@30.3: +edm4hep") + depends_on("podio @0.16:", when="+podio") depends_on("pythia8", when="+pythia8") depends_on("python", when="+python") depends_on("python@3.8:", when="+python @19.11:19") @@ -390,6 +405,7 @@ def plugin_cmake_variant(plugin_name, spack_variant): plugin_cmake_variant("ONNX", "onnx"), enable_cmake_variant("CPU_PROFILING", "profilecpu"), enable_cmake_variant("MEMORY_PROFILING", "profilemem"), + plugin_cmake_variant("PODIO", "podio"), example_cmake_variant("PYTHIA8", "pythia8"), example_cmake_variant("PYTHON_BINDINGS", "python"), plugin_cmake_variant("ACTSVG", "svg"), From 6983db1392dad206d117d1ea1b3e630779a22ddd Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 30 Oct 2023 07:38:53 +0100 Subject: [PATCH 388/806] ASP-based solver: avoid cycles in clingo using hidden directive (#40720) The code should be functonally equivalent to what it was before, but now to avoid cycles by design we are using a "hidden" feature of clingo --- lib/spack/spack/solver/asp.py | 29 ----------------------- lib/spack/spack/solver/concretize.lp | 4 ++++ lib/spack/spack/solver/cycle_detection.lp | 21 ---------------- 3 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 lib/spack/spack/solver/cycle_detection.lp diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index eba1d8a3eb9fc9..729a1febc4487a 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -8,7 +8,6 @@ import enum import itertools import os -import pathlib import pprint import re import types @@ -889,14 +888,6 @@ def on_model(model): timer.start("solve") solve_result = self.control.solve(**solve_kwargs) - - if solve_result.satisfiable and self._model_has_cycles(models): - tty.debug(f"cycles detected, falling back to slower algorithm [specs={specs}]") - self.control.load(os.path.join(parent_dir, "cycle_detection.lp")) - self.control.ground([("no_cycle", [])]) - models.clear() - solve_result = self.control.solve(**solve_kwargs) - timer.stop("solve") # once done, construct the solve result @@ -950,26 +941,6 @@ def on_model(model): return result, timer, self.control.statistics - def _model_has_cycles(self, models): - """Returns true if the best model has cycles in it""" - cycle_detection = clingo.Control() - parent_dir = pathlib.Path(__file__).parent - lp_file = parent_dir / "cycle_detection.lp" - - min_cost, best_model = min(models) - with cycle_detection.backend() as backend: - for atom in best_model: - if atom.name == "attr" and str(atom.arguments[0]) == '"depends_on"': - symbol = fn.depends_on(atom.arguments[1], atom.arguments[2]) - atom_id = backend.add_atom(symbol.symbol()) - backend.add_rule([atom_id], [], choice=False) - - cycle_detection.load(str(lp_file)) - cycle_detection.ground([("base", []), ("no_cycle", [])]) - cycle_result = cycle_detection.solve() - - return cycle_result.unsatisfiable - class ConcreteSpecsByHash(collections.abc.Mapping): """Mapping containing concrete specs keyed by DAG hash. diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index efca3bfed2a32e..92ba77ad8270fd 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -1325,6 +1325,10 @@ build_priority(PackageNode, 0) :- not build(PackageNode), attr("node", Package #defined installed_hash/2. +% This statement, which is a hidden feature of clingo, let us avoid cycles in the DAG +#edge (A, B) : depends_on(A, B). + + %----------------------------------------------------------------- % Optimization to avoid errors %----------------------------------------------------------------- diff --git a/lib/spack/spack/solver/cycle_detection.lp b/lib/spack/spack/solver/cycle_detection.lp deleted file mode 100644 index 310c543623d153..00000000000000 --- a/lib/spack/spack/solver/cycle_detection.lp +++ /dev/null @@ -1,21 +0,0 @@ -% Copyright 2013-2023 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) - -%============================================================================= -% Avoid cycles in the DAG -% -% Some combinations of conditional dependencies can result in cycles; -% this ensures that we solve around them. Note that these rules are quite -% demanding on both grounding and solving, since they need to compute and -% consider all possible paths between pair of nodes. -%============================================================================= - - -#program no_cycle. -path(Parent, Child) :- depends_on(Parent, Child). -path(Parent, Descendant) :- path(Parent, A), depends_on(A, Descendant). -:- path(A, A). - -#defined depends_on/2. From bd1bb7d1ba6730a67b6eab2e669e0e768e15ff61 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Mon, 30 Oct 2023 00:17:51 -0700 Subject: [PATCH 389/806] mfem: support petsc+rocm with spack-installed rocm (#40768) --- var/spack/repos/builtin/packages/mfem/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 5fac0860ea1040..baab5cb80890c1 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -923,6 +923,7 @@ def find_optional_library(name, prefix): if "+rocm" in spec: amdgpu_target = ",".join(spec.variants["amdgpu_target"].value) options += ["HIP_CXX=%s" % spec["hip"].hipcc, "HIP_ARCH=%s" % amdgpu_target] + hip_headers = HeaderList([]) hip_libs = LibraryList([]) # To use a C++ compiler that supports -xhip flag one can use # something like this: @@ -933,7 +934,7 @@ def find_optional_library(name, prefix): # hip_libs += find_libraries("libamdhip64", spec["hip"].prefix.lib) if "^hipsparse" in spec: # hipsparse is needed @4.4.0:+rocm hipsparse = spec["hipsparse"] - options += ["HIP_OPT=%s" % hipsparse.headers.cpp_flags] + hip_headers += hipsparse.headers hip_libs += hipsparse.libs # Note: MFEM's defaults.mk wants to find librocsparse.* in # $(HIP_DIR)/lib, so we set HIP_DIR to be $ROCM_PATH when using @@ -943,11 +944,16 @@ def find_optional_library(name, prefix): options += ["HIP_DIR=%s" % env["ROCM_PATH"]] else: options += ["HIP_DIR=%s" % hipsparse["rocsparse"].prefix] + if "^rocthrust" in spec and not spec["hip"].external: + # petsc+rocm needs the rocthrust header path + hip_headers += spec["rocthrust"].headers if "%cce" in spec: # We assume the proper Cray CCE module (cce) is loaded: craylibs_path = env["CRAYLIBS_" + machine().upper()] craylibs = ["libmodules", "libfi", "libcraymath", "libf", "libu", "libcsup"] hip_libs += find_libraries(craylibs, craylibs_path) + if hip_headers: + options += ["HIP_OPT=%s" % hip_headers.cpp_flags] if hip_libs: options += ["HIP_LIB=%s" % ld_flags_from_library_list(hip_libs)] From 7739c54eb5054ca4cb9a7b1b058947b877cea911 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Mon, 30 Oct 2023 03:35:36 -0400 Subject: [PATCH 390/806] exago: fix exago missing on PYTHONPATH when `+python` (#40748) --- var/spack/repos/builtin/packages/exago/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index 8db0f7f16fbefe..06a9c9f3931e59 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -62,10 +62,14 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): variant("raja", default=False, description="Enable/Disable RAJA") variant("python", default=True, when="@1.4:", description="Enable/Disable Python bindings") variant("logging", default=True, description="Enable/Disable spdlog based logging") + conflicts( "+python", when="+ipopt+rocm", msg="Python bindings require -fPIC with Ipopt for rocm." ) + # Adds ExaGO's python wrapper to PYTHONPATH + extends("python", when="+python") + # Solver options variant("hiop", default=False, description="Enable/Disable HiOp") variant("ipopt", default=False, description="Enable/Disable IPOPT") From a8f42b865f8839c58e44a8b5dbfc9f345dbd9368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Mon, 30 Oct 2023 08:54:36 +0100 Subject: [PATCH 391/806] pcl: checksum new versions (#39039) --- .../repos/builtin/packages/pcl/package.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pcl/package.py b/var/spack/repos/builtin/packages/pcl/package.py index f57dfed3871772..e0dd4967aa44cc 100644 --- a/var/spack/repos/builtin/packages/pcl/package.py +++ b/var/spack/repos/builtin/packages/pcl/package.py @@ -14,12 +14,29 @@ class Pcl(CMakePackage): homepage = "https://pointclouds.org/" url = "https://github.com/PointCloudLibrary/pcl/releases/download/pcl-1.11.1/source.tar.gz" + version("1.13.1", sha256="be4d499c066203a3c296e2f7e823d6209be5983415f2279310ed1c9abb361d30") + version("1.13.0", sha256="bd110789f6a7416ed1c58da302afbdb80f8d297a9e23cc02fd78ab78b4762698") + version("1.12.1", sha256="a9573efad5e024c02f2cc9180bb8f82605c3772c62463efbe25c5d6e634b91dc") + version("1.12.0", sha256="606a2d5c7af304791731d6b8ea79365bc8f2cd75908006484d71ecee01d9b51c") version("1.11.1", sha256="19d1a0bee2bc153de47c05da54fc6feb23393f306ab2dea2e25419654000336e") depends_on("cmake@3.5:", type="build") + depends_on("cmake@3.10:", when="@1.12.1:", type="build") depends_on("eigen@3.1:") + depends_on("eigen@3.3:", when="@1.13:") depends_on("flann@1.7:") - depends_on("boost@1.55:+filesystem+date_time+iostreams+system") + depends_on("flann@1.9.1:", when="@1.12:") + depends_on("boost@1.55:") + depends_on("boost@1.65:", when="@1.12:") + depends_on("boost+filesystem+iostreams+system") + depends_on("boost+date_time", when="@:1.13.0") + + # fix build with clang: #30653 + with when("@:1.12"): + patch( + "https://github.com/PointCloudLibrary/pcl/commit/dff16af269fbd2c15772d53064882b2bf8c2ffe9.patch?full_index=1", + sha256="17a7a7aec8e63701294612cbb25d46ac1ce58f643dbc68e1517329ae0b68956d", + ) # TODO: replace this with an explicit list of components of Boost, # for instance depends_on('boost +filesystem') From 272ca0fc24f9ed8b0b42fec616d15a4d2561a510 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 30 Oct 2023 03:28:52 -0500 Subject: [PATCH 392/806] PyTorch: build with external fp16 (#40760) --- .../repos/builtin/packages/fp16/package.py | 28 +++---------------- .../builtin/packages/py-torch/package.py | 6 ++-- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/var/spack/repos/builtin/packages/fp16/package.py b/var/spack/repos/builtin/packages/fp16/package.py index f3d535efbdccb1..5e56aec0113a74 100644 --- a/var/spack/repos/builtin/packages/fp16/package.py +++ b/var/spack/repos/builtin/packages/fp16/package.py @@ -14,7 +14,7 @@ class Fp16(CMakePackage): git = "https://github.com/Maratyszcza/FP16.git" version("master", branch="master") - version("2020-05-14", commit="4dfe081cf6bcd15db339cf2680b9281b8451eeb3") # py-torch@1.5:1.9 + version("2020-05-14", commit="4dfe081cf6bcd15db339cf2680b9281b8451eeb3") # py-torch@1.5: version("2018-11-28", commit="febbb1c163726b5db24bed55cc9dc42529068997") # py-torch@1.1:1.4 version("2018-10-10", commit="34d4bf01bbf7376f2baa71b8fa148b18524d45cf") # py-torch@1.0 version("2018-02-25", commit="43d6d17df48ebf622587e7ed9472ea76573799b9") # py-torch@:0.4 @@ -29,31 +29,11 @@ class Fp16(CMakePackage): destination="deps", placement="psimd", ) - resource( - name="googletest", - url="https://github.com/google/googletest/archive/release-1.8.0.zip", - sha256="f3ed3b58511efd272eb074a3a6d6fb79d7c2e6a0e374323d1e6bcbcc1ef141bf", - destination="deps", - placement="googletest", - ) - resource( - name="googlebenchmark", - url="https://github.com/google/benchmark/archive/v1.2.0.zip", - sha256="cc463b28cb3701a35c0855fbcefb75b29068443f1952b64dd5f4f669272e95ea", - destination="deps", - placement="googlebenchmark", - ) def cmake_args(self): return [ self.define("PSIMD_SOURCE_DIR", join_path(self.stage.source_path, "deps", "psimd")), - self.define( - "GOOGLETEST_SOURCE_DIR", join_path(self.stage.source_path, "deps", "googletest") - ), - self.define( - "GOOGLEBENCHMARK_SOURCE_DIR", - join_path(self.stage.source_path, "deps", "googlebenchmark"), - ), - self.define("FP16_BUILD_TESTS", self.run_tests), - self.define("FP16_BUILD_BENCHMARKS", self.run_tests), + self.define("FP16_BUILD_TESTS", False), + # https://github.com/Maratyszcza/FP16/issues/21 + self.define("FP16_BUILD_BENCHMARKS", False), ] diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 8b641c4e702159..96cae5404be448 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -198,8 +198,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # depends_on("sleef@3.5.1_2020-12-22", when="@1.8:") # https://github.com/pytorch/pytorch/issues/60334 # depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7") - # https://github.com/Maratyszcza/FP16/issues/18 - # depends_on("fp16@2020-05-14", when="@1.6:") + depends_on("fp16@2020-05-14", when="@1.6:") depends_on("pthreadpool@2021-04-13", when="@1.9:") depends_on("pthreadpool@2020-10-05", when="@1.8") depends_on("pthreadpool@2020-06-15", when="@1.6:1.7") @@ -631,8 +630,7 @@ def enable_or_disable(variant, keyword="USE", var=None, newer=False): # env.set("USE_SYSTEM_CPUINFO", "ON") # https://github.com/pytorch/pytorch/issues/60270 # env.set("USE_SYSTEM_GLOO", "ON") - # https://github.com/Maratyszcza/FP16/issues/18 - # env.set("USE_SYSTEM_FP16", "ON") + env.set("USE_SYSTEM_FP16", "ON") env.set("USE_SYSTEM_PTHREADPOOL", "ON") env.set("USE_SYSTEM_PSIMD", "ON") env.set("USE_SYSTEM_FXDIV", "ON") From 6511d3dfff391093d498e2657a4c6291a6e8b538 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 30 Oct 2023 03:32:48 -0500 Subject: [PATCH 393/806] py-pandas: add v2.1.2 (#40734) --- var/spack/repos/builtin/packages/py-pandas/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index f3d531f3bc382f..3dea26ff2c4111 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -17,8 +17,7 @@ class PyPandas(PythonPackage): maintainers("adamjstewart") - variant("excel", when="@1.4:", default=False, description="Build with support for Excel") - + version("2.1.2", sha256="52897edc2774d2779fbeb6880d2cfb305daa0b1a29c16b91f531a18918a6e0f3") version("2.1.1", sha256="fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b") version("2.1.0", sha256="62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918") version("2.0.3", sha256="c02f372a88e0d17f36d3093a644c73cfc1788e876a7c4bcb4020a77512e2043c") @@ -66,6 +65,8 @@ class PyPandas(PythonPackage): version("0.24.1", sha256="435821cb2501eabbcee7e83614bd710940dc0cf28b5afbc4bdb816c31cec71af") version("0.23.4", sha256="5b24ca47acf69222e82530e89111dd9d14f9b970ab2cd3a1c2c78f0c4fbba4f4") + variant("excel", when="@1.4:", default=False, description="Build with support for Excel") + # Required dependencies # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#python-version-support depends_on("python@3.9:3.12", when="@2.1.1:", type=("build", "run")) @@ -91,6 +92,7 @@ class PyPandas(PythonPackage): depends_on("py-versioneer+toml", when="@2:", type="build") # https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html#dependencies + depends_on("py-numpy@1.22.4:2", when="@2.1.2:", type=("build", "run")) depends_on("py-numpy@1.22.4:", when="@2.1:", type=("build", "run")) depends_on("py-numpy@1.20.3:", when="@1.5:", type=("build", "run")) depends_on("py-numpy@1.18.5:", when="@1.4:", type=("build", "run")) From 33cb8c988f3fd9afb364b403eda3aaaabe130729 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Mon, 30 Oct 2023 01:36:02 -0700 Subject: [PATCH 394/806] Fix an issue with using the environment variable `MACHTYPE` which is not always defined (#40733) * Fix an issue reported here: https://github.com/spack/spack/pull/36154#issuecomment-1781854894 * [@spackbot] updating style on behalf of v-dobrev --- var/spack/repos/builtin/packages/butterflypack/package.py | 4 +++- var/spack/repos/builtin/packages/strumpack/package.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py index 848dbcdfebabef..c9726a52aaa942 100644 --- a/var/spack/repos/builtin/packages/butterflypack/package.py +++ b/var/spack/repos/builtin/packages/butterflypack/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from platform import machine + from spack.package import * @@ -74,7 +76,7 @@ def cmake_args(self): args.append("-Denable_openmp=%s" % ("ON" if "+openmp" in spec else "OFF")) if "%cce" in spec: # Assume the proper Cray CCE module (cce) is loaded: - craylibs_path = env["CRAYLIBS_" + env["MACHTYPE"].capitalize()] + craylibs_path = env["CRAYLIBS_" + machine().upper()] env.setdefault("LDFLAGS", "") env["LDFLAGS"] += " -Wl,-rpath," + craylibs_path diff --git a/var/spack/repos/builtin/packages/strumpack/package.py b/var/spack/repos/builtin/packages/strumpack/package.py index fce0c4cd175f29..a82b3784b49a32 100644 --- a/var/spack/repos/builtin/packages/strumpack/package.py +++ b/var/spack/repos/builtin/packages/strumpack/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from platform import machine + from spack.package import * from spack.util.environment import set_env @@ -173,7 +175,7 @@ def cmake_args(self): if "%cce" in spec: # Assume the proper Cray CCE module (cce) is loaded: - craylibs_path = env["CRAYLIBS_" + env["MACHTYPE"].capitalize()] + craylibs_path = env["CRAYLIBS_" + machine().upper()] env.setdefault("LDFLAGS", "") env["LDFLAGS"] += " -Wl,-rpath," + craylibs_path From b53b235cffdb960a5e315a287517843a07836461 Mon Sep 17 00:00:00 2001 From: wspear Date: Mon, 30 Oct 2023 01:40:08 -0700 Subject: [PATCH 395/806] RAJA: add "plugins" variant (#40750) --- var/spack/repos/builtin/packages/raja/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index cc1ede76be35f4..99221b9b08c7d3 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -114,6 +114,7 @@ class Raja(CachedCMakePackage, CudaPackage, ROCmPackage): variant("openmp", default=True, description="Build OpenMP backend") variant("shared", default=True, description="Build Shared Libs") + variant("plugins", default=False, description="Enable runtime plugins") variant("examples", default=True, description="Build examples.") variant("exercises", default=True, description="Build exercises.") # TODO: figure out gtest dependency and then set this default True @@ -225,6 +226,7 @@ def initconfig_package_entries(self): if "camp" in self.spec: entries.append(cmake_cache_path("camp_DIR", spec["camp"].prefix)) entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) + entries.append(cmake_cache_option("RAJA_ENABLE_RUNTIME_PLUGINS", "+plugins" in spec)) entries.append( cmake_cache_option("{}ENABLE_EXAMPLES".format(option_prefix), "+examples" in spec) ) From a9e78dc7d897c146b11a93fd8c0176d0e886f2b4 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 30 Oct 2023 04:40:31 -0500 Subject: [PATCH 396/806] acts: new variant +binaries when +examples (#40738) Co-authored-by: wdconinc --- var/spack/repos/builtin/packages/acts/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 0acd01140221d8..f474b92cc98c99 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -243,6 +243,9 @@ class Acts(CMakePackage, CudaPackage): variant("tgeo", default=False, description="Build the TGeo plugin", when="+identification") # Variants that only affect Acts examples for now + variant( + "binaries", default=False, description="Build the examples binaries", when="@23: +examples" + ) variant( "edm4hep", default=False, @@ -384,6 +387,7 @@ def plugin_cmake_variant(plugin_name, spack_variant): cmake_variant("ANALYSIS_APPS", "analysis"), plugin_cmake_variant("AUTODIFF", "autodiff"), cmake_variant("BENCHMARKS", "benchmarks"), + example_cmake_variant("BINARIES", "binaries"), plugin_cmake_variant("CUDA", "cuda"), plugin_cmake_variant("DD4HEP", "dd4hep"), example_cmake_variant("DD4HEP", "dd4hep"), From 1586c8c786c497c1a3ecdbc1e65010cd61c21256 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Mon, 30 Oct 2023 03:26:24 -0700 Subject: [PATCH 397/806] aluminum: make network variants "sticky" (#40715) --- var/spack/repos/builtin/packages/aluminum/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py index 7c48339f69413a..bb085f8681044b 100644 --- a/var/spack/repos/builtin/packages/aluminum/package.py +++ b/var/spack/repos/builtin/packages/aluminum/package.py @@ -119,12 +119,14 @@ class Aluminum(CMakePackage, CudaPackage, ROCmPackage): "ofi_libfabric_plugin", default=spack.platforms.cray.slingshot_network(), when="+rccl", + sticky=True, description="Builds with support for OFI libfabric enhanced RCCL/NCCL communication lib", ) variant( "ofi_libfabric_plugin", default=spack.platforms.cray.slingshot_network(), when="+nccl", + sticky=True, description="Builds with support for OFI libfabric enhanced RCCL/NCCL communication lib", ) From 35882130ce8e7101a53d8ec8bcd3a26128ecd007 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Mon, 30 Oct 2023 12:09:42 +0100 Subject: [PATCH 398/806] justbuild: add version 1.2.2 (#40701) --- var/spack/repos/builtin/packages/justbuild/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/justbuild/package.py b/var/spack/repos/builtin/packages/justbuild/package.py index 2251535dc8bf2e..06a350821fbcba 100644 --- a/var/spack/repos/builtin/packages/justbuild/package.py +++ b/var/spack/repos/builtin/packages/justbuild/package.py @@ -22,6 +22,7 @@ class Justbuild(Package): maintainers("asartori86") version("master", branch="master") + version("1.2.2", tag="v1.2.2", commit="e1ee04684c34ae30ac3c91b6753e99a81a9dc51c") version("1.2.1", tag="v1.2.1", commit="959cd90083d0c783389cd09e187c98322c16469f") version("1.1.4", tag="v1.1.4", commit="32e96afd159f2158ca129fd00bf02c273d8e1e48") version("1.1.3", tag="v1.1.3", commit="3aed5d450aec38be18edec822ac2efac6d49a938") From 00602cda4f9ccd39d0f7a90012a918128adf9e51 Mon Sep 17 00:00:00 2001 From: Federico Ficarelli <1379149+nazavode@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:12:20 +0100 Subject: [PATCH 399/806] pegtl: add v3.2.7 (#35687) --- var/spack/repos/builtin/packages/pegtl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pegtl/package.py b/var/spack/repos/builtin/packages/pegtl/package.py index 8384ed91281e66..72a4bd67ada63f 100644 --- a/var/spack/repos/builtin/packages/pegtl/package.py +++ b/var/spack/repos/builtin/packages/pegtl/package.py @@ -19,6 +19,7 @@ class Pegtl(CMakePackage): git = "https://github.com/taocpp/PEGTL.git" version("master", branch="master") + version("3.2.7", sha256="444c3c33686c6b2d8d45ad03af5041b7bc910ef44ac10216237d8e3e8d6e7025") version("3.2.0", sha256="91aa6529ef9e6b57368e7b5b1f04a3bd26a39419d30e35a3c5c66ef073926b56") version("2.8.3", sha256="370afd0fbe6d73c448a33c10fbe4a7254f92077f5a217317d0a32a9231293015") version("2.1.4", sha256="d990dccc07b4d9ba548326d11c5c5e34fa88b34fe113cb5377da03dda29f23f2") From e720d8640a27a25a2e77cbb8b43a0eca4c78cb40 Mon Sep 17 00:00:00 2001 From: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> Date: Mon, 30 Oct 2023 06:16:25 -0500 Subject: [PATCH 400/806] ISPC: Drop ncurses workaround in favor of patch (#39662) ISPC had a bug in their lookup for NCurses, this was fixed upstream and backported here. --- var/spack/repos/builtin/packages/ispc/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/ispc/package.py b/var/spack/repos/builtin/packages/ispc/package.py index 1da8faa0fd6956..8bef2ce2f584c1 100644 --- a/var/spack/repos/builtin/packages/ispc/package.py +++ b/var/spack/repos/builtin/packages/ispc/package.py @@ -67,10 +67,15 @@ class Ispc(CMakePackage): sha256="d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc", ) + # Fix library lookup for NCurses in CMake + patch( + "https://patch-diff.githubusercontent.com/raw/ispc/ispc/pull/2638.patch?full_index=1", + when="@1.18:1.20", + sha256="3f7dae8d4a683fca2a6157bbcb7cbe9692ff2094b0f4afaf29be121c02b0b3ad", + ) + def setup_build_environment(self, env): if self.spec.satisfies("@1.18.0:"): - env.append_flags("LDFLAGS", "-lcurses") - env.append_flags("LDFLAGS", "-ltinfo") env.append_flags("LDFLAGS", "-lz") def patch(self): From d03289c38b77722c082854b5244c53a4addc2f09 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:22:31 +0100 Subject: [PATCH 401/806] Fetch recola from gitlab and add a new version of collier (#40651) Co-authored-by: jmcarcell --- .../repos/builtin/packages/collier/package.py | 1 + .../repos/builtin/packages/recola/package.py | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/collier/package.py b/var/spack/repos/builtin/packages/collier/package.py index c29704e354b0d2..98407d7c22076a 100644 --- a/var/spack/repos/builtin/packages/collier/package.py +++ b/var/spack/repos/builtin/packages/collier/package.py @@ -18,6 +18,7 @@ class Collier(CMakePackage): maintainers("vvolkl") + version("1.2.8", sha256="5cb24ce24ba1f62b7a96c655b31e9fddccc603eff31e60f9033b16354a6afd89") version("1.2.7", sha256="fde4b144a17c1bf5aa2ceaa86c71c79da10c9de8fec7bd33c8bffb4198acd5ca") version("1.2.6", sha256="b0d517868c71d2d1b8b6d3e0c370a43c9eb18ea8393a6e80070a5a2206f7de36") version("1.2.5", sha256="3ec58a975ff0c3b1ca870bc38973476c923ff78fd3dd5850e296037852b94a8b") diff --git a/var/spack/repos/builtin/packages/recola/package.py b/var/spack/repos/builtin/packages/recola/package.py index 80d11f2433444d..c4cb8d3c5f48b1 100644 --- a/var/spack/repos/builtin/packages/recola/package.py +++ b/var/spack/repos/builtin/packages/recola/package.py @@ -15,20 +15,27 @@ class Recola(CMakePackage): tags = ["hep"] - homepage = "https://recola.hepforge.org" - url = "https://recola.hepforge.org/downloads/?f=recola2-2.2.3.tar.gz" + homepage = "https://recola.gitlab.io/recola2/" + url = "https://gitlab.com/recola/recola2/-/archive/2.2.4/recola2-2.2.4.tar.gz" maintainers("vvolkl") variant("python", default=True, description="Build py-recola python bindings.") - version("2.2.4", sha256="16bdefb633d51842b4d32c39a43118d7052302cd63be456a473557e9b7e0316e") - version("2.2.3", sha256="db0f5e448ed603ac4073d4bbf36fd74f401a22876ad390c0d02c815a78106c5f") + version("2.2.4", sha256="212ae6141bc5de38c50be3e0c6947a3b0752aeb463cf850c22cfed5e61b1a64b") + version("2.2.3", sha256="8dc25798960c272434fcde93817ed92aad82b2a7cf07438bb4deb5688d301086") + version("2.2.2", sha256="a64cf2b4aa213289dfab6e2255a77264f281cd0ac85f5e9770c82b815272c5c9") + version("2.2.0", sha256="a64cf2b4aa213289dfab6e2255a77264f281cd0ac85f5e9770c82b815272c5c9") version( "1.4.3", url="https://recola.hepforge.org/downloads/?f=recola-1.4.3.tar.gz", sha256="f6a7dce6e1f09821ba919524f786557984f216c001ab63e7793e8aa9a8560ceb", ) + version( + "1.4.0", + url="https://recola.hepforge.org/downloads/?f=recola-1.4.0.tar.gz", + sha256="dc7db5ac9456dda2e6c03a63ad642066b0b5e4ceb8cae1f2a13ab33b35caaba8", + ) depends_on("collier") depends_on("recola-sm") From 2f3801196d353ab4e7cb4c9cda35eaeb96ed40f9 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 30 Oct 2023 12:52:47 +0100 Subject: [PATCH 402/806] binary_distribution.py: fix type annotation singleton (#40572) Convince the language server it's really just a BinaryCacheIndex, otherwise it defaults to thinking it's Singleton, and can't autocomplete etc. --- lib/spack/spack/binary_distribution.py | 38 +++++++++++--------------- lib/spack/spack/bootstrap/core.py | 2 +- lib/spack/spack/ci.py | 2 +- lib/spack/spack/test/conftest.py | 6 ++-- 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index af04dfefb07113..6a49ab445e71d1 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -25,7 +25,7 @@ import warnings from contextlib import closing, contextmanager from gzip import GzipFile -from typing import Dict, List, NamedTuple, Optional, Tuple, Union +from typing import Dict, List, NamedTuple, Optional, Set, Tuple from urllib.error import HTTPError, URLError import llnl.util.filesystem as fsys @@ -53,6 +53,7 @@ import spack.util.crypto import spack.util.file_cache as file_cache import spack.util.gpg +import spack.util.path import spack.util.spack_json as sjson import spack.util.spack_yaml as syaml import spack.util.timer as timer @@ -130,25 +131,25 @@ class BinaryCacheIndex: mean we should have paid the price to update the cache earlier? """ - def __init__(self, cache_root): - self._index_cache_root = cache_root + def __init__(self, cache_root: Optional[str] = None): + self._index_cache_root: str = cache_root or binary_index_location() # the key associated with the serialized _local_index_cache self._index_contents_key = "contents.json" # a FileCache instance storing copies of remote binary cache indices - self._index_file_cache = None + self._index_file_cache: Optional[file_cache.FileCache] = None # stores a map of mirror URL to index hash and cache key (index path) - self._local_index_cache = None + self._local_index_cache: Optional[dict] = None # hashes of remote indices already ingested into the concrete spec # cache (_mirrors_for_spec) - self._specs_already_associated = set() + self._specs_already_associated: Set[str] = set() # mapping from mirror urls to the time.time() of the last index fetch and a bool indicating # whether the fetch succeeded or not. - self._last_fetch_times = {} + self._last_fetch_times: Dict[str, float] = {} # _mirrors_for_spec is a dictionary mapping DAG hashes to lists of # entries indicating mirrors where that concrete spec can be found. @@ -158,7 +159,7 @@ def __init__(self, cache_root): # - the concrete spec itself, keyed by ``spec`` (including the # full hash, since the dag hash may match but we want to # use the updated source if available) - self._mirrors_for_spec = {} + self._mirrors_for_spec: Dict[str, dict] = {} def _init_local_index_cache(self): if not self._index_file_cache: @@ -529,15 +530,8 @@ def binary_index_location(): return spack.util.path.canonicalize_path(cache_root) -def _binary_index(): - """Get the singleton store instance.""" - return BinaryCacheIndex(binary_index_location()) - - -#: Singleton binary_index instance -binary_index: Union[BinaryCacheIndex, llnl.util.lang.Singleton] = llnl.util.lang.Singleton( - _binary_index -) +#: Default binary cache index instance +BINARY_INDEX: BinaryCacheIndex = llnl.util.lang.Singleton(BinaryCacheIndex) # type: ignore class NoOverwriteException(spack.error.SpackError): @@ -2255,7 +2249,7 @@ def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False): tty.debug("No Spack mirrors are currently configured") return {} - results = binary_index.find_built_spec(spec, mirrors_to_check=mirrors_to_check) + results = BINARY_INDEX.find_built_spec(spec, mirrors_to_check=mirrors_to_check) # The index may be out-of-date. If we aren't only considering indices, try # to fetch directly since we know where the file should be. @@ -2264,7 +2258,7 @@ def get_mirrors_for_spec(spec=None, mirrors_to_check=None, index_only=False): # We found a spec by the direct fetch approach, we might as well # add it to our mapping. if results: - binary_index.update_spec(spec, results) + BINARY_INDEX.update_spec(spec, results) return results @@ -2280,12 +2274,12 @@ def update_cache_and_get_specs(): Throws: FetchCacheError """ - binary_index.update() - return binary_index.get_all_built_specs() + BINARY_INDEX.update() + return BINARY_INDEX.get_all_built_specs() def clear_spec_cache(): - binary_index.clear() + BINARY_INDEX.clear() def get_keys(install=False, trust=False, force=False, mirrors=None): diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index d7b39b02e0cc38..9fb04453c42590 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -214,7 +214,7 @@ def _install_and_test( with spack.config.override(self.mirror_scope): # This index is currently needed to get the compiler used to build some # specs that we know by dag hash. - spack.binary_distribution.binary_index.regenerate_spec_cache() + spack.binary_distribution.BINARY_INDEX.regenerate_spec_cache() index = spack.binary_distribution.update_cache_and_get_specs() if not index: diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index fca28362540623..cda7a622d69187 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -932,7 +932,7 @@ def generate_gitlab_ci_yaml( # Speed up staging by first fetching binary indices from all mirrors try: - bindist.binary_index.update() + bindist.BINARY_INDEX.update() except bindist.FetchCacheError as e: tty.warn(e) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 3505d7213046f2..514b1e91542403 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -495,7 +495,7 @@ def mock_binary_index(monkeypatch, tmpdir_factory): tmpdir = tmpdir_factory.mktemp("mock_binary_index") index_path = tmpdir.join("binary_index").strpath mock_index = spack.binary_distribution.BinaryCacheIndex(index_path) - monkeypatch.setattr(spack.binary_distribution, "binary_index", mock_index) + monkeypatch.setattr(spack.binary_distribution, "BINARY_INDEX", mock_index) yield @@ -1710,8 +1710,8 @@ def inode_cache(): @pytest.fixture(autouse=True) def brand_new_binary_cache(): yield - spack.binary_distribution.binary_index = llnl.util.lang.Singleton( - spack.binary_distribution._binary_index + spack.binary_distribution.BINARY_INDEX = llnl.util.lang.Singleton( + spack.binary_distribution.BinaryCacheIndex ) From cc09e88a4a733978202c4594224acce8ac47b68c Mon Sep 17 00:00:00 2001 From: RichardBuntLinaro <133871029+RichardBuntLinaro@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:43:07 +0000 Subject: [PATCH 403/806] linaro-forge: add v23.0.4 (#40772) --- var/spack/repos/builtin/packages/linaro-forge/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/linaro-forge/package.py b/var/spack/repos/builtin/packages/linaro-forge/package.py index 7724f87a29ce6d..e67613fef1f621 100644 --- a/var/spack/repos/builtin/packages/linaro-forge/package.py +++ b/var/spack/repos/builtin/packages/linaro-forge/package.py @@ -23,6 +23,9 @@ class LinaroForge(Package): maintainers("kenche-linaro") if platform.machine() in ["aarch64", "arm64"]: + version( + "23.0.4", sha256="a19e6b247badaa52f78815761f71fb95a565024b7f79bdfb2f602f18b47a881c" + ) version( "23.0.3", sha256="a7e23ef2a187f8e2d6a6692cafb931c9bb614abf58e45ea9c2287191c4c44f02" ) @@ -40,6 +43,9 @@ class LinaroForge(Package): "21.1.3", sha256="4a4ff7372aad5a31fc9e18b7b6c493691ab37d8d44a3158584e62d1ab82b0eeb" ) elif platform.machine() == "ppc64le": + version( + "23.0.4", sha256="927c1ba733cf63027243060586b196f8262e545d898712044c359a6af6fc5795" + ) version( "23.0.3", sha256="5ff9770f4bc4a2df4bac8a2544a9d6bad9fba2556420fa2e659e5c21e741caf7" ) @@ -60,6 +66,9 @@ class LinaroForge(Package): "21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e" ) elif platform.machine() == "x86_64": + version( + "23.0.4", sha256="41a81840a273ea9a232efb4f031149867c5eff7a6381d787e18195f1171caac4" + ) version( "23.0.3", sha256="f2a010b94838f174f057cd89d12d03a89ca946163536eab178dd1ec877cdc27f" ) From 1ba530bff532bfda92de7f9748a37ce98f797f96 Mon Sep 17 00:00:00 2001 From: Brian Vanderwende Date: Mon, 30 Oct 2023 06:53:57 -0600 Subject: [PATCH 404/806] Get utilities necessary for successful PIO build (#40502) --- var/spack/repos/builtin/packages/parallelio/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/parallelio/package.py b/var/spack/repos/builtin/packages/parallelio/package.py index f3bcbaa99ad1a6..1841fe6bf6ccc8 100644 --- a/var/spack/repos/builtin/packages/parallelio/package.py +++ b/var/spack/repos/builtin/packages/parallelio/package.py @@ -55,6 +55,11 @@ class Parallelio(CMakePackage): depends_on("parallel-netcdf", type="link", when="+pnetcdf") resource(name="genf90", git="https://github.com/PARALLELIO/genf90.git", tag="genf90_200608") + resource( + name="CMake_Fortran_utils", + git="https://github.com/CESM-Development/CMake_Fortran_utils.git", + tag="CMake_Fortran_utils_150308", + ) # Allow argument mismatch in gfortran versions > 10 for mpi library compatibility patch("gfortran.patch", when="@:2.5.8 +fortran %gcc@10:") From c2f3943e9e95ec9593678772e0e4e97d1861664c Mon Sep 17 00:00:00 2001 From: SXS Bot <31972027+sxs-bot@users.noreply.github.com> Date: Mon, 30 Oct 2023 05:56:05 -0700 Subject: [PATCH 405/806] spectre: add v2023.10.11 (#40463) Co-authored-by: nilsvu --- var/spack/repos/builtin/packages/spectre/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/spectre/package.py b/var/spack/repos/builtin/packages/spectre/package.py index 7b8bc9dfebb1be..df0ff30acd88db 100644 --- a/var/spack/repos/builtin/packages/spectre/package.py +++ b/var/spack/repos/builtin/packages/spectre/package.py @@ -29,6 +29,9 @@ class Spectre(CMakePackage): generator("ninja") version("develop", branch="develop") + version( + "2023.10.11", sha256="f25d17bc80cc49ebdd81726326701fe9ecd2b6705d86e6e3d48d9e4a458c8aff" + ) version( "2023.09.07", sha256="2375117df09d99a2716d445ff51d151422467bd42cd38b5f1177d2d40cb90916" ) From 1ebf1c8d1c87e1d8675353b261b55c9c0c3b1371 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 30 Oct 2023 06:08:23 -0700 Subject: [PATCH 406/806] must: remove release candidates (#40476) --- var/spack/repos/builtin/packages/must/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/must/package.py b/var/spack/repos/builtin/packages/must/package.py index 1b3b0b152dc52b..5d6c36bb044e84 100644 --- a/var/spack/repos/builtin/packages/must/package.py +++ b/var/spack/repos/builtin/packages/must/package.py @@ -21,11 +21,8 @@ class Must(CMakePackage): version("1.9.0", sha256="24998f4ca6bce718d69347de90798600f2385c21266c2d1dd39a87dd8bd1fba4") version("1.8.0", sha256="9754fefd2e4c8cba812f8b56a5dd929bc84aa599b2509305e1eb8518be0a8a39") - version("1.8.0-rc1", sha256="49fd2487fbd1aa41f4252c7e37efebd3f6ff48218c88e82f34b88d59348fe406") - version( - "1.8-preview", sha256="67b4b061db7a893e22a6610e2085072716d11738bc6cc3cb3ffd60d6833e8bad" - ) version("1.7.2", sha256="616c54b7487923959df126ac4b47ae8c611717d679fe7ec29f57a89bf0e2e0d0") + variant("test", default=False, description="Enable must internal tests") variant("tsan", default=True, description="Enable thread sanitizer") variant("graphviz", default=False, description="Use to generate graphs") From 9ed9a541c9d7be3729339f810c50496ff6ceb63a Mon Sep 17 00:00:00 2001 From: marcost2 <52476474+marcost2@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:19:42 -0300 Subject: [PATCH 407/806] freesurfer: fix support for linux (#39864) * Load the script file during enviroment setup so that all the enviroment variables are set properly * Patch csh/tcsh so that it uses spacks via env * Update SHA for latest version * Extend shebang to perl and fix up the regex --- .../builtin/packages/freesurfer/package.py | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/freesurfer/package.py b/var/spack/repos/builtin/packages/freesurfer/package.py index 4bf4a4a2f5ef71..0e7188db06c51a 100644 --- a/var/spack/repos/builtin/packages/freesurfer/package.py +++ b/var/spack/repos/builtin/packages/freesurfer/package.py @@ -3,7 +3,11 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import glob +import os + from spack.package import * +from spack.util.environment import EnvironmentModifications class Freesurfer(Package): @@ -14,11 +18,11 @@ class Freesurfer(Package): # A license is required, but is free to obtain. license_required = True - license_files = ["./license.txt"] + license_files = [".license"] maintainers("robgics") - version("7.4.1", sha256="eb6545d1ffdee17a90abd2e7dc444aa1091a6138e257f6f956a7ff214635b092") + version("7.4.1", sha256="313a96caeb246c5985f483633b5cf43f86ed8f7ccc6d6acfac8eedb638443010") version("7.4.0", sha256="6b65c2edf3b88973ced0324269a88966c541f221b799337c6570c38c2f884431") version("7.3.2", sha256="58518d3ee5abd2e05109208aed2eef145c4e3b994164df8c4e0033c1343b9e56") version("7.2.0", sha256="4cca78602f898bf633428b9d82cbb9b07e3ab97a86c620122050803779c86d62") @@ -27,6 +31,9 @@ class Freesurfer(Package): depends_on("mesa-glu") depends_on("qt") + depends_on("tcsh") + depends_on("bc") + depends_on("perl") def url_for_version(self, version): return "https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/{0}/freesurfer-linux-centos7_x86_64-{1}.tar.gz".format( @@ -34,10 +41,24 @@ def url_for_version(self, version): ) def setup_run_environment(self, env): + source_file = join_path(self.prefix, "SetUpFreeSurfer.sh") env.prepend_path("PATH", self.prefix.bin) env.set("FREESURFER_HOME", self.prefix) env.set("SUBJECTS_DIR", join_path(self.prefix, "subjects")) env.set("FUNCTIONALS_DIR", join_path(self.prefix, "sessions")) + env.append_path("PERL5LIB", join_path(self.prefix, "mni/share/perl5")) + env.append_path("PATH", join_path(self.prefix, "mni/bin")) + env.extend(EnvironmentModifications.from_sourcing_file(source_file)) def install(self, spec, prefix): + scripts = ["sources.csh", "SetUpFreeSurfer.csh"] + scripts.extend(glob.glob("bin/*")) + scripts.extend(glob.glob("subjects/**/*", recursive=True)) + scripts.extend(glob.glob("fsfast/bin/*", recursive=True)) + scripts.extend(glob.glob("mni/bin/*", recursive=True)) + for s in scripts: + if os.path.isfile(s): + filter_file(r"(\/usr)?(\/local?)\/bin\/tcsh", "/usr/bin/env -S tcsh", s) + filter_file(r"(\/usr)?(\/local?)\/bin\/csh", "/usr/bin/env -S csh", s) + filter_file(r"(\/usr)?(\/local)?\/bin\/perl", "/usr/bin/env -S perl", s) install_tree(".", prefix) From 060a1ff2f3261f94e3137e43ac8c50534983b63b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 30 Oct 2023 15:07:30 +0100 Subject: [PATCH 408/806] tty: flush immediately (#40774) --- lib/spack/llnl/util/tty/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py index b3975cc08d7d88..ec7bd665374c08 100644 --- a/lib/spack/llnl/util/tty/__init__.py +++ b/lib/spack/llnl/util/tty/__init__.py @@ -211,6 +211,7 @@ def info(message, *args, **kwargs): stream.write(line + "\n") else: stream.write(indent + _output_filter(str(arg)) + "\n") + stream.flush() def verbose(message, *args, **kwargs): From b1b8500ebaf1387913220925f129f635fa9c1f66 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 30 Oct 2023 15:29:27 +0100 Subject: [PATCH 409/806] ci: print colored specs in concretization progress (#40711) --- lib/spack/spack/ci.py | 44 ++++++++----------- lib/spack/spack/environment/environment.py | 5 ++- lib/spack/spack/spec.py | 12 +++-- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 4 +- 4 files changed, 33 insertions(+), 32 deletions(-) diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index cda7a622d69187..afad3b7a45197e 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -25,6 +25,7 @@ import llnl.util.filesystem as fs import llnl.util.tty as tty from llnl.util.lang import memoized +from llnl.util.tty.color import cescape, colorize import spack import spack.binary_distribution as bindist @@ -97,15 +98,6 @@ def _remove_reserved_tags(tags): return [tag for tag in tags if tag not in SPACK_RESERVED_TAGS] -def _get_spec_string(spec): - format_elements = ["{name}{@version}", "{%compiler}"] - - if spec.architecture: - format_elements.append(" {arch=architecture}") - - return spec.format("".join(format_elements)) - - def _spec_deps_key(s): return "{0}/{1}".format(s.name, s.dag_hash(7)) @@ -210,22 +202,22 @@ def _print_staging_summary(spec_labels, stages, mirrors_to_check, rebuild_decisi tty.msg("Staging summary ([x] means a job needs rebuilding):") for stage_index, stage in enumerate(stages): - tty.msg(" stage {0} ({1} jobs):".format(stage_index, len(stage))) + tty.msg(f" stage {stage_index} ({len(stage)} jobs):") - for job in sorted(stage): + for job in sorted(stage, key=lambda j: (not rebuild_decisions[j].rebuild, j)): s = spec_labels[job] - rebuild = rebuild_decisions[job].rebuild reason = rebuild_decisions[job].reason - reason_msg = " ({0})".format(reason) if reason else "" - tty.msg( - " [{1}] {0} -> {2}{3}".format( - job, "x" if rebuild else " ", _get_spec_string(s), reason_msg - ) - ) - if rebuild_decisions[job].mirrors: - tty.msg(" found on the following mirrors:") - for murl in rebuild_decisions[job].mirrors: - tty.msg(" {0}".format(murl)) + reason_msg = f" ({reason})" if reason else "" + spec_fmt = "{name}{@version}{%compiler}{/hash:7}" + if rebuild_decisions[job].rebuild: + status = colorize("@*g{[x]} ") + msg = f" {status}{s.cformat(spec_fmt)}{reason_msg}" + else: + msg = f"{s.format(spec_fmt)}{reason_msg}" + if rebuild_decisions[job].mirrors: + msg += f" [{', '.join(rebuild_decisions[job].mirrors)}]" + msg = colorize(f" @K - {cescape(msg)}@.") + tty.msg(msg) def _compute_spec_deps(spec_list): @@ -2258,13 +2250,13 @@ def build_name(self): spec.architecture, self.build_group, ) - tty.verbose( + tty.debug( "Generated CDash build name ({0}) from the {1}".format(build_name, spec.name) ) return build_name build_name = os.environ.get("SPACK_CDASH_BUILD_NAME") - tty.verbose("Using CDash build name ({0}) from the environment".format(build_name)) + tty.debug("Using CDash build name ({0}) from the environment".format(build_name)) return build_name @property # type: ignore @@ -2278,11 +2270,11 @@ def build_stamp(self): Returns: (str) current CDash build stamp""" build_stamp = os.environ.get("SPACK_CDASH_BUILD_STAMP") if build_stamp: - tty.verbose("Using build stamp ({0}) from the environment".format(build_stamp)) + tty.debug("Using build stamp ({0}) from the environment".format(build_stamp)) return build_stamp build_stamp = cdash_build_stamp(self.build_group, time.time()) - tty.verbose("Generated new build stamp ({0})".format(build_stamp)) + tty.debug("Generated new build stamp ({0})".format(build_stamp)) return build_stamp @property # type: ignore diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 0b36351d4e853c..9998161df2b45d 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1525,7 +1525,10 @@ def _concretize_separately(self, tests=False): ): batch.append((i, concrete)) percentage = (j + 1) / len(args) * 100 - tty.verbose(f"{duration:6.1f}s [{percentage:3.0f}%] {root_specs[i]}") + tty.verbose( + f"{duration:6.1f}s [{percentage:3.0f}%] {concrete.cformat('{hash:7}')} " + f"{root_specs[i].colored_str}" + ) sys.stdout.flush() # Add specs in original order diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 3f3056d0fac0f0..6030ff2681a29a 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -4491,10 +4491,16 @@ def format_path( def __str__(self): sorted_nodes = [self] + sorted( - self.traverse(root=False), key=lambda x: x.name or x.abstract_hash + self.traverse(root=False), key=lambda x: (x.name, x.abstract_hash) ) - spec_str = " ^".join(d.format() for d in sorted_nodes) - return spec_str.strip() + return " ^".join(d.format() for d in sorted_nodes).strip() + + @property + def colored_str(self): + sorted_nodes = [self] + sorted( + self.traverse(root=False), key=lambda x: (x.name, x.abstract_hash) + ) + return " ^".join(d.cformat() for d in sorted_nodes).strip() def install_status(self): """Helper for tree to print DB install status.""" diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index e5475a7bdc6ed5..196037585fcdce 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -150,7 +150,7 @@ default: - spack python -c "import os,sys; print(os.path.expandvars(sys.stdin.read()))" < "${SPACK_CI_CONFIG_ROOT}/${PIPELINE_MIRROR_TEMPLATE}" > "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" - spack config add -f "${SPACK_CI_CONFIG_ROOT}/mirrors.yaml" - - spack -v + - spack -v --color=always --config-scope "${SPACK_CI_CONFIG_ROOT}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}" --config-scope "${SPACK_CI_CONFIG_ROOT}/${SPACK_TARGET_PLATFORM}/${SPACK_TARGET_ARCH}" @@ -203,7 +203,7 @@ default: - spack --version - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME} - spack env activate --without-view . - - spack -v + - spack -v --color=always ci generate --check-index-only --buildcache-destination "${PUSH_BUILDCACHE_DEPRECATED}" --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir" From 47ac2b8d09714a7f0dd4b2f856b8dd4eff82b421 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Mon, 30 Oct 2023 13:33:22 -0400 Subject: [PATCH 410/806] squashfuse: add version 0.5.0 (#40775) --- var/spack/repos/builtin/packages/squashfuse/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/squashfuse/package.py b/var/spack/repos/builtin/packages/squashfuse/package.py index 939b738c7d99a4..40aec33134b405 100644 --- a/var/spack/repos/builtin/packages/squashfuse/package.py +++ b/var/spack/repos/builtin/packages/squashfuse/package.py @@ -10,12 +10,12 @@ class Squashfuse(AutotoolsPackage): """squashfuse - Mount SquashFS archives using FUSE""" homepage = "https://github.com/vasi/squashfuse" - url = "https://github.com/vasi/squashfuse/releases/download/0.1.104/squashfuse-0.1.104.tar.gz" git = "https://github.com/vasi/squashfuse.git" maintainers("haampie") version("master", branch="master") + version("0.5.0", sha256="d7602c7a3b1d0512764547d27cb8cc99d1b21181e1c9819e76461ee96c2ab4d9") version("0.1.104", sha256="aa52460559e0d0b1753f6b1af5c68cfb777ca5a13913285e93f4f9b7aa894b3a") version("0.1.103", sha256="42d4dfd17ed186745117cfd427023eb81effff3832bab09067823492b6b982e7") @@ -51,6 +51,14 @@ class Squashfuse(AutotoolsPackage): depends_on("automake", type="build", when="@master") depends_on("libtool", type="build", when="@master") + def url_for_version(self, version): + url = "https://github.com/vasi/squashfuse/releases/download/" + if version == Version("0.5.0"): + url += "v{}/squashfuse-{}.tar.gz" + else: + url += "{}/squashfuse-{}.tar.gz" + return url.format(version, version) + def flag_handler(self, name, flags): if name == "cflags" and "+min_size" in self.spec: if "-Os" in self.compiler.opt_flags: From e9ca16ab07bd61b16f0f88f0a61f8f398986075e Mon Sep 17 00:00:00 2001 From: MatthewLieber <77356607+MatthewLieber@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:01:48 -0400 Subject: [PATCH 411/806] adding sha for OMB 7.3 release (#40784) Co-authored-by: Matt Lieber --- var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py index 8c9f50a3d1aa2d..6a755fcbf11f89 100644 --- a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py +++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py @@ -20,6 +20,7 @@ class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage, ROCmPackage): maintainers("natshineman", "harisubramoni", "MatthewLieber") + version("7.3", sha256="8fa25b8aaa34e4b07ab3a4f30b7690ab46b038b08d204a853a9b6aa7bdb02f2f") version("7.2", sha256="1a4e1f2aab0e65404b3414e23bd46616184b69b6231ce9313d9c630bd6e633c1") version("7.1-1", sha256="85f4dd8be1df31255e232852769ae5b82e87a5fb14be2f8eba1ae9de8ffe391a") version("7.1", sha256="2c4c931ecaf19e8ab72a393ee732e25743208c9a58fa50023e3fac47064292cc") From f228c7cbcc2272f10f7e7e7cabe77d8d8d966c58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:11:53 +0100 Subject: [PATCH 412/806] build(deps): bump black from 23.9.1 to 23.10.1 in /lib/spack/docs (#40680) Bumps [black](https://github.com/psf/black) from 23.9.1 to 23.10.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.9.1...23.10.1) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 31403710385657..10e19f093e5eec 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -8,6 +8,6 @@ pygments==2.16.1 urllib3==2.0.7 pytest==7.4.3 isort==5.12.0 -black==23.9.1 +black==23.10.1 flake8==6.1.0 mypy==1.6.1 From 4ef433b64d0d39a3465a4bd175752f18505201a1 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 30 Oct 2023 18:22:55 -0500 Subject: [PATCH 413/806] Add hdf5 version 1.14.3. (#40786) Add hdf5 version 1.10.11. Update version condition for adding h5pfc->h5fc symlink. File h5pfc exists in versions 1.10.10 and 1.10.22. --- var/spack/repos/builtin/packages/hdf5/package.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index dbd9acf7d6e4e9..0a3903e8015478 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -20,7 +20,7 @@ class Hdf5(CMakePackage): """ homepage = "https://portal.hdfgroup.org" - url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.8/src/hdf5-1.10.8.tar.gz" + url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.14/hdf5-1.14.3/src/hdf5-1.14.3.tar.gz" list_url = "https://support.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 git = "https://github.com/HDFGroup/hdf5.git" @@ -41,6 +41,11 @@ class Hdf5(CMakePackage): # Odd versions are considered experimental releases # Even versions are maintenance versions + version( + "1.14.3", + sha256="09cdb287aa7a89148c1638dd20891fdbae08102cf433ef128fd345338aa237c7", + preferred=True, + ) version( "1.14.2", sha256="1c342e634008284a8c2794c8e7608e2eaf26d01d445fb3dfd7f33cb2fb51ac53", @@ -71,6 +76,11 @@ class Hdf5(CMakePackage): sha256="a62dcb276658cb78e6795dd29bf926ed7a9bc4edf6e77025cd2c689a8f97c17a", preferred=True, ) + version( + "1.10.11", + sha256="341684c5c0976b8c7e6951735a400275a90693604464cac73e9f323c696fc79c", + preferred=True, + ) version( "1.10.10", sha256="a6877ab7bd5d769d2d68618fdb54beb50263dcc2a8c157fe7e2186925cdb02db", @@ -657,7 +667,7 @@ def ensure_parallel_compiler_wrappers(self): # 1.10.6 and 1.12.0. The current develop versions do not produce 'h5pfc' # at all. Here, we make sure that 'h5pfc' is available when Fortran and # MPI support are enabled (only for versions that generate 'h5fc'). - if self.spec.satisfies("@1.8.22:1.8," "1.10.6:1.10," "1.12.0:1.12" "+fortran+mpi"): + if self.spec.satisfies("@1.8.22:1.8," "1.10.6:1.10.9," "1.12.0:1.12" "+fortran+mpi"): with working_dir(self.prefix.bin): # No try/except here, fix the condition above instead: symlink("h5fc", "h5pfc") From a095c8113d5065bcb3d529269bc1de268df6791f Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 31 Oct 2023 01:55:33 +0100 Subject: [PATCH 414/806] dd4hep: Add tag for version 1.27 (#40776) --- var/spack/repos/builtin/packages/dd4hep/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index 459582022bfe1d..77c3934bdff7fd 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -24,6 +24,7 @@ class Dd4hep(CMakePackage): tags = ["hep"] version("master", branch="master") + version("1.27", sha256="51fbd0f91f2511261d9b01e4b3528c658bea1ea1b5d67b25b6812615e782a902") version("1.26", sha256="de2cc8d8e99217e23fdf0a55b879d3fd3a864690d6660e7808f1ff99eb47f384") version("1.25.1", sha256="6267e76c74fbb346aa881bc44de84434ebe788573f2997a189996252fc5b271b") version("1.25", sha256="102a049166a95c2f24fc1c03395a819fc4501c175bf7915d69ccc660468d094d") From 3a0f9ce22602c3027bb6e0cf088abf4204604bd9 Mon Sep 17 00:00:00 2001 From: Freifrau von Bleifrei Date: Tue, 31 Oct 2023 02:28:52 +0100 Subject: [PATCH 415/806] selalib: add (sca)lapack dependency (#40667) * selalib: add (sca)lapack dependency * selalib: change when "-mpi" to "~mpi" --- var/spack/repos/builtin/packages/selalib/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/selalib/package.py b/var/spack/repos/builtin/packages/selalib/package.py index 23b56afc217f35..d36a4d20538ca3 100644 --- a/var/spack/repos/builtin/packages/selalib/package.py +++ b/var/spack/repos/builtin/packages/selalib/package.py @@ -39,10 +39,12 @@ class Selalib(CMakePackage): depends_on("fgsl") depends_on("git", type=("build", "run", "test")) depends_on("hdf5+fortran+cxx") + depends_on("lapack", when="~mpi") with when("+mpi"): depends_on("mpi") depends_on("fftw+mpi") depends_on("hdf5+mpi") + depends_on("scalapack") depends_on("python@3.0.0:", type=("build")) # beware: compiling w/ zfp may throw type mismatch errors depends_on("zfp+fortran", when="+compression") From 702a2250faec5d72734004404450453dff877908 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 30 Oct 2023 18:54:31 -0700 Subject: [PATCH 416/806] docs: update `license()` docs with examples and links (#40598) - [x] Add links to information people are going to want to know when adding license information to their packages (namely OSI licenses and SPDX identifiers). - [x] Update the packaging docs for `license()` with Spack as an example for `when=`. After all, it's a dual-licensed package that changed once in the past. - [x] Add link to https://spdx.org/licenses/ in the `spack create` boilerplate as well. --- lib/spack/docs/packaging_guide.rst | 55 ++++++++++++++++++++++++------ lib/spack/spack/cmd/create.py | 1 + 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index d488ae0c7f1825..fad913cb0f7c70 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -3765,7 +3765,7 @@ Similarly, ``spack install example +feature build_system=autotools`` will pick the ``AutotoolsBuilder`` and invoke ``./configure --with-my-feature``. Dependencies are always specified in the package class. When some dependencies -depend on the choice of the build system, it is possible to use when conditions as +depend on the choice of the build system, it is possible to use when conditions as usual: .. code-block:: python @@ -3783,7 +3783,7 @@ usual: depends_on("cmake@3.18:", when="@2.0:", type="build") depends_on("cmake@3:", type="build") - # Specify extra build dependencies used only in the configure script + # Specify extra build dependencies used only in the configure script with when("build_system=autotools"): depends_on("perl", type="build") depends_on("pkgconfig", type="build") @@ -6831,25 +6831,58 @@ the adapter role is to "emulate" a method resolution order like the one represen Specifying License Information ------------------------------ -A significant portion of software that Spack packages is open source. Most open -source software is released under one or more common open source licenses. -Specifying the specific license that a package is released under in a project's -`package.py` is good practice. To specify a license, find the SPDX identifier for -a project and then add it using the license directive: +Most of the software in Spack is open source, and most open source software is released +under one or more `common open source licenses `_. +Specifying the license that a package is released under in a project's +`package.py` is good practice. To specify a license, find the `SPDX identifier +`_ for a project and then add it using the license +directive: .. code-block:: python license("") +For example, the SPDX ID for the Apache Software License, version 2.0 is ``Apache-2.0``, +so you'd write: + +.. code-block:: python + + license("Apache-2.0") + +Or, for a dual-licensed package like Spack, you would use an `SPDX Expression +`_ with both of its +licenses: + +.. code-block:: python + + license("Apache-2.0 OR MIT") + Note that specifying a license without a when clause makes it apply to all versions and variants of the package, which might not actually be the case. For example, a project might have switched licenses at some point or have certain build configurations that include files that are licensed differently. -To account for this, you can specify when licenses should be applied. For -example, to specify that a specific license identifier should only apply -to versionup to and including 1.5, you could write the following directive: +Spack itself used to be under the ``LGPL-2.1`` license, until it was relicensed +in version ``0.12`` in 2018. + +You can specify when a ``license()`` directive applies using with a ``when=`` +clause, just like other directives. For example, to specify that a specific +license identifier should only apply to versions up to ``0.11``, but another +license should apply for later versions, you could write: .. code-block:: python - license("...", when="@:1.5") + license("LGPL-2.1", when="@:0.11") + license("Apache-2.0 OR MIT", when="@0.12:") + +Note that unlike for most other directives, the ``when=`` constraints in the +``license()`` directive can't intersect. Spack needs to be able to resolve +exactly one license identifier expression for any given version. To specify +*multiple* licenses, use SPDX expressions and operators as above. The operators +you probably care most about are: + +* ``OR``: user chooses one license to adhere to; and +* ``AND``: user has to adhere to all the licenses. +You may also care about `license exceptions +`_ that use the ``WITH`` operator, +e.g. ``Apache-2.0 WITH LLVM-exception``. diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 32c6ed13e174b7..946e9bc8b960d3 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -64,6 +64,7 @@ class {class_name}({base_class_name}): # maintainers("github_user1", "github_user2") # FIXME: Add the SPDX identifier of the project's license below. + # See https://spdx.org/licenses/ for a list. license("UNKNOWN") {versions} From 81997ae6d606d458bf88d7e755c4226ec49a5a3f Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Mon, 30 Oct 2023 22:12:09 -0400 Subject: [PATCH 417/806] Added NVML and cgroup support to the slurm package (#40638) * Added NVML support to the slurm package * dbus package is required for cgroup support * Fixing formatting * Style fix * Added PAM support * Added ROCm SMI support --- .../repos/builtin/packages/dbus/package.py | 4 ++++ .../repos/builtin/packages/slurm/package.py | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 69cda7b4771ddd..37a1b8a694b907 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -29,6 +29,7 @@ class Dbus(AutotoolsPackage): version("1.8.2", sha256="5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08") variant("xml_docs", default=False, description="Build XML documentation") + variant("system-socket", default="default", description="Location for the DBus system socket") depends_on("pkgconfig", type="build") depends_on("docbook-xml", type="build") @@ -41,6 +42,9 @@ class Dbus(AutotoolsPackage): def configure_args(self): args = ["--disable-systemd", "--disable-launchd"] args += self.enable_or_disable("xml-docs", variant="xml_docs") + socket = self.spec.variants["system-socket"].value + if socket != "default": + args += ["--with-system-socket={0}".format(socket)] return args @run_after("install") diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py index 61214702b08710..aa4f126018bf39 100644 --- a/var/spack/repos/builtin/packages/slurm/package.py +++ b/var/spack/repos/builtin/packages/slurm/package.py @@ -129,6 +129,10 @@ class Slurm(AutotoolsPackage): description="Set system configuration path (possibly /etc/slurm)", ) variant("restd", default=False, description="Enable the slurmrestd server") + variant("nvml", default=False, description="Enable NVML autodetection") + variant("cgroup", default=False, description="Enable cgroup plugin") + variant("pam", default=False, description="Enable PAM support") + variant("rsmi", default=False, description="Enable ROCm SMI support") # TODO: add variant for BG/Q and Cray support @@ -156,6 +160,11 @@ class Slurm(AutotoolsPackage): depends_on("libyaml", when="+restd") depends_on("libjwt", when="+restd") + depends_on("cuda", when="+nvml") + depends_on("dbus", when="+cgroup") + depends_on("linux-pam", when="+pam") + depends_on("rocm-smi-lib", when="+rsmi") + executables = ["^srun$", "^salloc$"] @classmethod @@ -213,6 +222,15 @@ def configure_args(self): else: args.append("--without-pmix") + if spec.satisfies("+nvml"): + args.append(f"--with-nvml={spec['cuda'].prefix}") + + if spec.satisfies("+pam"): + args.append(f"--with-pam_dir={spec['linux-pam'].prefix}") + + if spec.satisfies("+rsmi"): + args.append(f"--with-rsmi={spec['rocm-smi-lib'].prefix}") + sysconfdir = spec.variants["sysconfdir"].value if sysconfdir != "PREFIX/etc": args.append("--sysconfdir={0}".format(sysconfdir)) From 160bfd881ddcb32a9b0fa1bd6eabe2f70b9bba41 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 31 Oct 2023 10:04:53 +0100 Subject: [PATCH 418/806] tutorial: replace zlib -> gmake to avoid deprecated versions (#40769) --- .../stacks/tutorial/spack.yaml | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index 0bc36ce8e44447..9e43de3cf0b366 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -1,9 +1,4 @@ spack: - config: - # allow deprecated versions in concretizations - # required for zlib - deprecated: true - view: false packages: all: @@ -13,11 +8,11 @@ spack: definitions: - gcc_system_packages: - matrix: - - - zlib - - zlib@1.2.8 - - zlib@1.2.8 cflags=-O3 + - - gmake + - gmake@4.3 + - gmake@4.3 cflags=-O3 - tcl - - tcl ^zlib@1.2.8 cflags=-O3 + - tcl ^gmake@4.3 cflags=-O3 - hdf5 - hdf5~mpi - hdf5+hl+mpi ^mpich @@ -26,13 +21,13 @@ spack: - gcc@12.1.0 - mpileaks - lmod - - macsio@1.1+scr^scr@2.0.0~fortran^silo~fortran^hdf5~fortran + - macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran - ['%gcc@11.3.0'] - gcc_old_packages: - - zlib%gcc@10.4.0 + - gmake%gcc@10.4.0 - clang_packages: - matrix: - - [zlib, tcl ^zlib@1.2.8] + - [gmake, tcl ^gmake@4.3] - ['%clang@14.0.0'] - gcc_spack_built_packages: - matrix: @@ -41,7 +36,7 @@ spack: - [^openblas, ^netlib-lapack] - ['%gcc@12.1.0'] - matrix: - - [py-scipy^openblas, armadillo^openblas, netlib-lapack, openmpi, mpich, elpa^mpich] + - [py-scipy ^openblas, armadillo ^openblas, netlib-lapack, openmpi, mpich, elpa ^mpich] - ['%gcc@12.1.0'] specs: - $gcc_system_packages From 6933e1c3cbba4bfb92296459fc8d5d125ef262e7 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 31 Oct 2023 12:58:33 +0100 Subject: [PATCH 419/806] ci: bump tutorial image and toolchain (#40795) --- share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml | 2 +- .../cloud_pipelines/stacks/tutorial/spack.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 196037585fcdce..880aeb6811a1d0 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -621,7 +621,7 @@ aws-isc-aarch64-build: tutorial-generate: extends: [ ".tutorial", ".generate-x86_64"] - image: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-05-07 + image: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-10-30 tutorial-build: extends: [ ".tutorial", ".build" ] diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index 9e43de3cf0b366..1ff435bc9bfb7c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -18,26 +18,26 @@ spack: - hdf5+hl+mpi ^mpich - trilinos - trilinos +hdf5 ^hdf5+hl+mpi ^mpich - - gcc@12.1.0 + - gcc@12 - mpileaks - lmod - macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran - - ['%gcc@11.3.0'] + - ['%gcc@11'] - gcc_old_packages: - - gmake%gcc@10.4.0 + - gmake%gcc@10 - clang_packages: - matrix: - [gmake, tcl ^gmake@4.3] - - ['%clang@14.0.0'] + - ['%clang@14'] - gcc_spack_built_packages: - matrix: - [netlib-scalapack] - [^mpich, ^openmpi] - [^openblas, ^netlib-lapack] - - ['%gcc@12.1.0'] + - ['%gcc@12'] - matrix: - [py-scipy ^openblas, armadillo ^openblas, netlib-lapack, openmpi, mpich, elpa ^mpich] - - ['%gcc@12.1.0'] + - ['%gcc@12'] specs: - $gcc_system_packages - $gcc_old_packages @@ -48,7 +48,7 @@ spack: pipeline-gen: - build-job: image: - name: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-05-07 + name: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-10-30 entrypoint: [''] cdash: build-group: Spack Tutorial From 40a5c1ff2d54a4fc547205cb1068bcf5c21981e3 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 31 Oct 2023 15:08:41 +0100 Subject: [PATCH 420/806] spack checksum: fix error when initial filter yields empty list (#40799) --- lib/spack/spack/stage.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 03689c39bacfd6..7418b5a44ee694 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -893,9 +893,9 @@ def interactive_version_filter( """ # Find length of longest string in the list for padding version_filter = initial_verion_filter or VersionList([":"]) + max_len = max(len(str(v)) for v in url_dict) if url_dict else 0 sorted_and_filtered = [v for v in url_dict if v.satisfies(version_filter)] sorted_and_filtered.sort(reverse=True) - max_len = max(len(str(v)) for v in sorted_and_filtered) orig_url_dict = url_dict # only copy when using editor to modify print_header = True VERSION_COLOR = spack.spec.VERSION_COLOR @@ -903,21 +903,20 @@ def interactive_version_filter( if print_header: has_filter = version_filter != VersionList([":"]) header = [] - if not sorted_and_filtered: - header.append("No versions selected") - elif len(sorted_and_filtered) == len(orig_url_dict): + if len(orig_url_dict) > 0 and len(sorted_and_filtered) == len(orig_url_dict): header.append( f"Selected {llnl.string.plural(len(sorted_and_filtered), 'version')}" ) else: header.append( - f"Selected {len(sorted_and_filtered)} of {len(orig_url_dict)} versions" + f"Selected {len(sorted_and_filtered)} of " + f"{llnl.string.plural(len(orig_url_dict), 'version')}" ) if sorted_and_filtered and known_versions: num_new = sum(1 for v in sorted_and_filtered if v not in known_versions) header.append(f"{llnl.string.plural(num_new, 'new version')}") if has_filter: - header.append(colorize(f"Filtered by {VERSION_COLOR}{version_filter}@.")) + header.append(colorize(f"Filtered by {VERSION_COLOR}@@{version_filter}@.")) version_with_url = [ colorize( From e420a685a9749216deeb48db96d62d7bd76bfab3 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 31 Oct 2023 09:38:20 -0600 Subject: [PATCH 421/806] Seacas: Update for latest seacas releaes version (#40698) --- var/spack/repos/builtin/packages/seacas/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py index 7a7d48c4087cef..44b4b6a6034cce 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -31,6 +31,9 @@ class Seacas(CMakePackage): # ###################### Versions ########################## version("master", branch="master") + version( + "2023-10-24", sha256="f93bf0327329c302ed3feb6adf2e3968f01ec325084a457b2c2dbbf6c4f751a2" + ) version( "2023-05-30", sha256="3dd982841854466820a3902163ad1cf1b3fbab65ed7542456d328f2d1a5373c1" ) @@ -132,7 +135,8 @@ class Seacas(CMakePackage): variant("x11", default=True, description="Compile with X11") # ###################### Dependencies ########################## - depends_on("cmake@3.17:", type="build") + depends_on("cmake@3.22:", when="@2023-10-24:", type="build") + depends_on("cmake@3.17:", when="@:2023-05-30", type="build") depends_on("mpi", when="+mpi") # Always depends on netcdf-c @@ -140,9 +144,10 @@ class Seacas(CMakePackage): depends_on("netcdf-c@4.8.0:~mpi", when="~mpi") depends_on("hdf5+hl~mpi", when="~mpi") + depends_on("fmt@10.1.0", when="@2023-10-24:") + depends_on("fmt@9.1.0", when="@2022-10-14:2023-05-30") depends_on("fmt@8.1.0:9", when="@2022-03-04:2022-05-16") - depends_on("fmt@9.1.0", when="@2022-10-14") - depends_on("fmt@9.1.0:", when="@2023-05-30") + depends_on("matio", when="+matio") depends_on("libx11", when="+x11") From cd6bb9e159ea18c46f399958558dfeb39bfb04a0 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 31 Oct 2023 16:52:53 +0100 Subject: [PATCH 422/806] spack checksum: improve signature (#40800) --- lib/spack/spack/cmd/checksum.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index 9e5e32b3b76c7a..f927d2d922a26d 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import argparse import re import sys @@ -67,11 +66,18 @@ def setup_parser(subparser): modes_parser.add_argument( "--verify", action="store_true", default=False, help="verify known package checksums" ) - subparser.add_argument("package", help="package or spec. for example cmake or cmake@3.18") + subparser.add_argument("package", help="name or spec (e.g. `cmake` or `cmake@3.18`)") subparser.add_argument( - "versions", nargs=argparse.REMAINDER, help="versions to generate checksums for" + "versions", + nargs="*", + help="checksum these specific versions (if omitted, Spack searches for remote versions)", ) arguments.add_common_arguments(subparser, ["jobs"]) + subparser.epilog = ( + "examples:\n" + " `spack checksum zlib@1.2` autodetects versions 1.2.0 to 1.2.13 from the remote\n" + " `spack checksum zlib 1.2.13` checksums exact version 1.2.13 directly without search\n" + ) def checksum(parser, args): From 544a121248ff2f3b526b5c38cc4b14affb96ee57 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 31 Oct 2023 17:50:13 +0100 Subject: [PATCH 423/806] Fix interaction of spec literals that propagate variants with unify:false (#40789) * Add tests to ensure variant propagation syntax can round-trip to/from string * Add a regression test for the bug in 35298 * Reconstruct the spec constraints in the worker process Specs do not preserve any information on propagation of variants when round-tripping to/from JSON (which we use to pickle), but preserve it when round-tripping to/from strings. Therefore, we pass a spec literal to the worker and reconstruct the Spec objects there. --- lib/spack/spack/environment/environment.py | 3 ++- lib/spack/spack/test/env.py | 26 +++++++++++++++++++ lib/spack/spack/test/spec_syntax.py | 25 ++++++++++++++++++ .../packages/client-not-foo/package.py | 17 ++++++++++++ .../packages/parent-foo/package.py | 21 +++++++++++++++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin.mock/packages/client-not-foo/package.py create mode 100644 var/spack/repos/builtin.mock/packages/parent-foo/package.py diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 9998161df2b45d..cd2a5a7533b0b9 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1484,7 +1484,7 @@ def _concretize_separately(self, tests=False): for uspec, uspec_constraints in zip(self.user_specs, self.user_specs.specs_as_constraints): if uspec not in old_concretized_user_specs: root_specs.append(uspec) - args.append((i, uspec_constraints, tests)) + args.append((i, [str(x) for x in uspec_constraints], tests)) i += 1 # Ensure we don't try to bootstrap clingo in parallel @@ -2403,6 +2403,7 @@ def _concretize_from_constraints(spec_constraints, tests=False): def _concretize_task(packed_arguments) -> Tuple[int, Spec, float]: index, spec_constraints, tests = packed_arguments + spec_constraints = [Spec(x) for x in spec_constraints] with tty.SuppressOutput(msg_enabled=False): start = time.time() spec = _concretize_from_constraints(spec_constraints, tests) diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py index e88af08761979f..f6b89e2108e866 100644 --- a/lib/spack/spack/test/env.py +++ b/lib/spack/spack/test/env.py @@ -690,3 +690,29 @@ def test_removing_spec_from_manifest_with_exact_duplicates( assert "zlib" in manifest.read_text() with ev.Environment(tmp_path) as env: assert len(env.user_specs) == 1 + + +@pytest.mark.regression("35298") +@pytest.mark.only_clingo("Propagation not supported in the original concretizer") +def test_variant_propagation_with_unify_false(tmp_path, mock_packages): + """Spack distributes concretizations to different processes, when unify:false is selected and + the number of roots is 2 or more. When that happens, the specs to be concretized need to be + properly reconstructed on the worker process, if variant propagation was requested. + """ + manifest = tmp_path / "spack.yaml" + manifest.write_text( + """ + spack: + specs: + - parent-foo ++foo + - c + concretizer: + unify: false + """ + ) + with ev.Environment(tmp_path) as env: + env.concretize() + + root = env.matching_spec("parent-foo") + for node in root.traverse(): + assert node.satisfies("+foo") diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index d731fcd31c1ac5..e7a760dc93037d 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -525,6 +525,31 @@ def _specfile_for(spec_str, filename): ], "zlib@git.foo/bar", ), + # Variant propagation + ( + "zlib ++foo", + [ + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, "zlib"), + Token(TokenType.PROPAGATED_BOOL_VARIANT, "++foo"), + ], + "zlib++foo", + ), + ( + "zlib ~~foo", + [ + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, "zlib"), + Token(TokenType.PROPAGATED_BOOL_VARIANT, "~~foo"), + ], + "zlib~~foo", + ), + ( + "zlib foo==bar", + [ + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, "zlib"), + Token(TokenType.PROPAGATED_KEY_VALUE_PAIR, "foo==bar"), + ], + "zlib foo==bar", + ), ], ) def test_parse_single_spec(spec_str, tokens, expected_roundtrip): diff --git a/var/spack/repos/builtin.mock/packages/client-not-foo/package.py b/var/spack/repos/builtin.mock/packages/client-not-foo/package.py new file mode 100644 index 00000000000000..03c9374b3acce1 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/client-not-foo/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 ClientNotFoo(Package): + """This package has a variant "foo", which is False by default.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/c-1.0.tar.gz" + + version("1.0", md5="0123456789abcdef0123456789abcdef") + + variant("foo", default=False, description="") diff --git a/var/spack/repos/builtin.mock/packages/parent-foo/package.py b/var/spack/repos/builtin.mock/packages/parent-foo/package.py new file mode 100644 index 00000000000000..61d15231f70822 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/parent-foo/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 ParentFoo(Package): + """This package has a variant "foo", which is True by default, and depends on another + package which has the same variant defaulting to False. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/c-1.0.tar.gz" + + version("1.0", md5="0123456789abcdef0123456789abcdef") + + variant("foo", default=True, description="") + + depends_on("client-not-foo") From 14cb923dd8d9c60425d98c1ac3b98417d956951b Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam Date: Tue, 31 Oct 2023 22:48:32 +0530 Subject: [PATCH 424/806] add new recipe for rocm packages- amdsmi (#39270) * add new recipe for rocm packages- amdsmilib * update tags,maintainers list --- .../repos/builtin/packages/amdsmi/package.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 var/spack/repos/builtin/packages/amdsmi/package.py diff --git a/var/spack/repos/builtin/packages/amdsmi/package.py b/var/spack/repos/builtin/packages/amdsmi/package.py new file mode 100644 index 00000000000000..5c293799b80a2e --- /dev/null +++ b/var/spack/repos/builtin/packages/amdsmi/package.py @@ -0,0 +1,49 @@ +# Copyright 2013-2023 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 Amdsmi(CMakePackage): + """The AMD System Management Interface Library, or AMD SMI library, + is a C library for Linux that provides a user space interface for + applications to monitor and control AMD device.""" + + homepage = "https://github.com/RadeonOpenCompute/amdsmi" + url = "https://github.com/RadeonOpenCompute/amdsmi/archive/refs/tags/rocm-5.6.0.tar.gz" + + tags = ["rocm"] + maintainers("srekolam", "renjithravindrankannath") + libraries = ["libamd_smi"] + + version("5.6.0", sha256="595c9d6d79d9071290b2f19ab4ef9222c8d2983b4322b3143fcd9d0b1ce0f6d8") + version("5.5.1", sha256="b794c7fd562fd92f2c9f2bbdc2d5dded7486101fcd4598f2e8c3484c9a939281") + version("5.5.0", sha256="dcfbd96e93afcf86b1261464e008e9ef7e521670871a1885e6eaffc7cdc8f555") + + depends_on("cmake@3.11:", type="build") + depends_on("python@3.6:", type="run") + depends_on("py-virtualenv", type="build") + depends_on("llvm@14:", type="build") + depends_on("pkgconfig", type="build") + depends_on("libdrm", type="build") + depends_on("py-pyyaml", type="build") + + @classmethod + def determine_version(cls, lib): + match = re.search(r"lib\S*\.so\.\d+\.\d+\.(\d)(\d\d)(\d\d)", lib) + if match: + ver = "{0}.{1}.{2}".format( + int(match.group(1)), int(match.group(2)), int(match.group(3)) + ) + else: + ver = None + return ver + + def cmake_args(self): + args = [] + args.append(self.define("BUILD_TESTS", "ON")) + args.append("-DCMAKE_INSTALL_LIBDIR=lib") + return args From f9c0a15ba058e63a6dbcc9674184438687313464 Mon Sep 17 00:00:00 2001 From: jalcaraz Date: Tue, 31 Oct 2023 12:28:16 -0700 Subject: [PATCH 425/806] TAU: Added dyninst variant (#40790) * Added dyninst variant * Added dyninst variant and fixed some issues * Update package.py * Removed whitespace * Update package.py * Update package.py * Fixed conflicting version --------- Co-authored-by: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> --- var/spack/repos/builtin/packages/tau/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index b61ab5753ca64c..9d5252cad2ef46 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -99,6 +99,7 @@ class Tau(Package): variant( "x86_64", default=False, description="Force build for x86 Linux instead of auto-detect" ) + variant("dyninst", default=False, description="Activates dyninst support") depends_on("cmake@3.14:", type="build", when="%clang") depends_on("zlib-api", type="link") @@ -128,6 +129,7 @@ class Tau(Package): depends_on("rocm-smi-lib", when="@2.32.1: +rocm") depends_on("java", type="run") # for paraprof depends_on("oneapi-level-zero", when="+level_zero") + depends_on("dyninst@12.3.0:", when="+dyninst") # Elf only required from 2.28.1 on conflicts("+elf", when="@:2.28.0") @@ -136,6 +138,7 @@ class Tau(Package): # ADIOS2, SQLite only available from 2.29.1 on conflicts("+adios2", when="@:2.29.1") conflicts("+sqlite", when="@:2.29.1") + conflicts("+dyninst", when="@:2.32.1") patch("unwind.patch", when="@2.29.0") @@ -337,6 +340,15 @@ def install(self, spec, prefix): break options.append("-pythonlib=%s" % lib_path) + if "+dyninst" in spec: + options.append("-dyninst=%s" % spec["dyninst"].prefix) + if "+tbb" not in spec: + options.append("-tbb=%s" % spec["intel-tbb"].prefix) + if "+boost" not in spec: + options.append("-boost=%s" % spec["boost"].prefix) + if "+elf" not in spec: + options.append("-elf=%s" % spec["elfutils"].prefix) + compiler_specific_options = self.set_compiler_options(spec) options.extend(compiler_specific_options) configure(*options) From 2f2d9ae30dad64cc654c48154e1c4ef65c03eba4 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 31 Oct 2023 13:19:12 -0700 Subject: [PATCH 426/806] Fix cflags requirements (#40639) --- lib/spack/spack/solver/concretize.lp | 21 +++++++++++-------- .../spack/test/concretize_requirements.py | 14 +++++++++---- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 92ba77ad8270fd..26c790775949fa 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -696,15 +696,18 @@ requirement_group_satisfied(node(ID, Package), X) :- % flags if their only source is from a requirement. This is overly-specific % and should use a more-generic approach like in https://github.com/spack/spack/pull/37180 -{ attr("node_flag", node(ID, A1), A2, A3) } :- - requirement_group_member(Y, Package, X), - activate_requirement(node(ID, Package), X), - imposed_constraint(Y,"node_flag_set", A1, A2, A3). - -{ attr("node_flag_source", node(ID, A1), A2, node(ID, A3)) } :- - requirement_group_member(Y, Package, X), - activate_requirement(node(ID, Package), X), - imposed_constraint(Y,"node_flag_source", A1, A2, A3). +{ attr("node_flag", node(ID, Package), FlagType, FlagValue) } :- + requirement_group_member(ConditionID, Package, RequirementID), + activate_requirement(node(ID, Package), RequirementID), + pkg_fact(Package, condition_effect(ConditionID, EffectID)), + imposed_constraint(EffectID, "node_flag_set", Package, FlagType, FlagValue). + +{ attr("node_flag_source", node(NodeID1, Package1), FlagType, node(NodeID2, Package2)) } :- + requirement_group_member(ConditionID, Package1, RequirementID), + activate_requirement(node(NodeID1, Package1), RequirementID), + pkg_fact(Package1, condition_effect(ConditionID, EffectID)), + imposed_constraint(EffectID, "node_flag_source", Package1, FlagType, Package2), + imposed_packages(NodeID2, Package2). requirement_weight(node(ID, Package), Group, W) :- W = #min { diff --git a/lib/spack/spack/test/concretize_requirements.py b/lib/spack/spack/test/concretize_requirements.py index cd51006088403b..d5295691ce0a8b 100644 --- a/lib/spack/spack/test/concretize_requirements.py +++ b/lib/spack/spack/test/concretize_requirements.py @@ -469,16 +469,22 @@ def test_one_package_multiple_oneof_groups(concretize_scope, test_repo): @pytest.mark.regression("34241") -def test_require_cflags(concretize_scope, test_repo): +def test_require_cflags(concretize_scope, mock_packages): """Ensures that flags can be required from configuration.""" conf_str = """\ packages: - y: + mpich2: require: cflags="-g" + mpi: + require: mpich cflags="-O1" """ update_packages_config(conf_str) - spec = Spec("y").concretized() - assert spec.satisfies("cflags=-g") + + spec_mpich2 = Spec("mpich2").concretized() + assert spec_mpich2.satisfies("cflags=-g") + + spec_mpi = Spec("mpi").concretized() + assert spec_mpi.satisfies("mpich cflags=-O1") def test_requirements_for_package_that_is_not_needed(concretize_scope, test_repo): From 26649e71f90fafae1425c3a7b416b9c11899846a Mon Sep 17 00:00:00 2001 From: Samuel Li Date: Tue, 31 Oct 2023 14:53:09 -0600 Subject: [PATCH 427/806] Update sperr (#40626) * update SPERR package * remove blank line * update SPERR to be version 0.7.1 * a little clean up * bound versions that require zstd * add USE_ZSTD * add libpressio-sperr version upbound * update libpressio-sperr * address review comments * improve format --------- Co-authored-by: Samuel Li Co-authored-by: Samuel Li --- .../packages/libpressio-sperr/package.py | 14 +++++----- .../repos/builtin/packages/sperr/package.py | 27 ++++++++++++------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/libpressio-sperr/package.py b/var/spack/repos/builtin/packages/libpressio-sperr/package.py index cd636f2fc9c070..35576e33a7a08a 100644 --- a/var/spack/repos/builtin/packages/libpressio-sperr/package.py +++ b/var/spack/repos/builtin/packages/libpressio-sperr/package.py @@ -10,17 +10,19 @@ class LibpressioSperr(CMakePackage): """A LibPressio plugin for Sperr""" homepage = "https://github.com/robertu94/libpressio-sperr" - url = "https://github.com/robertu94/libpressio-sperr/archive/refs/tags/0.0.1.tar.gz" + url = "https://github.com/robertu94/libpressio-sperr/archive/refs/tags/0.0.4.tar.gz" git = homepage maintainers("robertu94") - depends_on("libpressio@0.88.0:", when="@0.0.3:") - depends_on("libpressio@:0.88.0", when="@:0.0.2") - depends_on("sperr") - depends_on("pkgconfig", type="build") - version("master", branch="master") + version("0.0.4", sha256="97f2879460b1a28ed8ebf0c300c1cf7ceeb2c7aa7b8a1307ed19bf8cce0b7941") version("0.0.3", sha256="e0d1fd083419aaaa243cbf780b7de17aeb96533000071088aa21ec238d358ecc") version("0.0.2", sha256="61995d687f9e7e798e17ec7238d19d917890dc0ff5dec18293b840c4d6f8c115") version("0.0.1", sha256="e2c164822708624b97654046b42abff704594cba6537d6d0646d485bdf2d03ca") + + depends_on("libpressio@0.88.0:", when="@0.0.3:") + depends_on("libpressio@:0.88.0", when="@:0.0.2") + depends_on("sperr@:0.6.2", when="@:0.0.3") + depends_on("sperr@0.7.1:", when="@0.0.4:") + depends_on("pkgconfig", type="build") diff --git a/var/spack/repos/builtin/packages/sperr/package.py b/var/spack/repos/builtin/packages/sperr/package.py index 131a6a7fdadc77..5def42991f7d5b 100644 --- a/var/spack/repos/builtin/packages/sperr/package.py +++ b/var/spack/repos/builtin/packages/sperr/package.py @@ -12,23 +12,32 @@ class Sperr(CMakePackage): # Package info homepage = "https://github.com/NCAR/SPERR" - url = "https://github.com/NCAR/SPERR/archive/refs/tags/v0.6.2.tar.gz" + url = "https://github.com/NCAR/SPERR/archive/refs/tags/v0.7.1.tar.gz" git = "https://github.com/NCAR/SPERR.git" maintainers("shaomeng", "robertu94") # Versions version("main", branch="main") + version("0.7.1", sha256="1c3f46200be365427d1f57f5873f1b0b6dbcd297de4603a47a7fa3f41b273d79") version("0.6.2", sha256="d986997e2d79a1f27146ad02c623359976a1e72a1ab0d957e128d430cda3782d") version("0.5", sha256="20ad48c0e7599d3e5866e024d0c49648eb817f72ad5459f5468122cf14a97171") - depends_on("git", type="build") - depends_on("zstd", type=("build", "link"), when="+zstd") - depends_on("pkgconfig", type=("build"), when="+zstd") - + # Variants variant("shared", description="build shared libaries", default=True) - variant("zstd", description="use zstd for more compression", default=True) - variant("openmp", description="use openmp in 3D inputs", default=True) + variant("openmp", description="use OpenMP in 3D inputs", default=True) variant("utilities", description="build SPERR CLI utilities", default=True) + variant("zstd", description="use ZSTD for more compression", default=True, when="@:0.6.2") + variant( + "bundle_zstd", + description="Use SPERR bundled ZSTD. Keep it off in SPACK builds.", + default=False, + when="@:0.6.2", + ) + + # Depend ons + depends_on("git", type="build") + depends_on("pkgconfig", type=("build"), when="+zstd") + depends_on("zstd", type=("build", "link"), when="@:0.6.2+zstd") def cmake_args(self): # ensure the compiler supports OpenMP if it is used @@ -37,11 +46,11 @@ def cmake_args(self): args = [ self.define_from_variant("BUILD_SHARED_LIBS", "shared"), - self.define_from_variant("USE_ZSTD", "zstd"), self.define_from_variant("USE_OMP", "openmp"), self.define_from_variant("BUILD_CLI_UTILITIES", "utilities"), + self.define_from_variant("USE_ZSTD", "zstd"), + self.define_from_variant("USE_BUNDLED_ZSTD", "bundle_zstd"), "-DSPERR_PREFER_RPATH=OFF", - "-DUSE_BUNDLED_ZSTD=OFF", "-DBUILD_UNIT_TESTS=OFF", ] return args From 58e531508928a931925cc8166fe49fed63bc674f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 31 Oct 2023 16:25:24 -0500 Subject: [PATCH 428/806] PyTorch: build with external gloo (#40759) * PyTorch: build with external gloo * Fix gloo compilation with GCC 11 * undeprecate * py-torch+cuda+gloo requires gloo+cuda --- .../repos/builtin/packages/gloo/package.py | 5 +++- .../builtin/packages/py-horovod/package.py | 2 +- .../builtin/packages/py-torch/package.py | 26 ++++++++++++------- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/gloo/package.py b/var/spack/repos/builtin/packages/gloo/package.py index 4ca7d55f43a168..ec4503900e9b4c 100644 --- a/var/spack/repos/builtin/packages/gloo/package.py +++ b/var/spack/repos/builtin/packages/gloo/package.py @@ -13,7 +13,10 @@ class Gloo(CMakePackage, CudaPackage): git = "https://github.com/facebookincubator/gloo.git" version("master", branch="master") - version("2021-05-21", commit="c22a5cfba94edf8ea4f53a174d38aa0c629d070f") # py-torch@1.10: + version("2023-05-19", commit="597accfd79f5b0f9d57b228dec088ca996686475") # py-torch@2.1: + version("2023-01-17", commit="10909297fedab0a680799211a299203e53515032") # py-torch@2.0 + version("2022-05-18", commit="5b143513263133af2b95547e97c07cebeb72bf72") # py-torch@1.13 + version("2021-05-21", commit="c22a5cfba94edf8ea4f53a174d38aa0c629d070f") # py-torch@1.10:1.12 version("2021-05-04", commit="6f7095f6e9860ce4fd682a7894042e6eba0996f1") # py-torch@1.9 version("2020-09-18", commit="3dc0328fe6a9d47bd47c0c6ca145a0d8a21845c6") # py-torch@1.7:1.8 version("2020-03-17", commit="113bde13035594cafdca247be953610b53026553") # py-torch@1.5:1.6 diff --git a/var/spack/repos/builtin/packages/py-horovod/package.py b/var/spack/repos/builtin/packages/py-horovod/package.py index 0e0bc5fd7f6068..5e221c0296824f 100644 --- a/var/spack/repos/builtin/packages/py-horovod/package.py +++ b/var/spack/repos/builtin/packages/py-horovod/package.py @@ -225,7 +225,7 @@ class PyHorovod(PythonPackage, CudaPackage): conflicts( "controllers=gloo", when="@:0.20.0 platform=darwin", msg="Gloo cannot be compiled on MacOS" ) - # FIXME + # https://github.com/horovod/horovod/issues/3996 conflicts("^py-torch@2.1:") # https://github.com/horovod/horovod/pull/1835 diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 96cae5404be448..21a68b069f322f 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -246,14 +246,14 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # depends_on("xnnpack@2021-02-22", when="@1.8:1.9+xnnpack") # depends_on("xnnpack@2020-03-23", when="@1.6:1.7+xnnpack") depends_on("mpi", when="+mpi") - # https://github.com/pytorch/pytorch/issues/60270 - # depends_on("gloo@2023-05-19", when="@2.1:+gloo") - # depends_on("gloo@2023-01-17", when="@2.0+gloo") - # depends_on("gloo@2022-05-18", when="@1.13:1+gloo") - # depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo") - # depends_on("gloo@2021-05-04", when="@1.9+gloo") - # depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo") - # depends_on("gloo@2020-03-17", when="@1.6+gloo") + depends_on("gloo@2023-05-19", when="@2.1:+gloo") + depends_on("gloo@2023-01-17", when="@2.0+gloo") + depends_on("gloo@2022-05-18", when="@1.13:1+gloo") + depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo") + depends_on("gloo@2021-05-04", when="@1.9+gloo") + depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo") + depends_on("gloo@2020-03-17", when="@1.6+gloo") + depends_on("gloo+cuda", when="@1.6:+gloo+cuda") # https://github.com/pytorch/pytorch/issues/60331 # depends_on("onnx@1.14.1", when="@2.1:+onnx_ml") # depends_on("onnx@1.13.1", when="@2.0+onnx_ml") @@ -270,6 +270,13 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): depends_on("py-six", type="test") depends_on("py-psutil", type="test") + # https://github.com/pytorch/pytorch/issues/90448 + patch( + "https://github.com/pytorch/pytorch/pull/97270.patch?full_index=1", + sha256="beb3fb57746cf8443f5caa6e08b2f8f4d4822c1e11e0c912134bd166c6a0ade7", + when="@1.10:2.0", + ) + # Fix BLAS being overridden by MKL # https://github.com/pytorch/pytorch/issues/60328 patch( @@ -628,8 +635,7 @@ def enable_or_disable(variant, keyword="USE", var=None, newer=False): # env.set("USE_SYSTEM_LIBS", "ON") # https://github.com/pytorch/pytorch/issues/60329 # env.set("USE_SYSTEM_CPUINFO", "ON") - # https://github.com/pytorch/pytorch/issues/60270 - # env.set("USE_SYSTEM_GLOO", "ON") + env.set("USE_SYSTEM_GLOO", "ON") env.set("USE_SYSTEM_FP16", "ON") env.set("USE_SYSTEM_PTHREADPOOL", "ON") env.set("USE_SYSTEM_PSIMD", "ON") From 343ed8a3faa9927045a26b9b569a261811e61716 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 31 Oct 2023 22:27:00 +0100 Subject: [PATCH 429/806] force color in subshell if not SPACK_COLOR (#40782) --- share/spack/setup-env.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index b5f434863595f4..91a601e652c386 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -98,7 +98,7 @@ _spack_shell_wrapper() { if [ "$_sp_arg" = "-h" ] || [ "$_sp_arg" = "--help" ]; then command spack cd -h else - LOC="$(spack location $_sp_arg "$@")" + LOC="$(SPACK_COLOR="${SPACK_COLOR:-always}" spack location $_sp_arg "$@")" if [ -d "$LOC" ] ; then cd "$LOC" else @@ -136,7 +136,7 @@ _spack_shell_wrapper() { command spack env activate "$@" else # Actual call to activate: source the output. - stdout="$(command spack $_sp_flags env activate --sh "$@")" || return + stdout="$(SPACK_COLOR="${SPACK_COLOR:-always}" command spack $_sp_flags env activate --sh "$@")" || return eval "$stdout" fi ;; @@ -158,7 +158,7 @@ _spack_shell_wrapper() { command spack env deactivate -h else # No args: source the output of the command. - stdout="$(command spack $_sp_flags env deactivate --sh)" || return + stdout="$(SPACK_COLOR="${SPACK_COLOR:-always}" command spack $_sp_flags env deactivate --sh)" || return eval "$stdout" fi ;; @@ -186,7 +186,7 @@ _spack_shell_wrapper() { # Args contain --sh, --csh, or -h/--help: just execute. command spack $_sp_flags $_sp_subcommand "$@" else - stdout="$(command spack $_sp_flags $_sp_subcommand --sh "$@")" || return + stdout="$(SPACK_COLOR="${SPACK_COLOR:-always}" command spack $_sp_flags $_sp_subcommand --sh "$@")" || return eval "$stdout" fi ;; From 4738b45fb1252daf6c3c40734d514e7f845c46d0 Mon Sep 17 00:00:00 2001 From: Patrick Bridges Date: Tue, 31 Oct 2023 15:28:48 -0600 Subject: [PATCH 430/806] beatnik: mall changes for v1.0 (#40726) Co-authored-by: Massimiliano Culpo --- var/spack/repos/builtin/packages/beatnik/package.py | 4 ++-- var/spack/repos/builtin/packages/silo/package.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/beatnik/package.py b/var/spack/repos/builtin/packages/beatnik/package.py index aa39194494bbee..9afa9afa3825ce 100644 --- a/var/spack/repos/builtin/packages/beatnik/package.py +++ b/var/spack/repos/builtin/packages/beatnik/package.py @@ -14,8 +14,7 @@ class Beatnik(CMakePackage, CudaPackage, ROCmPackage): maintainers("patrickb314", "JStewart28") - # Add proper versions and checksums here. Will add 1.0 when a proper SHA is available - # version("1.0", sha256="XXX") + version("1.0", commit="ae31ef9cb44678d5ace77994b45b0778defa3d2f") version("develop", branch="develop") version("main", branch="main") @@ -55,6 +54,7 @@ class Beatnik(CMakePackage, CudaPackage, ROCmPackage): conflicts("mpich ~rocm", when="+rocm") conflicts("openmpi ~cuda", when="+cuda") conflicts("^intel-mpi") # Heffte won't build with intel MPI because of needed C++ MPI support + conflicts("^spectrum-mpi", when="^cuda@11.3:") # cuda-aware spectrum is broken with cuda 11.3: # Propagate CUDA and AMD GPU targets to cabana for cuda_arch in CudaPackage.cuda_arch_values: diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 4b4a0194e867ea..2678b0d7c56021 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -111,7 +111,6 @@ def flag_handler(self, name, flags): if "+hdf5" in spec: if spec["hdf5"].satisfies("~shared"): flags.append("-ldl") - flags.append(spec["readline"].libs.search_flags) if "+pic" in spec: if name == "cflags": From e5cebb6b6ff487500028a87a98051fda13c0a077 Mon Sep 17 00:00:00 2001 From: Luisa Burini Date: Tue, 31 Oct 2023 19:39:42 -0300 Subject: [PATCH 431/806] fix create/remove env with invalid spack.yaml (#39898) * fix create/remove env with invalid spack.yaml * fix isort error * fix env ident unittests * Fix pull request points --- lib/spack/spack/cmd/env.py | 49 ++++++++++++---------- lib/spack/spack/environment/environment.py | 19 +++++---- lib/spack/spack/test/cmd/env.py | 22 +++++++++- 3 files changed, 60 insertions(+), 30 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index cf5671aafae796..4ca98dcdccb8a6 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -380,28 +380,35 @@ def env_remove(args): and manifests embedded in repositories should be removed manually. """ read_envs = [] + bad_envs = [] for env_name in args.rm_env: - env = ev.read(env_name) - read_envs.append(env) - - if not args.yes_to_all: - answer = tty.get_yes_or_no( - "Really remove %s %s?" - % ( - string.plural(len(args.rm_env), "environment", show_n=False), - string.comma_and(args.rm_env), - ), - default=False, - ) - if not answer: - tty.die("Will not remove any environments") - - for env in read_envs: - if env.active: - tty.die("Environment %s can't be removed while activated." % env.name) - - env.destroy() - tty.msg("Successfully removed environment '%s'" % env.name) + try: + env = ev.read(env_name) + read_envs.append(env) + except spack.config.ConfigFormatError: + bad_envs.append(env_name) + + if not args.yes_to_all: + environments = string.plural(len(args.rm_env), "environment", show_n=False) + envs = string.comma_and(args.rm_env) + answer = tty.get_yes_or_no(f"Really remove {environments} {envs}?", default=False) + if not answer: + tty.die("Will not remove any environments") + + for env in read_envs: + name = env.name + if env.active: + tty.die(f"Environment {name} can't be removed while activated.") + env.destroy() + tty.msg(f"Successfully removed environment {name}") + + for bad_env_name in bad_envs: + shutil.rmtree( + spack.environment.environment.environment_dir_from_name( + bad_env_name, exists_ok=True + ) + ) + tty.msg(f"Successfully removed environment '{bad_env_name}'") # diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index cd2a5a7533b0b9..3fd75f3d70ffc2 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -330,16 +330,21 @@ def create_in_dir( if with_view is None and keep_relative: return Environment(manifest_dir) - manifest = EnvironmentManifestFile(manifest_dir) + try: + manifest = EnvironmentManifestFile(manifest_dir) - if with_view is not None: - manifest.set_default_view(with_view) + if with_view is not None: + manifest.set_default_view(with_view) - if not keep_relative and init_file is not None and str(init_file).endswith(manifest_name): - init_file = pathlib.Path(init_file) - manifest.absolutify_dev_paths(init_file.parent) + if not keep_relative and init_file is not None and str(init_file).endswith(manifest_name): + init_file = pathlib.Path(init_file) + manifest.absolutify_dev_paths(init_file.parent) + + manifest.flush() - manifest.flush() + except spack.config.ConfigFormatError as e: + shutil.rmtree(manifest_dir) + raise e return Environment(manifest_dir) diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 7d0eb37951b862..24657c30f97218 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -991,8 +991,26 @@ def test_bad_env_yaml_format(tmpdir): with tmpdir.as_cwd(): with pytest.raises(spack.config.ConfigFormatError) as e: env("create", "test", "./spack.yaml") - assert "spack.yaml:2" in str(e) - assert "'spacks' was unexpected" in str(e) + assert "'spacks' was unexpected" in str(e) + + assert "test" not in env("list") + + +def test_bad_env_yaml_format_remove(): + badenv = "badenv" + env("create", badenv) + tmpdir = spack.environment.environment.environment_dir_from_name(badenv, exists_ok=True) + filename = os.path.join(tmpdir, "spack.yaml") + with open(filename, "w") as f: + f.write( + """\ + - mpileaks +""" + ) + + assert badenv in env("list") + env("remove", "-y", badenv) + assert badenv not in env("list") def test_env_loads(install_mockery, mock_fetch): From cb018fd7ebbc8d895208c1cbdfdd277ae99d6a0d Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam Date: Wed, 1 Nov 2023 06:39:40 +0530 Subject: [PATCH 432/806] Enable address sanitizer in rocm's llvm-amdgpu package. (#40570) * enable address sanitizer in rocm's llvm-amdgpu package * remove references to 5.7.0 for now * fix style error * address review comments --- .../builtin/packages/hsakmt-roct/package.py | 1 + .../builtin/packages/llvm-amdgpu/package.py | 46 ++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py index 571cffd6577ee1..444f7adcc1adb3 100644 --- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py +++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py @@ -132,6 +132,7 @@ def install_targets(self): else: return ["install"] + def cmake_args(self): args = [] if self.spec.satisfies("@:5.4.3"): args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 905cfe1f831fff..8f975b70720c19 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -161,7 +161,7 @@ class LlvmAmdgpu(CMakePackage): # OpenMP clang toolchain looks for bitcode files in llvm/bin/../lib # as per 5.2.0 llvm code. It used to be llvm/bin/../lib/libdevice. # Below patch is to look in the old path. - patch("adjust-openmp-bitcode-directory-for-llvm-link.patch", when="@5.2.0:") + patch("adjust-openmp-bitcode-directory-for-llvm-link.patch", when="@5.2.0:5.6") # Below patch is to set the flag -mcode-object-version=none until # the below fix is available in device-libs release code. @@ -227,6 +227,44 @@ class LlvmAmdgpu(CMakePackage): when="@master +rocm-device-libs", ) + for d_version, d_shasum in [ + ("5.6.1", "4de9a57c2092edf9398d671c8a2c60626eb7daf358caf710da70d9c105490221"), + ("5.6.0", "30875d440df9d8481ffb24d87755eae20a0efc1114849a72619ea954f1e9206c"), + ]: + resource( + name="hsa-runtime", + placement="hsa-runtime", + url=f"https://github.com/RadeonOpenCompute/ROCR-Runtime/archive/rocm-{d_version}.tar.gz", + sha256=d_shasum, + when="@{0}".format(d_version), + ) + resource( + name="hsa-runtime", + placement="hsa-runtime", + git="https://github.com/RadeonOpenCompute/ROCR-Runtime.git", + branch="master", + when="@master", + ) + + for d_version, d_shasum in [ + ("5.6.1", "0a85d84619f98be26ca7a32c71f94ed3c4e9866133789eabb451be64ce739300"), + ("5.6.0", "9396a7238b547ee68146c669b10b9d5de8f1d76527c649133c75d8076a185a72"), + ]: + resource( + name="comgr", + placement="comgr", + url=f"https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-{d_version}.tar.gz", + sha256=d_shasum, + when="@{0}".format(d_version), + ) + resource( + name="comgr", + placement="comgr", + git="https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git", + branch="amd-stg-open", + when="@master", + ) + def cmake_args(self): llvm_projects = ["clang", "lld", "clang-tools-extra", "compiler-rt"] llvm_runtimes = [] @@ -292,6 +330,12 @@ def cmake_args(self): if self.spec.satisfies("@5.5.0:"): args.append("-DCLANG_DEFAULT_RTLIB=compiler-rt") args.append("-DCLANG_DEFAULT_UNWINDLIB=libgcc") + if self.spec.satisfies("@5.6.0:"): + hsainc_path = os.path.join(self.stage.source_path, "hsa-runtime/src/inc") + comgrinc_path = os.path.join(self.stage.source_path, "comgr/lib/comgr/include") + args.append("-DSANITIZER_HSA_INCLUDE_PATH={0}".format(hsainc_path)) + args.append("-DSANITIZER_COMGR_INCLUDE_PATH={0}".format(comgrinc_path)) + args.append("-DSANITIZER_AMDGPU:Bool=ON") return args @run_after("install") From f5d717cd5a6f556a0fee6c1dffdc2e29b15f138a Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Tue, 31 Oct 2023 23:08:46 -0700 Subject: [PATCH 433/806] Fix env remove indentation (#40811) --- lib/spack/spack/cmd/env.py | 40 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 4ca98dcdccb8a6..490538694bdd44 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -388,27 +388,25 @@ def env_remove(args): except spack.config.ConfigFormatError: bad_envs.append(env_name) - if not args.yes_to_all: - environments = string.plural(len(args.rm_env), "environment", show_n=False) - envs = string.comma_and(args.rm_env) - answer = tty.get_yes_or_no(f"Really remove {environments} {envs}?", default=False) - if not answer: - tty.die("Will not remove any environments") - - for env in read_envs: - name = env.name - if env.active: - tty.die(f"Environment {name} can't be removed while activated.") - env.destroy() - tty.msg(f"Successfully removed environment {name}") - - for bad_env_name in bad_envs: - shutil.rmtree( - spack.environment.environment.environment_dir_from_name( - bad_env_name, exists_ok=True - ) - ) - tty.msg(f"Successfully removed environment '{bad_env_name}'") + if not args.yes_to_all: + environments = string.plural(len(args.rm_env), "environment", show_n=False) + envs = string.comma_and(args.rm_env) + answer = tty.get_yes_or_no(f"Really remove {environments} {envs}?", default=False) + if not answer: + tty.die("Will not remove any environments") + + for env in read_envs: + name = env.name + if env.active: + tty.die(f"Environment {name} can't be removed while activated.") + env.destroy() + tty.msg(f"Successfully removed environment '{name}'") + + for bad_env_name in bad_envs: + shutil.rmtree( + spack.environment.environment.environment_dir_from_name(bad_env_name, exists_ok=True) + ) + tty.msg(f"Successfully removed environment '{bad_env_name}'") # From 7aaed4d6f3a8272c5ea6f26101aa03d9f831bb2a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 1 Nov 2023 07:10:34 +0100 Subject: [PATCH 434/806] Revert python build isolation & setuptools source install (#40796) * Revert "Improve build isolation in PythonPipBuilder (#40224)" This reverts commit 0f43074f3e93d13445ea662a13f5672f960947c2. * Revert "py-setuptools: sdist + rpath patch backport (#40205)" This reverts commit 512e41a84aa794ec0cc53872aaa6c228c36e0b49. --- lib/spack/spack/build_systems/python.py | 107 +------- .../builtin/packages/py-setuptools/package.py | 251 ++++++++++++++---- .../py-setuptools/rpath-compiler-flag.patch | 13 - 3 files changed, 208 insertions(+), 163 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index 7f71cbae7058f0..521994b1ec95f7 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -6,7 +6,6 @@ import os import re import shutil -import stat from typing import Optional import archspec @@ -26,7 +25,6 @@ from spack.directives import build_system, depends_on, extends, maintainers from spack.error import NoHeadersError, NoLibrariesError from spack.install_test import test_part -from spack.util.executable import Executable from ._checks import BaseBuilder, execute_install_time_tests @@ -369,51 +367,6 @@ def libs(self): raise NoLibrariesError(msg.format(self.spec.name, root)) -def fixup_shebangs(path: str, old_interpreter: bytes, new_interpreter: bytes): - # Recurse into the install prefix and fixup shebangs - exe = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH - dirs = [path] - hardlinks = set() - - while dirs: - with os.scandir(dirs.pop()) as entries: - for entry in entries: - if entry.is_dir(follow_symlinks=False): - dirs.append(entry.path) - continue - - # Only consider files, not symlinks - if not entry.is_file(follow_symlinks=False): - continue - - lstat = entry.stat(follow_symlinks=False) - - # Skip over files that are not executable - if not (lstat.st_mode & exe): - continue - - # Don't modify hardlinks more than once - if lstat.st_nlink > 1: - key = (lstat.st_ino, lstat.st_dev) - if key in hardlinks: - continue - hardlinks.add(key) - - # Finally replace shebangs if any. - with open(entry.path, "rb+") as f: - contents = f.read(2) - if contents != b"#!": - continue - contents += f.read() - - if old_interpreter not in contents: - continue - - f.seek(0) - f.write(contents.replace(old_interpreter, new_interpreter)) - f.truncate() - - @spack.builder.builder("python_pip") class PythonPipBuilder(BaseBuilder): phases = ("install",) @@ -511,36 +464,8 @@ def global_options(self, spec, prefix): """ return [] - @property - def _build_venv_path(self): - """Return the path to the virtual environment used for building when - python is external.""" - return os.path.join(self.spec.package.stage.path, "build_env") - - @property - def _build_venv_python(self) -> Executable: - """Return the Python executable in the build virtual environment when - python is external.""" - return Executable(os.path.join(self._build_venv_path, "bin", "python")) - def install(self, pkg, spec, prefix): """Install everything from build directory.""" - python: Executable = spec["python"].command - # Since we invoke pip with --no-build-isolation, we have to make sure that pip cannot - # execute hooks from user and system site-packages. - if spec["python"].external: - # There are no environment variables to disable the system site-packages, so we use a - # virtual environment instead. The downside of this approach is that pip produces - # incorrect shebangs that refer to the virtual environment, which we have to fix up. - python("-m", "venv", "--without-pip", self._build_venv_path) - pip = self._build_venv_python - else: - # For a Spack managed Python, system site-packages is empty/unused by design, so it - # suffices to disable user site-packages, for which there is an environment variable. - pip = python - pip.add_default_env("PYTHONNOUSERSITE", "1") - pip.add_default_arg("-m") - pip.add_default_arg("pip") args = PythonPipBuilder.std_args(pkg) + [f"--prefix={prefix}"] @@ -556,31 +481,15 @@ def install(self, pkg, spec, prefix): else: args.append(".") + pip = spec["python"].command + # Hide user packages, since we don't have build isolation. This is + # necessary because pip / setuptools may run hooks from arbitrary + # packages during the build. There is no equivalent variable to hide + # system packages, so this is not reliable for external Python. + pip.add_default_env("PYTHONNOUSERSITE", "1") + pip.add_default_arg("-m") + pip.add_default_arg("pip") with fs.working_dir(self.build_directory): pip(*args) - @spack.builder.run_after("install") - def fixup_shebangs_pointing_to_build(self): - """When installing a package using an external python, we use a temporary virtual - environment which improves build isolation. The downside is that pip produces shebangs - that point to the temporary virtual environment. This method fixes them up to point to the - underlying Python.""" - # No need to fixup shebangs if no build venv was used. (this post install function also - # runs when install was overridden in another package, so check existence of the venv path) - if not os.path.exists(self._build_venv_path): - return - - # Use sys.executable, since that's what pip uses. - interpreter = ( - lambda python: python("-c", "import sys; print(sys.executable)", output=str) - .strip() - .encode("utf-8") - ) - - fixup_shebangs( - path=self.spec.prefix, - old_interpreter=interpreter(self._build_venv_python), - new_interpreter=interpreter(self.spec["python"].command), - ) - spack.builder.run_after("install")(execute_install_time_tests) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 03487bfaa07aca..36cc6de4ee38b7 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -6,60 +6,191 @@ from spack.package import * -class PySetuptools(PythonPackage): +class PySetuptools(Package, PythonExtension): """A Python utility that aids in the process of downloading, building, upgrading, installing, and uninstalling Python packages.""" homepage = "https://github.com/pypa/setuptools" - pypi = "setuptools/setuptools-62.3.2.tar.gz" + url = "https://files.pythonhosted.org/packages/py3/s/setuptools/setuptools-62.3.2-py3-none-any.whl" + list_url = "https://pypi.org/simple/setuptools/" tags = ["build-tools"] - version("68.0.0", sha256="baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235") - version("67.6.0", sha256="2ee892cd5f29f3373097f5a814697e397cf3ce313616df0af11231e2ad118077") - version("65.5.0", sha256="512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17") - version("65.0.0", sha256="d73f8cd714a1a6691f5eb5abeeacbf313242b7aa2f5eba93776542c1aad90c6f") - version("64.0.0", sha256="9b5d2cb8df48f005825654e0cb17217418317e4d996c035f0bca7cbaeb8acf51") - version("63.4.3", sha256="521c833d1e5e1ef0869940e7f486a83de7773b9f029010ad0c2fe35453a9dad9") - version("63.0.0", sha256="7388e17e72f5c0c7279f59da950a7925910e35bc1a84e19d3affbb40da248d1d") - version("62.6.0", sha256="990a4f7861b31532871ab72331e755b5f14efbe52d336ea7f6118144dd478741") - version("62.4.0", sha256="bf8a748ac98b09d32c9a64a995a6b25921c96cc5743c1efa82763ba80ff54e91") - version("62.3.2", sha256="a43bdedf853c670e5fed28e5623403bad2f73cf02f9a2774e91def6bda8265a7") - version("59.4.0", sha256="b4c634615a0cf5b02cf83c7bedffc8da0ca439f00e79452699454da6fbd4153d") - version("58.2.0", sha256="2c55bdb85d5bb460bd2e3b12052b677879cffcf46c0c688f2e5bf51d36001145") - version("57.4.0", sha256="6bac238ffdf24e8806c61440e755192470352850f3419a52f26ffe0a1a64f465") - version("57.1.0", sha256="cfca9c97e7eebbc8abe18d5e5e962a08dcad55bb63afddd82d681de4d22a597b") - version("51.0.0", sha256="029c49fd713e9230f6a41c0298e6e1f5839f2cde7104c0ad5e053a37777e7688") - version("50.3.2", sha256="ed0519d27a243843b05d82a5e9d01b0b083d9934eaa3d02779a23da18077bd3c") - version("50.1.0", sha256="4a7708dafd2d360ce5e2ac7577374da9fb65fc867bc4cdaf461f9f834dfa6ac3") - version("49.6.0", sha256="46bd862894ed22c2edff033c758c2dc026324788d758e96788e8f7c11f4e9707") - version("49.2.0", sha256="afe9e81fee0270d3f60d52608549cc8ec4c46dada8c95640c1a00160f577acf2") - version("46.1.3", sha256="795e0475ba6cd7fa082b1ee6e90d552209995627a2a227a47c6ea93282f4bfb1") - version("44.1.1", sha256="c67aa55db532a0dadc4d2e20ba9961cbd3ccc84d544e9029699822542b5a476b") - version("44.1.0", sha256="794a96b0c1dc6f182c36b72ab70d7e90f1d59f7a132e6919bb37b4fd4d424aca") - version("43.0.0", sha256="db45ebb4a4b3b95ff0aca3ce5fe1e820ce17be393caf8902c78aa36240e8c378") - version("41.4.0", sha256="7eae782ccf36b790c21bde7d86a4f303a441cd77036b25c559a602cf5186ce4d") - version("41.3.0", sha256="9f5c54b529b2156c6f288e837e625581bb31ff94d4cfd116b8f271c589749556") - version("41.0.1", sha256="a222d126f5471598053c9a77f4b5d4f26eaa1f150ad6e01dcf1a42e185d05613") - version("41.0.0", sha256="79d30254b6fe7a8e672e43cd85f13a9f3f2a50080bc81d851143e2219ef0dcb1") - version("40.8.0", sha256="6e4eec90337e849ade7103723b9a99631c1f0d19990d6e8412dc42f5ae8b304d") - version("40.4.3", sha256="acbc5740dd63f243f46c2b4b8e2c7fd92259c2ddb55a4115b16418a2ed371b15") - version("40.2.0", sha256="47881d54ede4da9c15273bac65f9340f8929d4f0213193fa7894be384f2dcfa6") - version("39.2.0", sha256="f7cddbb5f5c640311eb00eab6e849f7701fa70bf6a183fc8a2c33dd1d1672fb2") - version("39.0.1", sha256="bec7badf0f60e7fc8153fac47836edc41b74e5d541d7692e614e635720d6a7c7") - version("25.2.0", sha256="b2757ddac2c41173140b111e246d200768f6dd314110e1e40661d0ecf9b4d6a6") - version("20.7.0", sha256="505cdf282c5f6e3a056e79f0244b8945f3632257bba8469386c6b9b396400233") - version("20.6.7", sha256="d20152ee6337323d3b6d95cd733fb719d6b4f3fbc40f61f7a48e5a1bb96478b2") - - def url_for_version(self, version): - url = self.url.rsplit("/", 1)[0] - if version.satisfies(ver("32.1.2:51.0.0")): - url += "/setuptools-{}.zip" - else: - url += "/setuptools-{}.tar.gz" - return url.format(version) - - patch("rpath-compiler-flag.patch", when="@48:58.2") + version( + "68.0.0", + sha256="11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f", + expand=False, + ) + version( + "67.6.0", + sha256="b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2", + expand=False, + ) + version( + "65.5.0", + sha256="f62ea9da9ed6289bfe868cd6845968a2c854d1427f8548d52cae02a42b4f0356", + expand=False, + ) + version( + "65.0.0", + sha256="fe9a97f68b064a6ddd4bacfb0b4b93a4c65a556d97ce906255540439d0c35cef", + expand=False, + ) + version( + "64.0.0", + sha256="63f463b90ff5e0a1422010100268fd688e15c44ae0798659013c8412963e15e4", + expand=False, + ) + version( + "63.4.3", + sha256="7f61f7e82647f77d4118eeaf43d64cbcd4d87e38af9611694d4866eb070cd10d", + expand=False, + ) + version( + "63.0.0", + sha256="045aec56a3eee5c82373a70e02db8b6da9a10f7faf61ff89a14ab66c738ed370", + expand=False, + ) + version( + "62.6.0", + sha256="c1848f654aea2e3526d17fc3ce6aeaa5e7e24e66e645b5be2171f3f6b4e5a178", + expand=False, + ) + version( + "62.4.0", + sha256="5a844ad6e190dccc67d6d7411d119c5152ce01f7c76be4d8a1eaa314501bba77", + expand=False, + ) + version( + "62.3.2", + sha256="68e45d17c9281ba25dc0104eadd2647172b3472d9e01f911efa57965e8d51a36", + expand=False, + ) + version( + "59.4.0", + sha256="feb5ff19b354cde9efd2344ef6d5e79880ce4be643037641b49508bbb850d060", + expand=False, + ) + version( + "58.2.0", + sha256="2551203ae6955b9876741a26ab3e767bb3242dafe86a32a749ea0d78b6792f11", + expand=False, + ) + version( + "57.4.0", + sha256="a49230977aa6cfb9d933614d2f7b79036e9945c4cdd7583163f4e920b83418d6", + expand=False, + ) + version( + "57.1.0", + sha256="ddae4c1b9220daf1e32ba9d4e3714df6019c5b583755559be84ff8199f7e1fe3", + expand=False, + ) + version( + "51.0.0", + sha256="8c177936215945c9a37ef809ada0fab365191952f7a123618432bbfac353c529", + expand=False, + ) + version( + "50.3.2", + sha256="2c242a0856fbad7efbe560df4a7add9324f340cf48df43651e9604924466794a", + expand=False, + ) + version( + "50.1.0", + sha256="4537c77e6e7dc170081f8547564551d4ff4e4999717434e1257600bbd3a23296", + expand=False, + ) + version( + "49.6.0", + sha256="4dd5bb0a0a0cff77b46ca5dd3a84857ee48c83e8223886b556613c724994073f", + expand=False, + ) + version( + "49.2.0", + sha256="272c7f48f5cddc5af5901f4265274c421c7eede5c8bc454ac2903d3f8fc365e9", + expand=False, + ) + version( + "46.1.3", + sha256="4fe404eec2738c20ab5841fa2d791902d2a645f32318a7850ef26f8d7215a8ee", + expand=False, + ) + version( + "44.1.1", + sha256="27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5", + expand=False, + ) + version( + "44.1.0", + sha256="992728077ca19db6598072414fb83e0a284aca1253aaf2e24bb1e55ee6db1a30", + expand=False, + ) + version( + "43.0.0", + sha256="a67faa51519ef28cd8261aff0e221b6e4c370f8fb8bada8aa3e7ad8945199963", + expand=False, + ) + version( + "41.4.0", + sha256="8d01f7ee4191d9fdcd9cc5796f75199deccb25b154eba82d44d6a042cf873670", + expand=False, + ) + version( + "41.3.0", + sha256="e9832acd9be6f3174f4c34b40e7d913a146727920cbef6465c1c1bd2d21a4ec4", + expand=False, + ) + version( + "41.0.1", + sha256="c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf", + expand=False, + ) + version( + "41.0.0", + sha256="e67486071cd5cdeba783bd0b64f5f30784ff855b35071c8670551fd7fc52d4a1", + expand=False, + ) + version( + "40.8.0", + sha256="e8496c0079f3ac30052ffe69b679bd876c5265686127a3159cfa415669b7f9ab", + expand=False, + ) + version( + "40.4.3", + sha256="ce4137d58b444bac11a31d4e0c1805c69d89e8ed4e91fde1999674ecc2f6f9ff", + expand=False, + ) + version( + "40.2.0", + sha256="ea3796a48a207b46ea36a9d26de4d0cc87c953a683a7b314ea65d666930ea8e6", + expand=False, + ) + version( + "39.2.0", + sha256="8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926", + expand=False, + ) + version( + "39.0.1", + sha256="8010754433e3211b9cdbbf784b50f30e80bf40fc6b05eb5f865fab83300599b8", + expand=False, + ) + version( + "25.2.0", + sha256="2845247c359bb91097ccf8f6be8a69edfa44847f3d2d5def39aa43c3d7f615ca", + expand=False, + ) + version( + "20.7.0", + sha256="8917a52aa3a389893221b173a89dae0471022d32bff3ebc31a1072988aa8039d", + expand=False, + ) + version( + "20.6.7", + sha256="9982ee4d279a2541dc1a7efee994ff9c535cfc05315e121e09df7f93da48c442", + expand=False, + ) extends("python") @@ -69,10 +200,6 @@ def url_for_version(self, version): depends_on("python@2.7:2.8,3.5:", when="@44", type=("build", "run")) depends_on("python@2.7:2.8,3.4:", when="@:43", type=("build", "run")) - # Newer pip requires setuptools to be installed, before building - # setuptools. This issue was fixed or worked around in setuptools 54+ - depends_on("py-pip@:18", when="@:53", type="build") - # Uses HTMLParser.unescape depends_on("python@:3.8", when="@:41.0", type=("build", "run")) @@ -81,3 +208,25 @@ def url_for_version(self, version): # https://github.com/pypa/setuptools/issues/3661 depends_on("python@:3.11", when="@:67", type=("build", "run")) + + depends_on("py-pip", type="build") + + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/{0}/s/setuptools/setuptools-{1}-{0}-none-any.whl" + + if version >= Version("45.1.0"): + python_tag = "py3" + else: + python_tag = "py2.py3" + return url.format(python_tag, version) + + def install(self, spec, prefix): + # When setuptools changes its entry point we might get weird + # incompatibilities if building from sources in a non-isolated environment. + # + # https://github.com/pypa/setuptools/issues/980#issuecomment-1154471423 + # + # We work around this issue by installing setuptools from wheels + whl = self.stage.archive_file + args = ["-m", "pip"] + std_pip_args + ["--prefix=" + prefix, whl] + python(*args) diff --git a/var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch b/var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch deleted file mode 100644 index 6b37d623234a53..00000000000000 --- a/var/spack/repos/builtin/packages/py-setuptools/rpath-compiler-flag.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setuptools/_distutils/unixccompiler.py b/setuptools/_distutils/unixccompiler.py ---- a/setuptools/_distutils/unixccompiler.py -+++ b/setuptools/_distutils/unixccompiler.py -@@ -257,7 +257,7 @@ class UnixCCompiler(CCompiler): - # No idea how --enable-new-dtags would be passed on to - # ld if this system was using GNU ld. Don't know if a - # system like this even exists. -- return "-R" + dir -+ return "-Wl,-rpath," + dir - - def library_option(self, lib): - return "-l" + lib - From e5f3ffc04fb7a1fea237226210b0cafc9246d0f2 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 1 Nov 2023 08:47:15 +0100 Subject: [PATCH 435/806] `SetupContext.get_env_modifications` fixes and documentation (#40683) Call setup_dependent_run_environment on both link and run edges, instead of only run edges, which restores old behavior. Move setup_build_environment into get_env_modifications Also call setup_run_environment on direct build deps, since their run environment has to be set up. --- lib/spack/docs/images/setup_env.png | Bin 0 -> 303254 bytes lib/spack/docs/packaging_guide.rst | 118 +++++++++++++++------------ lib/spack/spack/build_environment.py | 39 +++++---- 3 files changed, 83 insertions(+), 74 deletions(-) create mode 100644 lib/spack/docs/images/setup_env.png diff --git a/lib/spack/docs/images/setup_env.png b/lib/spack/docs/images/setup_env.png new file mode 100644 index 0000000000000000000000000000000000000000..4b16cac281f98195d1c5a30dca424b485ff514e4 GIT binary patch literal 303254 zcmZ^Kbx>Pj^KNkp#VPI<+$BhGiWCU$E`{P+Bm^s7+^wO(-J!UZLMcwsmg4U2a`WB$ z`~JB1PUoFWW-@2adC%tA-RIfeH(Eno5eJI`>&1%~ILb=$S}$Ip+#^16nCOUK&Q|dl zUc8`tp)4<><7;*R#mF?(y?j*9Qe{cW(ouqwwN25ZCQ%gnprRtB1*2*t5{5mGhw7jy zNaGU__PmhYQF29wE5`-vyhjfYBS}_OdzU;ERP}h&sl5cTJH}2STgg4n;YsXhJ%&NY z7VPq%vqtTM41&>IMs)vNE7;Z{G^e%C;pD^fN%kTCSV&FM5(k6P_+0;5Cuj|bD}s8_ z1wR1(`7An`t97a11@hE1BTUXmpAuAku3zi+fg zV*mbq($^*bx3gvtXG8bzuWffG;PoT?!#_?|zu9j5NUDE08y@ZnLCLs*q}}&DFIWcs zOl3R!+Wn}8cSaj{18;0<;u3lj%|rOlH%^>G?)1N$LVZDm{KvJs^Wf`ppdam|bDp_X zcBb-mR$c5d=*Sa$wK zLreURCnXLdcPs?0$BA6L+s|Fr{ZRxS^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yH+aC=h zF5nIdD4B<}e${(#W(Kbd9rh8b&BxykP^dL|l`HCgi*>lVJaVd;xnMW{4!$>-+u0QB zn|vcP1Q(gE&RP&Tp{~s0*<#7pJwPNLg@JN%Co-^YX%?<)hjHprKA0PmS@*2cBp!U% z7Wp>n;Z;%zIO7Sl6LZZ$O)|hQO_^GD6Ow@}7%V3-zC2{z^_4+rwO6 zIr%A=%$7RSej$orjw)%2#t*8tNOXVmLXZr&k#3PHRF^1rEOwx1IQQ25;pS}zHmfKVOxU& zW}5FUZ~>wuHh$iDuNtFAT82A(`@>~KNVXbGLFBK`!LxL6P5_^xe!cwB^`#^^WtDa; zFmUn8k7eM{Qj#&aLqLyIEqAkKb96qQ8w0`i$zXHx-)b6^sC%l(rhZ-G6hTX zqoiw-8>5KG-0+rlQ_?HIZexWFW5|>$S!5W=^`HjONc`aH{%Ue8ekyzWl^xxAa{YYr<^V9hi$Fs_QCY&D3KKv& z!y01gKu&%NK)sNL9D1CUWdOO|_)|JyFvA2DH`_Pj(xOc6ef8Al& zPBmLYRy*Mio3R?|q=c?_+iSOtsq3Y2Qc?nE^a=Twn=fZjzw14%S$G1?q%fZ#c_{V% z{T*rxbf8uQYk3=R|Hw>N9;Bg(tvgY@ zJBj7b6?H1G!40n4rj6;!R2_q+taSkUTv^1l0?&Dmci6eE85YAHnJ@F+9rX)JGVK6j zSY+R*SRg+!VD9IRWHqlC80TyN?6I_hLcNiRYj1gwB05jM^HzclPG9f83>~}^RL|?b z{I>mpKY-HT|Dg%^mqo4lhbR2)`u|Uto}#mE`x-iMJtAm;1^(&l8tJ_J%O>=H0KWVy Aod5s; literal 0 HcmV?d00001 diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index fad913cb0f7c70..89afac75fe979c 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2688,60 +2688,6 @@ appear in the package file (or in this case, in the list). right version. If two packages depend on ``binutils`` patched *the same* way, they can both use a single installation of ``binutils``. -.. _setup-dependent-environment: - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Influence how dependents are built or run -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Spack provides a mechanism for dependencies to influence the -environment of their dependents by overriding the -:meth:`setup_dependent_run_environment ` -or the -:meth:`setup_dependent_build_environment ` -methods. -The Qt package, for instance, uses this call: - -.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/qt/package.py - :pyobject: Qt.setup_dependent_build_environment - :linenos: - -to set the ``QTDIR`` environment variable so that packages -that depend on a particular Qt installation will find it. -Another good example of how a dependency can influence -the build environment of dependents is the Python package: - -.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/python/package.py - :pyobject: Python.setup_dependent_build_environment - :linenos: - -In the method above it is ensured that any package that depends on Python -will have the ``PYTHONPATH``, ``PYTHONHOME`` and ``PATH`` environment -variables set appropriately before starting the installation. To make things -even simpler the ``python setup.py`` command is also inserted into the module -scope of dependents by overriding a third method called -:meth:`setup_dependent_package ` -: - -.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/python/package.py - :pyobject: Python.setup_dependent_package - :linenos: - -This allows most python packages to have a very simple install procedure, -like the following: - -.. code-block:: python - - def install(self, spec, prefix): - setup_py("install", "--prefix={0}".format(prefix)) - -Finally the Python package takes also care of the modifications to ``PYTHONPATH`` -to allow dependencies to run correctly: - -.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/python/package.py - :pyobject: Python.setup_dependent_run_environment - :linenos: - .. _packaging_conflicts: @@ -2886,6 +2832,70 @@ variant(s) are selected. This may be accomplished with conditional extends("python", when="+python") ... +.. _setup-environment: + +-------------------------------------------- +Runtime and build time environment variables +-------------------------------------------- + +Spack provides a few methods to help package authors set up the required environment variables for +their package. Environment variables typically depend on how the package is used: variables that +make sense during the build phase may not be needed at runtime, and vice versa. Further, sometimes +it makes sense to let a dependency set the environment variables for its dependents. To allow all +this, Spack provides four different methods that can be overridden in a package: + +1. :meth:`setup_build_environment ` +2. :meth:`setup_run_environment ` +3. :meth:`setup_dependent_build_environment ` +4. :meth:`setup_dependent_run_environment ` + +The Qt package, for instance, uses this call: + +.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/qt/package.py + :pyobject: Qt.setup_dependent_build_environment + :linenos: + +to set the ``QTDIR`` environment variable so that packages that depend on a particular Qt +installation will find it. + +The following diagram will give you an idea when each of these methods is called in a build +context: + +.. image:: images/setup_env.png + :align: center + +Notice that ``setup_dependent_run_environment`` can be called multiple times, once for each +dependent package, whereas ``setup_run_environment`` is called only once for the package itself. +This means that the former should only be used if the environment variables depend on the dependent +package, whereas the latter should be used if the environment variables depend only on the package +itself. + +-------------------------------- +Setting package module variables +-------------------------------- + +Apart from modifying environment variables of the dependent package, you can also define Python +variables to be used by the dependent. This is done by implementing +:meth:`setup_dependent_package `. An +example of this can be found in the ``Python`` package: + +.. literalinclude:: _spack_root/var/spack/repos/builtin/packages/python/package.py + :pyobject: Python.setup_dependent_package + :linenos: + +This allows Python packages to directly use these variables: + +.. code-block:: python + + def install(self, spec, prefix): + ... + install("script.py", python_platlib) + +.. note:: + + We recommend using ``setup_dependent_package`` sparingly, as it is not always clear where + global variables are coming from when editing a ``package.py`` file. + ----- Views ----- diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 96c8cb8a4ad71a..3f6830ad3345de 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -752,19 +752,13 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD): target = platform.target(pkg.spec.architecture.target) platform.setup_platform_environment(pkg, env_mods) - if context == Context.BUILD: - tty.debug("setup_package: setup build environment for root") - builder = spack.builder.create(pkg) - builder.setup_build_environment(env_mods) - - if (not dirty) and (not env_mods.is_unset("CPATH")): - tty.debug( - "A dependency has updated CPATH, this may lead pkg-" - "config to assume that the package is part of the system" - " includes and omit it when invoked with '--cflags'." - ) - elif context == Context.TEST: + if context == Context.TEST: env_mods.prepend_path("PATH", ".") + elif context == Context.BUILD and not dirty and not env_mods.is_unset("CPATH"): + tty.debug( + "A dependency has updated CPATH, this may lead pkg-config to assume that the package " + "is part of the system includes and omit it when invoked with '--cflags'." + ) # First apply the clean environment changes env_base.apply_modifications() @@ -953,8 +947,11 @@ def __init__(self, *specs: spack.spec.Spec, context: Context) -> None: reversed(specs_with_type), lambda t: t[0].external ) self.should_be_runnable = UseMode.BUILDTIME_DIRECT | UseMode.RUNTIME_EXECUTABLE - self.should_setup_run_env = UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE + self.should_setup_run_env = ( + UseMode.BUILDTIME_DIRECT | UseMode.RUNTIME | UseMode.RUNTIME_EXECUTABLE + ) self.should_setup_dependent_build_env = UseMode.BUILDTIME | UseMode.BUILDTIME_DIRECT + self.should_setup_build_env = UseMode.ROOT if context == Context.BUILD else UseMode(0) if context == Context.RUN or context == Context.TEST: self.should_be_runnable |= UseMode.ROOT @@ -994,8 +991,9 @@ def get_env_modifications(self) -> EnvironmentModifications: - Updating PATH for packages that are required at runtime - Updating CMAKE_PREFIX_PATH and PKG_CONFIG_PATH so that their respective tools can find Spack-built dependencies (when context=build) - - Running custom package environment modifications (setup_run_environment, - setup_dependent_build_environment, setup_dependent_run_environment) + - Running custom package environment modifications: setup_run_environment, + setup_dependent_run_environment, setup_build_environment, + setup_dependent_build_environment. The (partial) order imposed on the specs is externals first, then topological from leaf to root. That way externals cannot contribute search paths that would shadow @@ -1008,16 +1006,17 @@ def get_env_modifications(self) -> EnvironmentModifications: if self.should_setup_dependent_build_env & flag: self._make_buildtime_detectable(dspec, env) - for spec in self.specs: - builder = spack.builder.create(pkg) - builder.setup_dependent_build_environment(env, spec) + for root in self.specs: # there is only one root in build context + spack.builder.create(pkg).setup_dependent_build_environment(env, root) + + if self.should_setup_build_env & flag: + spack.builder.create(pkg).setup_build_environment(env) if self.should_be_runnable & flag: self._make_runnable(dspec, env) if self.should_setup_run_env & flag: - # TODO: remove setup_dependent_run_environment... - for spec in dspec.dependents(deptype=dt.RUN): + for spec in dspec.dependents(deptype=dt.LINK | dt.RUN): if id(spec) in self.nodes_in_subdag: pkg.setup_dependent_run_environment(env, spec) pkg.setup_run_environment(env) From ac976a4bf42d475328f26f34e70bf1317fc0bdec Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 1 Nov 2023 09:08:57 +0100 Subject: [PATCH 436/806] Parser: fix ambiguity with whitespace in version ranges (#40344) Allowing white space around `:` in version ranges introduces an ambiguity: ``` a@1: b ``` parses as `a@1:b` but should really be parsed as two separate specs `a@1:` and `b`. With white space disallowed around `:` in ranges, the ambiguity is resolved. --- lib/spack/spack/parser.py | 6 ++--- lib/spack/spack/test/spec_syntax.py | 35 ++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py index 55eee4f1544586..b73a1897974fc2 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -96,9 +96,9 @@ VALUE = r"(?:[a-zA-Z_0-9\-+\*.,:=\~\/\\]+)" QUOTED_VALUE = r"[\"']+(?:[a-zA-Z_0-9\-+\*.,:=\~\/\\\s]+)[\"']+" -VERSION = r"=?([a-zA-Z0-9_][a-zA-Z_0-9\-\.]*\b)" -VERSION_RANGE = rf"({VERSION}\s*:\s*{VERSION}(?!\s*=)|:\s*{VERSION}(?!\s*=)|{VERSION}\s*:|:)" -VERSION_LIST = rf"({VERSION_RANGE}|{VERSION})(\s*[,]\s*({VERSION_RANGE}|{VERSION}))*" +VERSION = r"=?(?:[a-zA-Z0-9_][a-zA-Z_0-9\-\.]*\b)" +VERSION_RANGE = rf"(?:(?:{VERSION})?:(?:{VERSION}(?!\s*=))?)" +VERSION_LIST = rf"(?:{VERSION_RANGE}|{VERSION})(?:\s*,\s*(?:{VERSION_RANGE}|{VERSION}))*" class TokenBase(enum.Enum): diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index e7a760dc93037d..1d98731785b6a6 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -472,33 +472,46 @@ def _specfile_for(spec_str, filename): [Token(TokenType.PROPAGATED_KEY_VALUE_PAIR, value='cflags=="-O3 -g"')], 'cflags=="-O3 -g"', ), - # Way too many spaces + # Whitespace is allowed in version lists + ("@1.2:1.4 , 1.6 ", [Token(TokenType.VERSION, value="@1.2:1.4 , 1.6")], "@1.2:1.4,1.6"), + # But not in ranges. `a@1:` and `b` are separate specs, not a single `a@1:b`. ( - "@1.2 : 1.4 , 1.6 ", - [Token(TokenType.VERSION, value="@1.2 : 1.4 , 1.6")], - "@1.2:1.4,1.6", + "a@1: b", + [ + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="a"), + Token(TokenType.VERSION, value="@1:"), + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="b"), + ], + "a@1:", + ), + ( + "@1.2: develop = foo", + [ + Token(TokenType.VERSION, value="@1.2:"), + Token(TokenType.KEY_VALUE_PAIR, value="develop = foo"), + ], + "@1.2: develop=foo", ), - ("@1.2 : develop", [Token(TokenType.VERSION, value="@1.2 : develop")], "@1.2:develop"), ( - "@1.2 : develop = foo", + "@1.2:develop = foo", [ - Token(TokenType.VERSION, value="@1.2 :"), + Token(TokenType.VERSION, value="@1.2:"), Token(TokenType.KEY_VALUE_PAIR, value="develop = foo"), ], "@1.2: develop=foo", ), ( - "% intel @ 12.1 : 12.6 + debug", + "% intel @ 12.1:12.6 + debug", [ - Token(TokenType.COMPILER_AND_VERSION, value="% intel @ 12.1 : 12.6"), + Token(TokenType.COMPILER_AND_VERSION, value="% intel @ 12.1:12.6"), Token(TokenType.BOOL_VARIANT, value="+ debug"), ], "%intel@12.1:12.6+debug", ), ( - "@ 12.1 : 12.6 + debug - qt_4", + "@ 12.1:12.6 + debug - qt_4", [ - Token(TokenType.VERSION, value="@ 12.1 : 12.6"), + Token(TokenType.VERSION, value="@ 12.1:12.6"), Token(TokenType.BOOL_VARIANT, value="+ debug"), Token(TokenType.BOOL_VARIANT, value="- qt_4"), ], From 2ea8e6c820e78c08c5b5265056fb292511de9c04 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 1 Nov 2023 09:14:37 +0100 Subject: [PATCH 437/806] Executable.add_default_arg: multiple (#40801) --- lib/spack/spack/fetch_strategy.py | 3 +-- lib/spack/spack/util/executable.py | 6 +++--- lib/spack/spack/util/git.py | 3 +-- .../builtin/packages/intel-oneapi-compilers/package.py | 3 +-- var/spack/repos/builtin/packages/py-installer/package.py | 3 +-- var/spack/repos/builtin/packages/py-pip/package.py | 3 +-- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index a7b3d25043e5b9..a922d9caf4c085 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -773,8 +773,7 @@ def git(self): # Disable advice for a quieter fetch # https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.2.txt if self.git_version >= spack.version.Version("1.7.2"): - self._git.add_default_arg("-c") - self._git.add_default_arg("advice.detachedHead=false") + self._git.add_default_arg("-c", "advice.detachedHead=false") # If the user asked for insecure fetching, make that work # with git as well. diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 48dca0ffa35e0b..3aea141d875d7c 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -35,9 +35,9 @@ def __init__(self, name): if not self.exe: raise ProcessError("Cannot construct executable for '%s'" % name) - def add_default_arg(self, arg): - """Add a default argument to the command.""" - self.exe.append(arg) + def add_default_arg(self, *args): + """Add default argument(s) to the command.""" + self.exe.extend(args) def add_default_env(self, key, value): """Set an environment variable when the command is run. diff --git a/lib/spack/spack/util/git.py b/lib/spack/spack/util/git.py index ceb0013412028c..39efdda9c3c3bb 100644 --- a/lib/spack/spack/util/git.py +++ b/lib/spack/spack/util/git.py @@ -24,7 +24,6 @@ def git(required: bool = False): # If we're running under pytest, add this to ignore the fix for CVE-2022-39253 in # git 2.38.1+. Do this in one place; we need git to do this in all parts of Spack. if git and "pytest" in sys.modules: - git.add_default_arg("-c") - git.add_default_arg("protocol.file.allow=always") + git.add_default_arg("-c", "protocol.file.allow=always") return git diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 5545053cc8d368..84b65a576181e0 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -226,8 +226,7 @@ def install(self, spec, prefix): def inject_rpaths(self): # Sets rpath so the compilers can work without setting LD_LIBRARY_PATH. patchelf = which("patchelf") - patchelf.add_default_arg("--set-rpath") - patchelf.add_default_arg(":".join(self._ld_library_path())) + patchelf.add_default_arg("--set-rpath", ":".join(self._ld_library_path())) for pd in ["bin", "lib", join_path("compiler", "lib", "intel64_lin")]: for file in find(self.component_prefix.linux.join(pd), "*", recursive=False): # Try to patch all files, patchelf will do nothing and fail if file diff --git a/var/spack/repos/builtin/packages/py-installer/package.py b/var/spack/repos/builtin/packages/py-installer/package.py index 30a4a62072ab03..1bedecf074160a 100644 --- a/var/spack/repos/builtin/packages/py-installer/package.py +++ b/var/spack/repos/builtin/packages/py-installer/package.py @@ -40,6 +40,5 @@ def install(self, spec, prefix): def setup_dependent_package(self, module, dependent_spec): installer = dependent_spec["python"].command - installer.add_default_arg("-m") - installer.add_default_arg("installer") + installer.add_default_arg("-m", "installer") setattr(module, "installer", installer) diff --git a/var/spack/repos/builtin/packages/py-pip/package.py b/var/spack/repos/builtin/packages/py-pip/package.py index dfa85d55bc055e..d92a53671ed8b8 100644 --- a/var/spack/repos/builtin/packages/py-pip/package.py +++ b/var/spack/repos/builtin/packages/py-pip/package.py @@ -110,6 +110,5 @@ def install(self, spec, prefix): def setup_dependent_package(self, module, dependent_spec): pip = dependent_spec["python"].command - pip.add_default_arg("-m") - pip.add_default_arg("pip") + pip.add_default_arg("-m", "pip") setattr(module, "pip", pip) From 92780a9af601d525492940898225a64999a76afd Mon Sep 17 00:00:00 2001 From: Bilal Mirza <84387676+bilalmirza74@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:11:37 +0530 Subject: [PATCH 438/806] fix: sentence framing (#40809) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4c784cd1a6aba..d048140ec1badc 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Resources: * **Matrix space**: [#spack-space:matrix.org](https://matrix.to/#/#spack-space:matrix.org): [bridged](https://github.com/matrix-org/matrix-appservice-slack#matrix-appservice-slack) to Slack. * [**Github Discussions**](https://github.com/spack/spack/discussions): - not just for discussions, also Q&A. + not just for discussions, but also Q&A. * **Mailing list**: [groups.google.com/d/forum/spack](https://groups.google.com/d/forum/spack) * **Twitter**: [@spackpm](https://twitter.com/spackpm). Be sure to `@mention` us! From 581f45b63908dda8429b63c32047fd5295a95507 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 1 Nov 2023 19:44:11 +0100 Subject: [PATCH 439/806] podio: Add latest tags and variants and update dependencies accordingly (#40182) * Make sure sio is in dependent build env for podio * podio: Fix likely(?) typo in root dependency * podio: Add latest tag and new variants + dependencies * podio: Add v00-16-07 tag * podio: Fix dependencies flagged by package audit * podio: Simplify root dependency * podio: Add 0.17.1 tag --- .../repos/builtin/packages/podio/package.py | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/podio/package.py b/var/spack/repos/builtin/packages/podio/package.py index f2bbe7e74c213d..5f0b94ba3770eb 100644 --- a/var/spack/repos/builtin/packages/podio/package.py +++ b/var/spack/repos/builtin/packages/podio/package.py @@ -20,9 +20,24 @@ class Podio(CMakePackage): tags = ["hep", "key4hep"] version("master", branch="master") - version("0.16.6", sha256="859f7cd16bd2b833bee9c1f33eb4cdbc2a0c2b1a48a853f67c30e8a0301d16df") - version("0.16.5", sha256="42135e4d0e11be6f0d88748799fa2ec985514d4b4c979a10a56a00a378f65ee0") - version("0.16.3", sha256="d8208f98496af68ca8d02d302f428aab510e50d07575b90c3477fff7e499335b") + version("0.17.1", sha256="97d6c5f81d50ee42bf7c01f041af2fd333c806f1bbf0a4828ca961a24cea6bb2") + version("0.17", sha256="0c19f69970a891459cab227ab009514f1c1ce102b70e8c4b7d204eb6a0c643c1") + version("0.16.7", sha256="8af7c947e2637f508b7af053412bacd9218d41a455d69addd7492f05b7a4338d") + version( + "0.16.6", + sha256="859f7cd16bd2b833bee9c1f33eb4cdbc2a0c2b1a48a853f67c30e8a0301d16df", + deprecated=True, + ) + version( + "0.16.5", + sha256="42135e4d0e11be6f0d88748799fa2ec985514d4b4c979a10a56a00a378f65ee0", + deprecated=True, + ) + version( + "0.16.3", + sha256="d8208f98496af68ca8d02d302f428aab510e50d07575b90c3477fff7e499335b", + deprecated=True, + ) version( "0.16.2", sha256="faf7167290faf322f23c734adff19904b10793b5ab14e1dfe90ce257c225114b", @@ -112,6 +127,7 @@ class Podio(CMakePackage): description="Use the specified C++ standard when building.", ) variant("sio", default=False, description="Build the SIO I/O backend") + variant("rntuple", default=False, description="Build the RNTuple backend") # cpack config throws an error on some systems patch("cpack.patch", when="@:0.10.0") @@ -119,9 +135,12 @@ class Podio(CMakePackage): patch("python-tests.patch", when="@:0.14.0") depends_on("root@6.08.06: cxxstd=17", when="cxxstd=17") - depends_on("root@6.25.02: cxxstd=20", when="cxxstd=20") + depends_on("root@6.28.04:", when="+rntuple") + depends_on("root@6.28:", when="@0.17:") + for cxxstd in ("17", "20"): + depends_on("root cxxstd={}".format(cxxstd), when="cxxstd={}".format(cxxstd)) - depends_on("cmake@3.8:", type="build") + depends_on("cmake@3.12:", type="build") depends_on("python", type=("build", "run")) depends_on("py-pyyaml", type=("build", "run")) depends_on("py-jinja2@2.10.1:", type=("build", "run"), when="@0.12.0:") @@ -131,10 +150,12 @@ class Podio(CMakePackage): depends_on("py-tabulate", type=("run", "test"), when="@0.16.6:") conflicts("+sio", when="@:0.12", msg="sio support requires at least podio@0.13") + conflicts("+rntuple", when="@:0.16", msg="rntuple support requires at least podio@0.17") def cmake_args(self): args = [ self.define_from_variant("ENABLE_SIO", "sio"), + self.define_from_variant("ENABLE_RNTUPLE", "rntuple"), self.define("CMAKE_CXX_STANDARD", self.spec.variants["cxxstd"].value), self.define("BUILD_TESTING", self.run_tests), ] @@ -156,6 +177,12 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.prepend_path("PYTHONPATH", self.prefix.python) env.prepend_path("LD_LIBRARY_PATH", self.spec["podio"].libs.directories[0]) env.prepend_path("ROOT_INCLUDE_PATH", self.prefix.include) + if self.spec.satisfies("+sio @0.17:"): + # sio needs to be on LD_LIBRARY_PATH for ROOT to be able to + # dynamicaly load the python libraries also in dependent build + # environments since the import structure has changed with + # podio@0.17 + env.prepend_path("LD_LIBRARY_PATH", self.spec["sio"].libs.directories[0]) def url_for_version(self, version): """Translate version numbers to ilcsoft conventions. From afa2a2566e84c022eab5607753201697c7e888c4 Mon Sep 17 00:00:00 2001 From: wspear Date: Wed, 1 Nov 2023 12:10:35 -0700 Subject: [PATCH 440/806] Add 2.33 to tau (#40810) --- var/spack/repos/builtin/packages/tau/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index 9d5252cad2ef46..8466516872aa79 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -26,6 +26,7 @@ class Tau(Package): tags = ["e4s"] version("master", branch="master") + version("2.33", sha256="ed5d434924216b22ca4b7791abc15c6bba8f727fdcd74dcc2ba2c4733792e807") version("2.32.1", sha256="0eec3de46b0873846dfc639270c5e30a226b463dd6cb41aa12e975b7563f0eeb") version("2.32", sha256="ee774a06e30ce0ef0f053635a52229152c39aba4f4933bed92da55e5e13466f3") version("2.31.1", sha256="bf445b9d4fe40a5672a7b175044d2133791c4dfb36a214c1a55a931aebc06b9d") From d05dc8a468ff8acc9700128cc6be0f9fd40e3d8a Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Wed, 1 Nov 2023 15:18:57 -0400 Subject: [PATCH 441/806] LBANN: add explicit variant for shared builds (#40808) --- var/spack/repos/builtin/packages/lbann/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index b5ed6df831503f..faae710921e563 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -156,6 +156,9 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): variant("asan", default=False, description="Build with support for address-sanitizer") variant("unit_tests", default=False, description="Support for unit testing") variant("caliper", default=False, description="Support for instrumentation with caliper") + variant( + "shared", default=True, sticky=True, description="Enables the build of shared libraries" + ) # LBANN benefits from high performance linkers, but passing these in as command # line options forces the linker flags to unnecessarily propagate to all @@ -241,6 +244,8 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("dihydrogen@:0.0,0.2:", when="@:0.90,0.102: +dihydrogen") conflicts("~dihydrogen", when="+distconv") + depends_on("hdf5+mpi", when="+distconv") + for arch in CudaPackage.cuda_arch_values: depends_on("hydrogen cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) depends_on("aluminum cuda_arch=%s" % arch, when="+al +cuda cuda_arch=%s" % arch) @@ -343,6 +348,11 @@ def _get_sys_type(self, spec): sys_type = env["SYS_TYPE"] return sys_type + @property + def libs(self): + shared = True if "+shared" in self.spec else False + return find_libraries("liblbann", root=self.prefix, shared=shared, recursive=True) + @property def cache_name(self): hostname = socket.gethostname() @@ -360,6 +370,7 @@ def initconfig_compiler_entries(self): spec = self.spec entries = super().initconfig_compiler_entries() entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17")) + entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) if not spec.satisfies("^cmake@3.23.0"): # There is a bug with using Ninja generator in this version # of CMake From 5f87db98eaf5f49d0d76242f8f98824e20231e50 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 1 Nov 2023 14:20:13 -0500 Subject: [PATCH 442/806] butterflypack: add version 2.4.0 (#40826) --- var/spack/repos/builtin/packages/butterflypack/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/butterflypack/package.py b/var/spack/repos/builtin/packages/butterflypack/package.py index c9726a52aaa942..746fa32082d894 100644 --- a/var/spack/repos/builtin/packages/butterflypack/package.py +++ b/var/spack/repos/builtin/packages/butterflypack/package.py @@ -28,6 +28,7 @@ class Butterflypack(CMakePackage): maintainers("liuyangzhuan") version("master", branch="master") + version("2.4.0", sha256="12d04e7101b2c8292b5c62d9f42b5cd1e8a3c5af639d2665596e3e4255fd0804") version("2.2.2", sha256="73f67073e4291877f1eee19483a8a7b3c761eaf79a75805d52105ceedead85ea") version("2.2.1", sha256="4cedc2896a6b368773ce4f9003aa2c0230baf56a4464a6b899a155e01406a232") version("2.2.0", sha256="1ce5b8461b3c4f488cee6396419e8a6f0a1bcf95254f24d7c27bfa53b391c30b") From c7a8a83cbff376d6686bf9c81573fe2c532374c6 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 1 Nov 2023 14:37:53 -0500 Subject: [PATCH 443/806] petsc, py-petsc4py: add v3.20.1 (#40794) --- var/spack/repos/builtin/packages/petsc/package.py | 1 + var/spack/repos/builtin/packages/py-petsc4py/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 2f258edc17a183..5093961f7deffc 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -22,6 +22,7 @@ class Petsc(Package, CudaPackage, ROCmPackage): version("main", branch="main") + version("3.20.1", sha256="3d54f13000c9c8ceb13ca4f24f93d838319019d29e6de5244551a3ec22704f32") version("3.20.0", sha256="c152ccb12cb2353369d27a65470d4044a0c67e0b69814368249976f5bb232bd4") version("3.19.6", sha256="6045e379464e91bb2ef776f22a08a1bc1ff5796ffd6825f15270159cbb2464ae") version("3.19.5", sha256="511aa78cad36db2dfd298acf35e9f7afd2ecc1f089da5b0b5682507a31a5d6b2") diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py index 0181571f1b05fc..06c551b9f4a1a1 100644 --- a/var/spack/repos/builtin/packages/py-petsc4py/package.py +++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py @@ -18,6 +18,7 @@ class PyPetsc4py(PythonPackage): maintainers("balay") version("main", branch="main") + version("3.20.1", sha256="dcc9092040d13130496f1961b79c36468f383b6ede398080e004f1966c06ad38") version("3.20.0", sha256="c2461eef3977ae5c214ad252520adbb92ec3a31d00e79391dd92535077bbf03e") version("3.19.6", sha256="bd7891b651eb83504c744e70706818cf63ecbabee3206c1fed7c3013873802b9") version("3.19.5", sha256="e059fdb8b23936c3182c9226924029dbdc8f1f72a623be0fe8c2caf8646c7a45") From 73f012b99954109f22386a03acf7cc7ddf04f0ed Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Wed, 1 Nov 2023 12:38:02 -0700 Subject: [PATCH 444/806] amrex: add v23.11 (#40821) --- var/spack/repos/builtin/packages/amrex/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index 37f953ba75d73c..8f14d508ad0085 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -24,6 +24,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage): maintainers("WeiqunZhang", "asalmgren", "etpalmer63") version("develop", branch="development") + version("23.11", sha256="49b9fea10cd2a2b6cb0fedf7eac8f7889eacc68a05ae5ac7c5702bc0eb1b3848") version("23.10", sha256="3c85aa0ad5f96303e797960a6e0aa37c427f6483f39cdd61dbc2f7ca16357714") version("23.09", sha256="1a539c2628041b17ad910afd9270332060251c8e346b1482764fdb87a4f25053") version("23.08", sha256="a83b7249d65ad8b6ac1881377e5f814b6db8ed8410ea5562b8ae9d4ed1f37c29") From 9aa75eaf652c92851c980158bc06db27cce718cb Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 1 Nov 2023 14:44:13 -0500 Subject: [PATCH 445/806] superlu-dist: -std=c99 prevents usage of putenv() (#40729) --- var/spack/repos/builtin/packages/superlu-dist/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 7af573699337ed..241dc4b552c7ff 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -134,8 +134,6 @@ def flag_handler(self, name, flags): flags = list(flags) if name == "cxxflags": flags.append(self.compiler.cxx11_flag) - if name == "cflags" and "%pgi" not in self.spec: - flags.append("-std=c99") if ( name == "cflags" and (self.spec.satisfies("%xl") or self.spec.satisfies("%xl_r")) From 0767c8673eccf63dcd366dc020acb5c75f52c77b Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Wed, 1 Nov 2023 16:21:14 -0400 Subject: [PATCH 446/806] hiop: fix cuda constraints and add tag to versions (#40721) * hiop: fix cuda constraints and add tag to versions * hiop: fix styling --- .../repos/builtin/packages/hiop/package.py | 73 +++++++++++-------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index 353c7fd942b675..a2f3244e267c04 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -22,33 +22,43 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): maintainers("ryandanehy", "cameronrutherford", "pelesh") # Most recent tagged snapshot is the preferred version when profiling. - version("1.0.1", commit="c5e156c6f27d046f590dc35114980e3f9c573ca6", submodules=True) - version("1.0.0", commit="10b7d3ee0a15cb4949ccee8c905d447b9528794f", submodules=True) - version("0.7.2", commit="d0f57c880d4202a72c62dd1f5c92e3bc8acb9788", submodules=True) - version("0.7.1", commit="8064ef6b2249ad2feca92a9d1e90060bad3eebc7", submodules=True) - version("0.7.0", commit="5f42ab34b419b7cf64d0fffb29d443b009dbfd75", submodules=True) - version("0.6.2", commit="55652fbe923ab9107d002d0d070865bd22375b28") - version("0.6.1", commit="a9e2697b00aa13ecf0ae4783dd8a41dee11dc50e") - version("0.6.0", commit="21af7eb0d6427be73546cf303abc84e834a5a55d") - version("0.5.4", commit="a37a7a677884e95d1c0ad37936aef3778fc91c3e") - version("0.5.3", commit="698e8d0fdc0ff9975d8714339ff8c782b70d85f9") - version("0.5.2", commit="662ad76dee1f501f648a8bec9a490cb5881789e9") - version("0.5.1", commit="6789bbb55824e68e428c2df1009d647af81f9cf1") - version("0.5.0", commit="a39da8025037c7c8ae2eb31234eb80cc73bec2af") - version("0.4.6", commit="b72d163d52c9225c3196ceb2baebdc7cf09a69de") - version("0.4.5", commit="c353580456c4776c50811b97cf8ff802dc27b90c") - version("0.4.4", commit="e858eefa6b914f5c87c3717bbce811931ea69386") - version("0.4.3", commit="c0394af4d84ebb84b7d2b95283ad65ffd84e0d45") - version("0.4.2", commit="3fcb788d223eec24c0241680070c4a9a5ec71ef3") - version("0.4.1", commit="3f269560f76d5a89bcbd1d3c4f9f0e5acaa6fd64") - version("0.4", commit="91d21085a1149eacdb27cd738d4a74a7e412fcff") - version("0.3.99.3", commit="bed1dbef260e53a9d139ccfb77d2e83a98aab216") - version("0.3.99.2", commit="9eb026768bc5e0a2c1293d0487cc39913001ae19") - version("0.3.99.1", commit="220e32c0f318665d6d394ca3cd0735b9d26a65eb") - version("0.3.99.0", commit="589b9c76781447108fa55788d5fa1b83ff71a3d1") - version("0.3", commit="7e8adae9db757aed48e5c2bc448316307598258f") - version("0.2", commit="c52a6f6b9baaaa2d7f233a749aa98f901349723f") - version("0.1", commit="5f60e11b79d532115fb41694378b54c9c707aad9") + version( + "1.0.1", tag="v1.0.1", commit="c5e156c6f27d046f590dc35114980e3f9c573ca6", submodules=True + ) + version( + "1.0.0", tag="v1.0.0", commit="10b7d3ee0a15cb4949ccee8c905d447b9528794f", submodules=True + ) + version( + "0.7.2", tag="v0.7.2", commit="d0f57c880d4202a72c62dd1f5c92e3bc8acb9788", submodules=True + ) + version( + "0.7.1", tag="v0.7.1", commit="8064ef6b2249ad2feca92a9d1e90060bad3eebc7", submodules=True + ) + version( + "0.7.0", tag="v0.7.0", commit="5f42ab34b419b7cf64d0fffb29d443b009dbfd75", submodules=True + ) + version("0.6.2", tag="v0.6.2", commit="55652fbe923ab9107d002d0d070865bd22375b28") + version("0.6.1", tag="v0.6.1", commit="a9e2697b00aa13ecf0ae4783dd8a41dee11dc50e") + version("0.6.0", tag="v0.6.0", commit="21af7eb0d6427be73546cf303abc84e834a5a55d") + version("0.5.4", tag="v0.5.4", commit="a37a7a677884e95d1c0ad37936aef3778fc91c3e") + version("0.5.3", tag="v0.5.3", commit="698e8d0fdc0ff9975d8714339ff8c782b70d85f9") + version("0.5.2", tag="v0.5.2", commit="662ad76dee1f501f648a8bec9a490cb5881789e9") + version("0.5.1", tag="v0.5.1", commit="6789bbb55824e68e428c2df1009d647af81f9cf1") + version("0.5.0", tag="v0.5.0", commit="a39da8025037c7c8ae2eb31234eb80cc73bec2af") + version("0.4.6", tag="v0.4.6", commit="b72d163d52c9225c3196ceb2baebdc7cf09a69de") + version("0.4.5", tag="v0.4.5", commit="c353580456c4776c50811b97cf8ff802dc27b90c") + version("0.4.4", tag="v0.4.4", commit="e858eefa6b914f5c87c3717bbce811931ea69386") + version("0.4.3", tag="v0.4.3", commit="c0394af4d84ebb84b7d2b95283ad65ffd84e0d45") + version("0.4.2", tag="v0.4.2", commit="3fcb788d223eec24c0241680070c4a9a5ec71ef3") + version("0.4.1", tag="v0.4.1", commit="3f269560f76d5a89bcbd1d3c4f9f0e5acaa6fd64") + version("0.4", tag="v0.4", commit="91d21085a1149eacdb27cd738d4a74a7e412fcff") + version("0.3.99.3", tag="v0.3.99.3", commit="bed1dbef260e53a9d139ccfb77d2e83a98aab216") + version("0.3.99.2", tag="v0.3.99.2", commit="9eb026768bc5e0a2c1293d0487cc39913001ae19") + version("0.3.99.1", tag="v0.3.99.1", commit="220e32c0f318665d6d394ca3cd0735b9d26a65eb") + version("0.3.99.0", tag="v0.3.99.0", commit="589b9c76781447108fa55788d5fa1b83ff71a3d1") + version("0.3", tag="v0.3", commit="7e8adae9db757aed48e5c2bc448316307598258f") + version("0.2", tag="v0.2", commit="c52a6f6b9baaaa2d7f233a749aa98f901349723f") + version("0.1", tag="v0.1", commit="5f60e11b79d532115fb41694378b54c9c707aad9") # Development branches version("master", branch="master") @@ -103,9 +113,12 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): depends_on("magma@{0}:".format(magma_v), when="@{0}:+cuda".format(hiop_v)) depends_on("magma@{0}:".format(magma_v), when="@{0}:+rocm".format(hiop_v)) - # https://github.com/spack/spack/issues/40678 - depends_on("cuda@11:11.9", when="@develop:+cuda") - depends_on("cuda@:11.9", when="+cuda") + # 1.0.2 fixes bug with cuda 12 compatibility + # hiop@0.6.0 requires cusolver API in cuda@11 + depends_on("cuda@11:11.9", when="@0.6.0:1.0.1") + depends_on("cuda@11:", when="@develop:+cuda") + # Before hiop@0.6.0 only cuda requirement was magma + depends_on("cuda", when="@:0.5.4+cuda") depends_on("raja", when="+raja") depends_on("umpire", when="+raja") From ff6bbf03a1be7d783aa3bc58da79ad15f40ae9bc Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 1 Nov 2023 22:09:11 +0100 Subject: [PATCH 447/806] changelog: add 0.20.2 and 0.20.3 changes (#40818) --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cfdf00e67d3bb..c8cdd13db28993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +# v0.20.3 (2023-10-31) + +## Bugfixes + +- Fix a bug where `spack mirror set-url` would drop configured connection info (reverts #34210) +- Fix a minor issue with package hash computation for Python 3.12 (#40328) + + +# v0.20.2 (2023-10-03) + +## Features in this release + +Spack now supports Python 3.12 (#40155) + +## Bugfixes + +- Improve escaping in Tcl module files (#38375) +- Make repo cache work on repositories with zero mtime (#39214) +- Ignore errors for newer, incompatible buildcache version (#40279) +- Print an error when git is required, but missing (#40254) +- Ensure missing build dependencies get installed when using `spack install --overwrite` (#40252) +- Fix an issue where Spack freezes when the build process unexpectedly exits (#39015) +- Fix a bug where installation failures cause an unrelated `NameError` to be thrown (#39017) +- Fix an issue where Spack package versions would be incorrectly derived from git tags (#39414) +- Fix a bug triggered when file locking fails internally (#39188) +- Prevent "spack external find" to error out when a directory cannot be accessed (#38755) +- Fix multiple performance regressions in environments (#38771) +- Add more ignored modules to `pyproject.toml` for `mypy` (#38769) + + # v0.20.1 (2023-07-10) ## Spack Bugfixes From 9744e86d02055b64d1b0717e2df44ee0d7039a32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:20:29 -0700 Subject: [PATCH 448/806] build(deps): bump black in /.github/workflows/style (#40681) Bumps [black](https://github.com/psf/black) from 23.9.1 to 23.10.1. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.9.1...23.10.1) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt index 079c4557f64c72..0822ba39339737 100644 --- a/.github/workflows/style/requirements.txt +++ b/.github/workflows/style/requirements.txt @@ -1,4 +1,4 @@ -black==23.9.1 +black==23.10.1 clingo==5.6.2 flake8==6.1.0 isort==5.12.0 From f7630f265bb51a452c00aacc98c8be3b47216757 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 1 Nov 2023 17:16:04 -0500 Subject: [PATCH 449/806] pflotran: add version 5.0.0 (#40828) alquimia: add version 1.1.0 And fix alquimia@master --- var/spack/repos/builtin/packages/alquimia/package.py | 4 +++- var/spack/repos/builtin/packages/pflotran/package.py | 2 ++ var/spack/repos/builtin/packages/xsdk/package.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/alquimia/package.py b/var/spack/repos/builtin/packages/alquimia/package.py index 0a03abc2e0e6f1..d2b33d8524473d 100644 --- a/var/spack/repos/builtin/packages/alquimia/package.py +++ b/var/spack/repos/builtin/packages/alquimia/package.py @@ -15,7 +15,8 @@ class Alquimia(CMakePackage): maintainers("smolins", "balay") - version("develop") + version("master") + version("1.1.0", commit="211931c3e76b1ae7cdb48c46885b248412d6fe3d") # tag v1.1.0 version("1.0.10", commit="b2c11b6cde321f4a495ef9fcf267cb4c7a9858a0") # tag v.1.0.10 version("1.0.9", commit="2ee3bcfacc63f685864bcac2b6868b48ad235225") # tag v.1.0.9 version("xsdk-0.6.0", commit="9a0aedd3a927d4d5e837f8fd18b74ad5a78c3821") @@ -25,6 +26,7 @@ class Alquimia(CMakePackage): depends_on("mpi") depends_on("hdf5") + depends_on("pflotran@5.0.0", when="@1.1.0") depends_on("pflotran@4.0.1", when="@1.0.10") depends_on("pflotran@3.0.2", when="@1.0.9") depends_on("pflotran@xsdk-0.6.0", when="@xsdk-0.6.0") diff --git a/var/spack/repos/builtin/packages/pflotran/package.py b/var/spack/repos/builtin/packages/pflotran/package.py index 0045f2758837dc..57a409b150c858 100644 --- a/var/spack/repos/builtin/packages/pflotran/package.py +++ b/var/spack/repos/builtin/packages/pflotran/package.py @@ -18,6 +18,7 @@ class Pflotran(AutotoolsPackage): maintainers("ghammond86", "balay") version("develop") + version("5.0.0", commit="f0fe931c72c03580e489724afeb8c5451406b942") # tag v5.0.0 version("4.0.1", commit="fd351a49b687e27f46eae92e9259156eea74897d") # tag v4.0.1 version("3.0.2", commit="9e07f416a66b0ad304c720b61aa41cba9a0929d5") # tag v3.0.2 version("xsdk-0.6.0", commit="46e14355c1827c057f2e1b3e3ae934119ab023b2") @@ -30,6 +31,7 @@ class Pflotran(AutotoolsPackage): depends_on("mpi") depends_on("hdf5@1.8.12:+mpi+fortran+hl") depends_on("petsc@main:+hdf5+metis", when="@develop") + depends_on("petsc@3.20:+hdf5+metis", when="@5.0.0") depends_on("petsc@3.18:+hdf5+metis", when="@4.0.1") depends_on("petsc@3.16:+hdf5+metis", when="@3.0.2") depends_on("petsc@3.14:+hdf5+metis", when="@xsdk-0.6.0") diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py index 1dd9d79a5c1b79..3e02dbd8b36a61 100644 --- a/var/spack/repos/builtin/packages/xsdk/package.py +++ b/var/spack/repos/builtin/packages/xsdk/package.py @@ -202,7 +202,7 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on("pflotran@4.0.1", when="@0.8.0") xsdk_depends_on("pflotran@3.0.2", when="@0.7.0") - xsdk_depends_on("alquimia@develop", when="@develop +alquimia") + xsdk_depends_on("alquimia@master", when="@develop +alquimia") xsdk_depends_on("alquimia@1.0.10", when="@0.8.0 +alquimia") xsdk_depends_on("alquimia@1.0.9", when="@0.7.0 +alquimia") From 33b355a085866ee37dd8f67c0cd2073b4f2c1210 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:54:11 -0400 Subject: [PATCH 450/806] heffte: add v2.4.0 (#40741) * update the heffte versions * remove obsolete patch files * update testing * style * restore version (unknown reason) * restore old patch * change the syntax * [@spackbot] updating style on behalf of mkstoyanov * missed one * style --- .../repos/builtin/packages/heffte/package.py | 59 +++++++------------ .../builtin/packages/heffte/threads10.patch | 13 ---- 2 files changed, 22 insertions(+), 50 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/heffte/threads10.patch diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index 32d7e18cc6f848..01f1235771a744 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -10,7 +10,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): """Highly Efficient FFT for Exascale""" homepage = "https://github.com/icl-utk-edu/heffte/" - url = "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.3.0.tar.gz" + url = "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz" git = "https://github.com/icl-utk-edu/heffte/" maintainers("mkstoyanov", "G-Ragghianti") @@ -19,6 +19,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): test_requires_compiler = True version("develop", branch="master") + version("2.4.0", sha256="02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d") version("2.3.0", sha256="63db8c9a8822211d23e29f7adf5aa88bb462c91d7a18c296c3ef3a06be8d6171") version("2.2.0", sha256="332346d5c1d1032288d09839134c79e4a9704e213a2d53051e96c3c414c74df0") version("2.1.0", sha256="63b8ea45a220afc4fa0b14769c0dd291e614a2fe9d5a91c50d28f16ee29b3f1c") @@ -27,29 +28,13 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): sha256="b575fafe19a635265904ca302d48e778341b1567c055ea7f2939c8c6718f7212", deprecated=True, ) - version( - "1.0", - sha256="00e66cdff664ba90eeb26b4824f2a7341ba791b1d7220ece8180aba7623d36d5", - deprecated=True, - ) - version( - "0.2", - sha256="6e606aa9de91912925ec49f463de4369459e509e0e21a97ca72dfa07651056e5", - deprecated=True, - ) - version( - "0.1", - sha256="bcdc940c4cb254b178446d16c969b85ea6b5c69fdf4b6332bb3c8fbce00bccdf", - deprecated=True, - ) - patch("threads10.patch", when="@1.0") - patch("fortran200.patch", when="@2.0.0") patch("cmake-magma-v230.patch", when="@2.3.0") + patch("fortran200.patch", when="@2.0.0") - depends_on("cmake@3.10:", type=("build", "run")) - depends_on("cmake@3.19:", when="@develop", type=("build", "run")) - depends_on("cmake@3.21:", when="@develop+rocm", type=("build", "run")) + depends_on("cmake@3.10:", when="@:2.3.0", type=("build", "run")) + depends_on("cmake@3.19:", when="@2.4.0:", type=("build", "run")) + depends_on("cmake@3.21:", when="@2.4.0:+rocm", type=("build", "run")) variant("shared", default=True, description="Builds with shared libraries") variant("fftw", default=False, description="Builds with support for FFTW backend") @@ -64,14 +49,9 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): depends_on("py-numba", when="+python+cuda", type=("build", "run")) extends("python", when="+python", type=("build", "run")) - conflicts("~fftw", when="@:2.1.0~mkl~cuda") # requires at least one backend - conflicts("+fftw", when="+mkl@:1.0") # old API supports at most one CPU backend conflicts("^openmpi~cuda", when="+cuda") # +cuda requires CUDA enabled OpenMPI conflicts("~cuda~rocm", when="+magma") # magma requires CUDA or HIP conflicts("+rocm", when="@:2.1.0") # heffte+rocm is in in development in spack - conflicts("+python", when="@:1.0") # python support was added post v1.0 - conflicts("+fortran", when="@:1.0") # fortran support was added post v1.0 - conflicts("+magma", when="@:1.0") # magma support was added post v1.0 depends_on("mpi", type=("build", "run")) @@ -80,8 +60,8 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): depends_on("cuda@8.0:", when="+cuda", type=("build", "run")) depends_on("hip@3.8.0:", when="+rocm", type=("build", "run")) depends_on("rocfft@3.8.0:", when="+rocm", type=("build", "run")) - depends_on("hip@5.2.3:", when="@develop+rocm", type=("build", "run")) - depends_on("rocfft@5.2.3:", when="@develop+rocm", type=("build", "run")) + depends_on("hip@5.2.3:", when="@2.4.0:+rocm", type=("build", "run")) + depends_on("rocfft@5.2.3:", when="@2.4.0:+rocm", type=("build", "run")) depends_on("magma@2.5.3:", when="+cuda+magma", type=("build", "run")) depends_on("magma+rocm@2.6.1:", when="+magma+rocm @2.1:", type=("build", "run")) depends_on("rocblas@3.8:", when="+magma+rocm", type=("build", "run")) @@ -94,6 +74,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): def cmake_args(self): args = [ "-DHeffte_SEQUENTIAL_TESTING=ON", + "-DHeffte_ENABLE_TESTING=ON", self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("Heffte_ENABLE_CUDA", "cuda"), self.define_from_variant("Heffte_ENABLE_ROCM", "rocm"), @@ -146,22 +127,26 @@ def test_make_test(self): cmake_dir = self.test_suite.current_test_cache_dir.testing options = [cmake_dir] + options.append(self.define("Heffte_DIR", self.spec.prefix.lib.cmake.Heffte)) if "+rocm" in self.spec: + # path name is 'hsa-runtime64' but python cannot have '-' in variable name + hsa_runtime = join_path(self.spec["hsa-rocr-dev"].prefix.lib.cmake, "hsa-runtime64") options.extend( [ - f"-Dhip_DIR={self.spec['hip'].prefix.lib.cmake.hip}", - "-DAMDDeviceLibs_DIR=" - + f"{self.spec['llvm-amdgpu'].prefix.lib.cmake.AMDDeviceLibs}", - f"-Damd_comgr_DIR={self.spec['comgr'].prefix.lib.cmake.amd_comgr}", - "-Dhsa-runtime64_DIR=" - + f"{self.spec['hsa-rocr-dev'].prefix.lib.cmake.hsa-runtime64}", - "-DHSA_HEADER={self.spec['hsa-rocr-dev'].prefix.include}", - "-Drocfft_DIR={self.spec['rocfft'].prefix.lib.cmake.rocfft}", + self.define("hip_DIR", self.spec["hip"].prefix.lib.cmake.hip), + self.define( + "AMDDeviceLibs_DIR", + self.spec["llvm-amdgpu"].prefix.lib.cmake.AMDDeviceLibs, + ), + self.define("amd_comgr_DIR", self.spec["comgr"].prefix.lib.cmake.amd_comgr), + self.define("hsa-runtime64_DIR", hsa_runtime), + self.define("HSA_HEADER", self.spec["hsa-rocr-dev"].prefix.include), + self.define("rocfft_DIR", self.spec["rocfft"].prefix.lib.cmake.rocfft), ] ) # Provide the root directory of the MPI installation. - options.append(f"-DMPI_HOME={self.spec['mpi'].prefix}") + options.append(self.define("MPI_HOME", self.spec["mpi"].prefix)) cmake = which(self.spec["cmake"].prefix.bin.cmake) cmake(*options) diff --git a/var/spack/repos/builtin/packages/heffte/threads10.patch b/var/spack/repos/builtin/packages/heffte/threads10.patch deleted file mode 100644 index 41d55d9bb80919..00000000000000 --- a/var/spack/repos/builtin/packages/heffte/threads10.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/HeffteConfig.cmake b/cmake/HeffteConfig.cmake -index bd67de9..ca06086 100644 ---- a/cmake/HeffteConfig.cmake -+++ b/cmake/HeffteConfig.cmake -@@ -19,6 +19,8 @@ if (NOT TARGET MPI::MPI_CXX) - find_package(MPI REQUIRED) - endif() - -+find_package(Threads) -+ - if ("@BUILD_SHARED_LIBS@") - set(Heffte_SHARED_FOUND "ON") - else() From a73c95b7344ca0e0207bbde6e9c39a15c2532bf8 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Thu, 2 Nov 2023 00:19:56 +0100 Subject: [PATCH 451/806] pika: Add 0.20.0 (#40817) --- var/spack/repos/builtin/packages/pika/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index 0fd20bb0a3656a..949475650240dc 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -17,6 +17,7 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pika-org/pika.git" maintainers("msimberg", "albestro", "teonnik", "aurianer") + version("0.20.0", sha256="f338cceea66a0e3954806b2aca08f6560bba524ecea222f04bc18b483851c877") version("0.19.1", sha256="674675abf0dd4c6f5a0b2fa3db944b277ed65c62f654029d938a8cab608a9c1d") version("0.19.0", sha256="f45cc16e4e50cbb183ed743bdc8b775d49776ee33c13ea39a650f4230a5744cb") version("0.18.0", sha256="f34890e0594eeca6ac57f2b988d0807b502782817e53a7f7043c3f921b08c99f") From dd636dd3fb4af6214842636cd15ac5abd07ee770 Mon Sep 17 00:00:00 2001 From: Jeremy L Thompson Date: Wed, 1 Nov 2023 17:29:18 -0600 Subject: [PATCH 452/806] libCEED v0.12.0, Ratel v0.3.0 (#40822) * ratel - add v0.3.0 * libceed - add version 0.12.0 --- var/spack/repos/builtin/packages/libceed/package.py | 1 + var/spack/repos/builtin/packages/ratel/package.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/libceed/package.py b/var/spack/repos/builtin/packages/libceed/package.py index 43397349802a52..e74468646b824c 100644 --- a/var/spack/repos/builtin/packages/libceed/package.py +++ b/var/spack/repos/builtin/packages/libceed/package.py @@ -15,6 +15,7 @@ class Libceed(MakefilePackage, CudaPackage, ROCmPackage): maintainers("jedbrown", "v-dobrev", "tzanio", "jeremylt") version("develop", branch="main") + version("0.12.0", tag="v0.12.0", commit="60ef3feef7f5137af55ea7336903743d94ee71a8") version("0.11.0", tag="v0.11.0", commit="8ec64e9ae9d5df169dba8c8ee61d8ec8907b8f80") version("0.10.1", tag="v0.10.1", commit="74532b27052d94e943eb8bc76257fbd710103614") version("0.9", tag="v0.9.0", commit="d66340f5aae79e564186ab7514a1cd08b3a1b06b") diff --git a/var/spack/repos/builtin/packages/ratel/package.py b/var/spack/repos/builtin/packages/ratel/package.py index c3e32ab85eb30b..9eeaf2ec8c8a7d 100644 --- a/var/spack/repos/builtin/packages/ratel/package.py +++ b/var/spack/repos/builtin/packages/ratel/package.py @@ -15,6 +15,7 @@ class Ratel(MakefilePackage, CudaPackage, ROCmPackage): maintainers("jedbrown", "jeremylt") version("develop", branch="main") + version("0.3.0", tag="v0.3.0", commit="ca2f3357e10b89fb274626fba104aad30c72774b") version("0.2.1", tag="v0.2.1", commit="043b61696a2407205fdfd898681467d1a7ff59e0") version("0.1.2", tag="v0.1.2", commit="94ad630bf897d231af7a94bf08257f6067258aae") @@ -22,6 +23,8 @@ class Ratel(MakefilePackage, CudaPackage, ROCmPackage): depends_on("libceed@develop", when="@develop") depends_on("petsc@main", when="@develop") # released versions + depends_on("libceed@0.12.0:0.12", when="@0.3.0") + depends_on("petsc@3.20.0:3.20", when="@0.3.0") depends_on("libceed@0.11.0:0.11", when="@0.2.1") depends_on("petsc@3.18.3:3.18", when="@0.2.1") depends_on("libceed@0.10.1:0.10", when="@0.1.2") From e7456e1aab27b2d9b8b1133a65d5561f3ff21584 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 1 Nov 2023 18:33:00 -0500 Subject: [PATCH 453/806] py-matplotlib: add v3.8.1 (#40819) --- .../repos/builtin/packages/py-matplotlib/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 2560155ac8f684..18d8d98f0ac880 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -24,6 +24,7 @@ class PyMatplotlib(PythonPackage): "mpl_toolkits.mplot3d.tests", ] + version("3.8.1", sha256="044df81c1f6f3a8e52d70c4cfcb44e77ea9632a10929932870dfaa90de94365d") version("3.8.0", sha256="df8505e1c19d5c2c26aff3497a7cbd3ccfc2e97043d1e4db3e76afa399164b69") version("3.7.3", sha256="f09b3dd6bdeb588de91f853bbb2d6f0ff8ab693485b0c49035eaa510cb4f142e") version("3.7.2", sha256="a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b") @@ -136,7 +137,8 @@ class PyMatplotlib(PythonPackage): depends_on("py-contourpy@1.0.1:", when="@3.6:", type=("build", "run")) depends_on("py-cycler@0.10:", type=("build", "run")) depends_on("py-fonttools@4.22:", when="@3.5:", type=("build", "run")) - depends_on("py-kiwisolver@1.0.1:", type=("build", "run"), when="@2.2.0:") + depends_on("py-kiwisolver@1.3.1:", when="@3.8.1:", type=("build", "run")) + depends_on("py-kiwisolver@1.0.1:", when="@2.2:", type=("build", "run")) depends_on("py-numpy@1.21:1", when="@3.8:", type=("build", "link", "run")) depends_on("py-numpy@1.20:", when="@3.7:", type=("build", "link", "run")) depends_on("py-numpy@1.19:", when="@3.6:", type=("build", "link", "run")) @@ -146,8 +148,9 @@ class PyMatplotlib(PythonPackage): depends_on("py-numpy@1.11:", type=("build", "run")) depends_on("py-packaging@20:", when="@3.6:", type=("build", "run")) depends_on("py-packaging", when="@3.5:", type=("build", "run")) + depends_on("pil@8:", when="@3.8.1:", type=("build", "run")) depends_on("pil@6.2:", when="@3.3:", type=("build", "run")) - depends_on("py-pyparsing@2.3.1:3.0", when="@3.7.2:", type=("build", "run")) + depends_on("py-pyparsing@2.3.1:3.0", when="@3.7.2", type=("build", "run")) depends_on("py-pyparsing@2.3.1:", when="@3.7:", type=("build", "run")) depends_on("py-pyparsing@2.2.1:", when="@3.4:", type=("build", "run")) depends_on("py-pyparsing@2.0.3,2.0.5:2.1.1,2.1.3:2.1.5,2.1.7:", type=("build", "run")) @@ -221,7 +224,9 @@ class PyMatplotlib(PythonPackage): # Dependencies for building matplotlib # Setup dependencies depends_on("py-certifi@2020.6.20:", when="@3.3.1:", type="build") + depends_on("py-numpy@1.25:", when="@3.8:", type="build") depends_on("py-pybind11@2.6:", when="@3.7:", type="build") + depends_on("py-setuptools@64:", when="@3.8.1:", type="build") depends_on("py-setuptools@42:", when="@3.8:", type="build") depends_on("py-setuptools@42:", when="@3.7.2:3.7", type=("build", "run")) depends_on("py-setuptools", when="@:3.7.1", type=("build", "run")) From a8285f0eec9917d8a0c4202268ddcb91f410dcc6 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:33:12 -0500 Subject: [PATCH 454/806] vcftools: add v0.1.16 (#40805) * vcftools: adding new version 0.1.16 * Update var/spack/repos/builtin/packages/vcftools/package.py Co-authored-by: Alec Scott --------- Co-authored-by: Alec Scott --- var/spack/repos/builtin/packages/vcftools/package.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/vcftools/package.py b/var/spack/repos/builtin/packages/vcftools/package.py index 944760be387763..e592728113f0cb 100644 --- a/var/spack/repos/builtin/packages/vcftools/package.py +++ b/var/spack/repos/builtin/packages/vcftools/package.py @@ -16,6 +16,7 @@ class Vcftools(AutotoolsPackage): homepage = "https://vcftools.github.io/" url = "https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz" + version("0.1.16", sha256="dbfc774383c106b85043daa2c42568816aa6a7b4e6abc965eeea6c47dde914e3") # this is "a pre-release" # version('0.1.15', sha256='31e47afd5be679d89ece811a227525925b6907cce4af2c86f10f465e080383e3') version("0.1.14", sha256="76d799dd9afcb12f1ed42a07bc2886cd1a989858a4d047f24d91dcf40f608582") @@ -26,7 +27,15 @@ class Vcftools(AutotoolsPackage): # this needs to be in sync with what setup_run_environment adds to # PERL5LIB below def configure_args(self): - return ["--with-pmdir={0}".format(self.prefix.lib)] + args = [] + # between 0.1.16 and 14 the behavior of the configure script + # wrt the perl lib dir changed and it became relative to the + # install directory, if you specify the whole prefix in + # it now you end up with a nasty recreation of the + # prefix tree in self.prefix. + if self.spec.satisfies("@:0.1.14"): + args.append(f"--with-pmdir={self.prefix.lib}") + return args @run_before("install") def filter_sbang(self): From 6af45230b468f090d1a2318d3ec539bfd5b1f4c4 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Wed, 1 Nov 2023 19:47:55 -0500 Subject: [PATCH 455/806] ceres-solver: adding version 2.2.0 (#40824) * ceres-solver: adding version 2.2.0 * ceres-solver: adding suite-sparse dep --- .../builtin/packages/ceres-solver/package.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/ceres-solver/package.py b/var/spack/repos/builtin/packages/ceres-solver/package.py index 30ee0f19709137..c9cdecc07e1f4f 100644 --- a/var/spack/repos/builtin/packages/ceres-solver/package.py +++ b/var/spack/repos/builtin/packages/ceres-solver/package.py @@ -17,6 +17,7 @@ class CeresSolver(CMakePackage): homepage = "http://ceres-solver.org" url = "http://ceres-solver.org/ceres-solver-1.12.0.tar.gz" + version("2.2.0", sha256="48b2302a7986ece172898477c3bcd6deb8fb5cf19b3327bc49969aad4cede82d") version("2.0.0", sha256="10298a1d75ca884aa0507d1abb0e0f04800a92871cd400d4c361b56a777a7603") version("1.14.0", sha256="4744005fc3b902fed886ea418df70690caa8e2ff6b5a90f3dd88a3d291ef8e8e") version("1.12.0", sha256="745bfed55111e086954126b748eb9efe20e30be5b825c6dec3c525cf20afc895") @@ -25,12 +26,26 @@ class CeresSolver(CMakePackage): variant("shared", default=True, description="Build shared libraries") variant("examples", default=False, description="Build examples") + depends_on("cmake@2.8.0:", type="build", when="@1.12.0:1.14.0") + depends_on("cmake@3.5:", type="build", when="@2.0.0") + depends_on("cmake@3.16:3.27", type="build", when="@2.2.0") depends_on("eigen@3:") + depends_on("eigen@3.3:", when="@2.0.0:") depends_on("lapack") - depends_on("glog") + depends_on("glog@0.3.5:") + depends_on("suite-sparse", when="+suitesparse") def cmake_args(self): - args = ["-DCXSPARSE=OFF", "-DEIGENSPARSE=ON", "-DLAPACK=ON", "-DSCHUR_SPECIALIZATIONS=OFF"] + args = [] + if self.spec.satisfies("@:2.0.0"): + args.extend( + [ + "-DCXSPARSE=OFF", + "-DEIGENSPARSE=ON", + "-DLAPACK=ON", + "-DSCHUR_SPECIALIZATIONS=OFF", + ] + ) if "+suitesparse" in self.spec: args.append("-DSUITESPARSE=ON") From 6cd2241e49a393d7ac32b46064a2d2f4e53f7d86 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Thu, 2 Nov 2023 06:04:00 +0100 Subject: [PATCH 456/806] edm4hep: Add 0.10.1 tag and update maintainers (#40829) * edm4hep: add latest tag * edm4hep: Add myself as maintainer --- var/spack/repos/builtin/packages/edm4hep/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/edm4hep/package.py b/var/spack/repos/builtin/packages/edm4hep/package.py index a0204eeefd678a..b8d4238ce70522 100644 --- a/var/spack/repos/builtin/packages/edm4hep/package.py +++ b/var/spack/repos/builtin/packages/edm4hep/package.py @@ -14,11 +14,12 @@ class Edm4hep(CMakePackage): url = "https://github.com/key4hep/EDM4hep/archive/v00-01.tar.gz" git = "https://github.com/key4hep/EDM4hep.git" - maintainers("vvolkl", "jmcarcell") + maintainers("vvolkl", "jmcarcell", "tmadlener") tags = ["hep", "key4hep"] version("master", branch="master") + version("0.10.1", sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed") version("0.10", sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0") version( "0.9", From 16fa3b9f077be62e62214585dee9f6dfda7f48ad Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 2 Nov 2023 07:35:23 +0100 Subject: [PATCH 457/806] Cherry-picking virtual dependencies (#35322) This PR makes it possible to select only a subset of virtual dependencies from a spec that _may_ provide more. To select providers, a syntax to specify edge attributes is introduced: ``` hdf5 ^[virtuals=mpi] mpich ``` With that syntax we can concretize specs like: ```console $ spack spec strumpack ^[virtuals=mpi] intel-parallel-studio+mkl ^[virtuals=lapack] openblas ``` On `develop` this would currently fail with: ```console $ spack spec strumpack ^intel-parallel-studio+mkl ^openblas ==> Error: Spec cannot include multiple providers for virtual 'blas' Requested 'intel-parallel-studio' and 'openblas' ``` In package recipes, virtual specs that are declared in the same `provides` directive need to be provided _together_. This means that e.g. `openblas`, which has: ```python provides("blas", "lapack") ``` needs to provide both `lapack` and `blas` when requested to provide at least one of them. ## Additional notes This capability is needed to model compilers. Assuming that languages are treated like virtual dependencies, we might want e.g. to use LLVM to compile C/C++ and Gnu GCC to compile Fortran. This can be accomplished by the following[^1]: ``` hdf5 ^[virtuals=c,cxx] llvm ^[virtuals=fortran] gcc ``` [^1]: We plan to add some syntactic sugar around this syntax, and reuse the `%` sigil to avoid having a lot of boilerplate around compilers. Modifications: - [x] Add syntax to interact with edge attributes from spec literals - [x] Add concretization logic to be able to cherry-pick virtual dependencies - [x] Extend semantic of the `provides` directive to express when virtuals need to be provided together - [x] Add unit-tests and documentation --- lib/spack/docs/basic_usage.rst | 24 + lib/spack/docs/images/strumpack_virtuals.svg | 534 ++++++++++++++++++ lib/spack/docs/packaging_guide.rst | 27 + lib/spack/spack/directives.py | 37 +- lib/spack/spack/graph.py | 7 +- lib/spack/spack/parser.py | 74 ++- lib/spack/spack/provider_index.py | 51 -- lib/spack/spack/solver/asp.py | 25 +- lib/spack/spack/solver/concretize.lp | 43 +- lib/spack/spack/spec.py | 108 +++- lib/spack/spack/test/build_environment.py | 10 + lib/spack/spack/test/cmd/dependencies.py | 9 +- lib/spack/spack/test/cmd/env.py | 15 +- lib/spack/spack/test/concretize.py | 46 +- lib/spack/spack/test/package_class.py | 1 + lib/spack/spack/test/spec_dag.py | 1 + lib/spack/spack/test/spec_semantics.py | 142 ++++- lib/spack/spack/test/spec_syntax.py | 23 + .../packages/intel-parallel-studio/package.py | 19 + .../packages/low-priority-provider/package.py | 4 +- .../packages/many-virtual-consumer/package.py | 2 +- .../packages/netlib-scalapack/package.py | 20 + .../packages/openblas-with-lapack/package.py | 3 +- .../packages/lua-luajit-openresty/package.py | 3 +- .../builtin/packages/lua-luajit/package.py | 3 +- .../builtin/packages/openblas/package.py | 3 +- .../packages/conditional-edge/package.py | 24 + .../repos/edges.test/packages/zlib/package.py | 19 + var/spack/repos/edges.test/repo.yaml | 2 + 29 files changed, 1126 insertions(+), 153 deletions(-) create mode 100644 lib/spack/docs/images/strumpack_virtuals.svg create mode 100644 var/spack/repos/builtin.mock/packages/intel-parallel-studio/package.py create mode 100644 var/spack/repos/builtin.mock/packages/netlib-scalapack/package.py create mode 100644 var/spack/repos/edges.test/packages/conditional-edge/package.py create mode 100644 var/spack/repos/edges.test/packages/zlib/package.py create mode 100644 var/spack/repos/edges.test/repo.yaml diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index d1f048ac055acc..52054a9405653e 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -1526,6 +1526,30 @@ any MPI implementation will do. If another package depends on error. Likewise, if you try to plug in some package that doesn't provide MPI, Spack will raise an error. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Explicit binding of virtual dependencies +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There are packages that provide more than just one virtual dependency. When interacting with them, users +might want to utilize just a subset of what they could provide, and use other providers for virtuals they +need. + +It is possible to be more explicit and tell Spack which dependency should provide which virtual, using a +special syntax: + +.. code-block:: console + + $ spack spec strumpack ^[virtuals=mpi] intel-parallel-studio+mkl ^[virtuals=lapack] openblas + +Concretizing the spec above produces the following DAG: + +.. figure:: images/strumpack_virtuals.svg + :scale: 60 % + :align: center + +where ``intel-parallel-studio`` *could* provide ``mpi``, ``lapack``, and ``blas`` but is used only for the former. The ``lapack`` +and ``blas`` dependencies are satisfied by ``openblas``. + ^^^^^^^^^^^^^^^^^^^^^^^^ Specifying Specs by Hash ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/images/strumpack_virtuals.svg b/lib/spack/docs/images/strumpack_virtuals.svg new file mode 100644 index 00000000000000..eb580f0a5805c7 --- /dev/null +++ b/lib/spack/docs/images/strumpack_virtuals.svg @@ -0,0 +1,534 @@ + + +G + + + +hkcrbrtf2qex6rvzuok5tzdrbam55pdn + +netlib-scalapack@2.2.0%gcc@9.4.0/hkcrbrt + + + +o524gebsxavobkte3k5fglgwnedfkadf + +openblas@0.3.21%gcc@9.4.0/o524geb + + + +hkcrbrtf2qex6rvzuok5tzdrbam55pdn->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas,lapack + + + +2w3nq3n3hcj2tqlvcpewsryamltlu5tw + +intel-parallel-studio@cluster.2020.4%gcc@9.4.0/2w3nq3n + + + +hkcrbrtf2qex6rvzuok5tzdrbam55pdn->2w3nq3n3hcj2tqlvcpewsryamltlu5tw + + + +virtuals=mpi + + + +gguve5icmo5e4cw5o3hvvfsxremc46if + +cmake@3.25.1%gcc@9.4.0/gguve5i + + + +hkcrbrtf2qex6rvzuok5tzdrbam55pdn->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +i4avrindvhcamhurzbfdaggbj2zgsrrh + +pkgconf@1.8.0%gcc@9.4.0/i4avrin + + + +ywrpvv2hgooeepdke33exkqrtdpd5gkl + +perl@5.36.0%gcc@9.4.0/ywrpvv2 + + + +h3ujmb3ts4kxxxv77knh2knuystuerbx + +bzip2@1.0.8%gcc@9.4.0/h3ujmb3 + + + +ywrpvv2hgooeepdke33exkqrtdpd5gkl->h3ujmb3ts4kxxxv77knh2knuystuerbx + + + + + + +uabgssx6lsgrevwbttslldnr5nzguprj + +gdbm@1.23%gcc@9.4.0/uabgssx + + + +ywrpvv2hgooeepdke33exkqrtdpd5gkl->uabgssx6lsgrevwbttslldnr5nzguprj + + + + + + +gkw4dg2p7rdnhru3m6lcnsjbzyr7g3hb + +berkeley-db@18.1.40%gcc@9.4.0/gkw4dg2 + + + +ywrpvv2hgooeepdke33exkqrtdpd5gkl->gkw4dg2p7rdnhru3m6lcnsjbzyr7g3hb + + + + + + +nizxi5u5bbrzhzwfy2qb7hatlhuswlrz + +zlib@1.2.13%gcc@9.4.0/nizxi5u + + + +ywrpvv2hgooeepdke33exkqrtdpd5gkl->nizxi5u5bbrzhzwfy2qb7hatlhuswlrz + + + + + + +idvshq5nqmygzd4uo62mdispwgxsw7id + +strumpack@7.0.1%gcc@9.4.0/idvshq5 + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->hkcrbrtf2qex6rvzuok5tzdrbam55pdn + + + +virtuals=scalapack + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas,lapack + + + +imopnxjmv7cwzyiecdw2saq42qvpnauh + +parmetis@4.0.3%gcc@9.4.0/imopnxj + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->imopnxjmv7cwzyiecdw2saq42qvpnauh + + + + + + +ern66gyp6qmhmpod4jaynxx4weoberfm + +metis@5.1.0%gcc@9.4.0/ern66gy + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->ern66gyp6qmhmpod4jaynxx4weoberfm + + + + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf + +butterflypack@2.2.2%gcc@9.4.0/nqiyrxl + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->nqiyrxlid6tikfpvoqdpvsjt5drs2obf + + + + + + +4bu62kyfuh4ikdkuyxfxjxanf7e7qopu + +slate@2022.07.00%gcc@9.4.0/4bu62ky + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->4bu62kyfuh4ikdkuyxfxjxanf7e7qopu + + + + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->2w3nq3n3hcj2tqlvcpewsryamltlu5tw + + + +virtuals=mpi + + + +7rzbmgoxhmm2jhellkgcjmn62uklf22x + +zfp@0.5.5%gcc@9.4.0/7rzbmgo + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->7rzbmgoxhmm2jhellkgcjmn62uklf22x + + + + + + +idvshq5nqmygzd4uo62mdispwgxsw7id->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +mujlx42xgttdc6u6rmiftsktpsrcmpbs + +blaspp@2022.07.00%gcc@9.4.0/mujlx42 + + + +mujlx42xgttdc6u6rmiftsktpsrcmpbs->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas + + + +mujlx42xgttdc6u6rmiftsktpsrcmpbs->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +htzjns66gmq6pjofohp26djmjnpbegho + +patchelf@0.16.1%gcc@9.4.0/htzjns6 + + + +xm3ldz3y3msfdc3hzshvxpbpg5hnt6o6 + +diffutils@3.8%gcc@9.4.0/xm3ldz3 + + + +h3ujmb3ts4kxxxv77knh2knuystuerbx->xm3ldz3y3msfdc3hzshvxpbpg5hnt6o6 + + + + + +o524gebsxavobkte3k5fglgwnedfkadf->ywrpvv2hgooeepdke33exkqrtdpd5gkl + + + + + +4vsmjofkhntilgzh4zebluqak5mdsu3x + +ca-certificates-mozilla@2023-01-10%gcc@9.4.0/4vsmjof + + + +xiro2z6na56qdd4czjhj54eag3ekbiow + +lapackpp@2022.07.00%gcc@9.4.0/xiro2z6 + + + +xiro2z6na56qdd4czjhj54eag3ekbiow->mujlx42xgttdc6u6rmiftsktpsrcmpbs + + + + + + +xiro2z6na56qdd4czjhj54eag3ekbiow->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas,lapack + + + +xiro2z6na56qdd4czjhj54eag3ekbiow->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +j5rupoqliu7kasm6xndl7ui32wgawkru + +ncurses@6.4%gcc@9.4.0/j5rupoq + + + +j5rupoqliu7kasm6xndl7ui32wgawkru->i4avrindvhcamhurzbfdaggbj2zgsrrh + + +virtuals=pkgconfig + + + +imopnxjmv7cwzyiecdw2saq42qvpnauh->ern66gyp6qmhmpod4jaynxx4weoberfm + + + + + + +imopnxjmv7cwzyiecdw2saq42qvpnauh->2w3nq3n3hcj2tqlvcpewsryamltlu5tw + + + +virtuals=mpi + + + +imopnxjmv7cwzyiecdw2saq42qvpnauh->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +ern66gyp6qmhmpod4jaynxx4weoberfm->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf->hkcrbrtf2qex6rvzuok5tzdrbam55pdn + + + +virtuals=scalapack + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas,lapack + + + +lfh3aovn65e66cs24qiehq3nd2ddojef + +arpack-ng@3.8.0%gcc@9.4.0/lfh3aov + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf->lfh3aovn65e66cs24qiehq3nd2ddojef + + + + + + +57joith2sqq6sehge54vlloyolm36mdu + +sed@4.8%gcc@9.4.0/57joith + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf->57joith2sqq6sehge54vlloyolm36mdu + + + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf->2w3nq3n3hcj2tqlvcpewsryamltlu5tw + + + +virtuals=mpi + + + +nqiyrxlid6tikfpvoqdpvsjt5drs2obf->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +ogcucq2eod3xusvvied5ol2iobui4nsb + +libiconv@1.17%gcc@9.4.0/ogcucq2 + + + +xm3ldz3y3msfdc3hzshvxpbpg5hnt6o6->ogcucq2eod3xusvvied5ol2iobui4nsb + + + +virtuals=iconv + + + +4bu62kyfuh4ikdkuyxfxjxanf7e7qopu->mujlx42xgttdc6u6rmiftsktpsrcmpbs + + + + + + +4bu62kyfuh4ikdkuyxfxjxanf7e7qopu->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas + + + +4bu62kyfuh4ikdkuyxfxjxanf7e7qopu->xiro2z6na56qdd4czjhj54eag3ekbiow + + + + + + +4bu62kyfuh4ikdkuyxfxjxanf7e7qopu->2w3nq3n3hcj2tqlvcpewsryamltlu5tw + + + +virtuals=mpi + + + +4bu62kyfuh4ikdkuyxfxjxanf7e7qopu->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + + +5xerf6imlgo4xlubacr4mljacc3edexo + +openssl@1.1.1s%gcc@9.4.0/5xerf6i + + + +5xerf6imlgo4xlubacr4mljacc3edexo->ywrpvv2hgooeepdke33exkqrtdpd5gkl + + + + + +5xerf6imlgo4xlubacr4mljacc3edexo->4vsmjofkhntilgzh4zebluqak5mdsu3x + + + + + +5xerf6imlgo4xlubacr4mljacc3edexo->nizxi5u5bbrzhzwfy2qb7hatlhuswlrz + + + + + + +v32wejd4d5lc6uka4qlrogwh5xae2h3r + +readline@8.2%gcc@9.4.0/v32wejd + + + +uabgssx6lsgrevwbttslldnr5nzguprj->v32wejd4d5lc6uka4qlrogwh5xae2h3r + + + + + + +lfh3aovn65e66cs24qiehq3nd2ddojef->o524gebsxavobkte3k5fglgwnedfkadf + + + +virtuals=blas,lapack + + + +lfh3aovn65e66cs24qiehq3nd2ddojef->2w3nq3n3hcj2tqlvcpewsryamltlu5tw + + + +virtuals=mpi + + + +lfh3aovn65e66cs24qiehq3nd2ddojef->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +2w3nq3n3hcj2tqlvcpewsryamltlu5tw->htzjns66gmq6pjofohp26djmjnpbegho + + + + + +7rzbmgoxhmm2jhellkgcjmn62uklf22x->gguve5icmo5e4cw5o3hvvfsxremc46if + + + + + +v32wejd4d5lc6uka4qlrogwh5xae2h3r->j5rupoqliu7kasm6xndl7ui32wgawkru + + + + + + +gguve5icmo5e4cw5o3hvvfsxremc46if->j5rupoqliu7kasm6xndl7ui32wgawkru + + + + + + +gguve5icmo5e4cw5o3hvvfsxremc46if->5xerf6imlgo4xlubacr4mljacc3edexo + + + + + + \ No newline at end of file diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 89afac75fe979c..839f3b7c6f14f0 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2974,6 +2974,33 @@ The ``provides("mpi")`` call tells Spack that the ``mpich`` package can be used to satisfy the dependency of any package that ``depends_on("mpi")``. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Providing multiple virtuals simultaneously +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Packages can provide more than one virtual dependency. Sometimes, due to implementation details, +there are subsets of those virtuals that need to be provided together by the same package. + +A well-known example is ``openblas``, which provides both the ``lapack`` and ``blas`` API in a single ``libopenblas`` +library. A package that needs ``lapack`` and ``blas`` must either use ``openblas`` to provide both, or not use +``openblas`` at all. It cannot pick one or the other. + +To express this constraint in a package, the two virtual dependencies must be listed in the same ``provides`` directive: + +.. code-block:: python + + provides('blas', 'lapack') + +This makes it impossible to select ``openblas`` as a provider for one of the two +virtual dependencies and not for the other. If you try to, Spack will report an error: + +.. code-block:: console + + $ spack spec netlib-scalapack ^[virtuals=lapack] openblas ^[virtuals=blas] atlas + ==> Error: concretization failed for the following reasons: + + 1. Package 'openblas' needs to provide both 'lapack' and 'blas' together, but provides only 'lapack' + ^^^^^^^^^^^^^^^^^^^^ Versioned Interfaces ^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 7ebf68e54885f7..bfd57fc6f9cade 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -573,17 +573,21 @@ def _execute_extends(pkg): return _execute_extends -@directive("provided") -def provides(*specs, **kwargs): - """Allows packages to provide a virtual dependency. If a package provides - 'mpi', other packages can declare that they depend on "mpi", and spack - can use the providing package to satisfy the dependency. +@directive(dicts=("provided", "provided_together")) +def provides(*specs, when: Optional[str] = None): + """Allows packages to provide a virtual dependency. + + If a package provides "mpi", other packages can declare that they depend on "mpi", + and spack can use the providing package to satisfy the dependency. + + Args: + *specs: virtual specs provided by this package + when: condition when this provides clause needs to be considered """ def _execute_provides(pkg): import spack.parser # Avoid circular dependency - when = kwargs.get("when") when_spec = make_when_spec(when) if not when_spec: return @@ -591,15 +595,18 @@ def _execute_provides(pkg): # ``when`` specs for ``provides()`` need a name, as they are used # to build the ProviderIndex. when_spec.name = pkg.name - - for string in specs: - for provided_spec in spack.parser.parse(string): - if pkg.name == provided_spec.name: - raise CircularReferenceError("Package '%s' cannot provide itself." % pkg.name) - - if provided_spec not in pkg.provided: - pkg.provided[provided_spec] = set() - pkg.provided[provided_spec].add(when_spec) + spec_objs = [spack.spec.Spec(x) for x in specs] + spec_names = [x.name for x in spec_objs] + if len(spec_names) > 1: + pkg.provided_together.setdefault(when_spec, []).append(set(spec_names)) + + for provided_spec in spec_objs: + if pkg.name == provided_spec.name: + raise CircularReferenceError("Package '%s' cannot provide itself." % pkg.name) + + if provided_spec not in pkg.provided: + pkg.provided[provided_spec] = set() + pkg.provided[provided_spec].add(when_spec) return _execute_provides diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py index 76ebbf636ebc95..78bf38ec0e7e43 100644 --- a/lib/spack/spack/graph.py +++ b/lib/spack/spack/graph.py @@ -528,10 +528,15 @@ def node_entry(self, node): def edge_entry(self, edge): colormap = {"build": "dodgerblue", "link": "crimson", "run": "goldenrod"} + label = "" + if edge.virtuals: + label = f" xlabel=\"virtuals={','.join(edge.virtuals)}\"" return ( edge.parent.dag_hash(), edge.spec.dag_hash(), - f"[color=\"{':'.join(colormap[x] for x in dt.flag_to_tuple(edge.depflag))}\"]", + f"[color=\"{':'.join(colormap[x] for x in dt.flag_to_tuple(edge.depflag))}\"" + + label + + "]", ) diff --git a/lib/spack/spack/parser.py b/lib/spack/spack/parser.py index b73a1897974fc2..c69918b41905b5 100644 --- a/lib/spack/spack/parser.py +++ b/lib/spack/spack/parser.py @@ -6,7 +6,7 @@ Here is the EBNF grammar for a spec:: - spec = [name] [node_options] { ^ node } | + spec = [name] [node_options] { ^[edge_properties] node } | [name] [node_options] hash | filename @@ -14,7 +14,8 @@ [name] [node_options] hash | filename - node_options = [@(version_list|version_pair)] [%compiler] { variant } + node_options = [@(version_list|version_pair)] [%compiler] { variant } + edge_properties = [ { bool_variant | key_value } ] hash = / id filename = (.|/|[a-zA-Z0-9-_]*/)([a-zA-Z0-9-_./]*)(.json|.yaml) @@ -64,6 +65,7 @@ from llnl.util.tty import color +import spack.deptypes import spack.error import spack.spec import spack.version @@ -126,6 +128,8 @@ class TokenType(TokenBase): """ # Dependency + START_EDGE_PROPERTIES = r"(?:\^\[)" + END_EDGE_PROPERTIES = r"(?:\])" DEPENDENCY = r"(?:\^)" # Version VERSION_HASH_PAIR = rf"(?:@(?:{GIT_VERSION_PATTERN})=(?:{VERSION}))" @@ -280,16 +284,15 @@ def next_spec( initial_spec = initial_spec or spack.spec.Spec() root_spec = SpecNodeParser(self.ctx).parse(initial_spec) while True: - if self.ctx.accept(TokenType.DEPENDENCY): - dependency = SpecNodeParser(self.ctx).parse() - - if dependency is None: - msg = ( - "this dependency sigil needs to be followed by a package name " - "or a node attribute (version, variant, etc.)" - ) - raise SpecParsingError(msg, self.ctx.current_token, self.literal_str) - + if self.ctx.accept(TokenType.START_EDGE_PROPERTIES): + edge_properties = EdgeAttributeParser(self.ctx, self.literal_str).parse() + edge_properties.setdefault("depflag", 0) + edge_properties.setdefault("virtuals", ()) + dependency = self._parse_node(root_spec) + root_spec._add_dependency(dependency, **edge_properties) + + elif self.ctx.accept(TokenType.DEPENDENCY): + dependency = self._parse_node(root_spec) root_spec._add_dependency(dependency, depflag=0, virtuals=()) else: @@ -297,6 +300,18 @@ def next_spec( return root_spec + def _parse_node(self, root_spec): + dependency = SpecNodeParser(self.ctx).parse() + if dependency is None: + msg = ( + "the dependency sigil and any optional edge attributes must be followed by a " + "package name or a node attribute (version, variant, etc.)" + ) + raise SpecParsingError(msg, self.ctx.current_token, self.literal_str) + if root_spec.concrete: + raise spack.spec.RedundantSpecError(root_spec, "^" + str(dependency)) + return dependency + def all_specs(self) -> List["spack.spec.Spec"]: """Return all the specs that remain to be parsed""" return list(iter(self.next_spec, None)) @@ -438,6 +453,41 @@ def parse(self, initial_spec: "spack.spec.Spec") -> "spack.spec.Spec": return initial_spec +class EdgeAttributeParser: + __slots__ = "ctx", "literal_str" + + def __init__(self, ctx, literal_str): + self.ctx = ctx + self.literal_str = literal_str + + def parse(self): + attributes = {} + while True: + if self.ctx.accept(TokenType.KEY_VALUE_PAIR): + name, value = self.ctx.current_token.value.split("=", maxsplit=1) + name = name.strip("'\" ") + value = value.strip("'\" ").split(",") + attributes[name] = value + if name not in ("deptypes", "virtuals"): + msg = ( + "the only edge attributes that are currently accepted " + 'are "deptypes" and "virtuals"' + ) + raise SpecParsingError(msg, self.ctx.current_token, self.literal_str) + # TODO: Add code to accept bool variants here as soon as use variants are implemented + elif self.ctx.accept(TokenType.END_EDGE_PROPERTIES): + break + else: + msg = "unexpected token in edge attributes" + raise SpecParsingError(msg, self.ctx.next_token, self.literal_str) + + # Turn deptypes=... to depflag representation + if "deptypes" in attributes: + deptype_string = attributes.pop("deptypes") + attributes["depflag"] = spack.deptypes.canonicalize(deptype_string) + return attributes + + def parse(text: str) -> List["spack.spec.Spec"]: """Parse text into a list of strings diff --git a/lib/spack/spack/provider_index.py b/lib/spack/spack/provider_index.py index 2624de56acd88e..32ace00a1669e7 100644 --- a/lib/spack/spack/provider_index.py +++ b/lib/spack/spack/provider_index.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """Classes and functions to manage providers of virtual dependencies""" -import itertools from typing import Dict, List, Optional, Set import spack.error @@ -11,33 +10,6 @@ import spack.util.spack_json as sjson -def _cross_provider_maps(lmap, rmap): - """Return a dictionary that combines constraint requests from both input. - - Args: - lmap: main provider map - rmap: provider map with additional constraints - """ - # TODO: this is pretty darned nasty, and inefficient, but there - # TODO: are not that many vdeps in most specs. - result = {} - for lspec, rspec in itertools.product(lmap, rmap): - try: - constrained = lspec.constrained(rspec) - except spack.error.UnsatisfiableSpecError: - continue - - # lp and rp are left and right provider specs. - for lp_spec, rp_spec in itertools.product(lmap[lspec], rmap[rspec]): - if lp_spec.name == rp_spec.name: - try: - const = lp_spec.constrained(rp_spec, deps=False) - result.setdefault(constrained, set()).add(const) - except spack.error.UnsatisfiableSpecError: - continue - return result - - class _IndexBase: #: This is a dict of dicts used for finding providers of particular #: virtual dependencies. The dict of dicts looks like: @@ -81,29 +53,6 @@ def providers_for(self, virtual_spec): def __contains__(self, name): return name in self.providers - def satisfies(self, other): - """Determine if the providers of virtual specs are compatible. - - Args: - other: another provider index - - Returns: - True if the providers are compatible, False otherwise. - """ - common = set(self.providers) & set(other.providers) - if not common: - return True - - # This ensures that some provider in other COULD satisfy the - # vpkg constraints on self. - result = {} - for name in common: - crossed = _cross_provider_maps(self.providers[name], other.providers[name]) - if crossed: - result[name] = crossed - - return all(c in result for c in common) - def __eq__(self, other): return self.providers == other.providers diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 729a1febc4487a..63e32a757692c1 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1501,6 +1501,17 @@ def package_provider_rules(self, pkg): ) self.gen.newline() + for when, sets_of_virtuals in pkg.provided_together.items(): + condition_id = self.condition( + when, name=pkg.name, msg="Virtuals are provided together" + ) + for set_id, virtuals_together in enumerate(sets_of_virtuals): + for name in virtuals_together: + self.gen.fact( + fn.pkg_fact(pkg.name, fn.provided_together(condition_id, set_id, name)) + ) + self.gen.newline() + def package_dependencies_rules(self, pkg): """Translate 'depends_on' directives into ASP logic.""" for _, conditions in sorted(pkg.dependencies.items()): @@ -1902,6 +1913,15 @@ class Body: clauses.append(fn.attr("package_hash", spec.name, spec._package_hash)) clauses.append(fn.attr("hash", spec.name, spec.dag_hash())) + edges = spec.edges_from_dependents() + virtuals = [x for x in itertools.chain.from_iterable([edge.virtuals for edge in edges])] + if not body: + for virtual in virtuals: + clauses.append(fn.attr("provider_set", spec.name, virtual)) + else: + for virtual in virtuals: + clauses.append(fn.attr("virtual_on_incoming_edges", spec.name, virtual)) + # add all clauses from dependencies if transitive: # TODO: Eventually distinguish 2 deps on the same pkg (build and link) @@ -3124,10 +3144,11 @@ def __init__(self, provided, conflicts): msg = ( "Spack concretizer internal error. Please submit a bug report and include the " "command, environment if applicable and the following error message." - f"\n {provided} is unsatisfiable, errors are:" + f"\n {provided} is unsatisfiable" ) - msg += "".join([f"\n {conflict}" for conflict in conflicts]) + if conflicts: + msg += ", errors are:" + "".join([f"\n {conflict}" for conflict in conflicts]) super(spack.error.UnsatisfiableSpecError, self).__init__(msg) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 26c790775949fa..3b3a547efffe37 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -113,10 +113,11 @@ unification_set(SetID, VirtualNode) multiple_nodes_attribute("node_flag_source"). multiple_nodes_attribute("depends_on"). multiple_nodes_attribute("virtual_on_edge"). +multiple_nodes_attribute("provider_set"). % Map constraint on the literal ID to facts on the node attr(Name, node(min_dupe_id, A1)) :- literal(LiteralID, Name, A1), solve_literal(LiteralID). -attr(Name, node(min_dupe_id, A1), A2) :- literal(LiteralID, Name, A1, A2), solve_literal(LiteralID). +attr(Name, node(min_dupe_id, A1), A2) :- literal(LiteralID, Name, A1, A2), solve_literal(LiteralID), not multiple_nodes_attribute(Name). attr(Name, node(min_dupe_id, A1), A2, A3) :- literal(LiteralID, Name, A1, A2, A3), solve_literal(LiteralID), not multiple_nodes_attribute(Name). attr(Name, node(min_dupe_id, A1), A2, A3, A4) :- literal(LiteralID, Name, A1, A2, A3, A4), solve_literal(LiteralID). @@ -124,6 +125,10 @@ attr(Name, node(min_dupe_id, A1), A2, A3, A4) :- literal(LiteralID, Name, A1, A2 attr("node_flag_source", node(min_dupe_id, A1), A2, node(min_dupe_id, A3)) :- literal(LiteralID, "node_flag_source", A1, A2, A3), solve_literal(LiteralID). attr("depends_on", node(min_dupe_id, A1), node(min_dupe_id, A2), A3) :- literal(LiteralID, "depends_on", A1, A2, A3), solve_literal(LiteralID). +attr("virtual_node", node(min_dupe_id, Virtual)) :- literal(LiteralID, "provider_set", _, Virtual), solve_literal(LiteralID). +attr("provider_set", node(min_dupe_id, Provider), node(min_dupe_id, Virtual)) :- literal(LiteralID, "provider_set", Provider, Virtual), solve_literal(LiteralID). +provider(node(min_dupe_id, Provider), node(min_dupe_id, Virtual)) :- literal(LiteralID, "provider_set", Provider, Virtual), solve_literal(LiteralID). + % Discriminate between "roots" that have been explicitly requested, and roots that are deduced from "virtual roots" explicitly_requested_root(node(min_dupe_id, A1)) :- literal(LiteralID, "root", A1), solve_literal(LiteralID). @@ -476,6 +481,19 @@ error(1, Msg) % Virtual dependencies %----------------------------------------------------------------------------- +% If the provider is set from the command line, its weight is 0 +possible_provider_weight(ProviderNode, VirtualNode, 0, "Set on the command line") + :- attr("provider_set", ProviderNode, VirtualNode). + +% Enforces all virtuals to be provided, if multiple of them are provided together +error(100, "Package '{0}' needs to provide both '{1}' and '{2}' together, but provides only '{1}'", Package, Virtual1, Virtual2) +:- condition_holds(ID, node(X, Package)), + pkg_fact(Package, provided_together(ID, SetID, Virtual1)), + pkg_fact(Package, provided_together(ID, SetID, Virtual2)), + Virtual1 != Virtual2, + attr("virtual_on_incoming_edges", node(X, Package), Virtual1), + not attr("virtual_on_incoming_edges", node(X, Package), Virtual2). + % if a package depends on a virtual, it's not external and we have a % provider for that virtual then it depends on the provider node_depends_on_virtual(PackageNode, Virtual, Type) @@ -494,6 +512,9 @@ attr("virtual_on_edge", PackageNode, ProviderNode, Virtual) provider(ProviderNode, node(_, Virtual)), not external(PackageNode). +attr("virtual_on_incoming_edges", ProviderNode, Virtual) + :- attr("virtual_on_edge", _, ProviderNode, Virtual). + % dependencies on virtuals also imply that the virtual is a virtual node 1 { attr("virtual_node", node(0..X-1, Virtual)) : max_dupes(Virtual, X) } :- node_depends_on_virtual(PackageNode, Virtual). @@ -501,6 +522,10 @@ attr("virtual_on_edge", PackageNode, ProviderNode, Virtual) % If there's a virtual node, we must select one and only one provider. % The provider must be selected among the possible providers. +error(100, "'{0}' cannot be a provider for the '{1}' virtual", Package, Virtual) + :- attr("provider_set", node(min_dupe_id, Package), node(min_dupe_id, Virtual)), + not virtual_condition_holds( node(min_dupe_id, Package), Virtual). + error(100, "Cannot find valid provider for virtual {0}", Virtual) :- attr("virtual_node", node(X, Virtual)), not provider(_, node(X, Virtual)). @@ -521,20 +546,6 @@ attr("root", PackageNode) :- attr("virtual_root", VirtualNode), provider(Package attr("node", PackageNode), virtual_condition_holds(PackageNode, Virtual) } 1 :- attr("virtual_node", node(X, Virtual)). -% If a spec is selected as a provider, it is for all the virtual it could provide -:- provider(PackageNode, node(X, Virtual1)), - virtual_condition_holds(PackageNode, Virtual2), - Virtual2 != Virtual1, - unification_set(SetID, PackageNode), - unification_set(SetID, node(X, Virtual2)), - not provider(PackageNode, node(X, Virtual2)). - -% If a spec is a dependency, and could provide a needed virtual, it must be a provider -:- node_depends_on_virtual(PackageNode, Virtual), - depends_on(PackageNode, PossibleProviderNode), - virtual_condition_holds(PossibleProviderNode, Virtual), - not attr("virtual_on_edge", PackageNode, PossibleProviderNode, Virtual). - % The provider provides the virtual if some provider condition holds. virtual_condition_holds(node(ProviderID, Provider), Virtual) :- virtual_condition_holds(ID, node(ProviderID, Provider), Virtual). virtual_condition_holds(ID, node(ProviderID, Provider), Virtual) :- @@ -561,6 +572,8 @@ do_not_impose(EffectID, node(X, Package)) not virtual_condition_holds(PackageNode, Virtual), internal_error("Virtual when provides not respected"). +#defined provided_together/4. + %----------------------------------------------------------------------------- % Virtual dependency weights %----------------------------------------------------------------------------- diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 6030ff2681a29a..20e5c3ffa33e05 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -59,7 +59,7 @@ import re import socket import warnings -from typing import Any, Callable, Dict, List, Optional, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union import llnl.path import llnl.string @@ -1464,6 +1464,26 @@ def edges_to_dependencies(self, name=None, depflag: dt.DepFlag = dt.ALL): """ return [d for d in self._dependencies.select(child=name, depflag=depflag)] + @property + def edge_attributes(self) -> str: + """Helper method to print edge attributes in spec literals""" + edges = self.edges_from_dependents() + if not edges: + return "" + + union = DependencySpec(parent=Spec(), spec=self, depflag=0, virtuals=()) + for edge in edges: + union.update_deptypes(edge.depflag) + union.update_virtuals(edge.virtuals) + deptypes_str = ( + f"deptypes={','.join(dt.flag_to_tuple(union.depflag))}" if union.depflag else "" + ) + virtuals_str = f"virtuals={','.join(union.virtuals)}" if union.virtuals else "" + if not deptypes_str and not virtuals_str: + return "" + result = f"{deptypes_str} {virtuals_str}".strip() + return f"[{result}]" + def dependencies(self, name=None, deptype: Union[dt.DepTypes, dt.DepFlag] = dt.ALL): """Return a list of direct dependencies (nodes in the DAG). @@ -3688,8 +3708,15 @@ def intersects(self, other: Union[str, "Spec"], deps: bool = True) -> bool: if other.concrete and self.concrete: return self.dag_hash() == other.dag_hash() - self_hash = self.dag_hash() if self.concrete else self.abstract_hash - other_hash = other.dag_hash() if other.concrete else other.abstract_hash + elif self.concrete: + return self.satisfies(other) + + elif other.concrete: + return other.satisfies(self) + + # From here we know both self and other are not concrete + self_hash = self.abstract_hash + other_hash = other.abstract_hash if ( self_hash @@ -3778,10 +3805,6 @@ def _intersects_dependencies(self, other): repository=spack.repo.PATH, specs=other.traverse(), restrict=True ) - # This handles cases where there are already providers for both vpkgs - if not self_index.satisfies(other_index): - return False - # These two loops handle cases where there is an overly restrictive # vpkg in one spec for a provider in the other (e.g., mpi@3: is not # compatible with mpich2) @@ -3879,7 +3902,46 @@ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool: return False # If we arrived here, then rhs is abstract. At the moment we don't care about the edge - # structure of an abstract DAG - hence the deps=False parameter. + # structure of an abstract DAG, so we check if any edge could satisfy the properties + # we ask for. + lhs_edges: Dict[str, Set[DependencySpec]] = collections.defaultdict(set) + for rhs_edge in other.traverse_edges(root=False, cover="edges"): + # If we are checking for ^mpi we need to verify if there is any edge + if rhs_edge.spec.virtual: + rhs_edge.update_virtuals(virtuals=(rhs_edge.spec.name,)) + + if not rhs_edge.virtuals: + continue + + if not lhs_edges: + # Construct a map of the link/run subDAG + direct "build" edges, + # keyed by dependency name + for lhs_edge in self.traverse_edges( + root=False, cover="edges", deptype=("link", "run") + ): + lhs_edges[lhs_edge.spec.name].add(lhs_edge) + for virtual_name in lhs_edge.virtuals: + lhs_edges[virtual_name].add(lhs_edge) + + build_edges = self.edges_to_dependencies(depflag=dt.BUILD) + for lhs_edge in build_edges: + lhs_edges[lhs_edge.spec.name].add(lhs_edge) + for virtual_name in lhs_edge.virtuals: + lhs_edges[virtual_name].add(lhs_edge) + + # We don't have edges to this dependency + current_dependency_name = rhs_edge.spec.name + if current_dependency_name not in lhs_edges: + return False + + for virtual in rhs_edge.virtuals: + has_virtual = any( + virtual in edge.virtuals for edge in lhs_edges[current_dependency_name] + ) + if not has_virtual: + return False + + # Edges have been checked above already, hence deps=False return all( any(lhs.satisfies(rhs, deps=False) for lhs in self.traverse(root=False)) for rhs in other.traverse(root=False) @@ -4081,9 +4143,7 @@ def __getitem__(self, name): """ query_parameters = name.split(":") if len(query_parameters) > 2: - msg = "key has more than one ':' symbol." - msg += " At most one is admitted." - raise KeyError(msg) + raise KeyError("key has more than one ':' symbol. At most one is admitted.") name, query_parameters = query_parameters[0], query_parameters[1:] if query_parameters: @@ -4108,11 +4168,17 @@ def __getitem__(self, name): itertools.chain( # Regular specs (x for x in order() if x.name == name), + ( + x + for x in order() + if (not x.virtual) + and any(name in edge.virtuals for edge in x.edges_from_dependents()) + ), (x for x in order() if (not x.virtual) and x.package.provides(name)), ) ) except StopIteration: - raise KeyError("No spec with name %s in %s" % (name, self)) + raise KeyError(f"No spec with name {name} in {self}") if self._concrete: return SpecBuildInterface(value, name, query_parameters) @@ -4490,17 +4556,27 @@ def format_path( return str(path_ctor(*output_path_components)) def __str__(self): - sorted_nodes = [self] + sorted( + root_str = [self.format()] + sorted_dependencies = sorted( self.traverse(root=False), key=lambda x: (x.name, x.abstract_hash) ) - return " ^".join(d.format() for d in sorted_nodes).strip() + sorted_dependencies = [ + d.format("{edge_attributes} " + DEFAULT_FORMAT) for d in sorted_dependencies + ] + spec_str = " ^".join(root_str + sorted_dependencies) + return spec_str.strip() @property def colored_str(self): - sorted_nodes = [self] + sorted( + root_str = [self.cformat()] + sorted_dependencies = sorted( self.traverse(root=False), key=lambda x: (x.name, x.abstract_hash) ) - return " ^".join(d.cformat() for d in sorted_nodes).strip() + sorted_dependencies = [ + d.cformat("{edge_attributes} " + DISPLAY_FORMAT) for d in sorted_dependencies + ] + spec_str = " ^".join(root_str + sorted_dependencies) + return spec_str.strip() def install_status(self): """Helper for tree to print DB install status.""" diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py index 0893b76a98a2f3..f2bf740272e7b6 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -642,3 +642,13 @@ def test_effective_deptype_run_environment(default_mock_concretization): for spec, effective_type in spack.build_environment.effective_deptypes(s, context=Context.RUN): assert effective_type & expected_flags.pop(spec.name) == effective_type assert not expected_flags, f"Missing {expected_flags.keys()} from effective_deptypes" + + +def test_monkey_patching_works_across_virtual(default_mock_concretization): + """Assert that a monkeypatched attribute is found regardless we access through the + real name or the virtual name. + """ + s = default_mock_concretization("mpileaks ^mpich") + s["mpich"].foo = "foo" + assert s["mpich"].foo == "foo" + assert s["mpi"].foo == "foo" diff --git a/lib/spack/spack/test/cmd/dependencies.py b/lib/spack/spack/test/cmd/dependencies.py index f61c19a7f1f942..bc615c7a3a10d7 100644 --- a/lib/spack/spack/test/cmd/dependencies.py +++ b/lib/spack/spack/test/cmd/dependencies.py @@ -14,7 +14,14 @@ dependencies = SpackCommand("dependencies") -mpis = ["low-priority-provider", "mpich", "mpich2", "multi-provider-mpi", "zmpi"] +mpis = [ + "intel-parallel-studio", + "low-priority-provider", + "mpich", + "mpich2", + "multi-provider-mpi", + "zmpi", +] mpi_deps = ["fake"] diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 24657c30f97218..5d244f422c7112 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -2461,8 +2461,12 @@ def test_concretize_user_specs_together(): e.remove("mpich") e.add("mpich2") + exc_cls = spack.error.SpackError + if spack.config.get("config:concretizer") == "clingo": + exc_cls = spack.error.UnsatisfiableSpecError + # Concretizing without invalidating the concrete spec for mpileaks fails - with pytest.raises(spack.error.UnsatisfiableSpecError): + with pytest.raises(exc_cls): e.concretize() e.concretize(force=True) @@ -2494,9 +2498,12 @@ def test_duplicate_packages_raise_when_concretizing_together(): e.add("mpileaks~opt") e.add("mpich") - with pytest.raises( - spack.error.UnsatisfiableSpecError, match=r"You could consider setting `concretizer:unify`" - ): + exc_cls, match = spack.error.SpackError, None + if spack.config.get("config:concretizer") == "clingo": + exc_cls = spack.error.UnsatisfiableSpecError + match = r"You could consider setting `concretizer:unify`" + + with pytest.raises(exc_cls, match=match): e.concretize() diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 04959a19b34b51..1dd530ac70c0da 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -1838,7 +1838,8 @@ def test_installed_specs_disregard_conflicts(self, mutable_database, monkeypatch # If we concretize with --reuse it is not, since "mpich~debug" was already installed with spack.config.override("concretizer:reuse", True): s = Spec("mpich").concretized() - assert s.satisfies("~debug") + assert s.installed + assert s.satisfies("~debug"), s @pytest.mark.regression("32471") @pytest.mark.only_clingo("Use case not supported by the original concretizer") @@ -2132,14 +2133,16 @@ def test_reuse_python_from_cli_and_extension_from_db(self, mutable_database): @pytest.fixture() def duplicates_test_repository(): - builder_test_path = os.path.join(spack.paths.repos_path, "duplicates.test") - with spack.repo.use_repositories(builder_test_path) as mock_repo: + repository_path = os.path.join(spack.paths.repos_path, "duplicates.test") + with spack.repo.use_repositories(repository_path) as mock_repo: yield mock_repo @pytest.mark.usefixtures("mutable_config", "duplicates_test_repository") @pytest.mark.only_clingo("Not supported by the original concretizer") class TestConcretizeSeparately: + """Collects test on separate concretization""" + @pytest.mark.parametrize("strategy", ["minimal", "full"]) def test_two_gmake(self, strategy): """Tests that we can concretize a spec with nodes using the same build @@ -2320,3 +2323,40 @@ def test_adding_specs(self, input_specs, default_mock_concretization): assert node == container[node.dag_hash()] assert node.dag_hash() in container assert node is not container[node.dag_hash()] + + +@pytest.fixture() +def edges_test_repository(): + repository_path = os.path.join(spack.paths.repos_path, "edges.test") + with spack.repo.use_repositories(repository_path) as mock_repo: + yield mock_repo + + +@pytest.mark.usefixtures("mutable_config", "edges_test_repository") +@pytest.mark.only_clingo("Edge properties not supported by the original concretizer") +class TestConcretizeEdges: + """Collects tests on edge properties""" + + @pytest.mark.parametrize( + "spec_str,expected_satisfies,expected_not_satisfies", + [ + ("conditional-edge", ["^zlib@2.0"], ["^zlib-api"]), + ("conditional-edge~foo", ["^zlib@2.0"], ["^zlib-api"]), + ( + "conditional-edge+foo", + ["^zlib@1.0", "^zlib-api", "^[virtuals=zlib-api] zlib"], + ["^[virtuals=mpi] zlib"], + ), + ], + ) + def test_condition_triggered_by_edge_property( + self, spec_str, expected_satisfies, expected_not_satisfies + ): + """Tests that we can enforce constraints based on edge attributes""" + s = Spec(spec_str).concretized() + + for expected in expected_satisfies: + assert s.satisfies(expected), str(expected) + + for not_expected in expected_not_satisfies: + assert not s.satisfies(not_expected), str(not_expected) diff --git a/lib/spack/spack/test/package_class.py b/lib/spack/spack/test/package_class.py index d0126af230c9ef..279693a529b81b 100644 --- a/lib/spack/spack/test/package_class.py +++ b/lib/spack/spack/test/package_class.py @@ -37,6 +37,7 @@ def mpileaks_possible_deps(mock_packages, mpi_names): "low-priority-provider": set(), "dyninst": set(["libdwarf", "libelf"]), "fake": set(), + "intel-parallel-studio": set(), "libdwarf": set(["libelf"]), "libelf": set(), "mpich": set(), diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index be646b1e03c23a..3a9c0350ae48a9 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -532,6 +532,7 @@ def test_normalize_mpileaks(self): assert not spec.eq_dag(expected_normalized, deptypes=True) assert not spec.eq_dag(non_unique_nodes, deptypes=True) + @pytest.mark.xfail(reason="String representation changed") def test_normalize_with_virtual_package(self): spec = Spec("mpileaks ^mpi ^libelf@1.8.11 ^libdwarf") spec.normalize() diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 579ba4486c8a36..87ed1e4b3f994e 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -294,13 +294,10 @@ def test_concrete_specs_which_satisfies_abstract(self, lhs, rhs, default_mock_co ("foo@4.0%pgi@4.5", "@1:3%pgi@4.4:4.6"), ("builtin.mock.mpich", "builtin.mpich"), ("mpileaks ^builtin.mock.mpich", "^builtin.mpich"), - ("mpileaks^mpich", "^zmpi"), - ("mpileaks^zmpi", "^mpich"), ("mpileaks^mpich@1.2", "^mpich@2.0"), ("mpileaks^mpich@4.0^callpath@1.5", "^mpich@1:3^callpath@1.4:1.6"), ("mpileaks^mpich@2.0^callpath@1.7", "^mpich@1:3^callpath@1.4:1.6"), ("mpileaks^mpich@4.0^callpath@1.7", "^mpich@1:3^callpath@1.4:1.6"), - ("mpileaks^mpich", "^zmpi"), ("mpileaks^mpi@3", "^mpi@1.2:1.6"), ("mpileaks^mpi@3:", "^mpich2@1.4"), ("mpileaks^mpi@3:", "^mpich2"), @@ -338,30 +335,30 @@ def test_constraining_abstract_specs_with_empty_intersection(self, lhs, rhs): rhs.constrain(lhs) @pytest.mark.parametrize( - "lhs,rhs,intersection_expected", + "lhs,rhs", [ - ("mpich", "mpich +foo", True), - ("mpich", "mpich~foo", True), - ("mpich", "mpich foo=1", True), - ("mpich", "mpich++foo", True), - ("mpich", "mpich~~foo", True), - ("mpich", "mpich foo==1", True), + ("mpich", "mpich +foo"), + ("mpich", "mpich~foo"), + ("mpich", "mpich foo=1"), + ("mpich", "mpich++foo"), + ("mpich", "mpich~~foo"), + ("mpich", "mpich foo==1"), # Flags semantics is currently different from other variant - ("mpich", 'mpich cflags="-O3"', True), - ("mpich cflags=-O3", 'mpich cflags="-O3 -Ofast"', False), - ("mpich cflags=-O2", 'mpich cflags="-O3"', False), - ("multivalue-variant foo=bar", "multivalue-variant +foo", False), - ("multivalue-variant foo=bar", "multivalue-variant ~foo", False), - ("multivalue-variant fee=bar", "multivalue-variant fee=baz", False), + ("mpich", 'mpich cflags="-O3"'), + ("mpich cflags=-O3", 'mpich cflags="-O3 -Ofast"'), + ("mpich cflags=-O2", 'mpich cflags="-O3"'), + ("multivalue-variant foo=bar", "multivalue-variant +foo"), + ("multivalue-variant foo=bar", "multivalue-variant ~foo"), + ("multivalue-variant fee=bar", "multivalue-variant fee=baz"), ], ) def test_concrete_specs_which_do_not_satisfy_abstract( - self, lhs, rhs, intersection_expected, default_mock_concretization + self, lhs, rhs, default_mock_concretization ): lhs, rhs = default_mock_concretization(lhs), Spec(rhs) - assert lhs.intersects(rhs) is intersection_expected - assert rhs.intersects(lhs) is intersection_expected + assert lhs.intersects(rhs) is False + assert rhs.intersects(lhs) is False assert not lhs.satisfies(rhs) assert not rhs.satisfies(lhs) @@ -483,10 +480,14 @@ def test_intersects_virtual(self): assert Spec("mpich2").intersects(Spec("mpi")) assert Spec("zmpi").intersects(Spec("mpi")) - def test_intersects_virtual_dep_with_virtual_constraint(self): + def test_intersects_virtual_providers(self): + """Tests that we can always intersect virtual providers from abstract specs. + Concretization will give meaning to virtuals, and eventually forbid certain + configurations. + """ assert Spec("netlib-lapack ^openblas").intersects("netlib-lapack ^openblas") - assert not Spec("netlib-lapack ^netlib-blas").intersects("netlib-lapack ^openblas") - assert not Spec("netlib-lapack ^openblas").intersects("netlib-lapack ^netlib-blas") + assert Spec("netlib-lapack ^netlib-blas").intersects("netlib-lapack ^openblas") + assert Spec("netlib-lapack ^openblas").intersects("netlib-lapack ^netlib-blas") assert Spec("netlib-lapack ^netlib-blas").intersects("netlib-lapack ^netlib-blas") def test_intersectable_concrete_specs_must_have_the_same_hash(self): @@ -1006,6 +1007,103 @@ def test_spec_override(self): assert new_spec.compiler_flags["cflags"] == ["-O2"] assert new_spec.compiler_flags["cxxflags"] == ["-O1"] + @pytest.mark.parametrize( + "spec_str,specs_in_dag", + [ + ("hdf5 ^[virtuals=mpi] mpich", [("mpich", "mpich"), ("mpi", "mpich")]), + # Try different combinations with packages that provides a + # disjoint set of virtual dependencies + ( + "netlib-scalapack ^mpich ^openblas-with-lapack", + [ + ("mpi", "mpich"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + ( + "netlib-scalapack ^[virtuals=mpi] mpich ^openblas-with-lapack", + [ + ("mpi", "mpich"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + ( + "netlib-scalapack ^mpich ^[virtuals=lapack] openblas-with-lapack", + [ + ("mpi", "mpich"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + ( + "netlib-scalapack ^[virtuals=mpi] mpich ^[virtuals=lapack] openblas-with-lapack", + [ + ("mpi", "mpich"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + # Test that we can mix dependencies that provide an overlapping + # sets of virtual dependencies + ( + "netlib-scalapack ^[virtuals=mpi] intel-parallel-studio " + "^[virtuals=lapack] openblas-with-lapack", + [ + ("mpi", "intel-parallel-studio"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + ( + "netlib-scalapack ^[virtuals=mpi] intel-parallel-studio ^openblas-with-lapack", + [ + ("mpi", "intel-parallel-studio"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + ( + "netlib-scalapack ^intel-parallel-studio ^[virtuals=lapack] openblas-with-lapack", + [ + ("mpi", "intel-parallel-studio"), + ("lapack", "openblas-with-lapack"), + ("blas", "openblas-with-lapack"), + ], + ), + # Test that we can bind more than one virtual to the same provider + ( + "netlib-scalapack ^[virtuals=lapack,blas] openblas-with-lapack", + [("lapack", "openblas-with-lapack"), ("blas", "openblas-with-lapack")], + ), + ], + ) + def test_virtual_deps_bindings(self, default_mock_concretization, spec_str, specs_in_dag): + if spack.config.get("config:concretizer") == "original": + pytest.skip("Use case not supported by the original concretizer") + + s = default_mock_concretization(spec_str) + for label, expected in specs_in_dag: + assert label in s + assert s[label].satisfies(expected), label + + @pytest.mark.parametrize( + "spec_str", + [ + # openblas-with-lapack needs to provide blas and lapack together + "netlib-scalapack ^[virtuals=blas] intel-parallel-studio ^openblas-with-lapack", + # intel-* provides blas and lapack together, openblas can provide blas only + "netlib-scalapack ^[virtuals=lapack] intel-parallel-studio ^openblas", + ], + ) + def test_unsatisfiable_virtual_deps_bindings(self, spec_str): + if spack.config.get("config:concretizer") == "original": + pytest.skip("Use case not supported by the original concretizer") + + with pytest.raises(spack.solver.asp.UnsatisfiableSpecError): + Spec(spec_str).concretized() + @pytest.mark.parametrize( "spec_str,format_str,expected", diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 1d98731785b6a6..3cbb59e69f0af2 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -530,6 +530,26 @@ def _specfile_for(spec_str, filename): [Token(TokenType.VERSION, value="@:0.4"), Token(TokenType.COMPILER, value="% nvhpc")], "@:0.4%nvhpc", ), + ( + "^[virtuals=mpi] openmpi", + [ + Token(TokenType.START_EDGE_PROPERTIES, value="^["), + Token(TokenType.KEY_VALUE_PAIR, value="virtuals=mpi"), + Token(TokenType.END_EDGE_PROPERTIES, value="]"), + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="openmpi"), + ], + "^[virtuals=mpi] openmpi", + ), + ( + "^[deptypes=link,build] zlib", + [ + Token(TokenType.START_EDGE_PROPERTIES, value="^["), + Token(TokenType.KEY_VALUE_PAIR, value="deptypes=link,build"), + Token(TokenType.END_EDGE_PROPERTIES, value="]"), + Token(TokenType.UNQUALIFIED_PACKAGE_NAME, value="zlib"), + ], + "^[deptypes=build,link] zlib", + ), ( "zlib@git.foo/bar", [ @@ -923,6 +943,9 @@ def test_disambiguate_hash_by_spec(spec1, spec2, constraint, mock_packages, monk ("x platform=test platform=test", spack.spec.DuplicateArchitectureError), ("x os=fe platform=test target=fe os=fe", spack.spec.DuplicateArchitectureError), ("x target=be platform=test os=be os=fe", spack.spec.DuplicateArchitectureError), + ("^[@foo] zlib", spack.parser.SpecParsingError), + # TODO: Remove this as soon as use variants are added and we can parse custom attributes + ("^[foo=bar] zlib", spack.parser.SpecParsingError), ], ) def test_error_conditions(text, exc_cls): diff --git a/var/spack/repos/builtin.mock/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin.mock/packages/intel-parallel-studio/package.py new file mode 100644 index 00000000000000..1ec5cf6932619e --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/intel-parallel-studio/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 IntelParallelStudio(Package): + """Intel Parallel Studio.""" + + homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" + url = "http://tec/16225/parallel_studio_xe_2020_cluster_edition.tgz" + + version("cluster.2020.0", sha256="b1d3e3e425b2e44a06760ff173104bdf") + + provides("mpi@:3") + provides("scalapack") + provides("blas", "lapack") diff --git a/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py b/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py index 5b7bfc03c1aad2..940dea3dafc13c 100644 --- a/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py +++ b/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py @@ -14,5 +14,5 @@ class LowPriorityProvider(Package): version("1.0", md5="0123456789abcdef0123456789abcdef") - provides("lapack") - provides("mpi") + # A low priority provider that provides both these specs together + provides("mpi", "lapack") diff --git a/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py b/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py index 070adf60bc80e1..087cfb77cccac1 100644 --- a/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py +++ b/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py @@ -19,4 +19,4 @@ class ManyVirtualConsumer(Package): # This directive is an example of imposing a constraint on a # dependency is that dependency is in the DAG. This pattern # is mainly used with virtual providers. - depends_on("low-priority-provider@1.0", when="^low-priority-provider") + depends_on("low-priority-provider@1.0", when="^[virtuals=mpi,lapack] low-priority-provider") diff --git a/var/spack/repos/builtin.mock/packages/netlib-scalapack/package.py b/var/spack/repos/builtin.mock/packages/netlib-scalapack/package.py new file mode 100644 index 00000000000000..fe5d7f90a1f27d --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/netlib-scalapack/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 NetlibScalapack(Package): + homepage = "http://www.netlib.org/scalapack/" + url = "http://www.netlib.org/scalapack/scalapack-2.1.0.tgz" + + version("2.1.0", "b1d3e3e425b2e44a06760ff173104bdf") + + provides("scalapack") + + depends_on("mpi") + depends_on("lapack") + depends_on("blas") diff --git a/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py b/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py index 015608587756c6..1273b70def2127 100644 --- a/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py +++ b/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py @@ -14,5 +14,4 @@ class OpenblasWithLapack(Package): version("0.2.15", md5="b1190f3d3471685f17cfd1ec1d252ac9") - provides("lapack") - provides("blas") + provides("lapack", "blas") diff --git a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py index fbcc63cdedc7f1..081e07fe6c2e10 100644 --- a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py +++ b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py @@ -28,8 +28,7 @@ class LuaLuajitOpenresty(LuaImplPackage): description="add symlinks to make lua-luajit a drop-in lua replacement", ) - provides("lua-lang@5.1", when="+lualinks") - provides("luajit") + provides("luajit", "lua-lang@5.1", when="+lualinks") lua_version_override = "5.1" @run_after("install") diff --git a/var/spack/repos/builtin/packages/lua-luajit/package.py b/var/spack/repos/builtin/packages/lua-luajit/package.py index e8a1c124e09d63..dfe9f51cd0bd8b 100644 --- a/var/spack/repos/builtin/packages/lua-luajit/package.py +++ b/var/spack/repos/builtin/packages/lua-luajit/package.py @@ -33,8 +33,7 @@ class LuaLuajit(LuaImplPackage): description="add symlinks to make lua-luajit a drop-in lua replacement", ) - provides("lua-lang@5.1", when="+lualinks") - provides("luajit") + provides("luajit", "lua-lang@5.1", when="+lualinks") lua_version_override = "5.1" conflicts("platform=darwin", msg="luajit not supported on MacOS, see lua-luajit-openresty") diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 43c3dafdadeca5..409dfa004d9bea 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -88,8 +88,7 @@ class Openblas(CMakePackage, MakefilePackage): ) # virtual dependency - provides("blas") - provides("lapack") + provides("blas", "lapack") provides("lapack@3.9.1:", when="@0.3.15:") provides("lapack@3.7.0", when="@0.2.20") diff --git a/var/spack/repos/edges.test/packages/conditional-edge/package.py b/var/spack/repos/edges.test/packages/conditional-edge/package.py new file mode 100644 index 00000000000000..964596fcc14a7e --- /dev/null +++ b/var/spack/repos/edges.test/packages/conditional-edge/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2023 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 ConditionalEdge(Package): + """This package has a variant that triggers a condition only if a required dependency is + providing a virtual. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version("2.0", md5="abcdef0123456789abcdef0123456789") + version("1.0", md5="0123456789abcdef0123456789abcdef") + + variant("foo", default=False, description="Just a regular foo") + + # zlib is a real package, providing zlib-api + depends_on("zlib") + depends_on("zlib-api", when="+foo") + depends_on("zlib@1.0", when="^[virtuals=zlib-api] zlib") diff --git a/var/spack/repos/edges.test/packages/zlib/package.py b/var/spack/repos/edges.test/packages/zlib/package.py new file mode 100644 index 00000000000000..66dfc4f58bb94b --- /dev/null +++ b/var/spack/repos/edges.test/packages/zlib/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 Zlib(Package): + """This package has a variant that triggers a condition only if a required dependency is + providing a virtual. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version("2.0", md5="abcdef0123456789abcdef0123456789") + version("1.0", md5="0123456789abcdef0123456789abcdef") + + provides("zlib-api") diff --git a/var/spack/repos/edges.test/repo.yaml b/var/spack/repos/edges.test/repo.yaml new file mode 100644 index 00000000000000..86df79affe294a --- /dev/null +++ b/var/spack/repos/edges.test/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: edges.test From 83bb2002b427e2503785e758c485ba00b5f0fbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Thu, 2 Nov 2023 08:41:03 +0100 Subject: [PATCH 458/806] openscenegraph: support more file formats (#39897) --- .../openscenegraph-3.6.5-openexr3.patch | 68 ++++++++++++++++ .../packages/openscenegraph/package.py | 79 ++++++++++++++----- 2 files changed, 127 insertions(+), 20 deletions(-) create mode 100644 var/spack/repos/builtin/packages/openscenegraph/openscenegraph-3.6.5-openexr3.patch diff --git a/var/spack/repos/builtin/packages/openscenegraph/openscenegraph-3.6.5-openexr3.patch b/var/spack/repos/builtin/packages/openscenegraph/openscenegraph-3.6.5-openexr3.patch new file mode 100644 index 00000000000000..6a6aa57950d60a --- /dev/null +++ b/var/spack/repos/builtin/packages/openscenegraph/openscenegraph-3.6.5-openexr3.patch @@ -0,0 +1,68 @@ +https://bugs.gentoo.org/833491 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -752,7 +752,6 @@ ELSE() +- FIND_PACKAGE(ilmbase) + FIND_PACKAGE(Inventor) + FIND_PACKAGE(Jasper) +- FIND_PACKAGE(OpenEXR) ++ FIND_PACKAGE(OpenEXR CONFIG) + FIND_PACKAGE(OpenCascade) + FIND_PACKAGE(COLLADA) + FIND_PACKAGE(FBX) +--- a/src/osgPlugins/CMakeLists.txt ++++ b/src/osgPlugins/CMakeLists.txt +@@ -105,7 +105,7 @@ ENDIF() + IF(JASPER_FOUND) + ADD_PLUGIN_DIRECTORY(jp2) + ENDIF() +-IF(OPENEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) ++IF(OpenEXR_FOUND AND ZLIB_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) + ADD_PLUGIN_DIRECTORY(exr) + ENDIF() + IF(GIFLIB_FOUND) +--- a/src/osgPlugins/exr/CMakeLists.txt ++++ b/src/osgPlugins/exr/CMakeLists.txt +@@ -1,9 +1,7 @@ +-INCLUDE_DIRECTORIES( ${ILMBASE_INCLUDE_DIR}/OpenEXR ) +-INCLUDE_DIRECTORIES( ${OPENEXR_INCLUDE_DIR}/OpenEXR ) +- + SET(TARGET_SRC ReaderWriterEXR.cpp ) + +-SET(TARGET_LIBRARIES_VARS ${OPENEXR_LIBRARIES_VARS} ${ILMBASE_LIBRARIES_VARS} ZLIB_LIBRARIES) ++SET(OPENEXR_LIBRARIES_VARS OpenEXR::OpenEXR) ++SET(TARGET_LIBRARIES_VARS OPENEXR_LIBRARIES_VARS ZLIB_LIBRARIES) + + IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + REMOVE_CXX_FLAG(-Wshadow) +--- a/src/osgPlugins/exr/ReaderWriterEXR.cpp ++++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp +@@ -41,11 +41,11 @@ public: + { + return _inStream->read(c,n).good(); + }; +- virtual Int64 tellg () ++ virtual uint64_t tellg () + { + return _inStream->tellg(); + }; +- virtual void seekg (Int64 pos) ++ virtual void seekg (uint64_t pos) + { + _inStream->seekg(pos); + }; +@@ -69,11 +69,11 @@ public: + { + _outStream->write(c,n); + }; +- virtual Int64 tellp () ++ virtual uint64_t tellp () + { + return _outStream->tellp(); + }; +- virtual void seekp (Int64 pos) ++ virtual void seekp (uint64_t pos) + { + _outStream->seekp(pos); + }; diff --git a/var/spack/repos/builtin/packages/openscenegraph/package.py b/var/spack/repos/builtin/packages/openscenegraph/package.py index bb4e2186a122a4..bce48ff1c13868 100644 --- a/var/spack/repos/builtin/packages/openscenegraph/package.py +++ b/var/spack/repos/builtin/packages/openscenegraph/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys + from spack.package import * @@ -14,6 +16,10 @@ class Openscenegraph(CMakePackage): git = "https://github.com/openscenegraph/OpenSceneGraph.git" url = "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.6.4.tar.gz" + maintainers("aumuell") + + version("master", branch="master") + version("stable", branch="OpenSceneGraph-3.6") version("3.6.5", sha256="aea196550f02974d6d09291c5d83b51ca6a03b3767e234a8c0e21322927d1e12") version("3.6.4", sha256="81394d1b484c631028b85d21c5535280c21bbd911cb058e8746c87e93e7b9d33") version("3.4.1", sha256="930eb46f05781a76883ec16c5f49cfb29a059421db131005d75bec4d78401fd5") @@ -22,11 +28,25 @@ class Openscenegraph(CMakePackage): version("3.1.5", sha256="dddecf2b33302076712100af59b880e7647bc595a9a7cc99186e98d6e0eaeb5c") variant("shared", default=True, description="Builds a shared version of the library") + variant("apps", default=False, description="Build OpenSceneGraph tools") + variant("dcmtk", default=False, description="Build support for DICOM files using DCMTK") variant( "ffmpeg", default=False, description="Builds ffmpeg plugin for audio encoding/decoding" ) + variant("gdal", default=False, description="Build support for geospatial files using GDAL") + variant("gta", default=False, description="Build support for Generic Tagged Array (GTA) files") + variant( + "inventor", default=False, description="Build support for Open Inventor files using Coin3D" + ) + variant( + "opencascade", default=False, description="Build support for CAD files using Open CASCADE" + ) + variant("openexr", default=False, description="Build support for OpenEXR files") + variant("pdf", default=False, description="Build support for PDF files using Poppler") + variant("svg", default=False, description="Build support for SVG files using librsvg") depends_on("cmake@2.8.7:", type="build") + depends_on("pkgconfig", type="build") depends_on("gl") depends_on( "qt+opengl", when="@:3.5.4" @@ -42,39 +62,58 @@ class Openscenegraph(CMakePackage): depends_on("zlib-api") depends_on("fontconfig") - depends_on("ffmpeg+avresample", when="+ffmpeg") + depends_on("dcmtk+pic", when="+dcmtk") + depends_on("gdal", when="+gdal") + depends_on("libgta", when="+gta") + depends_on("coin3d", when="+inventor") + depends_on("opencascade@:7.5", when="+opencascade") + depends_on("openexr", when="+openexr") + depends_on("ilmbase", when="+openexr ^openexr@:2") + depends_on("poppler+glib", when="+pdf") + depends_on("librsvg", when="+svg") + + depends_on("ffmpeg@:4", when="+ffmpeg") + depends_on("ffmpeg+avresample", when="^ffmpeg@:4") # https://github.com/openscenegraph/OpenSceneGraph/issues/167 depends_on("ffmpeg@:2", when="@:3.4.0+ffmpeg") patch("glibc-jasper.patch", when="@3.4%gcc") + # from gentoo: https://raw.githubusercontent.com/gentoo/gentoo/9523b20c27d12dd72d1fd5ced3ba4995099925a2/dev-games/openscenegraph/files/openscenegraph-3.6.5-openexr3.patch + patch("openscenegraph-3.6.5-openexr3.patch", when="@3.6:") + + def patch(self): + # pkgconfig does not work for GTA on macos + if sys.platform == "darwin": + filter_file("PKG_CHECK_MODULES\\(GTA gta\\)", "", "CMakeModules/FindGTA.cmake") def cmake_args(self): spec = self.spec - shared_status = "ON" if "+shared" in spec else "OFF" - opengl_profile = "GL{0}".format(spec["gl"].version.up_to(1)) - args = [ # Variant Options # - "-DDYNAMIC_OPENSCENEGRAPH={0}".format(shared_status), - "-DDYNAMIC_OPENTHREADS={0}".format(shared_status), - "-DOPENGL_PROFILE={0}".format(opengl_profile), + self.define_from_variant("DYNAMIC_OPENSCENEGRAPH", "shared"), + self.define_from_variant("DYNAMIC_OPENTHREADS", "shared"), + self.define_from_variant("BUILD_OSG_APPLICATIONS", "apps"), # General Options # - "-DBUILD_OSG_APPLICATIONS=OFF", - "-DOSG_NOTIFY_DISABLED=ON", - "-DLIB_POSTFIX=", - "-DCMAKE_RELWITHDEBINFO_POSTFIX=", - "-DCMAKE_MINSIZEREL_POSTFIX=", + self.define("OPENGL_PROFILE", f"GL{spec['gl'].version.up_to(1)}"), + self.define("OSG_NOTIFY_DISABLED", True), + self.define("LIB_POSTFIX", ""), + self.define("CMAKE_RELWITHDEBINFO_POSTFIX", ""), + self.define("CMAKE_MINSIZEREL_POSTFIX", ""), ] - if spec.satisfies("~ffmpeg"): - for ffmpeg_lib in ["libavcodec", "libavformat", "libavutil"]: - args.extend( - [ - "-DFFMPEG_{0}_INCLUDE_DIRS=".format(ffmpeg_lib.upper()), - "-DFFMPEG_{0}_LIBRARIES=".format(ffmpeg_lib.upper()), - ] - ) + # explicitly disable or enable plugins depending on variants + # CMake will still search for the packages, but won't build the plugins requiring them + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_DICOM", "dcmtk")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_EXR", "openexr")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_FFMPEG", "ffmpeg")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_GDAL", "gdal")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_OGR", "gdal")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_GTA", "gta")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_INVENTOR", "inventor")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_OPENCASCADE", "opencascade")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_PDF", "pdf")) + args.append(self.define_from_variant("BUILD_OSG_PLUGIN_SVG", "svg")) # NOTE: This is necessary in order to allow OpenSceneGraph to compile # despite containing a number of implicit bool to int conversions. From f56efaff3ee2c706e965659de812a8785803412d Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Thu, 2 Nov 2023 00:51:08 -0700 Subject: [PATCH 459/806] env remove: add a unit test removing two environments (#40814) --- lib/spack/spack/test/cmd/env.py | 51 ++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 5d244f422c7112..0c290493ba453d 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -14,6 +14,7 @@ import llnl.util.filesystem as fs import llnl.util.link_tree +import llnl.util.tty as tty import spack.cmd.env import spack.config @@ -977,10 +978,9 @@ def test_included_config_precedence(environment_from_manifest): assert any([x.satisfies("libelf@0.8.10") for x in e._get_environment_specs()]) -def test_bad_env_yaml_format(tmpdir): - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( +def test_bad_env_yaml_format(environment_from_manifest): + with pytest.raises(spack.config.ConfigFormatError) as e: + environment_from_manifest( """\ spack: spacks: @@ -988,19 +988,15 @@ def test_bad_env_yaml_format(tmpdir): """ ) - with tmpdir.as_cwd(): - with pytest.raises(spack.config.ConfigFormatError) as e: - env("create", "test", "./spack.yaml") - assert "'spacks' was unexpected" in str(e) + assert "'spacks' was unexpected" in str(e) assert "test" not in env("list") -def test_bad_env_yaml_format_remove(): +def test_bad_env_yaml_format_remove(mutable_mock_env_path): badenv = "badenv" env("create", badenv) - tmpdir = spack.environment.environment.environment_dir_from_name(badenv, exists_ok=True) - filename = os.path.join(tmpdir, "spack.yaml") + filename = mutable_mock_env_path / "spack.yaml" with open(filename, "w") as f: f.write( """\ @@ -1013,6 +1009,39 @@ def test_bad_env_yaml_format_remove(): assert badenv not in env("list") +@pytest.mark.parametrize("answer", ["-y", ""]) +def test_multi_env_remove(mutable_mock_env_path, monkeypatch, answer): + """Test removal (or not) of a valid and invalid environment""" + remove_environment = answer == "-y" + monkeypatch.setattr(tty, "get_yes_or_no", lambda prompt, default: remove_environment) + + environments = ["goodenv", "badenv"] + for e in environments: + env("create", e) + + # Ensure the bad environment contains invalid yaml + filename = mutable_mock_env_path / environments[1] / "spack.yaml" + filename.write_text( + """\ + - libdwarf +""" + ) + + assert all(e in env("list") for e in environments) + + args = [answer] if answer else [] + args.extend(environments) + output = env("remove", *args, fail_on_error=False) + + if remove_environment is True: + # Successfully removed (and reported removal) of *both* environments + assert not all(e in env("list") for e in environments) + assert output.count("Successfully removed") == 2 + else: + # Not removing any of the environments + assert all(e in env("list") for e in environments) + + def test_env_loads(install_mockery, mock_fetch): env("create", "test") From 80944d22f775b014cfd201e895fc8777a2038786 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 2 Nov 2023 09:45:31 +0100 Subject: [PATCH 460/806] spack external find: fix multi-arch troubles (#33973) --- lib/spack/spack/detection/path.py | 90 ++++++++++++++++++++++++++----- lib/spack/spack/test/util/elf.py | 15 ++++++ lib/spack/spack/util/elf.py | 9 ++-- 3 files changed, 98 insertions(+), 16 deletions(-) diff --git a/lib/spack/spack/detection/path.py b/lib/spack/spack/detection/path.py index 6531ed62da0ef5..f5da02bede1842 100644 --- a/lib/spack/spack/detection/path.py +++ b/lib/spack/spack/detection/path.py @@ -15,9 +15,12 @@ from typing import Dict, List, Optional, Set, Tuple import llnl.util.filesystem +import llnl.util.lang import llnl.util.tty +import spack.util.elf as elf_utils import spack.util.environment +import spack.util.environment as environment import spack.util.ld_so_conf from .common import ( @@ -57,6 +60,11 @@ def common_windows_package_paths(pkg_cls=None) -> List[str]: return paths +def file_identifier(path): + s = os.stat(path) + return (s.st_dev, s.st_ino) + + def executables_in_path(path_hints: List[str]) -> Dict[str, str]: """Get the paths of all executables available from the current PATH. @@ -75,12 +83,40 @@ def executables_in_path(path_hints: List[str]) -> Dict[str, str]: return path_to_dict(search_paths) +def get_elf_compat(path): + """For ELF files, get a triplet (EI_CLASS, EI_DATA, e_machine) and see if + it is host-compatible.""" + # On ELF platforms supporting, we try to be a bit smarter when it comes to shared + # libraries, by dropping those that are not host compatible. + with open(path, "rb") as f: + elf = elf_utils.parse_elf(f, only_header=True) + return (elf.is_64_bit, elf.is_little_endian, elf.elf_hdr.e_machine) + + +def accept_elf(path, host_compat): + """Accept an ELF file if the header matches the given compat triplet, + obtained with :py:func:`get_elf_compat`. In case it's not an ELF (e.g. + static library, or some arbitrary file, fall back to is_readable_file).""" + # Fast path: assume libraries at least have .so in their basename. + # Note: don't replace with splitext, because of libsmth.so.1.2.3 file names. + if ".so" not in os.path.basename(path): + return llnl.util.filesystem.is_readable_file(path) + try: + return host_compat == get_elf_compat(path) + except (OSError, elf_utils.ElfParsingError): + return llnl.util.filesystem.is_readable_file(path) + + def libraries_in_ld_and_system_library_path( path_hints: Optional[List[str]] = None, ) -> Dict[str, str]: - """Get the paths of all libraries available from LD_LIBRARY_PATH, - LIBRARY_PATH, DYLD_LIBRARY_PATH, DYLD_FALLBACK_LIBRARY_PATH, and - standard system library paths. + """Get the paths of all libraries available from ``path_hints`` or the + following defaults: + + - Environment variables (Linux: ``LD_LIBRARY_PATH``, Darwin: ``DYLD_LIBRARY_PATH``, + and ``DYLD_FALLBACK_LIBRARY_PATH``) + - Dynamic linker default paths (glibc: ld.so.conf, musl: ld-musl-.path) + - Default system library paths. For convenience, this is constructed as a dictionary where the keys are the library paths and the values are the names of the libraries @@ -94,17 +130,45 @@ def libraries_in_ld_and_system_library_path( constructed based on the set of LD_LIBRARY_PATH, LIBRARY_PATH, DYLD_LIBRARY_PATH, and DYLD_FALLBACK_LIBRARY_PATH environment variables as well as the standard system library paths. + path_hints (list): list of paths to be searched. If ``None``, the default + system paths are used. """ - default_lib_search_paths = ( - spack.util.environment.get_path("LD_LIBRARY_PATH") - + spack.util.environment.get_path("DYLD_LIBRARY_PATH") - + spack.util.environment.get_path("DYLD_FALLBACK_LIBRARY_PATH") - + spack.util.ld_so_conf.host_dynamic_linker_search_paths() - ) - path_hints = path_hints if path_hints is not None else default_lib_search_paths - - search_paths = llnl.util.filesystem.search_paths_for_libraries(*path_hints) - return path_to_dict(search_paths) + if path_hints: + search_paths = llnl.util.filesystem.search_paths_for_libraries(*path_hints) + else: + search_paths = [] + + # Environment variables + if sys.platform == "darwin": + search_paths.extend(environment.get_path("DYLD_LIBRARY_PATH")) + search_paths.extend(environment.get_path("DYLD_FALLBACK_LIBRARY_PATH")) + elif sys.platform.startswith("linux"): + search_paths.extend(environment.get_path("LD_LIBRARY_PATH")) + + # Dynamic linker paths + search_paths.extend(spack.util.ld_so_conf.host_dynamic_linker_search_paths()) + + # Drop redundant paths + search_paths = list(filter(os.path.isdir, search_paths)) + + # Make use we don't doubly list /usr/lib and /lib etc + search_paths = list(llnl.util.lang.dedupe(search_paths, key=file_identifier)) + + try: + host_compat = get_elf_compat(sys.executable) + accept = lambda path: accept_elf(path, host_compat) + except (OSError, elf_utils.ElfParsingError): + accept = llnl.util.filesystem.is_readable_file + + path_to_lib = {} + # Reverse order of search directories so that a lib in the first + # search path entry overrides later entries + for search_path in reversed(search_paths): + for lib in os.listdir(search_path): + lib_path = os.path.join(search_path, lib) + if accept(lib_path): + path_to_lib[lib_path] = lib + return path_to_lib def libraries_in_windows_paths(path_hints: Optional[List[str]] = None) -> Dict[str, str]: diff --git a/lib/spack/spack/test/util/elf.py b/lib/spack/spack/test/util/elf.py index 6380bb7910b5d8..db826df1730fab 100644 --- a/lib/spack/spack/test/util/elf.py +++ b/lib/spack/spack/test/util/elf.py @@ -120,6 +120,21 @@ def test_parser_doesnt_deal_with_nonzero_offset(): elf.parse_elf(elf_at_offset_one) +def test_only_header(): + # When passing only_header=True parsing a file that is literally just a header + # without any sections/segments should not error. + + # 32 bit + elf_32 = elf.parse_elf(io.BytesIO(b"\x7fELF\x01\x01" + b"\x00" * 46), only_header=True) + assert not elf_32.is_64_bit + assert elf_32.is_little_endian + + # 64 bit + elf_64 = elf.parse_elf(io.BytesIO(b"\x7fELF\x02\x01" + b"\x00" * 58), only_header=True) + assert elf_64.is_64_bit + assert elf_64.is_little_endian + + @pytest.mark.requires_executables("gcc") @skip_unless_linux def test_elf_get_and_replace_rpaths(binary_with_rpaths): diff --git a/lib/spack/spack/util/elf.py b/lib/spack/spack/util/elf.py index cab1db0b03dff8..6d0881f4946429 100644 --- a/lib/spack/spack/util/elf.py +++ b/lib/spack/spack/util/elf.py @@ -377,7 +377,7 @@ def parse_header(f, elf): elf.elf_hdr = ElfHeader._make(unpack(elf_header_fmt, data)) -def _do_parse_elf(f, interpreter=True, dynamic_section=True): +def _do_parse_elf(f, interpreter=True, dynamic_section=True, only_header=False): # We don't (yet?) allow parsing ELF files at a nonzero offset, we just # jump to absolute offsets as they are specified in the ELF file. if f.tell() != 0: @@ -386,6 +386,9 @@ def _do_parse_elf(f, interpreter=True, dynamic_section=True): elf = ElfFile() parse_header(f, elf) + if only_header: + return elf + # We don't handle anything but executables and shared libraries now. if elf.elf_hdr.e_type not in (ELF_CONSTANTS.ET_EXEC, ELF_CONSTANTS.ET_DYN): raise ElfParsingError("Not an ET_DYN or ET_EXEC type") @@ -403,11 +406,11 @@ def _do_parse_elf(f, interpreter=True, dynamic_section=True): return elf -def parse_elf(f, interpreter=False, dynamic_section=False): +def parse_elf(f, interpreter=False, dynamic_section=False, only_header=False): """Given a file handle f for an ELF file opened in binary mode, return an ElfFile object that is stores data about rpaths""" try: - return _do_parse_elf(f, interpreter, dynamic_section) + return _do_parse_elf(f, interpreter, dynamic_section, only_header) except (DeprecationWarning, struct.error): # According to the docs old versions of Python can throw DeprecationWarning # instead of struct.error. From af3a29596ea52431155a98895a84f2da1cd31882 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 2 Nov 2023 15:13:13 +0100 Subject: [PATCH 461/806] go/rust bootstrap: no versions if unsupported arch (#40841) The lookup in a dictionary causes KeyError on package load for unsupported architectures such as i386 and ppc big endian. --- var/spack/repos/builtin/packages/go-bootstrap/package.py | 2 +- var/spack/repos/builtin/packages/rust-bootstrap/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py index 047f9f3353b937..4f5c8f00732439 100644 --- a/var/spack/repos/builtin/packages/go-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -59,7 +59,7 @@ class GoBootstrap(Package): # determine system os and architecture/target os = platform.system().lower() - target = go_targets[platform.machine().lower()] + target = go_targets.get(platform.machine().lower(), platform.machine().lower()) # construct releases for current system configuration for release in go_releases: diff --git a/var/spack/repos/builtin/packages/rust-bootstrap/package.py b/var/spack/repos/builtin/packages/rust-bootstrap/package.py index 84100bf2424a14..337618e20e38f2 100644 --- a/var/spack/repos/builtin/packages/rust-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/rust-bootstrap/package.py @@ -73,7 +73,7 @@ class RustBootstrap(Package): # Determine system os and architecture/target. os = platform.system().lower() - target = rust_targets[platform.machine().lower()] + target = rust_targets.get(platform.machine().lower(), platform.machine().lower()) # Pre-release versions of the bootstrap compiler. # Note: These versions are unchecksumed since they will change From dbf21bf843dd81721dd0affc3a5c368d8099ff38 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 2 Nov 2023 09:29:37 -0500 Subject: [PATCH 462/806] exago: update petsc dependency (#40831) --- var/spack/repos/builtin/packages/exago/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index 06a9c9f3931e59..fe7b67cc11d949 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -157,9 +157,10 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): # This is no longer a requirement in RAJA > 0.14 depends_on("umpire+cuda~shared", when="+raja+cuda ^raja@:0.14") - depends_on("petsc@3.13:3.14", when="@:1.2.99") - depends_on("petsc@3.16.0:3.16", when="@1.3.0:1.4") - depends_on("petsc@3.18.0:3.19", when="@1.5.0:") + depends_on("petsc@3.13:3.14", when="@:1.2") + depends_on("petsc@3.16", when="@1.3:1.4") + depends_on("petsc@3.18:3.19", when="@1.5") + depends_on("petsc@3.20:", when="@1.6:") depends_on("petsc~mpi", when="~mpi") From 8b0ab67de4d08d3c9015216d1d125c7e442ade0c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 2 Nov 2023 16:04:35 +0100 Subject: [PATCH 463/806] depfile: deal with empty / non-concrete env (#40816) --- lib/spack/spack/cmd/env.py | 15 ++++++++++++++- lib/spack/spack/environment/depfile.py | 15 +++++++-------- lib/spack/spack/test/cmd/env.py | 14 ++++++++++++++ share/spack/templates/depfile/Makefile | 2 +- 4 files changed, 36 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 490538694bdd44..d75cf6b2625c7c 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -672,18 +672,31 @@ def env_depfile(args): # Currently only make is supported. spack.cmd.require_active_env(cmd_name="env depfile") + env = ev.active_environment() + # What things do we build when running make? By default, we build the # root specs. If specific specs are provided as input, we build those. filter_specs = spack.cmd.parse_specs(args.specs) if args.specs else None template = spack.tengine.make_environment().get_template(os.path.join("depfile", "Makefile")) model = depfile.MakefileModel.from_env( - ev.active_environment(), + env, filter_specs=filter_specs, pkg_buildcache=depfile.UseBuildCache.from_string(args.use_buildcache[0]), dep_buildcache=depfile.UseBuildCache.from_string(args.use_buildcache[1]), make_prefix=args.make_prefix, jobserver=args.jobserver, ) + + # Warn in case we're generating a depfile for an empty environment. We don't automatically + # concretize; the user should do that explicitly. Could be changed in the future if requested. + if model.empty: + if not env.user_specs: + tty.warn("no specs in the environment") + elif filter_specs is not None: + tty.warn("no concrete matching specs found in environment") + else: + tty.warn("environment is not concretized. Run `spack concretize` first") + makefile = template.render(model.to_dict()) # Finally write to stdout/file. diff --git a/lib/spack/spack/environment/depfile.py b/lib/spack/spack/environment/depfile.py index f3a28331bd94dd..34e2481fa916c3 100644 --- a/lib/spack/spack/environment/depfile.py +++ b/lib/spack/spack/environment/depfile.py @@ -232,6 +232,10 @@ def to_dict(self): "pkg_ids": " ".join(self.all_pkg_identifiers), } + @property + def empty(self): + return len(self.roots) == 0 + @staticmethod def from_env( env: ev.Environment, @@ -254,15 +258,10 @@ def from_env( jobserver: when enabled, make will invoke Spack with jobserver support. For dry-run this should be disabled. """ - # If no specs are provided as a filter, build all the specs in the environment. - if filter_specs: - entrypoints = [env.matching_spec(s) for s in filter_specs] - else: - entrypoints = [s for _, s in env.concretized_specs()] - + roots = env.all_matching_specs(*filter_specs) if filter_specs else env.concrete_roots() visitor = DepfileSpecVisitor(pkg_buildcache, dep_buildcache) traverse.traverse_breadth_first_with_visitor( - entrypoints, traverse.CoverNodesVisitor(visitor, key=lambda s: s.dag_hash()) + roots, traverse.CoverNodesVisitor(visitor, key=lambda s: s.dag_hash()) ) - return MakefileModel(env, entrypoints, visitor.adjacency_list, make_prefix, jobserver) + return MakefileModel(env, roots, visitor.adjacency_list, make_prefix, jobserver) diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 0c290493ba453d..3b843be72aca8a 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -3382,6 +3382,20 @@ def test_spack_package_ids_variable(tmpdir, mock_packages): assert "post-install: {}".format(s.dag_hash()) in out +def test_depfile_empty_does_not_error(tmp_path): + # For empty environments Spack should create a depfile that does nothing + make = Executable("make") + makefile = str(tmp_path / "Makefile") + + env("create", "test") + with ev.read("test"): + env("depfile", "-o", makefile) + + make("-f", makefile) + + assert make.returncode == 0 + + def test_unify_when_possible_works_around_conflicts(): e = ev.create("coconcretization") e.unify = "when_possible" diff --git a/share/spack/templates/depfile/Makefile b/share/spack/templates/depfile/Makefile index dde42cf7d5b605..4b764752678c0f 100644 --- a/share/spack/templates/depfile/Makefile +++ b/share/spack/templates/depfile/Makefile @@ -8,7 +8,7 @@ SPACK_INSTALL_FLAGS ?= {{ all_target }}: {{ env_target }} -{{ env_target }}: {{ root_install_targets }} +{{ env_target }}: {{ root_install_targets }} | {{ dirs_target }} @touch $@ {{ dirs_target }}: From bb64b22066d359ace40c944cc42ab5ff34bf8c7e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 2 Nov 2023 10:09:49 -0500 Subject: [PATCH 464/806] PyTorch: build with external sleef (#40763) Co-authored-by: adamjstewart --- .../builtin/packages/py-torch/package.py | 15 +++-------- .../builtin/packages/py-torch/sleef.patch | 12 --------- .../repos/builtin/packages/sleef/package.py | 26 ++++++++++++------- 3 files changed, 19 insertions(+), 34 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-torch/sleef.patch diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 21a68b069f322f..d2edd9453837bf 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -194,10 +194,8 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # depends_on("cpuinfo@2022-08-19", when="@1.13:2.0") # depends_on("cpuinfo@2020-12-17", when="@1.8:1.12") # depends_on("cpuinfo@2020-06-11", when="@1.6:1.7") - # https://github.com/shibatch/sleef/issues/427 - # depends_on("sleef@3.5.1_2020-12-22", when="@1.8:") - # https://github.com/pytorch/pytorch/issues/60334 - # depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7") + depends_on("sleef@3.5.1_2020-12-22", when="@1.8:") + depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7") depends_on("fp16@2020-05-14", when="@1.6:") depends_on("pthreadpool@2021-04-13", when="@1.9:") depends_on("pthreadpool@2020-10-05", when="@1.8") @@ -308,11 +306,6 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # Fixes build error when ROCm is enabled for pytorch-1.5 release patch("rocm.patch", when="@1.5+rocm") - # Fixes fatal error: sleef.h: No such file or directory - # https://github.com/pytorch/pytorch/pull/35359 - # https://github.com/pytorch/pytorch/issues/26555 - # patch("sleef.patch", when="@:1.5") - # Fixes compilation with Clang 9.0.0 and Apple Clang 11.0.3 # https://github.com/pytorch/pytorch/pull/37086 patch( @@ -628,13 +621,11 @@ def enable_or_disable(variant, keyword="USE", var=None, newer=False): env.set("pybind11_INCLUDE_DIR", self.spec["py-pybind11"].prefix.include) if self.spec.satisfies("@1.10:"): env.set("USE_SYSTEM_PYBIND11", "ON") - # https://github.com/pytorch/pytorch/issues/60334 - # if self.spec.satisfies("@1.8:"): - # env.set("USE_SYSTEM_SLEEF", "ON") if self.spec.satisfies("@1.6:"): # env.set("USE_SYSTEM_LIBS", "ON") # https://github.com/pytorch/pytorch/issues/60329 # env.set("USE_SYSTEM_CPUINFO", "ON") + env.set("USE_SYSTEM_SLEEF", "ON") env.set("USE_SYSTEM_GLOO", "ON") env.set("USE_SYSTEM_FP16", "ON") env.set("USE_SYSTEM_PTHREADPOOL", "ON") diff --git a/var/spack/repos/builtin/packages/py-torch/sleef.patch b/var/spack/repos/builtin/packages/py-torch/sleef.patch deleted file mode 100644 index 67f0234162d1a1..00000000000000 --- a/var/spack/repos/builtin/packages/py-torch/sleef.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt -index 8025a7de3c..2e5cdbb5c9 100644 ---- a/caffe2/CMakeLists.txt -+++ b/caffe2/CMakeLists.txt -@@ -1232,6 +1232,7 @@ if (BUILD_TEST) - add_executable(${test_name} "${test_src}") - target_link_libraries(${test_name} ${Caffe2_MAIN_LIBS} gtest_main) - target_include_directories(${test_name} PRIVATE $) -+ target_include_directories(${test_name} PRIVATE $) - target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE}) - add_test(NAME ${test_name} COMMAND $) - if (INSTALL_TEST) diff --git a/var/spack/repos/builtin/packages/sleef/package.py b/var/spack/repos/builtin/packages/sleef/package.py index 663ffff3def032..79227766691a76 100644 --- a/var/spack/repos/builtin/packages/sleef/package.py +++ b/var/spack/repos/builtin/packages/sleef/package.py @@ -14,9 +14,7 @@ class Sleef(CMakePackage): git = "https://github.com/shibatch/sleef.git" version("master", branch="master") - version( - "3.5.1_2020-12-22", commit="e0a003ee838b75d11763aa9c3ef17bf71a725bff" - ) # py-torch@1.8:1.9 + version("3.5.1_2020-12-22", commit="e0a003ee838b75d11763aa9c3ef17bf71a725bff") # py-torch@1.8: version( "3.5.1", sha256="415ee9b1bcc5816989d3d4d92afd0cd3f9ee89cbd5a33eb008e69751e40438ab", @@ -40,17 +38,25 @@ class Sleef(CMakePackage): ) # py-torch@0.4.1:1.0 version("3.2", sha256="3130c5966e204e6d6a3ace81e543d12b5b21f60897f1c185bfa587c1bd77bee2") - # Some versions have ICE when building RelWithDebInfo with GCC 7 - # See https://github.com/shibatch/sleef/issues/234 - # See https://github.com/pytorch/pytorch/issues/26892 - # See https://github.com/pytorch/pytorch/pull/26993 + # https://github.com/shibatch/sleef/issues/474 + conflicts("%apple-clang@15:") generator("ninja") depends_on("cmake@3.4.3:", type="build") + # # https://github.com/shibatch/sleef/issues/475 + # depends_on("fftw-api") + # depends_on("mpfr") + # depends_on("openssl") + + # # https://github.com/shibatch/sleef/issues/458 + # conflicts("^mpfr@4.2:") + def cmake_args(self): + # Taken from PyTorch's aten/src/ATen/CMakeLists.txt return [ - self.define("DISABLE_FFTW", True), - self.define("DISABLE_MPFR", True), - self.define("DISABLE_SSL", True), + self.define("BUILD_SHARED_LIBS", False), + self.define("BUILD_DFT", False), + self.define("BUILD_GNUABI_LIBS", False), + self.define("BUILD_TESTS", False), ] From 6930176ac6b9bccd04a225051706260bc998cbb9 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 2 Nov 2023 16:48:21 +0100 Subject: [PATCH 465/806] clingo ^pyhton@3.12: revisit distutils fix (#40844) --- var/spack/repos/builtin/packages/clingo/package.py | 2 +- .../builtin/packages/clingo/setuptools-2.patch | 8 ++++++++ .../repos/builtin/packages/clingo/setuptools.patch | 14 -------------- 3 files changed, 9 insertions(+), 15 deletions(-) create mode 100644 var/spack/repos/builtin/packages/clingo/setuptools-2.patch delete mode 100644 var/spack/repos/builtin/packages/clingo/setuptools.patch diff --git a/var/spack/repos/builtin/packages/clingo/package.py b/var/spack/repos/builtin/packages/clingo/package.py index ab5fe9a0430da1..f64dc6e8121dcd 100644 --- a/var/spack/repos/builtin/packages/clingo/package.py +++ b/var/spack/repos/builtin/packages/clingo/package.py @@ -72,7 +72,7 @@ class Clingo(CMakePackage): # TODO: Simplify this after Spack 0.21 release. The old concretizer has problems with # py-setuptools ^python@3.6, so we only apply the distutils -> setuptools patch for Python 3.12 with when("@:5.6.1 ^python@3.12:"): - patch("setuptools.patch") + patch("setuptools-2.patch") depends_on("py-setuptools", type="build") def patch(self): diff --git a/var/spack/repos/builtin/packages/clingo/setuptools-2.patch b/var/spack/repos/builtin/packages/clingo/setuptools-2.patch new file mode 100644 index 00000000000000..6c6377936fb420 --- /dev/null +++ b/var/spack/repos/builtin/packages/clingo/setuptools-2.patch @@ -0,0 +1,8 @@ +diff --git a/cmake/python-site.py b/cmake/python-site.py +--- a/cmake/python-site.py ++++ b/cmake/python-site.py +@@ -1,3 +1,4 @@ ++import setuptools # makes import distutils work + from distutils.sysconfig import get_python_lib, get_config_vars + import sys + if sys.argv[1] == "prefix": \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/clingo/setuptools.patch b/var/spack/repos/builtin/packages/clingo/setuptools.patch deleted file mode 100644 index 4a38a7e6d9ad9e..00000000000000 --- a/var/spack/repos/builtin/packages/clingo/setuptools.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/cmake/python-site.py b/cmake/python-site.py -index 1e7fc8ce..95ef827f 100644 ---- a/cmake/python-site.py -+++ b/cmake/python-site.py -@@ -1,4 +1,7 @@ --from distutils.sysconfig import get_python_lib, get_config_vars -+try: -+ from setuptools.sysconfig import get_python_lib, get_config_vars -+except ImportError: -+ from distutils.sysconfig import get_python_lib, get_config_vars - import sys - if sys.argv[1] == "prefix": - print(get_python_lib(True, False, sys.argv[2] if len(sys.argv) > 2 else None)) - From 4633327e60e04121b36ae82891c7025499b082ec Mon Sep 17 00:00:00 2001 From: "Paul R. C. Kent" Date: Thu, 2 Nov 2023 12:00:35 -0400 Subject: [PATCH 466/806] llvm: add 17.0.2-4 (#40820) --- var/spack/repos/builtin/packages/llvm/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 7e110a248ecf0a..383871353fe9fa 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -35,6 +35,9 @@ class Llvm(CMakePackage, CudaPackage): family = "compiler" # Used by lmod version("main", branch="main") + version("17.0.4", sha256="46200b79f52a02fe26d0a43fd856ab6ceff49ab2a0b7c240ac4b700a6ada700c") + version("17.0.3", sha256="1e3d9d04fb5fbd8d0080042ad72c7e2a5c68788b014b186647a604dbbdd625d2") + version("17.0.2", sha256="dcba3eb486973dce45b6edfe618f3f29b703ae7e6ef9df65182fb50fb6fe4235") version("17.0.1", sha256="d51b10be66c10a6a81f4c594b554ffbf1063ffbadcb810af37d1f88d6e0b49dd") version("16.0.6", sha256="56b2f75fdaa95ad5e477a246d3f0d164964ab066b4619a01836ef08e475ec9d5") version("16.0.5", sha256="e0fbca476693fcafa125bc71c8535587b6d9950293122b66b262bb4333a03942") From 518da168331fd0e58c6c3a611b52507d1750b13a Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:15:27 +0100 Subject: [PATCH 467/806] Gaudi: Add a few versions and a dependency on tbb after 37.1 (#40802) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/gaudi/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gaudi/package.py b/var/spack/repos/builtin/packages/gaudi/package.py index e065b649ceb003..12a095c301989a 100644 --- a/var/spack/repos/builtin/packages/gaudi/package.py +++ b/var/spack/repos/builtin/packages/gaudi/package.py @@ -17,6 +17,8 @@ class Gaudi(CMakePackage): tags = ["hep"] version("master", branch="master") + version("37.1", sha256="1d7038fd5dfb5f2517ce57623cf8090549ffe2ea8f0171d534e5c1ca20bd009a") + version("37.0", sha256="823f3821a4f498ddd2dd123fbb8a3787b361ddfd818f4ab13572076fc9afdfe4") version("36.14", sha256="b11e0afcb797d61a305856dfe8079d48d74c6b6867ceccc0a83aab5978c9ba5f") version("36.13", sha256="41e711c83428663996c825044b268ce515bef85dad74b4a9453f2207b4b1be7b") version("36.12", sha256="dfce9156cedfa0a7234f880a3c395e592a5f3dc79070d5d196fdb94b83ae203e") @@ -72,7 +74,8 @@ class Gaudi(CMakePackage): depends_on("cppgsl") depends_on("fmt", when="@33.2:") depends_on("fmt@:8", when="@:36.9") - depends_on("intel-tbb@:2020.3") + depends_on("intel-tbb@:2020.3", when="@:37.0") + depends_on("tbb", when="@37.1:") depends_on("uuid") depends_on("nlohmann-json", when="@35.0:") depends_on("python", type=("build", "run")) From 3447e425f05abf7ace5cac6baa0f52cc224b6079 Mon Sep 17 00:00:00 2001 From: Jordan Ogas Date: Thu, 2 Nov 2023 12:23:49 -0600 Subject: [PATCH 468/806] add charliecloud 0.35 (#40842) * add charliecloud 0.35 * fix linter rage * fix linter rage? --- var/spack/repos/builtin/packages/charliecloud/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/charliecloud/package.py b/var/spack/repos/builtin/packages/charliecloud/package.py index 1b751b511dd139..88cca7d6e2a88a 100644 --- a/var/spack/repos/builtin/packages/charliecloud/package.py +++ b/var/spack/repos/builtin/packages/charliecloud/package.py @@ -17,7 +17,12 @@ class Charliecloud(AutotoolsPackage): tags = ["e4s"] version("master", branch="master") - version("0.34", sha256="034080c162949f4344ae1011cda026d4bb3ecd5cdb53135ac06d236f87e3b27d") + version("0.35", sha256="042f5be5ed8eda95f45230b4647510780142a50adb4e748be57e8dd8926b310e") + version( + "0.34", + deprecated=True, + sha256="034080c162949f4344ae1011cda026d4bb3ecd5cdb53135ac06d236f87e3b27d", + ) version( "0.33", deprecated=True, From 29a30963b3af0560df6bea557e0f9bf30e445a2a Mon Sep 17 00:00:00 2001 From: Chris Richardson Date: Thu, 2 Nov 2023 19:02:07 +0000 Subject: [PATCH 469/806] Fixes to ffcx @0.6.0 (#40787) --- var/spack/repos/builtin/packages/py-fenics-ffcx/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py index 2cd0584a662527..f2cec1e21e9b0d 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py @@ -24,7 +24,8 @@ class PyFenicsFfcx(PythonPackage): depends_on("python@3.8:", when="@0.7:", type=("build", "run")) depends_on("py-setuptools@62:", when="@0.7:", type="build") - depends_on("py-setuptools@58:", when="@0.4.2:0.6", type="build") + # Runtime dependency on pkg_resources from setuptools at 0.6.0 + depends_on("py-setuptools@58:", when="@0.4.2:0.6", type=("build", "run")) # CFFI is required at runtime for JIT support depends_on("py-cffi", type=("build", "run")) @@ -35,6 +36,7 @@ class PyFenicsFfcx(PythonPackage): depends_on("py-fenics-ufl@main", type=("build", "run"), when="@main") depends_on("py-fenics-ufl@2023.3.0:", type=("build", "run"), when="@0.8") depends_on("py-fenics-ufl@2023.2.0", type=("build", "run"), when="@0.7") + depends_on("py-fenics-ufl@2023.1", type=("build", "run"), when="@0.6") depends_on("py-fenics-ufl@2022.2.0", type=("build", "run"), when="@0.5.0:0.5") depends_on("py-fenics-ufl@2022.1.0", type=("build", "run"), when="@0.4.2") From dd57b58c2fa830464e426686308c85b6e089624e Mon Sep 17 00:00:00 2001 From: vucoda Date: Fri, 3 Nov 2023 05:33:18 +1030 Subject: [PATCH 470/806] py-pyside2: fix to build with newer llvm and to use spack install headers (#40544) * Fix py-pyside2 to build with newer llvm and to use spack libglx and libxcb headers where system headers are missing pyside2 needs LLVM_INSTALL_DIR to be set when using llvm 11: and expects system headers for libglx and libxcb and won't build otherwise. * Fix styling * remove raw string type * Update var/spack/repos/builtin/packages/py-pyside2/package.py Co-authored-by: Adam J. Stewart --------- Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-pyside2/package.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pyside2/package.py b/var/spack/repos/builtin/packages/py-pyside2/package.py index e6ee1f8cc89531..b13f0c1aac4220 100644 --- a/var/spack/repos/builtin/packages/py-pyside2/package.py +++ b/var/spack/repos/builtin/packages/py-pyside2/package.py @@ -54,7 +54,7 @@ class PyPyside2(PythonPackage): depends_on("cmake@3.1:", type="build") # libclang versioning from sources/shiboken2/doc/gettingstarted.rst depends_on("llvm@6", type="build", when="@5.12:5.13") - depends_on("llvm@10", type="build", when="@5.15") + depends_on("llvm@10:", type="build", when="@5.15:") depends_on("py-setuptools", type="build") depends_on("py-packaging", type="build") depends_on("py-wheel", type="build") @@ -69,6 +69,23 @@ class PyPyside2(PythonPackage): depends_on("libxslt@1.1.19:", when="+doc", type="build") depends_on("py-sphinx", when="+doc", type="build") + def patch(self): + filter_file( + "=${shiboken_include_dirs}", + ":".join( + [ + "=${shiboken_include_dirs}", + self.spec["qt"]["glx"]["libglx"].prefix.include, + self.spec["qt"]["libxcb"].prefix.include, + ] + ), + "sources/pyside2/cmake/Macros/PySideModules.cmake", + string=True, + ) + + def setup_build_environment(self, env): + env.set("LLVM_INSTALL_DIR", self.spec["llvm"].prefix) + def install_options(self, spec, prefix): args = [ "--parallel={0}".format(make_jobs), From b5b94d89d335b72e6e85169561b1546f7fa6e9ea Mon Sep 17 00:00:00 2001 From: Chris Richardson Date: Thu, 2 Nov 2023 19:07:44 +0000 Subject: [PATCH 471/806] Update to latest version (#40778) --- var/spack/repos/builtin/packages/py-nanobind/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-nanobind/package.py b/var/spack/repos/builtin/packages/py-nanobind/package.py index 19c3d915f98843..5c39cf271cfc14 100644 --- a/var/spack/repos/builtin/packages/py-nanobind/package.py +++ b/var/spack/repos/builtin/packages/py-nanobind/package.py @@ -23,6 +23,9 @@ class PyNanobind(PythonPackage): maintainers("chrisrichardson", "garth-wells", "ma595") version("master", branch="master", submodules=True) + version( + "1.7.0", tag="v1.7.0", commit="555ec7595c89c60ce7cf53e803bc226dc4899abb", submodules=True + ) version( "1.6.2", tag="v1.6.2", commit="cc5ac7e61def198db2a8b65c6d630343987a9f1d", submodules=True ) From c2193b54701dbe8608f0677d188163b1d95f05fa Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Thu, 2 Nov 2023 15:13:19 -0400 Subject: [PATCH 472/806] py-pint: new versions 0.21, 0.22 (#40745) * py-pint: new versions 0.21, 0.22 * Address feedback * Fix dumb typo * Add typing extension requirement --- var/spack/repos/builtin/packages/py-pint/package.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pint/package.py b/var/spack/repos/builtin/packages/py-pint/package.py index 85bb7a0f054acd..83cb92af0d6d67 100644 --- a/var/spack/repos/builtin/packages/py-pint/package.py +++ b/var/spack/repos/builtin/packages/py-pint/package.py @@ -18,6 +18,8 @@ class PyPint(PythonPackage): # any import tests for this package. import_modules = [] # type: List[str] + version("0.22", sha256="2d139f6abbcf3016cad7d3cec05707fe908ac4f99cf59aedfd6ee667b7a64433") + version("0.21.1", sha256="5d5b6b518d0c5a7ab03a776175db500f1ed1523ee75fb7fafe38af8149431c8d") version("0.20.1", sha256="387cf04078dc7dfe4a708033baad54ab61d82ab06c4ee3d4922b1e45d5626067") version("0.18", sha256="8c4bce884c269051feb7abc69dbfd18403c0c764abc83da132e8a7222f8ba801") version("0.17", sha256="f4d0caa713239e6847a7c6eefe2427358566451fe56497d533f21fb590a3f313") @@ -27,11 +29,14 @@ class PyPint(PythonPackage): version("0.9", sha256="32d8a9a9d63f4f81194c0014b3b742679dce81a26d45127d9810a68a561fe4e2") version("0.8.1", sha256="afcf31443a478c32bbac4b00337ee9026a13d0e2ac83d30c79151462513bb0d4") - depends_on("python@3.8:", type=("build", "run"), when="@0.19:") - depends_on("py-setuptools@41:", when="@0.16:", type="build") + depends_on("python@3.9:", when="@0.22:", type=("build", "run")) + depends_on("python@3.8:", when="@0.19:0.21", type=("build", "run")) + depends_on("py-typing-extensions", when="@0.22:", type=("build", "run")) + depends_on("py-setuptools@61:", when="@0.21:", type="build") + depends_on("py-setuptools@41:", when="@0.16:0.20", type="build") depends_on("py-setuptools@41:", when="@0.11:0.15", type=("build", "run")) depends_on("py-setuptools", when="@:0.10", type=("build", "run")) depends_on("py-setuptools-scm@3.4.3:+toml", when="@0.11:", type="build") depends_on("py-setuptools-scm", when="@0.10", type="build") - depends_on("py-packaging", type=("build", "run"), when="@0.13:18") - depends_on("py-importlib-metadata", type=("build", "run"), when="@0.13:18 ^python@:3.7") + depends_on("py-packaging", when="@0.13:18", type=("build", "run")) + depends_on("py-importlib-metadata", when="@0.13:18 ^python@:3.7", type=("build", "run")) From fa08de669e8af0186000128cd7c3be3f67bac865 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Thu, 2 Nov 2023 12:17:54 -0700 Subject: [PATCH 473/806] bugfix: computing NodeID2 in requirement node_flag_source (#40846) --- lib/spack/spack/solver/concretize.lp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 3b3a547efffe37..b5a9ebf77aea40 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -720,7 +720,7 @@ requirement_group_satisfied(node(ID, Package), X) :- activate_requirement(node(NodeID1, Package1), RequirementID), pkg_fact(Package1, condition_effect(ConditionID, EffectID)), imposed_constraint(EffectID, "node_flag_source", Package1, FlagType, Package2), - imposed_packages(NodeID2, Package2). + imposed_nodes(EffectID, node(NodeID2, Package2), node(NodeID1, Package1)). requirement_weight(node(ID, Package), Group, W) :- W = #min { From 6b236f130c907bb3c43586a46832c34ea547fefc Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Thu, 2 Nov 2023 20:28:31 +0100 Subject: [PATCH 474/806] eccodes: rename variant 'definitions' to 'extra_definitions' (#36186) --- .../repos/builtin/packages/eccodes/package.py | 33 ++++--------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/var/spack/repos/builtin/packages/eccodes/package.py b/var/spack/repos/builtin/packages/eccodes/package.py index 8d18055a4c5197..1c24effccc8430 100644 --- a/var/spack/repos/builtin/packages/eccodes/package.py +++ b/var/spack/repos/builtin/packages/eccodes/package.py @@ -81,17 +81,9 @@ class Eccodes(CMakePackage): variant("shared", default=True, description="Build shared versions of the libraries") variant( - "definitions", - values=disjoint_sets(("auto",), ("default",) + tuple(_definitions.keys())).with_default( - "auto" - ), - description="List of definitions to install", - ) - - variant( - "samples", - values=disjoint_sets(("auto",), ("default",)).with_default("auto"), - description="List of samples to install", + "extra_definitions", + values=any_combination_of(*_definitions.keys()), + description="List of extra definitions to install", ) depends_on("netcdf-c", when="+netcdf") @@ -132,7 +124,7 @@ class Eccodes(CMakePackage): for center, definitions in _definitions.items(): kwargs = definitions.get("conflicts", None) if kwargs: - conflicts("definitions={0}".format(center), **kwargs) + conflicts("extra_definitions={0}".format(center), **kwargs) for kwargs in definitions.get("resources", []): resource( name=center, @@ -357,25 +349,12 @@ def cmake_args(self): if "+memfs" in self.spec: args.append(self.define("PYTHON_EXECUTABLE", python.path)) - definitions = self.spec.variants["definitions"].value - - if "auto" not in definitions: - args.append( - self.define("ENABLE_INSTALL_ECCODES_DEFINITIONS", "default" in definitions) - ) - - samples = self.spec.variants["samples"].value - - if "auto" not in samples: - args.append(self.define("ENABLE_INSTALL_ECCODES_SAMPLES", "default" in samples)) - return args @run_after("install") def install_extra_definitions(self): - noop = set(["auto", "none", "default"]) - for center in self.spec.variants["definitions"].value: - if center not in noop: + for center in self.spec.variants["extra_definitions"].value: + if center != "none": center_dir = "definitions.{0}".format(center) install_tree( join_path(self.stage.source_path, "spack-definitions", center_dir), From 05953e44919f043e2a50f62c6fa9ffaddd083760 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Thu, 2 Nov 2023 21:03:44 +0100 Subject: [PATCH 475/806] highfive: 2.8.0 (#40837) Co-authored-by: Nicolas Cornu --- var/spack/repos/builtin/packages/highfive/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/highfive/package.py b/var/spack/repos/builtin/packages/highfive/package.py index 78a6f337d5806f..02f0152bef5409 100644 --- a/var/spack/repos/builtin/packages/highfive/package.py +++ b/var/spack/repos/builtin/packages/highfive/package.py @@ -17,6 +17,7 @@ class Highfive(CMakePackage): maintainers("alkino") version("develop", branch="master") + version("2.8.0", sha256="cd2502cae61bfb00e32dd18c9dc75289e09ad1db5c2a46d3b0eefd32e0df983b") version("2.7.1", sha256="25b4c51a94d1e670dc93b9b73f51e79b65d8ff49bcd6e5d5582d5ecd2789a249") version("2.7.0", sha256="8e05672ddf81a59ce014b1d065bd9a8c5034dbd91a5c2578e805ef880afa5907") version("2.6.2", sha256="ab51b9fbb49e877dd1aa7b53b4b26875f41e4e0b8ee0fc2f1d735e0d1e43d708") From 6f9425c593558b64d577651e2272feaa096ac266 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:16:39 -0600 Subject: [PATCH 476/806] Automated deployment to update package flux-sched 2023-10-18 (#40596) Co-authored-by: github-actions Co-authored-by: Tom Scogland --- .../builtin/packages/flux-sched/package.py | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py index 8c8b7b617c800d..df38f938296043 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -6,11 +6,13 @@ import os import spack.util.executable +from spack.build_systems.autotools import AutotoolsBuilder +from spack.build_systems.cmake import CMakeBuilder from spack.package import * -class FluxSched(AutotoolsPackage): - """A scheduler for flux-core (pre-alpha)""" +class FluxSched(CMakePackage, AutotoolsPackage): + """A scheduler for flux-core""" homepage = "https://github.com/flux-framework/flux-sched" url = "https://github.com/flux-framework/flux-sched/releases/download/v0.5.0/flux-sched-0.5.0.tar.gz" @@ -20,6 +22,7 @@ class FluxSched(AutotoolsPackage): maintainers("grondo") version("master", branch="master") + version("0.29.0", sha256="b93b18788e677535aa8ef945cdbeeced6d1408a4d16cb4a816ead53f31dd78d2") version("0.28.0", sha256="9431c671bed5d76fd95b4a4a7f36224d4bf76f416a2a1a5c4908f3ca790d434d") version("0.27.0", sha256="1e131924440c904fa0c925b7aa14c47b97f4e67b43af7efd2ebc0ef7ce90eb7c") version("0.26.0", sha256="184faec800cf45952ef79bda113f710bf91a05be584034d36a3234627d4a54c7") @@ -81,6 +84,18 @@ class FluxSched(AutotoolsPackage): depends_on("automake", type="build", when="@master") depends_on("libtool", type="build", when="@master") + # Set default to cmake so master (and branches) use it + build_system( + conditional("cmake", when="@0.29.0:"), + conditional("autotools", when="@:0.28.0"), + default="cmake", + ) + + # Required dependencies + with when("build_system=cmake"): + generator("ninja") + depends_on("cmake@3.18:", type="build") + # Disable t5000-valgrind.t by default due to false positives not yet # in the suppressions file. (This patch will be in v0.21.0) patch("no-valgrind.patch", when="@:0.20.0") @@ -136,19 +151,6 @@ def patch(self): filter_file("NULL", "nullptr", "resource/schema/sched_data.hpp") filter_file("size_t", "std::size_t", "resource/planner/planner.h") - def configure_args(self): - args = [] - if self.spec.satisfies("@0.9.0:"): - args.append("CXXFLAGS=-Wno-uninitialized") - if self.spec.satisfies("%clang@12:"): - args.append("CXXFLAGS=-Wno-defaulted-function-deleted") - if self.spec.satisfies("%oneapi"): - args.append("CXXFLAGS=-Wno-tautological-constant-compare") - # flux-sched's ax_boost is sometimes weird about non-system locations - # explicitly setting the path guarantees success - args.append("--with-boost={0}".format(self.spec["boost"].prefix)) - return args - @property def lua_version(self): return self.spec["lua"].version.up_to(2) @@ -173,3 +175,23 @@ def setup_run_environment(self, env): env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules.sched) env.prepend_path("FLUX_EXEC_PATH", self.prefix.libexec.flux.cmd) env.prepend_path("FLUX_RC_EXTRA", self.prefix.etc.flux) + + +class CMakeBuilder(CMakeBuilder): + def cmake_args(self): + return [] + + +class AutotoolsBuilder(AutotoolsBuilder): + def configure_args(self): + args = [] + if self.spec.satisfies("@0.9.0:"): + args.append("CXXFLAGS=-Wno-uninitialized") + if self.spec.satisfies("%clang@12:"): + args.append("CXXFLAGS=-Wno-defaulted-function-deleted") + if self.spec.satisfies("%oneapi"): + args.append("CXXFLAGS=-Wno-tautological-constant-compare") + # flux-sched's ax_boost is sometimes weird about non-system locations + # explicitly setting the path guarantees success + args.append("--with-boost={0}".format(self.spec["boost"].prefix)) + return args From 94d143763eeaf2adfcdea12f8a32e3d33552892d Mon Sep 17 00:00:00 2001 From: garylawson <82234526+garylawson@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:42:44 -0600 Subject: [PATCH 477/806] Update Anaconda3 -- add version 2023.09-0 for x86_64, aarch64, and ppc64le (#40622) * Add 2023.09-0 for x86_64, aarch64, and ppc64le extend the anaconda3 package.py to support aarch64 and ppc64le. add the latest version of anaconda3 to each new platform, including the existing x86_64 * formatting --- .../builtin/packages/anaconda3/package.py | 358 ++++++++++-------- 1 file changed, 193 insertions(+), 165 deletions(-) diff --git a/var/spack/repos/builtin/packages/anaconda3/package.py b/var/spack/repos/builtin/packages/anaconda3/package.py index 4c0196fe9092b1..c405e9d9034197 100644 --- a/var/spack/repos/builtin/packages/anaconda3/package.py +++ b/var/spack/repos/builtin/packages/anaconda3/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import platform from os.path import split from spack.package import * @@ -22,172 +23,199 @@ class Anaconda3(Package): maintainers("ajkotobi") - version( - "2022.10", - sha256="e7ecbccbc197ebd7e1f211c59df2e37bc6959d081f2235d387e08c9026666acd", - expand=False, - ) - version( - "2022.05", - sha256="a7c0afe862f6ea19a596801fc138bde0463abcbce1b753e8d5c474b506a2db2d", - expand=False, - ) - version( - "2021.11", - sha256="fedf9e340039557f7b5e8a8a86affa9d299f5e9820144bd7b92ae9f7ee08ac60", - expand=False, - ) + if platform.machine() == "ppc64le": + version( + "2023.09-0", + sha256="5ea1ed9808af95eb2655fe6a4ffdb66bea66ecd1d053fc2ee69eacc7685ef665", + expand=False, + ) + elif platform.machine() == "aarch64": + version( + "2023.09-0", + sha256="69ee26361c1ec974199bce5c0369e3e9a71541de7979d2b9cfa4af556d1ae0ea", + expand=False, + ) + elif platform.machine() == "x86_64": + version( + "2023.09-0", + sha256="6c8a4abb36fbb711dc055b7049a23bbfd61d356de9468b41c5140f8a11abd851", + expand=False, + ) + version( + "2023.07-2", + sha256="589fb34fe73bc303379abbceba50f3131254e85ce4e7cd819ba4276ba29cad16", + expand=False, + ) + version( + "2022.10", + sha256="e7ecbccbc197ebd7e1f211c59df2e37bc6959d081f2235d387e08c9026666acd", + expand=False, + ) + version( + "2022.05", + sha256="a7c0afe862f6ea19a596801fc138bde0463abcbce1b753e8d5c474b506a2db2d", + expand=False, + ) + version( + "2021.11", + sha256="fedf9e340039557f7b5e8a8a86affa9d299f5e9820144bd7b92ae9f7ee08ac60", + expand=False, + ) - version( - "2021.05", - sha256="2751ab3d678ff0277ae80f9e8a74f218cfc70fe9a9cdc7bb1c137d7e47e33d53", - expand=False, - ) - version( - "2020.11", - sha256="cf2ff493f11eaad5d09ce2b4feaa5ea90db5174303d5b3fe030e16d29aeef7de", - expand=False, - ) - version( - "2020.07", - sha256="38ce717758b95b3bd0b1797cc6ccfb76f29a90c25bdfa50ee45f11e583edfdbf", - expand=False, - ) - version( - "2020.02", - sha256="2b9f088b2022edb474915d9f69a803d6449d5fdb4c303041f60ac4aefcc208bb", - expand=False, - ) - version( - "2019.10", - sha256="46d762284d252e51cd58a8ca6c8adc9da2eadc82c342927b2f66ed011d1d8b53", - expand=False, - ) - version( - "2019.07", - sha256="69581cf739365ec7fb95608eef694ba959d7d33b36eb961953f2b82cb25bdf5a", - expand=False, - ) - version( - "2019.03", - sha256="45c851b7497cc14d5ca060064394569f724b67d9b5f98a926ed49b834a6bb73a", - expand=False, - ) - version( - "2018.12", - sha256="1019d0857e5865f8a6861eaf15bfe535b87e92b72ce4f531000dc672be7fce00", - expand=False, - ) - version( - "5.3.1", - sha256="d4c4256a8f46173b675dd6a62d12f566ed3487f932bab6bb7058f06c124bcc27", - expand=False, - ) - version( - "5.3.0", - sha256="cfbf5fe70dd1b797ec677e63c61f8efc92dad930fd1c94d60390bb07fdc09959", - expand=False, - ) - version( - "5.2.0", - sha256="09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48", - expand=False, - ) - version( - "5.1.0", - sha256="7e6785caad25e33930bc03fac4994a434a21bc8401817b7efa28f53619fa9c29", - expand=False, - ) - version( - "5.0.1", - sha256="55e4db1919f49c92d5abbf27a4be5986ae157f074bf9f8238963cd4582a4068a", - expand=False, - ) - version( - "5.0.0.1", - sha256="092c92427f44687d789a41922ce8426fbdc3c529cc9d6d4ee6de5b62954b93b2", - expand=False, - ) - version( - "5.0.0", - sha256="67f5c20232a3e493ea3f19a8e273e0618ab678fa14b03b59b1783613062143e9", - expand=False, - ) - version( - "4.4.0", - sha256="3301b37e402f3ff3df216fe0458f1e6a4ccbb7e67b4d626eae9651de5ea3ab63", - expand=False, - ) - version( - "4.3.1", - sha256="4447b93d2c779201e5fb50cfc45de0ec96c3804e7ad0fe201ab6b99f73e90302", - expand=False, - ) - version( - "4.3.0", - sha256="e9169c3a5029aa820393ac92704eb9ee0701778a085ca7bdc3c57b388ac1beb6", - expand=False, - ) - version( - "4.2.0", - sha256="73b51715a12b6382dd4df3dd1905b531bd6792d4aa7273b2377a0436d45f0e78", - expand=False, - ) - version( - "4.1.1", - sha256="4f5c95feb0e7efeadd3d348dcef117d7787c799f24b0429e45017008f3534e55", - expand=False, - ) - version( - "4.1.0", - sha256="11d32cf4026603d3b327dc4299863be6b815905ff51a80329085e1bb9f96c8bd", - expand=False, - ) - version( - "4.0.0", - sha256="36a558a1109868661a5735f5f32607643f6dc05cf581fefb1c10fb8abbe22f39", - expand=False, - ) - version( - "2.5.0", - sha256="addadcb927f15cb0b5b6e36890563d3352a8ff6a901ea753d389047d274a29a9", - expand=False, - ) - version( - "2.4.1", - sha256="0735e69199fc37135930ea2fd4fb6ad0adef215a2a7ba9fd6b0a0a4daaadb1cf", - expand=False, - ) - version( - "2.4.0", - sha256="fb4e480059e991f2fa632b5a9bcdd284c7f0677814cd719c11d524453f96a40d", - expand=False, - ) - version( - "2.3.0", - sha256="3be5410b2d9db45882c7de07c554cf4f1034becc274ec9074b23fd37a5c87a6f", - expand=False, - ) - version( - "2.2.0", - sha256="4aac68743e7706adb93f042f970373a6e7e087dbf4b02ac467c94ca4ce33d2d1", - expand=False, - ) - version( - "2.1.0", - sha256="af3225ccbe8df0ffb918939e009aa57740e35058ebf9dfcf5fec794a77556c3c", - expand=False, - ) - version( - "2.0.1", - sha256="3c3b834793e461f3316ad1d9a9178c67859a9d74aaf7bcade076f04134dd1e26", - expand=False, - ) - version( - "2.0.0", - sha256="57ce4f97e300cf94c5724f72d992e9eecef708fdaa13bc672ae9779773056540", - expand=False, - ) + version( + "2021.05", + sha256="2751ab3d678ff0277ae80f9e8a74f218cfc70fe9a9cdc7bb1c137d7e47e33d53", + expand=False, + ) + version( + "2020.11", + sha256="cf2ff493f11eaad5d09ce2b4feaa5ea90db5174303d5b3fe030e16d29aeef7de", + expand=False, + ) + version( + "2020.07", + sha256="38ce717758b95b3bd0b1797cc6ccfb76f29a90c25bdfa50ee45f11e583edfdbf", + expand=False, + ) + version( + "2020.02", + sha256="2b9f088b2022edb474915d9f69a803d6449d5fdb4c303041f60ac4aefcc208bb", + expand=False, + ) + version( + "2019.10", + sha256="46d762284d252e51cd58a8ca6c8adc9da2eadc82c342927b2f66ed011d1d8b53", + expand=False, + ) + version( + "2019.07", + sha256="69581cf739365ec7fb95608eef694ba959d7d33b36eb961953f2b82cb25bdf5a", + expand=False, + ) + version( + "2019.03", + sha256="45c851b7497cc14d5ca060064394569f724b67d9b5f98a926ed49b834a6bb73a", + expand=False, + ) + version( + "2018.12", + sha256="1019d0857e5865f8a6861eaf15bfe535b87e92b72ce4f531000dc672be7fce00", + expand=False, + ) + version( + "5.3.1", + sha256="d4c4256a8f46173b675dd6a62d12f566ed3487f932bab6bb7058f06c124bcc27", + expand=False, + ) + version( + "5.3.0", + sha256="cfbf5fe70dd1b797ec677e63c61f8efc92dad930fd1c94d60390bb07fdc09959", + expand=False, + ) + version( + "5.2.0", + sha256="09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48", + expand=False, + ) + version( + "5.1.0", + sha256="7e6785caad25e33930bc03fac4994a434a21bc8401817b7efa28f53619fa9c29", + expand=False, + ) + version( + "5.0.1", + sha256="55e4db1919f49c92d5abbf27a4be5986ae157f074bf9f8238963cd4582a4068a", + expand=False, + ) + version( + "5.0.0.1", + sha256="092c92427f44687d789a41922ce8426fbdc3c529cc9d6d4ee6de5b62954b93b2", + expand=False, + ) + version( + "5.0.0", + sha256="67f5c20232a3e493ea3f19a8e273e0618ab678fa14b03b59b1783613062143e9", + expand=False, + ) + version( + "4.4.0", + sha256="3301b37e402f3ff3df216fe0458f1e6a4ccbb7e67b4d626eae9651de5ea3ab63", + expand=False, + ) + version( + "4.3.1", + sha256="4447b93d2c779201e5fb50cfc45de0ec96c3804e7ad0fe201ab6b99f73e90302", + expand=False, + ) + version( + "4.3.0", + sha256="e9169c3a5029aa820393ac92704eb9ee0701778a085ca7bdc3c57b388ac1beb6", + expand=False, + ) + version( + "4.2.0", + sha256="73b51715a12b6382dd4df3dd1905b531bd6792d4aa7273b2377a0436d45f0e78", + expand=False, + ) + version( + "4.1.1", + sha256="4f5c95feb0e7efeadd3d348dcef117d7787c799f24b0429e45017008f3534e55", + expand=False, + ) + version( + "4.1.0", + sha256="11d32cf4026603d3b327dc4299863be6b815905ff51a80329085e1bb9f96c8bd", + expand=False, + ) + version( + "4.0.0", + sha256="36a558a1109868661a5735f5f32607643f6dc05cf581fefb1c10fb8abbe22f39", + expand=False, + ) + version( + "2.5.0", + sha256="addadcb927f15cb0b5b6e36890563d3352a8ff6a901ea753d389047d274a29a9", + expand=False, + ) + version( + "2.4.1", + sha256="0735e69199fc37135930ea2fd4fb6ad0adef215a2a7ba9fd6b0a0a4daaadb1cf", + expand=False, + ) + version( + "2.4.0", + sha256="fb4e480059e991f2fa632b5a9bcdd284c7f0677814cd719c11d524453f96a40d", + expand=False, + ) + version( + "2.3.0", + sha256="3be5410b2d9db45882c7de07c554cf4f1034becc274ec9074b23fd37a5c87a6f", + expand=False, + ) + version( + "2.2.0", + sha256="4aac68743e7706adb93f042f970373a6e7e087dbf4b02ac467c94ca4ce33d2d1", + expand=False, + ) + version( + "2.1.0", + sha256="af3225ccbe8df0ffb918939e009aa57740e35058ebf9dfcf5fec794a77556c3c", + expand=False, + ) + version( + "2.0.1", + sha256="3c3b834793e461f3316ad1d9a9178c67859a9d74aaf7bcade076f04134dd1e26", + expand=False, + ) + version( + "2.0.0", + sha256="57ce4f97e300cf94c5724f72d992e9eecef708fdaa13bc672ae9779773056540", + expand=False, + ) + + def url_for_version(self, version): + url = "https://repo.anaconda.com/archive/Anaconda3-{0}-Linux-{1}.sh" + return url.format(version, platform.machine()) def install(self, spec, prefix): dir, anaconda_script = split(self.stage.archive_file) From 7c79c744b6e70d90fc2b9567d4e070122c2258ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Fri, 3 Nov 2023 00:08:22 +0100 Subject: [PATCH 478/806] libtheora: fix build on macos (#40840) * libtheora: regenerate Makefile.in during autoreconf The patch to inhibit running of configure would exit autogen.sh so early that it did not yet run autoconf/automake/... Instead of patching autogen.sh, just pass -V as argument, as this is passed on to configure and lets it just print its version instead of configuring the build tree. Also drop arguments from autogen.sh, as they are unused when configure does not run. * libtheora: fix build on macos Apply upstream patches in order to avoid unresolved symbols during building of libtheoraenc. These patches require re-running automake/autoconf/... Error messages: libtool: link: /Users/ma/git/spack/lib/spack/env/clang/clang -dynamiclib -o .libs/libtheoraenc.1.dylib .libs/apiwrapper.o .libs/fragment.o .libs/idct.o .libs/internal.o .libs/state.o .libs/quant.o .l ibs/analyze.o .libs/fdct.o .libs/encfrag.o .libs/encapiwrapper.o .libs/encinfo.o .libs/encode.o .libs/enquant.o .libs/huffenc.o .libs/mathops.o .libs/mcenc.o .libs/rate.o .libs/tokenize.o -L/opt/spac k/darwin-sonoma-m1/apple-clang-15.0.0/libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/lib -logg -lm -Wl,-exported_symbols_list -Wl,/var/folders/zv/qr55pmd9065glf0mcltpx5bm000102/T/ma/spack-stage/spac k-stage-libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/spack-src/lib/theoraenc.exp -install_name /opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/lib /libtheoraenc.1.dylib -compatibility_version 3 -current_version 3.2 ld: warning: search path '/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/lib' not found ld: Undefined symbols: _th_comment_add, referenced from: _theora_comment_add in apiwrapper.o _th_comment_add_tag, referenced from: _theora_comment_add_tag in apiwrapper.o _th_comment_clear, referenced from: _theora_comment_clear in apiwrapper.o _th_comment_init, referenced from: _theora_comment_init in apiwrapper.o _th_comment_query, referenced from: _theora_comment_query in apiwrapper.o _th_comment_query_count, referenced from: _theora_comment_query_count in apiwrapper.o * libtheora: add git versions stable as version name for theora-1.1 branch was chosen so that it sorts between 1.1.x and master * libtheora: remove unused patch thanks to @michaelkuhn for noticing --- .../exit-prior-to-running-configure.patch | 23 ----------------- .../builtin/packages/libtheora/package.py | 25 ++++++++++++++----- 2 files changed, 19 insertions(+), 29 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch diff --git a/var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch b/var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch deleted file mode 100644 index 99992c39c28dc1..00000000000000 --- a/var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0060fd48c12a59a080974ca3754bf0eab9ab6d35 Mon Sep 17 00:00:00 2001 -From: Howard Pritchard -Date: Tue, 24 Nov 2020 15:14:41 -0700 -Subject: [PATCH] exit prior to running configure - -Signed-off-by: Howard Pritchard - -diff --git a/autogen.sh b/autogen.sh -index bbca69dc..4de1e783 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -112,6 +112,8 @@ if test -z "$*"; then - echo "to pass any to it, please specify them on the $0 command line." - fi - -+exit 0 -+ - echo "Generating configuration files for $package, please wait...." - - echo " $ACLOCAL $ACLOCAL_FLAGS" --- -2.18.2 - diff --git a/var/spack/repos/builtin/packages/libtheora/package.py b/var/spack/repos/builtin/packages/libtheora/package.py index 7c454a52504f25..6ec88aa91ccf24 100644 --- a/var/spack/repos/builtin/packages/libtheora/package.py +++ b/var/spack/repos/builtin/packages/libtheora/package.py @@ -17,7 +17,10 @@ class Libtheora(AutotoolsPackage, MSBuildPackage): homepage = "https://www.theora.org" url = "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz" + git = "https://gitlab.xiph.org/xiph/theora.git" + version("master", branch="master") + version("stable", branch="theora-1.1") version("1.1.1", sha256="f36da409947aa2b3dcc6af0a8c2e3144bc19db2ed547d64e9171c59c66561c61") version("1.1.0", sha256="3d7b4fb1c115f1a530afd430eed2e8861fa57c8b179ec2d5a5d8f1cd0c7a4268") @@ -43,12 +46,23 @@ class Libtheora(AutotoolsPackage, MSBuildPackage): "msbuild", "autotools", default="autotools" if sys.platform != "win32" else "msbuild" ) - patch("exit-prior-to-running-configure.patch", when="@1.1.1") patch("fix_encoding.patch", when="@1.1:") patch( "https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff", sha256="e01ef71a1c19783a0b323b90a625e5c360ddb7ee03d2b6c201f1519f1704ea11", - when="^libpng@1.6:", + when="@:1.1.1 ^libpng@1.6:", + ) + # add -no-undefined + patch( + "https://gitlab.xiph.org/xiph/theora/-/commit/391ab0e99f2ad730231dbe5fc1154b990087f17d.diff", + sha256="d9bb5a9573819a27b3a925b1b66c33b36d9bca11b05d8aef88566eb6c8700690", + when="@:1.1.1", + ) + # link theoraenc to theoradec + patch( + "https://gitlab.xiph.org/xiph/theora/-/commit/133b951b60fd845eabbc38bf7acd998bb9be75fc.diff", + sha256="e01511aff0130a40c889868d3713a56458744f39d1bb5ad98c8058da50233aa7", + when="@:1.1.1", ) patch("libtheora-inc-external-ogg.patch", when="platform=windows") @@ -62,10 +76,9 @@ def configure_args(self): def autoreconf(self, pkg, spec, prefix): sh = which("sh") - if self.spec.satisfies("target=aarch64:"): - sh("./autogen.sh", "prefix={0}".format(prefix), "--build=arm-linux") - else: - sh("./autogen.sh", "prefix={0}".format(prefix)) + # arguments are passed on to configure, let it just print its version + # and exit, so that configure can run in the configure build phase + sh("./autogen.sh", "-V") class MSBuildBuilder(MSBuildBuilder): From c2af2bcac3c0d9089825ac39978bdbac88784616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Fri, 3 Nov 2023 00:52:15 +0100 Subject: [PATCH 479/806] qt-*: add v6.5.3 & v6.6.0 (#40833) --- var/spack/repos/builtin/packages/qt-base/package.py | 2 ++ var/spack/repos/builtin/packages/qt-declarative/package.py | 2 ++ var/spack/repos/builtin/packages/qt-quick3d/package.py | 2 ++ var/spack/repos/builtin/packages/qt-quicktimeline/package.py | 2 ++ var/spack/repos/builtin/packages/qt-shadertools/package.py | 2 ++ 5 files changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index f3fcfc0eed7193..4345e6b34d7508 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -91,6 +91,8 @@ class QtBase(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.0", sha256="882f39ea3a40a0894cd64e515ce51711a4fab79b8c47bc0fe0279e99493a62cf") + version("6.5.3", sha256="174021c4a630df2e7e912c2e523844ad3cb5f90967614628fd8aa15ddbab8bc5") version("6.5.2", sha256="221cafd400c0a992a42746b43ea879d23869232e56d9afe72cb191363267c674") version("6.5.1", sha256="fdde60cdc5c899ab7165f1c3f7b93bc727c2484c348f367d155604f5d901bfb6") version("6.5.0", sha256="7b0de20e177335927c55c58a3e1a7e269e32b044936e97e9a82564f0f3e69f99") diff --git a/var/spack/repos/builtin/packages/qt-declarative/package.py b/var/spack/repos/builtin/packages/qt-declarative/package.py index 390053188dcafa..b93141c4e438d7 100644 --- a/var/spack/repos/builtin/packages/qt-declarative/package.py +++ b/var/spack/repos/builtin/packages/qt-declarative/package.py @@ -14,6 +14,8 @@ class QtDeclarative(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.0", sha256="2e52ef00736a9954426adf454cfb365fabdffb5703c814c188bc866cbf9f4dad") + version("6.5.3", sha256="563924e58ac517492acb1952af0fb950cd54045ef6d61b98de06fac728239811") version("6.5.2", sha256="8b9eed849c90fb301d5399c545c2c926c18dc889d724df2b284253152a2ee139") version("6.5.1", sha256="b6f81ee73e8dbc30601c022b30ceb592fd2f8a5a79e7bc48fcd7feef80e3cc7a") version("6.5.0", sha256="38281cdfc60b8820ac2943eebabe968138f90629edc8c6c5e88a72a7ec05e303") diff --git a/var/spack/repos/builtin/packages/qt-quick3d/package.py b/var/spack/repos/builtin/packages/qt-quick3d/package.py index 15453659090e38..b2d4fb0456b23f 100644 --- a/var/spack/repos/builtin/packages/qt-quick3d/package.py +++ b/var/spack/repos/builtin/packages/qt-quick3d/package.py @@ -14,6 +14,8 @@ class QtQuick3d(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.0", sha256="2cda12649cfb6c23261c48e626714ca7eb01fa4b20e0bed02031f9c488c820ad") + version("6.5.3", sha256="5df7494824c44fc73c03348b218166db5c4d8d42bd7d221f15e58c962cf657e5") version("6.5.2", sha256="7b40e578fc1ee2a5f5c413873fdb0552bb97829b70296ba3c6844da062608a7e") version("6.5.1", sha256="2b4f65f6c616302b38656f287e9acdf5a9f0e220ef79eaa2e80946780898fa51") version("6.5.0", sha256="eaf41f06450b2be50f16b39ec06c06d10dd337b7516aba1d95695b326fd9ef40") diff --git a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py index 611057a0efc4be..42fc1a93e2dd18 100644 --- a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py +++ b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py @@ -14,6 +14,8 @@ class QtQuicktimeline(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.0", sha256="06b94443da3f81153f04dca0cce781481462310d51f97d5550f81322a7a88cd0") + version("6.5.3", sha256="fddd90cdb15af093673c6da924e18e22ebd364b9ab215356e1b40db28ac66640") version("6.5.2", sha256="96389af740fde3b2a655bf994001b94fd6e151ef84958ff9982e2ae799f1c3a2") version("6.5.1", sha256="d7d845f877f9b990e63ab14c9152f18e290611e760719a9c22f7740b91bd2ed1") version("6.5.0", sha256="ff862aad1aa4327c39c071ad1ca6eea6c64d4937521f9ed5d022a70cb3df92a7") diff --git a/var/spack/repos/builtin/packages/qt-shadertools/package.py b/var/spack/repos/builtin/packages/qt-shadertools/package.py index 866e0cb18b9d90..5ac23d8626c861 100644 --- a/var/spack/repos/builtin/packages/qt-shadertools/package.py +++ b/var/spack/repos/builtin/packages/qt-shadertools/package.py @@ -16,6 +16,8 @@ class QtShadertools(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.0", sha256="8b34908f8bbc7fb00a00babede91dbbeec9826f5138d390041f239d483e1162a") + version("6.5.3", sha256="e6c627763db8c60799218947443efb90fb3511342f2212f5e99cd98f6942ed08") version("6.5.2", sha256="2b14cf982753f19cf48a4780bc7d96d8fc0ad3ed1049ae5d3292fc5fc1fd6aef") version("6.5.1", sha256="642bf97498d54b4471bf4cc227709c6b676dbd520765f82b0749a2b4ef833d25") version("6.5.0", sha256="ef2c71fac111a837914b7dc2b46c26579ea50b05fbd60022d430da88bdb211cb") From 864d47043cefce7e5aba756ae231c8ce7724909b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Fri, 3 Nov 2023 01:05:54 +0100 Subject: [PATCH 480/806] qt-svg: new package for Qt6 SVG module (#40834) enables loading of SVG icons by providing plugin used by qt-base --- .../repos/builtin/packages/qt-svg/package.py | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 var/spack/repos/builtin/packages/qt-svg/package.py diff --git a/var/spack/repos/builtin/packages/qt-svg/package.py b/var/spack/repos/builtin/packages/qt-svg/package.py new file mode 100644 index 00000000000000..dfd063bda82e20 --- /dev/null +++ b/var/spack/repos/builtin/packages/qt-svg/package.py @@ -0,0 +1,45 @@ +# Copyright 2013-2023 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 * +from spack.pkg.builtin.qt_base import QtBase, QtPackage + + +class QtSvg(QtPackage): + """Scalable Vector Graphics (SVG) is an XML-based language for describing + two-dimensional vector graphics. Qt provides classes for rendering and + displaying SVG drawings in widgets and on other paint devices.""" + + url = QtPackage.get_url(__qualname__) + list_url = QtPackage.get_list_url(__qualname__) + + version("6.6.0", sha256="4fd6b4d9307c3cd8fd207e60334823fed07a9acb32f7d53cd9c9be9b6a2f8a30") + version("6.5.3", sha256="fb8e5574c2480aab78062fad2d0a521633b4591ada600130b918b703c2ddb09a") + version("6.5.2", sha256="2d0c8780f164472ad968bb4eff325a86b2826f101efedbeca5662acdc0b294ba") + version("6.5.1", sha256="1b262f860c51bc5af5034d88e74bb5584ecdc661f4903c9ba27c8edad14fc403") + version("6.5.0", sha256="2f96e22858de18de02b05eb6bcc96fadb6d77f4dadd407e1fa4aebcceb6dd154") + version("6.4.3", sha256="3cc7479f7787a19e7af8923547dfc35b7b3fd658e3701577e76b2c1e4c1c0c23") + version("6.4.2", sha256="2f5fa08dbe6f3aea0c1c77acb74b6164dc069e15010103377186902b018fb623") + version("6.4.1", sha256="be6300292a6f38d85c13bb750890af268bd979fb18ab754f88d5332935215e47") + version("6.4.0", sha256="375eb69f320121e42d5dc107f9455008980c149646931b8ace19e6bc235dcd80") + version("6.3.2", sha256="781055bca458be46ef69f2fff147a00226e41f3a23d02c91238b0328a7156518") + + variant("widgets", default=False, description="Build SVG widgets.") + + depends_on("qt-base +gui") + depends_on("qt-base +widgets", when="+widgets") + + for _v in QtBase.versions: + v = str(_v) + depends_on("qt-base@" + v, when="@" + v) + + def cmake_args(self): + args = super().cmake_args() + [] + return args + + def setup_run_environment(self, env): + # to make plugins from SVG module to base, for e.g. icon loading + env.prepend_path("QT_PLUGIN_PATH", self.prefix.plugins) From 48a21970d1f6693ff70c57416050fa7f54a49665 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Thu, 2 Nov 2023 20:19:11 -0700 Subject: [PATCH 481/806] MFEM: add logic to find CUDA math-libs when using HPC SDK installation (#40815) * mfem: add logic to find CUDA math-libs when using HPC SDK installation * [@spackbot] updating style on behalf of v-dobrev --- var/spack/repos/builtin/packages/mfem/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index baab5cb80890c1..4744e8bceb9a6a 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -919,6 +919,22 @@ def find_optional_library(name, prefix): "CUDA_CXX=%s" % join_path(spec["cuda"].prefix, "bin", "nvcc"), "CUDA_ARCH=sm_%s" % cuda_arch, ] + # Check if we are using a CUDA installation where the math libs are + # in a separate directory: + culibs = ["libcusparse"] + cuda_libs = find_optional_library(culibs, spec["cuda"].prefix) + if not cuda_libs: + p0 = os.path.realpath(join_path(spec["cuda"].prefix, "bin", "nvcc")) + p0 = os.path.dirname(p0) + p1 = os.path.dirname(p0) + while p1 != p0: + cuda_libs = find_optional_library(culibs, join_path(p1, "math_libs")) + if cuda_libs: + break + p0, p1 = p1, os.path.dirname(p1) + if not cuda_libs: + raise InstallError("Required CUDA libraries not found: %s" % culibs) + options += ["CUDA_LIB=%s" % ld_flags_from_library_list(cuda_libs)] if "+rocm" in spec: amdgpu_target = ",".join(spec.variants["amdgpu_target"].value) From d4a1618e0716fbe857dc15b705d038827d476d29 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 2 Nov 2023 23:58:00 -0700 Subject: [PATCH 482/806] tau: update 2.33 hash, add syscall variant (#40851) Co-authored-by: wspear --- .../cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml | 4 ++-- .../gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 4 ++-- .../gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml | 2 +- .../cloud_pipelines/stacks/e4s-rocm-external/spack.yaml | 2 +- share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 6 +++--- var/spack/repos/builtin/packages/tau/package.py | 6 +++++- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml index 47f0b55f9f03be..82a1f07c8d4186 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-neoverse_v1/spack.yaml @@ -150,7 +150,7 @@ spack: - swig@4.0.2-fortran - sz3 - tasmanian - - tau +mpi +python + - tau +mpi +python +syscall - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap @@ -186,7 +186,7 @@ spack: - flux-core +cuda - hpctoolkit +cuda - papi +cuda - - tau +mpi +cuda + - tau +mpi +cuda +syscall # -- # - bricks +cuda # not respecting target=aarch64? # - legion +cuda # legion: needs NVIDIA driver diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 8e420a5b75c961..efbf0e2e9ce5f8 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -153,7 +153,7 @@ spack: - superlu-dist - sz3 - tasmanian - - tau +mpi +python + - tau +mpi +python +syscall - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap @@ -200,7 +200,7 @@ spack: - kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples - slate +sycl - - tau +mpi +opencl +level_zero ~pdt # tau: requires libdrm.so to be installed + - tau +mpi +opencl +level_zero ~pdt +syscall # tau: requires libdrm.so to be installed # -- # - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler. # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml index 718f1d23d336b2..511f48e7459408 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-power/spack.yaml @@ -150,7 +150,7 @@ spack: - swig@4.0.2-fortran - sz3 - tasmanian - - tau +mpi +python # tau: has issue with `spack env depfile` build + - tau +mpi +python # +syscall fails: https://github.com/spack/spack/pull/40830#issuecomment-1790799772; tau: has issue with `spack env depfile` build - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml index b30236a717453f..8f902aa6a8d4f4 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml @@ -240,7 +240,7 @@ spack: specs: # ROCM NOARCH - hpctoolkit +rocm - - tau +mpi +rocm # tau: has issue with `spack env depfile` build + - tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build # ROCM 908 - adios2 +kokkos +rocm amdgpu_target=gfx908 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index eb689234552cab..1fa5b41c265529 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -157,7 +157,7 @@ spack: - swig@4.0.2-fortran - sz3 - tasmanian - - tau +mpi +python + - tau +mpi +python +syscall - trilinos +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long - turbine - umap @@ -192,7 +192,7 @@ spack: - flux-core +cuda - hpctoolkit +cuda - papi +cuda - - tau +mpi +cuda + - tau +mpi +cuda +syscall # -- # - legion +cuda # legion: needs NVIDIA driver @@ -289,7 +289,7 @@ spack: # ROCM NOARCH - hpctoolkit +rocm - - tau +mpi +rocm # tau: has issue with `spack env depfile` build + - tau +mpi +rocm +syscall # tau: has issue with `spack env depfile` build # ROCM 908 - adios2 +kokkos +rocm amdgpu_target=gfx908 diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index 8466516872aa79..56cf5f1d721a7b 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -26,7 +26,7 @@ class Tau(Package): tags = ["e4s"] version("master", branch="master") - version("2.33", sha256="ed5d434924216b22ca4b7791abc15c6bba8f727fdcd74dcc2ba2c4733792e807") + version("2.33", sha256="04d9d67adb495bc1ea56561f33c5ce5ba44f51cc7f64996f65bd446fac5483d9") version("2.32.1", sha256="0eec3de46b0873846dfc639270c5e30a226b463dd6cb41aa12e975b7563f0eeb") version("2.32", sha256="ee774a06e30ce0ef0f053635a52229152c39aba4f4933bed92da55e5e13466f3") version("2.31.1", sha256="bf445b9d4fe40a5672a7b175044d2133791c4dfb36a214c1a55a931aebc06b9d") @@ -86,6 +86,7 @@ class Tau(Package): variant("io", default=True, description="Activates POSIX I/O support") variant("adios2", default=False, description="Activates ADIOS2 output support") variant("sqlite", default=False, description="Activates SQLite3 output support") + variant("syscall", default=False, description="Activates syscall wrapper") variant( "profileparam", default=False, @@ -247,6 +248,9 @@ def install(self, spec, prefix): if "+io" in spec: options.append("-iowrapper") + if "+syscall" in spec: + options.append("-syscall") + if "+binutils" in spec: options.append("-bfd=%s" % spec["binutils"].prefix) From a5e6097af7c77e1a48d835d1c19ba20bfb302de4 Mon Sep 17 00:00:00 2001 From: Thomas-Ulrich Date: Fri, 3 Nov 2023 09:56:13 +0100 Subject: [PATCH 483/806] fix typo in packaging guide (#40853) --- lib/spack/docs/packaging_guide.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 839f3b7c6f14f0..3b05ce8932c713 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2352,7 +2352,7 @@ the following at the command line of a bash shell: .. code-block:: console - $ for i in {1..12}; do nohup spack install -j 4 mpich@3.3.2 >> mpich_install.txt 2>&1 &; done + $ for i in {1..12}; do nohup spack install -j 4 mpich@3.3.2 >> mpich_install.txt 2>&1 & done .. note:: From fe0cf80e0571272e88b068e9d38a0c03e6a6fd80 Mon Sep 17 00:00:00 2001 From: George Young Date: Fri, 3 Nov 2023 11:07:58 +0000 Subject: [PATCH 484/806] py-spython: updating to @0.3.1 (#40839) * py-spython: updating to @0.3.1 * Adding `when=` for py-semver --------- Co-authored-by: LMS Bioinformatics --- var/spack/repos/builtin/packages/py-spython/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-spython/package.py b/var/spack/repos/builtin/packages/py-spython/package.py index d3c49ac9adb32f..41c5375563edf8 100644 --- a/var/spack/repos/builtin/packages/py-spython/package.py +++ b/var/spack/repos/builtin/packages/py-spython/package.py @@ -13,6 +13,7 @@ class PySpython(PythonPackage): homepage = "https://github.com/singularityhub/singularity-cli" pypi = "spython/spython-0.2.14.tar.gz" + version("0.3.1", sha256="143557849d636697ddd80e0ba95920efe4668351f5becce6bdc73a7651aa128d") version("0.2.14", sha256="49e22fbbdebe456b27ca17d30061489db8e0f95e62be3623267a23b85e3ce0f0") variant( @@ -27,5 +28,4 @@ class PySpython(PythonPackage): depends_on("singularity@3.5.2:", when="runtime=singularity", type="run") depends_on("py-setuptools", type="build") - - depends_on("py-semver@2.8.1:", type=("build", "run")) + depends_on("py-semver@2.8.1:", when="@:0.2", type=("build", "run")) From 3082ce6a22b1c1356da533a26225150298264a4b Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 3 Nov 2023 12:50:30 +0100 Subject: [PATCH 485/806] oci parsing: make image name case insensitive (#40858) --- lib/spack/spack/oci/image.py | 13 ++++++++++--- lib/spack/spack/test/oci/image.py | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/oci/image.py b/lib/spack/spack/oci/image.py index 1954bf013d6142..b61591b7bed0d0 100644 --- a/lib/spack/spack/oci/image.py +++ b/lib/spack/spack/oci/image.py @@ -9,8 +9,10 @@ import spack.spec -# all the building blocks -alphanumeric = r"[a-z0-9]+" +# notice: Docker is more strict (no uppercase allowed). We parse image names *with* uppercase +# and normalize, so: example.com/Organization/Name -> example.com/organization/name. Tags are +# case sensitive though. +alphanumeric_with_uppercase = r"[a-zA-Z0-9]+" separator = r"(?:[._]|__|[-]+)" localhost = r"localhost" domainNameComponent = r"(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])" @@ -25,7 +27,7 @@ domainAndPort = rf"{host}{optionalPort}" # image name -pathComponent = rf"{alphanumeric}(?:{separator}{alphanumeric})*" +pathComponent = rf"{alphanumeric_with_uppercase}(?:{separator}{alphanumeric_with_uppercase})*" remoteName = rf"{pathComponent}(?:\/{pathComponent})*" namePat = rf"(?:{domainAndPort}\/)?{remoteName}" @@ -130,6 +132,11 @@ def from_string(cls, string) -> "ImageReference": name = f"{domain}/{name}" domain = "index.docker.io" + # Lowercase the image name. This is enforced by Docker, although the OCI spec isn't clear? + # We do this anyways, cause for example in Github Actions the / + # part can have uppercase, and may be interpolated when specifying the relevant OCI image. + name = name.lower() + if not tag: tag = "latest" diff --git a/lib/spack/spack/test/oci/image.py b/lib/spack/spack/test/oci/image.py index 17899d1f4385f7..b074cc679af0a6 100644 --- a/lib/spack/spack/test/oci/image.py +++ b/lib/spack/spack/test/oci/image.py @@ -34,6 +34,10 @@ ("myname:1234/myimage:abc", ("myname:1234", "myimage", "abc", None)), ("localhost/myimage:abc", ("localhost", "myimage", "abc", None)), ("localhost:1234/myimage:abc", ("localhost:1234", "myimage", "abc", None)), + ( + "example.com/UPPERCASE/lowercase:AbC", + ("example.com", "uppercase/lowercase", "AbC", None), + ), ], ) def test_name_parsing(image_ref, expected): From db16335aec9add0ce838f9fcd4eb426352e35b07 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 3 Nov 2023 12:56:37 +0100 Subject: [PATCH 486/806] ASP-based solver: fix for unsplittable providers (#40859) Some providers must provide virtuals "together", i.e. if they provide one virtual of a set, they must be the providers also of the others. There was a bug though, where we were not checking if the other virtuals in the set were needed at all in the DAG. This commit fixes the bug. --- lib/spack/spack/solver/concretize.lp | 4 +++- lib/spack/spack/test/concretize.py | 13 +++++++++++ .../packages/blas-only-client/package.py | 19 ++++++++++++++++ .../edges.test/packages/openblas/package.py | 22 +++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/edges.test/packages/blas-only-client/package.py create mode 100644 var/spack/repos/edges.test/packages/openblas/package.py diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index b5a9ebf77aea40..2207fa9f9a6d73 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -492,7 +492,9 @@ error(100, "Package '{0}' needs to provide both '{1}' and '{2}' together, but pr pkg_fact(Package, provided_together(ID, SetID, Virtual2)), Virtual1 != Virtual2, attr("virtual_on_incoming_edges", node(X, Package), Virtual1), - not attr("virtual_on_incoming_edges", node(X, Package), Virtual2). + not attr("virtual_on_incoming_edges", node(X, Package), Virtual2), + attr("virtual_node", node(_, Virtual1)), + attr("virtual_node", node(_, Virtual2)). % if a package depends on a virtual, it's not external and we have a % provider for that virtual then it depends on the provider diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 1dd530ac70c0da..915f6ca39be761 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -2360,3 +2360,16 @@ def test_condition_triggered_by_edge_property( for not_expected in expected_not_satisfies: assert not s.satisfies(not_expected), str(not_expected) + + def test_virtuals_provided_together_but_only_one_required_in_dag(self): + """Tests that we can use a provider that provides more than one virtual together, + and is providing only one, iff the others are not needed in the DAG. + + o blas-only-client + | [virtual=blas] + o openblas (provides blas and lapack together) + + """ + s = Spec("blas-only-client ^openblas").concretized() + assert s.satisfies("^[virtuals=blas] openblas") + assert not s.satisfies("^[virtuals=blas,lapack] openblas") diff --git a/var/spack/repos/edges.test/packages/blas-only-client/package.py b/var/spack/repos/edges.test/packages/blas-only-client/package.py new file mode 100644 index 00000000000000..9e9652a752f44a --- /dev/null +++ b/var/spack/repos/edges.test/packages/blas-only-client/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 BlasOnlyClient(Package): + """This package depends on the 'blas' virtual only, but should be able to use also provider + that provide e.g. 'blas' together with 'lapack'. + """ + + homepage = "http://www.openblas.net" + url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + + version("0.2.16", md5="b1190f3d3471685f17cfd1ec1d252ac9") + + depends_on("blas") diff --git a/var/spack/repos/edges.test/packages/openblas/package.py b/var/spack/repos/edges.test/packages/openblas/package.py new file mode 100644 index 00000000000000..d162e069b0bae0 --- /dev/null +++ b/var/spack/repos/edges.test/packages/openblas/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 Openblas(Package): + """This package provides two virtuals together, so if one is chosen the other + must be used too if needed. + """ + + homepage = "http://www.openblas.net" + url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + + version("0.2.16", md5="b1190f3d3471685f17cfd1ec1d252ac9") + version("0.2.15", md5="b1190f3d3471685f17cfd1ec1d252ac9") + version("0.2.14", md5="b1190f3d3471685f17cfd1ec1d252ac9") + version("0.2.13", md5="b1190f3d3471685f17cfd1ec1d252ac9") + + provides("blas", "lapack") From 0f1898c82a92c45af9e7d70752ba4158b4b3fe0f Mon Sep 17 00:00:00 2001 From: Thomas-Ulrich Date: Fri, 3 Nov 2023 14:23:49 +0100 Subject: [PATCH 487/806] xdmf3: fix compilation with hdf5@1.10 and above (#37551) --- .../packages/xdmf3/fix_hdf5_hid_t.diff | 40 +++++++++++++++++++ .../repos/builtin/packages/xdmf3/package.py | 8 ++-- 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/xdmf3/fix_hdf5_hid_t.diff diff --git a/var/spack/repos/builtin/packages/xdmf3/fix_hdf5_hid_t.diff b/var/spack/repos/builtin/packages/xdmf3/fix_hdf5_hid_t.diff new file mode 100644 index 00000000000000..8323ddda26def7 --- /dev/null +++ b/var/spack/repos/builtin/packages/xdmf3/fix_hdf5_hid_t.diff @@ -0,0 +1,40 @@ +diff --git a/core/XdmfHDF5Controller.hpp b/core/XdmfHDF5Controller.hpp +index c5c15d0a..496cc80d 100644 +--- a/core/XdmfHDF5Controller.hpp ++++ b/core/XdmfHDF5Controller.hpp +@@ -27,13 +27,14 @@ + // C Compatible Includes + #include "XdmfCore.hpp" + #include "XdmfHeavyDataController.hpp" ++#include + + // So that hdf5 does not need to be included in the header files + // It would add a dependancy to programs that use Xdmf + #ifndef _H5Ipublic_H + #ifndef XDMF_HID_T + #define XDMF_HID_T +- typedef int hid_t; ++ typedef int64_t hid_t; + #endif + #endif + +diff --git a/core/XdmfHDF5Writer.hpp b/core/XdmfHDF5Writer.hpp +index cfbec6f4..f83aa0de 100644 +--- a/core/XdmfHDF5Writer.hpp ++++ b/core/XdmfHDF5Writer.hpp +@@ -28,13 +28,14 @@ + #include "XdmfCore.hpp" + #include "XdmfHeavyDataWriter.hpp" + #include "XdmfHeavyDataController.hpp" ++#include + + // So that hdf5 does not need to be included in the header files + // It would add a dependancy to programs that use Xdmf + #ifndef _H5Ipublic_H + #ifndef XDMF_HID_T + #define XDMF_HID_T +- typedef int hid_t; ++ typedef int64_t hid_t; + #endif + #endif + diff --git a/var/spack/repos/builtin/packages/xdmf3/package.py b/var/spack/repos/builtin/packages/xdmf3/package.py index 8a84aa27f10238..ba54eed8413081 100644 --- a/var/spack/repos/builtin/packages/xdmf3/package.py +++ b/var/spack/repos/builtin/packages/xdmf3/package.py @@ -30,8 +30,10 @@ class Xdmf3(CMakePackage): # See https://github.com/spack/spack/pull/22303 for reference depends_on(Boost.with_default_variants) depends_on("mpi", when="+mpi") - depends_on("hdf5+mpi", when="+mpi") - depends_on("hdf5~mpi", when="~mpi") + depends_on("hdf5@1.10:+mpi", when="+mpi") + depends_on("hdf5@1.10:~mpi", when="~mpi") + # motivated by discussion in https://gitlab.kitware.com/xdmf/xdmf/-/issues/28 + patch("fix_hdf5_hid_t.diff") def cmake_args(self): """Populate cmake arguments for XDMF.""" @@ -42,7 +44,7 @@ def cmake_args(self): "-DXDMF_BUILD_UTILS=ON", "-DXDMF_WRAP_JAVA=OFF", "-DXDMF_WRAP_PYTHON=OFF", - "-DXDMF_BUILD_TESTING=ON", + "-DXDMF_BUILD_TESTING=OFF", ] return cmake_args From 70171d6caf68e99430eecf49950bb8498d05d1f6 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Fri, 3 Nov 2023 10:34:25 -0400 Subject: [PATCH 488/806] squashfuse: remove url_for_version (#40862) 0.5.0 tarball now has the 'v' removed from the name --- var/spack/repos/builtin/packages/squashfuse/package.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/squashfuse/package.py b/var/spack/repos/builtin/packages/squashfuse/package.py index 40aec33134b405..85b7c03c8a8a42 100644 --- a/var/spack/repos/builtin/packages/squashfuse/package.py +++ b/var/spack/repos/builtin/packages/squashfuse/package.py @@ -10,6 +10,7 @@ class Squashfuse(AutotoolsPackage): """squashfuse - Mount SquashFS archives using FUSE""" homepage = "https://github.com/vasi/squashfuse" + url = "https://github.com/vasi/squashfuse/releases/download/0.1.104/squashfuse-0.1.104.tar.gz" git = "https://github.com/vasi/squashfuse.git" maintainers("haampie") @@ -51,14 +52,6 @@ class Squashfuse(AutotoolsPackage): depends_on("automake", type="build", when="@master") depends_on("libtool", type="build", when="@master") - def url_for_version(self, version): - url = "https://github.com/vasi/squashfuse/releases/download/" - if version == Version("0.5.0"): - url += "v{}/squashfuse-{}.tar.gz" - else: - url += "{}/squashfuse-{}.tar.gz" - return url.format(version, version) - def flag_handler(self, name, flags): if name == "cflags" and "+min_size" in self.spec: if "-Os" in self.compiler.opt_flags: From 668a5b45e5ca5b5c16ea042d0121c5a958564089 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 3 Nov 2023 16:53:45 +0100 Subject: [PATCH 489/806] clingo-bootstrap: force setuptools through variant (#40866) --- .github/workflows/bootstrap.yml | 3 +++ lib/spack/spack/bootstrap/core.py | 4 ++++ .../repos/builtin/packages/clingo-bootstrap/package.py | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index db64ca94d5e6a0..fd863b6abb8726 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -159,6 +159,9 @@ jobs: brew install cmake bison@2.7 tree - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # @v2 + with: + python-version: "3.12" - name: Bootstrap clingo run: | source share/spack/setup-env.sh diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py index 9fb04453c42590..5f73c7bfaf49c8 100644 --- a/lib/spack/spack/bootstrap/core.py +++ b/lib/spack/spack/bootstrap/core.py @@ -291,6 +291,10 @@ def try_import(self, module: str, abstract_spec_str: str) -> bool: with spack_python_interpreter(): # Add hint to use frontend operating system on Cray concrete_spec = spack.spec.Spec(abstract_spec_str + " ^" + spec_for_current_python()) + # This is needed to help the old concretizer taking the `setuptools` dependency + # only when bootstrapping from sources on Python 3.12 + if spec_for_current_python() == "python@3.12": + concrete_spec.constrain("+force_setuptools") if module == "clingo": # TODO: remove when the old concretizer is deprecated # pylint: disable=fixme diff --git a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py index 7fb34446a11ada..65535f330abfc2 100644 --- a/var/spack/repos/builtin/packages/clingo-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/clingo-bootstrap/package.py @@ -32,6 +32,13 @@ class ClingoBootstrap(Clingo): description="Enable a series of Spack-specific optimizations (PGO, LTO, mimalloc)", ) + variant( + "force_setuptools", + default=False, + description="Force a dependency on setuptools to help the old concretizer", + ) + depends_on("py-setuptools", type="build", when="+force_setuptools") + # Enable LTO conflicts("~ipo", when="+optimized") From 8fc1ba2d7a27109a8f5a4836c23c2dacd3d2dd10 Mon Sep 17 00:00:00 2001 From: Richarda Butler <39577672+RikkiButler20@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:09:39 -0700 Subject: [PATCH 490/806] Bugfix: propagation of multivalued variants (#39833) Don't encourage use of default value if propagating a multivalued variant. --- lib/spack/spack/solver/concretize.lp | 1 + lib/spack/spack/test/concretize.py | 12 ++++++++++++ var/spack/repos/builtin.mock/packages/b/package.py | 4 ++++ .../packages/multivalue-variant/package.py | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 2207fa9f9a6d73..340e1b04ee29c5 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -881,6 +881,7 @@ variant_default_not_used(node(ID, Package), Variant, Value) :- variant_default_value(Package, Variant, Value), node_has_variant(node(ID, Package), Variant), not attr("variant_value", node(ID, Package), Variant, Value), + not attr("variant_propagate", node(ID, Package), Variant, _, _), attr("node", node(ID, Package)). % The variant is set in an external spec diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 915f6ca39be761..0af689ddd5f0eb 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -472,6 +472,18 @@ def test_concretize_propagated_variant_is_not_passed_to_dependent(self): assert spec.satisfies("^openblas+shared") + @pytest.mark.only_clingo("Original concretizer is allowed to forego variant propagation") + def test_concretize_propagate_multivalue_variant(self): + """Test that multivalue variants are propagating the specified value(s) + to their dependecies. The dependencies should not have the default value""" + spec = Spec("multivalue-variant foo==baz,fee") + spec.concretize() + + assert spec.satisfies("^a foo=baz,fee") + assert spec.satisfies("^b foo=baz,fee") + assert not spec.satisfies("^a foo=bar") + assert not spec.satisfies("^b foo=bar") + def test_no_matching_compiler_specs(self, mock_low_high_config): # only relevant when not building compilers as needed with spack.concretize.enable_compiler_existence_check(): diff --git a/var/spack/repos/builtin.mock/packages/b/package.py b/var/spack/repos/builtin.mock/packages/b/package.py index 06d82860850808..1685711825f9ea 100644 --- a/var/spack/repos/builtin.mock/packages/b/package.py +++ b/var/spack/repos/builtin.mock/packages/b/package.py @@ -15,4 +15,8 @@ class B(Package): version("1.0", md5="0123456789abcdef0123456789abcdef") version("0.9", md5="abcd456789abcdef0123456789abcdef") + variant( + "foo", description="", values=any_combination_of("bar", "baz", "fee").with_default("bar") + ) + depends_on("test-dependency", type="test") diff --git a/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py b/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py index 136646324191dd..b0f7ac9501cd18 100644 --- a/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py +++ b/var/spack/repos/builtin.mock/packages/multivalue-variant/package.py @@ -19,7 +19,7 @@ class MultivalueVariant(Package): variant( "foo", description="Multi-valued variant", - values=any_combination_of("bar", "baz", "barbaz"), + values=any_combination_of("bar", "baz", "barbaz", "fee"), ) variant( From 8e96d3a051dc03864362ef2af523e86705444cae Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 3 Nov 2023 16:59:52 -0500 Subject: [PATCH 491/806] GDAL: add v3.7.3 (#40865) --- var/spack/repos/builtin/packages/gdal/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 0130b6662a0939..6528d366d747cc 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -30,6 +30,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): maintainers("adamjstewart") + version("3.7.3", sha256="e0a6f0c453ea7eb7c09967f50ac49426808fcd8f259dbc9888140eb69d7ffee6") version("3.7.2", sha256="40c0068591d2c711c699bbb734319398485ab169116ac28005d8302f80b923ad") version("3.7.1", sha256="9297948f0a8ba9e6369cd50e87c7e2442eda95336b94d2b92ef1829d260b9a06") version("3.7.0", sha256="af4b26a6b6b3509ae9ccf1fcc5104f7fe015ef2110f5ba13220816398365adce") From f50377de7f087868dd481b4129694b85e3594ba6 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 4 Nov 2023 00:10:42 +0100 Subject: [PATCH 492/806] environment: solve one spec per child process (#40876) Looking at the memory profiles of concurrent solves for environment with unify:false, it seems memory is only ramping up. This exchange in the potassco mailing list: https://sourceforge.net/p/potassco/mailman/potassco-users/thread/b55b5b8c2e8945409abb3fa3c935c27e%40lohn.at/#msg36517698 Seems to suggest that clingo doesn't release memory until end of the application. Since when unify:false we distribute work to processes, here we give a maxtaskperchild=1, so we clean memory after each solve. --- lib/spack/spack/environment/environment.py | 6 +++++- lib/spack/spack/util/parallel.py | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 3fd75f3d70ffc2..85c10e366b4f1f 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1525,7 +1525,11 @@ def _concretize_separately(self, tests=False): batch = [] for j, (i, concrete, duration) in enumerate( spack.util.parallel.imap_unordered( - _concretize_task, args, processes=num_procs, debug=tty.is_debug() + _concretize_task, + args, + processes=num_procs, + debug=tty.is_debug(), + maxtaskperchild=1, ) ): batch.append((i, concrete)) diff --git a/lib/spack/spack/util/parallel.py b/lib/spack/spack/util/parallel.py index 683835641ae17e..c8e6ef7907f584 100644 --- a/lib/spack/spack/util/parallel.py +++ b/lib/spack/spack/util/parallel.py @@ -6,6 +6,7 @@ import os import sys import traceback +from typing import Optional class ErrorFromWorker: @@ -53,7 +54,9 @@ def __call__(self, *args, **kwargs): return value -def imap_unordered(f, list_of_args, *, processes: int, debug=False): +def imap_unordered( + f, list_of_args, *, processes: int, maxtaskperchild: Optional[int] = None, debug=False +): """Wrapper around multiprocessing.Pool.imap_unordered. Args: @@ -62,6 +65,8 @@ def imap_unordered(f, list_of_args, *, processes: int, debug=False): processes: maximum number of processes allowed debug: if False, raise an exception containing just the error messages from workers, if True an exception with complete stacktraces + maxtaskperchild: number of tasks to be executed by a child before being + killed and substituted Raises: RuntimeError: if any error occurred in the worker processes @@ -70,7 +75,7 @@ def imap_unordered(f, list_of_args, *, processes: int, debug=False): yield from map(f, list_of_args) return - with multiprocessing.Pool(processes) as p: + with multiprocessing.Pool(processes, maxtasksperchild=maxtaskperchild) as p: for result in p.imap_unordered(Task(f), list_of_args): if isinstance(result, ErrorFromWorker): raise RuntimeError(result.stacktrace if debug else str(result)) From 88ee3a0fba3cc806d2cddbad9740dd2c67ac8a4e Mon Sep 17 00:00:00 2001 From: zv-io <30916613+zv-io@users.noreply.github.com> Date: Sat, 4 Nov 2023 06:21:12 -0500 Subject: [PATCH 493/806] linux-headers: support multiple versions (#40877) The download URL for linux-headers was hardcoded to 4.x; we need to derive the correct URL from the version number. --- var/spack/repos/builtin/packages/linux-headers/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/linux-headers/package.py b/var/spack/repos/builtin/packages/linux-headers/package.py index 1236a25ce691ee..8e1d995695b069 100644 --- a/var/spack/repos/builtin/packages/linux-headers/package.py +++ b/var/spack/repos/builtin/packages/linux-headers/package.py @@ -20,6 +20,10 @@ class LinuxHeaders(Package): version("6.2.8", sha256="fed0ad87d42f83a70ce019ff2800bc30a855e672e72bf6d54a014d98d344f665") version("4.9.10", sha256="bd6e05476fd8d9ea4945e11598d87bc97806bbc8d03556abbaaf809707661525") + def url_for_version(self, version): + url = "https://www.kernel.org/pub/linux/kernel/v{0}.x/linux-{1}.tar.xz" + return url.format(version.up_to(1), version) + def setup_build_environment(self, env): # This variable is used in the Makefile. If it is defined on the # system, it can break the build if there is no build recipe for From fd22d109a675aa7095b05500f2add2378cda5913 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Sat, 4 Nov 2023 06:55:19 -0700 Subject: [PATCH 494/806] sundials +sycl: add cxxflags=-fsycl via flag_handler (#40845) --- .../gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 2 +- var/spack/repos/builtin/packages/sundials/package.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index efbf0e2e9ce5f8..8c872240f9e608 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -200,11 +200,11 @@ spack: - kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples - slate +sycl + - sundials +sycl cxxstd=17 +examples-install - tau +mpi +opencl +level_zero ~pdt +syscall # tau: requires libdrm.so to be installed # -- # - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler. # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc - # - sundials +sycl cxxstd=17 # sundials: include/sunmemory/sunmemory_sycl.h:20:10: fatal error: 'CL/sycl.hpp' file not found - py-scipy diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index f424a523f115ab..71ae9186a00578 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -292,6 +292,12 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage): # fix issues with exported PETSc target(s) in SUNDIALSConfig.cmake patch("sundials-v5.8.0.patch", when="@5.8.0") + def flag_handler(self, name, flags): + if name == "cxxflags": + if self.spec.satisfies("+sycl"): + flags.append("-fsycl") + return (flags, None, None) + # ========================================================================== # SUNDIALS Settings # ========================================================================== From ff8cd597e0fa65cdcadefd53e8ba98cdec450a8e Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Sat, 4 Nov 2023 14:09:59 -0400 Subject: [PATCH 495/806] hiop: fix cuda constraints (#40875) --- var/spack/repos/builtin/packages/hiop/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hiop/package.py b/var/spack/repos/builtin/packages/hiop/package.py index a2f3244e267c04..4f68978ab640fa 100644 --- a/var/spack/repos/builtin/packages/hiop/package.py +++ b/var/spack/repos/builtin/packages/hiop/package.py @@ -115,7 +115,7 @@ class Hiop(CMakePackage, CudaPackage, ROCmPackage): # 1.0.2 fixes bug with cuda 12 compatibility # hiop@0.6.0 requires cusolver API in cuda@11 - depends_on("cuda@11:11.9", when="@0.6.0:1.0.1") + depends_on("cuda@11:11.9", when="@0.6.0:1.0.1+cuda") depends_on("cuda@11:", when="@develop:+cuda") # Before hiop@0.6.0 only cuda requirement was magma depends_on("cuda", when="@:0.5.4+cuda") From f51dad976e0108192904174dd656be6cadca8572 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 4 Nov 2023 20:31:52 +0100 Subject: [PATCH 496/806] hdf5-vol-async: better specify dependency condition (#40882) --- share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 2 ++ var/spack/repos/builtin/packages/hdf5-vol-async/package.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 1fa5b41c265529..11396a768f7cb1 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -51,6 +51,8 @@ spack: require: "@3.4.4" vtk-m: require: "+examples" + visit: + require: "~gui" cuda: version: [11.8.0] paraview: diff --git a/var/spack/repos/builtin/packages/hdf5-vol-async/package.py b/var/spack/repos/builtin/packages/hdf5-vol-async/package.py index 017093911bc8d4..ab34a7f0b1a148 100644 --- a/var/spack/repos/builtin/packages/hdf5-vol-async/package.py +++ b/var/spack/repos/builtin/packages/hdf5-vol-async/package.py @@ -35,9 +35,8 @@ class Hdf5VolAsync(CMakePackage): depends_on("hdf5@1.14.0: +mpi +threadsafe") # Require MPI_THREAD_MULTIPLE. - depends_on("openmpi +thread_multiple", when="^openmpi@:2") - depends_on("openmpi", when="^openmpi@3:") - depends_on("mvapich2 threads=multiple", when="^mvapich2") + depends_on("openmpi +thread_multiple", when="^[virtuals=mpi] openmpi@:2") + depends_on("mvapich2 threads=multiple", when="^[virtuals=mpi] mvapich2") def setup_run_environment(self, env): env.prepend_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) From 6593d22c4e399547ac3de0b2738628ccd15c8c64 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 4 Nov 2023 21:42:47 +0100 Subject: [PATCH 497/806] spack.modules.commmon: pass spec to SetupContext (#40886) Currently module globals aren't set before running `setup_[dependent_]run_environment` to compute environment modifications for module files. This commit fixes that. --- lib/spack/spack/modules/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 98dcdb4fb1e3e5..49040e5ba309a6 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -731,7 +731,9 @@ def environment_modifications(self): # for that to work, globals have to be set on the package modules, and the # whole chain of setup_dependent_package has to be followed from leaf to spec. # So: just run it here, but don't collect env mods. - spack.build_environment.SetupContext(context=Context.RUN).set_all_package_py_globals() + spack.build_environment.SetupContext( + spec, context=Context.RUN + ).set_all_package_py_globals() # Then run setup_dependent_run_environment before setup_run_environment. for dep in spec.dependencies(deptype=("link", "run")): From e47be18acba0cf5ddbbea0e1d73caa854b077bb8 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sun, 5 Nov 2023 00:51:37 +0100 Subject: [PATCH 498/806] c-blosc: add v1.21.5 (#40888) --- var/spack/repos/builtin/packages/c-blosc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py index e578004f24a10f..31de7ef7ae35b1 100644 --- a/var/spack/repos/builtin/packages/c-blosc/package.py +++ b/var/spack/repos/builtin/packages/c-blosc/package.py @@ -15,6 +15,7 @@ class CBlosc(CMakePackage): homepage = "https://www.blosc.org" url = "https://github.com/Blosc/c-blosc/archive/v1.11.1.tar.gz" + version("1.21.5", sha256="32e61961bbf81ffea6ff30e9d70fca36c86178afd3e3cfa13376adec8c687509") version("1.21.4", sha256="e72bd03827b8564bbb3dc3ea0d0e689b4863871ce3861d946f2efd7a186ecf3e") version("1.21.2", sha256="e5b4ddb4403cbbad7aab6e9ff55762ef298729c8a793c6147160c771959ea2aa") version("1.21.1", sha256="f387149eab24efa01c308e4cba0f59f64ccae57292ec9c794002232f7903b55b") From 5a67c578b716d6b5e3e7615bdeb0ae45d2bc28dd Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Sat, 4 Nov 2023 18:15:56 -0700 Subject: [PATCH 499/806] mfem: allow cuda/rocm builds with superlu-dist built without cuda/rocm (#40847) --- var/spack/repos/builtin/packages/mfem/package.py | 8 ++++++-- .../repos/builtin/packages/mfem/test_builds.sh | 15 +++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 4744e8bceb9a6a..f4821e63c2ba0f 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -309,15 +309,19 @@ class Mfem(Package, CudaPackage, ROCmPackage): depends_on("gslib@1.0.7:", when="@4.3.0:+gslib") depends_on("suite-sparse", when="+suite-sparse") depends_on("superlu-dist", when="+superlu-dist") + # Propagate 'cuda_arch' to 'superlu-dist' without propagating the '+cuda' + # variant so we can build 'mfem+cuda+superlu-dist ^superlu-dist~cuda': for sm_ in CudaPackage.cuda_arch_values: depends_on( "superlu-dist+cuda cuda_arch={0}".format(sm_), - when="+superlu-dist+cuda cuda_arch={0}".format(sm_), + when="+superlu-dist+cuda cuda_arch={0} ^superlu-dist+cuda".format(sm_), ) + # Propagate 'amdgpu_target' to 'superlu-dist' without propagating the '+rocm' + # variant so we can build 'mfem+rocm+superlu-dist ^superlu-dist~rocm': for gfx in ROCmPackage.amdgpu_targets: depends_on( "superlu-dist+rocm amdgpu_target={0}".format(gfx), - when="+superlu-dist+rocm amdgpu_target={0}".format(gfx), + when="+superlu-dist+rocm amdgpu_target={0} ^superlu-dist+rocm".format(gfx), ) depends_on("strumpack@3.0.0:", when="+strumpack~shared") depends_on("strumpack@3.0.0:+shared", when="+strumpack+shared") diff --git a/var/spack/repos/builtin/packages/mfem/test_builds.sh b/var/spack/repos/builtin/packages/mfem/test_builds.sh index 787f936be132d2..cb658dd59cc468 100755 --- a/var/spack/repos/builtin/packages/mfem/test_builds.sh +++ b/var/spack/repos/builtin/packages/mfem/test_builds.sh @@ -31,6 +31,9 @@ petsc_spec_rocm='^petsc+rocm+mumps' strumpack_spec='^strumpack~slate~openmp~cuda' strumpack_cuda_spec='^strumpack+cuda~slate~openmp' strumpack_rocm_spec='^strumpack+rocm~slate~openmp~cuda' +# superlu specs with cuda and rocm +superlu_cuda_spec='^superlu-dist+cuda' +superlu_rocm_spec='^superlu-dist+rocm' builds=( # preferred version: @@ -136,7 +139,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared'" $strumpack_cuda_spec"' \ - '"$petsc_spec_cuda $conduit_spec" + '"$superlu_cuda_spec $petsc_spec_cuda $conduit_spec" # hypre with cuda: # TODO: restore '+libceed' when the libCEED CUDA unit tests take less time. @@ -148,7 +151,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib \ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared ^hypre+cuda \ - '" $strumpack_cuda_spec $conduit_spec" + '" $strumpack_cuda_spec $superlu_cuda_spec $conduit_spec" # # same builds as above with ${mfem_dev} @@ -173,7 +176,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared'" $strumpack_cuda_spec"' \ - '"$petsc_spec_cuda $conduit_spec" + '"$superlu_cuda_spec $petsc_spec_cuda $conduit_spec" # hypre with cuda: # TODO: restore '+libceed' when the libCEED CUDA unit tests take less time. @@ -185,7 +188,7 @@ builds_cuda=( +superlu-dist+strumpack+suite-sparse+gslib \ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit+ginkgo+hiop \ ^raja+cuda+openmp ^hiop+shared ^hypre+cuda \ - '"$strumpack_cuda_spec $conduit_spec" + '"$strumpack_cuda_spec $superlu_cuda_spec $conduit_spec" ) @@ -208,7 +211,7 @@ builds_rocm=( +superlu-dist+strumpack+suite-sparse+gslib+petsc+slepc \ +sundials+pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit \ ^raja+rocm~openmp ^occa~cuda'" $strumpack_rocm_spec"' \ - '"$petsc_spec_rocm $conduit_spec" + '"$superlu_rocm_spec $petsc_spec_rocm $conduit_spec" # hypre with rocm: # TODO: add back "+petsc+slepc $petsc_spec_rocm" when it works. @@ -220,7 +223,7 @@ builds_rocm=( +superlu-dist+strumpack+suite-sparse+gslib \ +pumi+mpfr+netcdf+zlib+gnutls+libunwind+conduit \ ^raja+rocm~openmp ^occa~cuda ^hypre+rocm \ - '"$strumpack_rocm_spec $conduit_spec" + '"$strumpack_rocm_spec $superlu_rocm_spec $conduit_spec" # # same builds as above with ${mfem_dev} From c9dfb9b0fd68869f86cab7ce714035ed499f95dd Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Sun, 5 Nov 2023 00:47:06 -0700 Subject: [PATCH 500/806] Environments: Add support for including definitions files (#33960) This PR adds support for including separate definitions from `spack.yaml`. Supporting the inclusion of files with definitions enables user to make curated/standardized collections of packages that can re-used by others. --- lib/spack/spack/config.py | 2 + lib/spack/spack/environment/environment.py | 69 ++++--- lib/spack/spack/schema/__init__.py | 22 +++ lib/spack/spack/schema/definitions.py | 34 ++++ lib/spack/spack/schema/env.py | 34 +--- lib/spack/spack/schema/merged.py | 2 + lib/spack/spack/spec_list.py | 9 +- lib/spack/spack/test/cmd/env.py | 199 ++++++++++++--------- lib/spack/spack/test/env.py | 62 +++++++ lib/spack/spack/test/schema.py | 12 +- share/spack/spack-completion.fish | 6 +- 11 files changed, 299 insertions(+), 152 deletions(-) create mode 100644 lib/spack/spack/schema/definitions.py diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 86e8981a18f90f..cd1be71c9d0a33 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -69,6 +69,7 @@ SECTION_SCHEMAS = { "compilers": spack.schema.compilers.schema, "concretizer": spack.schema.concretizer.schema, + "definitions": spack.schema.definitions.schema, "mirrors": spack.schema.mirrors.schema, "repos": spack.schema.repos.schema, "packages": spack.schema.packages.schema, @@ -994,6 +995,7 @@ def read_config_file(filename, schema=None): key = next(iter(data)) schema = _ALL_SCHEMAS[key] validate(data, schema) + return data except StopIteration: diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 85c10e366b4f1f..ab6fef6fc016d2 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -781,10 +781,18 @@ def _re_read(self): """Reinitialize the environment object.""" self.clear(re_read=True) self.manifest = EnvironmentManifestFile(self.path) - self._read() + self._read(re_read=True) - def _read(self): - self._construct_state_from_manifest() + def _read(self, re_read=False): + # If the manifest has included files, then some of the information + # (e.g., definitions) MAY be in those files. So we need to ensure + # the config is populated with any associated spec lists in order + # to fully construct the manifest state. + includes = self.manifest[TOP_LEVEL_KEY].get("include", []) + if includes and not re_read: + prepare_config_scope(self) + + self._construct_state_from_manifest(re_read) if os.path.exists(self.lock_path): with open(self.lock_path) as f: @@ -798,21 +806,30 @@ def write_transaction(self): """Get a write lock context manager for use in a `with` block.""" return lk.WriteTransaction(self.txlock, acquire=self._re_read) - def _construct_state_from_manifest(self): + def _process_definition(self, item): + """Process a single spec definition item.""" + entry = copy.deepcopy(item) + when = _eval_conditional(entry.pop("when", "True")) + assert len(entry) == 1 + if when: + name, spec_list = next(iter(entry.items())) + user_specs = SpecList(name, spec_list, self.spec_lists.copy()) + if name in self.spec_lists: + self.spec_lists[name].extend(user_specs) + else: + self.spec_lists[name] = user_specs + + def _construct_state_from_manifest(self, re_read=False): """Read manifest file and set up user specs.""" self.spec_lists = collections.OrderedDict() + + if not re_read: + for item in spack.config.get("definitions", []): + self._process_definition(item) + env_configuration = self.manifest[TOP_LEVEL_KEY] for item in env_configuration.get("definitions", []): - entry = copy.deepcopy(item) - when = _eval_conditional(entry.pop("when", "True")) - assert len(entry) == 1 - if when: - name, spec_list = next(iter(entry.items())) - user_specs = SpecList(name, spec_list, self.spec_lists.copy()) - if name in self.spec_lists: - self.spec_lists[name].extend(user_specs) - else: - self.spec_lists[name] = user_specs + self._process_definition(item) spec_list = env_configuration.get(user_speclist_name, []) user_specs = SpecList( @@ -857,7 +874,9 @@ def clear(self, re_read=False): yaml, and need to be maintained when re-reading an existing environment. """ - self.spec_lists = {user_speclist_name: SpecList()} # specs from yaml + self.spec_lists = collections.OrderedDict() + self.spec_lists[user_speclist_name] = SpecList() + self.dev_specs = {} # dev-build specs from yaml self.concretized_user_specs = [] # user specs from last concretize self.concretized_order = [] # roots of last concretize, in order @@ -1006,7 +1025,8 @@ def included_config_scopes(self): elif include_url.scheme: raise ValueError( - "Unsupported URL scheme for environment include: {}".format(config_path) + f"Unsupported URL scheme ({include_url.scheme}) for " + f"environment include: {config_path}" ) # treat relative paths as relative to the environment @@ -1068,8 +1088,10 @@ def update_stale_references(self, from_list=None): from_list = next(iter(self.spec_lists.keys())) index = list(self.spec_lists.keys()).index(from_list) - # spec_lists is an OrderedDict, all list entries after the modified - # list may refer to the modified list. Update stale references + # spec_lists is an OrderedDict to ensure lists read from the manifest + # are maintainted in order, hence, all list entries after the modified + # list may refer to the modified list requiring stale references to be + # updated. for i, (name, speclist) in enumerate( list(self.spec_lists.items())[index + 1 :], index + 1 ): @@ -1167,7 +1189,7 @@ def change_existing_spec( def remove(self, query_spec, list_name=user_speclist_name, force=False): """Remove specs from an environment that match a query_spec""" err_msg_header = ( - f"cannot remove {query_spec} from '{list_name}' definition " + f"Cannot remove '{query_spec}' from '{list_name}' definition " f"in {self.manifest.manifest_file}" ) query_spec = Spec(query_spec) @@ -1198,11 +1220,10 @@ def remove(self, query_spec, list_name=user_speclist_name, force=False): list_to_change.remove(spec) self.update_stale_references(list_name) new_specs = set(self.user_specs) - except spack.spec_list.SpecListError: + except spack.spec_list.SpecListError as e: # define new specs list new_specs = set(self.user_specs) - msg = f"Spec '{spec}' is part of a spec matrix and " - msg += f"cannot be removed from list '{list_to_change}'." + msg = str(e) if force: msg += " It will be removed from the concrete specs." # Mock new specs, so we can remove this spec from concrete spec lists @@ -2067,7 +2088,7 @@ def matching_spec(self, spec): def removed_specs(self): """Tuples of (user spec, concrete spec) for all specs that will be - removed on nexg concretize.""" + removed on next concretize.""" needed = set() for s, c in self.concretized_specs(): if s in self.user_specs: @@ -2726,7 +2747,7 @@ def override_user_spec(self, user_spec: str, idx: int) -> None: self.changed = True def add_definition(self, user_spec: str, list_name: str) -> None: - """Appends a user spec to the first active definition mathing the name passed as argument. + """Appends a user spec to the first active definition matching the name passed as argument. Args: user_spec: user spec to be appended diff --git a/lib/spack/spack/schema/__init__.py b/lib/spack/spack/schema/__init__.py index f99f47a455e42c..bdb1a272d03754 100644 --- a/lib/spack/spack/schema/__init__.py +++ b/lib/spack/spack/schema/__init__.py @@ -62,3 +62,25 @@ def _deprecated_properties(validator, deprecated, instance, schema): Validator = llnl.util.lang.Singleton(_make_validator) + +spec_list_schema = { + "type": "array", + "default": [], + "items": { + "anyOf": [ + { + "type": "object", + "additionalProperties": False, + "properties": { + "matrix": { + "type": "array", + "items": {"type": "array", "items": {"type": "string"}}, + }, + "exclude": {"type": "array", "items": {"type": "string"}}, + }, + }, + {"type": "string"}, + {"type": "null"}, + ] + }, +} diff --git a/lib/spack/spack/schema/definitions.py b/lib/spack/spack/schema/definitions.py new file mode 100644 index 00000000000000..470eb7e8989ce4 --- /dev/null +++ b/lib/spack/spack/schema/definitions.py @@ -0,0 +1,34 @@ +# Copyright 2013-2023 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) + +"""Schema for definitions + +.. literalinclude:: _spack_root/lib/spack/spack/schema/definitions.py + :lines: 13- +""" + +import spack.schema + +#: Properties for inclusion in other schemas +properties = { + "definitions": { + "type": "array", + "default": [], + "items": { + "type": "object", + "properties": {"when": {"type": "string"}}, + "patternProperties": {r"^(?!when$)\w*": spack.schema.spec_list_schema}, + }, + } +} + +#: Full schema with metadata +schema = { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Spack definitions configuration file schema", + "type": "object", + "additionalProperties": False, + "properties": properties, +} diff --git a/lib/spack/spack/schema/env.py b/lib/spack/spack/schema/env.py index 6548ca4b2b400d..463c6680f0d47e 100644 --- a/lib/spack/spack/schema/env.py +++ b/lib/spack/spack/schema/env.py @@ -12,34 +12,11 @@ import spack.schema.gitlab_ci # DEPRECATED import spack.schema.merged -import spack.schema.packages import spack.schema.projections #: Top level key in a manifest file TOP_LEVEL_KEY = "spack" -spec_list_schema = { - "type": "array", - "default": [], - "items": { - "anyOf": [ - { - "type": "object", - "additionalProperties": False, - "properties": { - "matrix": { - "type": "array", - "items": {"type": "array", "items": {"type": "string"}}, - }, - "exclude": {"type": "array", "items": {"type": "string"}}, - }, - }, - {"type": "string"}, - {"type": "null"}, - ] - }, -} - projections_scheme = spack.schema.projections.properties["projections"] schema = { @@ -75,16 +52,7 @@ } }, }, - "definitions": { - "type": "array", - "default": [], - "items": { - "type": "object", - "properties": {"when": {"type": "string"}}, - "patternProperties": {r"^(?!when$)\w*": spec_list_schema}, - }, - }, - "specs": spec_list_schema, + "specs": spack.schema.spec_list_schema, "view": { "anyOf": [ {"type": "boolean"}, diff --git a/lib/spack/spack/schema/merged.py b/lib/spack/spack/schema/merged.py index b20700a03cebfb..7ceb6494108d0e 100644 --- a/lib/spack/spack/schema/merged.py +++ b/lib/spack/spack/schema/merged.py @@ -17,6 +17,7 @@ import spack.schema.concretizer import spack.schema.config import spack.schema.container +import spack.schema.definitions import spack.schema.mirrors import spack.schema.modules import spack.schema.packages @@ -32,6 +33,7 @@ spack.schema.config.properties, spack.schema.container.properties, spack.schema.ci.properties, + spack.schema.definitions.properties, spack.schema.mirrors.properties, spack.schema.modules.properties, spack.schema.packages.properties, diff --git a/lib/spack/spack/spec_list.py b/lib/spack/spack/spec_list.py index 3f60d5724922c2..6bb1ba8d047e9a 100644 --- a/lib/spack/spack/spec_list.py +++ b/lib/spack/spack/spec_list.py @@ -93,8 +93,8 @@ def remove(self, spec): if (isinstance(s, str) and not s.startswith("$")) and Spec(s) == Spec(spec) ] if not remove: - msg = "Cannot remove %s from SpecList %s\n" % (spec, self.name) - msg += "Either %s is not in %s or %s is " % (spec, self.name, spec) + msg = f"Cannot remove {spec} from SpecList {self.name}.\n" + msg += f"Either {spec} is not in {self.name} or {spec} is " msg += "expanded from a matrix and cannot be removed directly." raise SpecListError(msg) @@ -133,9 +133,8 @@ def _parse_reference(self, name): # Make sure the reference is valid if name not in self._reference: - msg = "SpecList %s refers to " % self.name - msg += "named list %s " % name - msg += "which does not appear in its reference dict" + msg = f"SpecList '{self.name}' refers to named list '{name}'" + msg += " which does not appear in its reference dict." raise UndefinedReferenceError(msg) return (name, sigil) diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 3b843be72aca8a..308e0b0e90cd1f 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -632,7 +632,7 @@ def test_env_view_external_prefix(tmp_path, mutable_database, mock_packages): manifest_dir.mkdir(parents=True, exist_ok=False) manifest_file = manifest_dir / ev.manifest_name manifest_file.write_text( - """ + """\ spack: specs: - a @@ -720,38 +720,25 @@ def test_env_with_config(environment_from_manifest): def test_with_config_bad_include(environment_from_manifest): """Confirm missing include paths raise expected exception and error.""" - e = environment_from_manifest( - """ + with pytest.raises(spack.config.ConfigFileError, match="2 missing include path"): + e = environment_from_manifest( + """ spack: include: - /no/such/directory - no/such/file.yaml """ - ) - with pytest.raises(spack.config.ConfigFileError, match="2 missing include path"): + ) with e: e.concretize() assert ev.active_environment() is None -def test_env_with_include_config_files_same_basename(environment_from_manifest): - e = environment_from_manifest( - """ -spack: - include: - - ./path/to/included-config.yaml - - ./second/path/to/include-config.yaml - specs: - - libelf - - mpileaks -""" - ) - - e = ev.read("test") - - fs.mkdirp(os.path.join(e.path, "path", "to")) - with open(os.path.join(e.path, "./path/to/included-config.yaml"), "w") as f: +def test_env_with_include_config_files_same_basename(tmp_path, environment_from_manifest): + file1 = fs.join_path(tmp_path, "path", "to", "included-config.yaml") + fs.mkdirp(os.path.dirname(file1)) + with open(file1, "w") as f: f.write( """\ packages: @@ -760,8 +747,9 @@ def test_env_with_include_config_files_same_basename(environment_from_manifest): """ ) - fs.mkdirp(os.path.join(e.path, "second", "path", "to")) - with open(os.path.join(e.path, "./second/path/to/include-config.yaml"), "w") as f: + file2 = fs.join_path(tmp_path, "second", "path", "included-config.yaml") + fs.mkdirp(os.path.dirname(file2)) + with open(file2, "w") as f: f.write( """\ packages: @@ -770,6 +758,18 @@ def test_env_with_include_config_files_same_basename(environment_from_manifest): """ ) + e = environment_from_manifest( + f""" +spack: + include: + - {file1} + - {file2} + specs: + - libelf + - mpileaks +""" + ) + with e: e.concretize() @@ -806,12 +806,18 @@ def mpileaks_env_config(include_path): ) -def test_env_with_included_config_file(environment_from_manifest, packages_file): +def test_env_with_included_config_file(mutable_mock_env_path, packages_file): """Test inclusion of a relative packages configuration file added to an existing environment. """ + env_root = mutable_mock_env_path + fs.mkdirp(env_root) include_filename = "included-config.yaml" - e = environment_from_manifest( + included_path = env_root / include_filename + shutil.move(packages_file.strpath, included_path) + + spack_yaml = env_root / ev.manifest_name + spack_yaml.write_text( f"""\ spack: include: @@ -821,9 +827,7 @@ def test_env_with_included_config_file(environment_from_manifest, packages_file) """ ) - included_path = os.path.join(e.path, include_filename) - shutil.move(packages_file.strpath, included_path) - + e = ev.Environment(env_root) with e: e.concretize() @@ -856,68 +860,67 @@ def test_env_with_included_config_missing_file(tmpdir, mutable_empty_config): with spack_yaml.open("w") as f: f.write("spack:\n include:\n - {0}\n".format(missing_file.strpath)) - env = ev.Environment(tmpdir.strpath) with pytest.raises(spack.config.ConfigError, match="missing include path"): - ev.activate(env) + ev.Environment(tmpdir.strpath) -def test_env_with_included_config_scope(environment_from_manifest, packages_file): +def test_env_with_included_config_scope(mutable_mock_env_path, packages_file): """Test inclusion of a package file from the environment's configuration stage directory. This test is intended to represent a case where a remote file has already been staged.""" - config_scope_path = os.path.join(ev.root("test"), "config") - - # Configure the environment to include file(s) from the environment's - # remote configuration stage directory. - e = environment_from_manifest(mpileaks_env_config(config_scope_path)) + env_root = mutable_mock_env_path + config_scope_path = env_root / "config" # Copy the packages.yaml file to the environment configuration # directory, so it is picked up during concretization. (Using # copy instead of rename in case the fixture scope changes.) fs.mkdirp(config_scope_path) include_filename = os.path.basename(packages_file.strpath) - included_path = os.path.join(config_scope_path, include_filename) + included_path = config_scope_path / include_filename fs.copy(packages_file.strpath, included_path) + # Configure the environment to include file(s) from the environment's + # remote configuration stage directory. + spack_yaml = env_root / ev.manifest_name + spack_yaml.write_text(mpileaks_env_config(config_scope_path)) + # Ensure the concretized environment reflects contents of the # packages.yaml file. + e = ev.Environment(env_root) with e: e.concretize() assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs()) -def test_env_with_included_config_var_path(environment_from_manifest, packages_file): +def test_env_with_included_config_var_path(tmpdir, packages_file): """Test inclusion of a package configuration file with path variables "staged" in the environment's configuration stage directory.""" - config_var_path = os.path.join("$tempdir", "included-config.yaml") - e = environment_from_manifest(mpileaks_env_config(config_var_path)) + included_file = packages_file.strpath + env_path = pathlib.PosixPath(tmpdir) + config_var_path = os.path.join("$tempdir", "included-packages.yaml") + + spack_yaml = env_path / ev.manifest_name + spack_yaml.write_text(mpileaks_env_config(config_var_path)) config_real_path = substitute_path_variables(config_var_path) - fs.mkdirp(os.path.dirname(config_real_path)) - shutil.move(packages_file.strpath, config_real_path) + shutil.move(included_file, config_real_path) assert os.path.exists(config_real_path) + e = ev.Environment(env_path) with e: e.concretize() assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs()) -def test_env_config_precedence(environment_from_manifest): - e = environment_from_manifest( - """ -spack: - packages: - libelf: - version: ["0.8.12"] - include: - - ./included-config.yaml - specs: - - mpileaks -""" - ) - with open(os.path.join(e.path, "included-config.yaml"), "w") as f: +def test_env_with_included_config_precedence(tmp_path): + """Test included scope and manifest precedence when including a package + configuration file.""" + + included_file = "included-packages.yaml" + included_path = tmp_path / included_file + with open(included_path, "w") as f: f.write( """\ packages: @@ -928,29 +931,50 @@ def test_env_config_precedence(environment_from_manifest): """ ) + spack_yaml = tmp_path / ev.manifest_name + spack_yaml.write_text( + f"""\ +spack: + packages: + libelf: + version: ["0.8.12"] + include: + - {os.path.join(".", included_file)} + specs: + - mpileaks +""" + ) + + e = ev.Environment(tmp_path) with e: e.concretize() + specs = e._get_environment_specs() # ensure included scope took effect - assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs()) + assert any(x.satisfies("mpileaks@2.2") for x in specs) # ensure env file takes precedence - assert any(x.satisfies("libelf@0.8.12") for x in e._get_environment_specs()) + assert any(x.satisfies("libelf@0.8.12") for x in specs) -def test_included_config_precedence(environment_from_manifest): - e = environment_from_manifest( - """ +def test_env_with_included_configs_precedence(tmp_path): + """Test precendence of multiple included configuration files.""" + file1 = "high-config.yaml" + file2 = "low-config.yaml" + + spack_yaml = tmp_path / ev.manifest_name + spack_yaml.write_text( + f"""\ spack: include: - - ./high-config.yaml # this one should take precedence - - ./low-config.yaml + - {os.path.join(".", file1)} # this one should take precedence + - {os.path.join(".", file2)} specs: - mpileaks """ ) - with open(os.path.join(e.path, "high-config.yaml"), "w") as f: + with open(tmp_path / file1, "w") as f: f.write( """\ packages: @@ -959,7 +983,7 @@ def test_included_config_precedence(environment_from_manifest): """ ) - with open(os.path.join(e.path, "low-config.yaml"), "w") as f: + with open(tmp_path / file2, "w") as f: f.write( """\ packages: @@ -970,12 +994,16 @@ def test_included_config_precedence(environment_from_manifest): """ ) + e = ev.Environment(tmp_path) with e: e.concretize() + specs = e._get_environment_specs() - assert any(x.satisfies("mpileaks@2.2") for x in e._get_environment_specs()) + # ensure included package spec took precedence over manifest spec + assert any(x.satisfies("mpileaks@2.2") for x in specs) - assert any([x.satisfies("libelf@0.8.10") for x in e._get_environment_specs()]) + # ensure first included package spec took precedence over one from second + assert any(x.satisfies("libelf@0.8.10") for x in specs) def test_bad_env_yaml_format(environment_from_manifest): @@ -1578,11 +1606,10 @@ def test_stack_yaml_remove_from_list(tmpdir): assert Spec("callpath") in test.user_specs -def test_stack_yaml_remove_from_list_force(tmpdir): - filename = str(tmpdir.join("spack.yaml")) - with open(filename, "w") as f: - f.write( - """\ +def test_stack_yaml_remove_from_list_force(tmp_path): + spack_yaml = tmp_path / ev.manifest_name + spack_yaml.write_text( + """\ spack: definitions: - packages: [mpileaks, callpath] @@ -1591,20 +1618,20 @@ def test_stack_yaml_remove_from_list_force(tmpdir): - [$packages] - [^mpich, ^zmpi] """ - ) - with tmpdir.as_cwd(): - env("create", "test", "./spack.yaml") - with ev.read("test"): - concretize() - remove("-f", "-l", "packages", "mpileaks") - find_output = find("-c") + ) - assert "mpileaks" not in find_output + env("create", "test", str(spack_yaml)) + with ev.read("test"): + concretize() + remove("-f", "-l", "packages", "mpileaks") + find_output = find("-c") - test = ev.read("test") - assert len(test.user_specs) == 2 - assert Spec("callpath ^zmpi") in test.user_specs - assert Spec("callpath ^mpich") in test.user_specs + assert "mpileaks" not in find_output + + test = ev.read("test") + assert len(test.user_specs) == 2 + assert Spec("callpath ^zmpi") in test.user_specs + assert Spec("callpath ^mpich") in test.user_specs def test_stack_yaml_remove_from_matrix_no_effect(tmpdir): @@ -1650,7 +1677,7 @@ def test_stack_yaml_force_remove_from_matrix(tmpdir): with tmpdir.as_cwd(): env("create", "test", "./spack.yaml") with ev.read("test") as e: - concretize() + e.concretize() before_user = e.user_specs.specs before_conc = e.concretized_user_specs diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py index f6b89e2108e866..7490a6e0b26204 100644 --- a/lib/spack/spack/test/env.py +++ b/lib/spack/spack/test/env.py @@ -18,6 +18,7 @@ SpackEnvironmentViewError, _error_on_nonempty_view_dir, ) +from spack.spec_list import UndefinedReferenceError pytestmark = pytest.mark.not_on_windows("Envs are not supported on windows") @@ -716,3 +717,64 @@ def test_variant_propagation_with_unify_false(tmp_path, mock_packages): root = env.matching_spec("parent-foo") for node in root.traverse(): assert node.satisfies("+foo") + + +def test_env_with_include_defs(mutable_mock_env_path, mock_packages): + """Test environment with included definitions file.""" + env_path = mutable_mock_env_path + env_path.mkdir() + defs_file = env_path / "definitions.yaml" + defs_file.write_text( + """definitions: +- core_specs: [libdwarf, libelf] +- compilers: ['%gcc'] +""" + ) + + spack_yaml = env_path / ev.manifest_name + spack_yaml.write_text( + f"""spack: + include: + - file://{defs_file} + + definitions: + - my_packages: [zlib] + + specs: + - matrix: + - [$core_specs] + - [$compilers] + - $my_packages +""" + ) + + e = ev.Environment(env_path) + with e: + e.concretize() + + +def test_env_with_include_def_missing(mutable_mock_env_path, mock_packages): + """Test environment with included definitions file that is missing a definition.""" + env_path = mutable_mock_env_path + env_path.mkdir() + filename = "missing-def.yaml" + defs_file = env_path / filename + defs_file.write_text("definitions:\n- my_compilers: ['%gcc']\n") + + spack_yaml = env_path / ev.manifest_name + spack_yaml.write_text( + f"""spack: + include: + - file://{defs_file} + + specs: + - matrix: + - [$core_specs] + - [$my_compilers] +""" + ) + + e = ev.Environment(env_path) + with e: + with pytest.raises(UndefinedReferenceError, match=r"which does not appear"): + e.concretize() diff --git a/lib/spack/spack/test/schema.py b/lib/spack/spack/test/schema.py index d7f4e524ffadfc..916e61cf26c821 100644 --- a/lib/spack/spack/test/schema.py +++ b/lib/spack/spack/test/schema.py @@ -80,7 +80,17 @@ def test_module_suffixes(module_suffixes_schema): @pytest.mark.regression("10246") @pytest.mark.parametrize( "config_name", - ["compilers", "config", "env", "merged", "mirrors", "modules", "packages", "repos"], + [ + "compilers", + "config", + "definitions", + "env", + "merged", + "mirrors", + "modules", + "packages", + "repos", + ], ) def test_schema_validation(meta_schema, config_name): import importlib diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index ee9011e11c4857..7ea1d1848417b3 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1159,19 +1159,19 @@ complete -c spack -n '__fish_spack_using_command config' -l scope -r -d 'configu # spack config get set -g __fish_spack_optspecs_spack_config_get h/help -complete -c spack -n '__fish_spack_using_command_pos 0 config get' -f -a 'bootstrap cdash ci compilers concretizer config mirrors modules packages repos upstreams' +complete -c spack -n '__fish_spack_using_command_pos 0 config get' -f -a 'bootstrap cdash ci compilers concretizer config definitions mirrors modules packages repos upstreams' complete -c spack -n '__fish_spack_using_command config get' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command config get' -s h -l help -d 'show this help message and exit' # spack config blame set -g __fish_spack_optspecs_spack_config_blame h/help -complete -c spack -n '__fish_spack_using_command_pos 0 config blame' -f -a 'bootstrap cdash ci compilers concretizer config mirrors modules packages repos upstreams' +complete -c spack -n '__fish_spack_using_command_pos 0 config blame' -f -a 'bootstrap cdash ci compilers concretizer config definitions mirrors modules packages repos upstreams' complete -c spack -n '__fish_spack_using_command config blame' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command config blame' -s h -l help -d 'show this help message and exit' # spack config edit set -g __fish_spack_optspecs_spack_config_edit h/help print-file -complete -c spack -n '__fish_spack_using_command_pos 0 config edit' -f -a 'bootstrap cdash ci compilers concretizer config mirrors modules packages repos upstreams' +complete -c spack -n '__fish_spack_using_command_pos 0 config edit' -f -a 'bootstrap cdash ci compilers concretizer config definitions mirrors modules packages repos upstreams' complete -c spack -n '__fish_spack_using_command config edit' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command config edit' -s h -l help -d 'show this help message and exit' complete -c spack -n '__fish_spack_using_command config edit' -l print-file -f -a print_file From 4755b28398da08a424ab159fa425a25e3966dab3 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sun, 5 Nov 2023 08:56:11 +0100 Subject: [PATCH 501/806] Hidden modules: always append hash (#40868) --- .../spack/hooks/module_file_generation.py | 13 +++- lib/spack/spack/modules/__init__.py | 9 ++- lib/spack/spack/modules/common.py | 34 ++++---- lib/spack/spack/modules/lmod.py | 59 +++++++------- lib/spack/spack/modules/tcl.py | 36 ++++----- .../data/modules/lmod/hide_implicits.yaml | 1 + .../data/modules/tcl/exclude_implicits.yaml | 1 + .../test/data/modules/tcl/hide_implicits.yaml | 1 + lib/spack/spack/test/modules/lmod.py | 77 +++++++++---------- lib/spack/spack/test/modules/tcl.py | 72 ++++++++--------- 10 files changed, 153 insertions(+), 150 deletions(-) diff --git a/lib/spack/spack/hooks/module_file_generation.py b/lib/spack/spack/hooks/module_file_generation.py index 0c6428ebd44198..1a2bbfdfe42d5c 100644 --- a/lib/spack/spack/hooks/module_file_generation.py +++ b/lib/spack/spack/hooks/module_file_generation.py @@ -3,17 +3,22 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from typing import Optional, Set + from llnl.util import tty import spack.config import spack.modules +import spack.spec -def _for_each_enabled(spec, method_name, explicit=None): +def _for_each_enabled( + spec: spack.spec.Spec, method_name: str, explicit: Optional[bool] = None +) -> None: """Calls a method for each enabled module""" - set_names = set(spack.config.get("modules", {}).keys()) + set_names: Set[str] = set(spack.config.get("modules", {}).keys()) for name in set_names: - enabled = spack.config.get("modules:%s:enable" % name) + enabled = spack.config.get(f"modules:{name}:enable") if not enabled: tty.debug("NO MODULE WRITTEN: list of enabled module files is empty") continue @@ -28,7 +33,7 @@ def _for_each_enabled(spec, method_name, explicit=None): tty.warn(msg.format(method_name, str(e))) -def post_install(spec, explicit): +def post_install(spec, explicit: bool): import spack.environment as ev # break import cycle if ev.active_environment(): diff --git a/lib/spack/spack/modules/__init__.py b/lib/spack/spack/modules/__init__.py index 13b8a95bed7d08..dde8b74a5c285e 100644 --- a/lib/spack/spack/modules/__init__.py +++ b/lib/spack/spack/modules/__init__.py @@ -7,10 +7,15 @@ include Tcl non-hierarchical modules, Lua hierarchical modules, and others. """ -from .common import disable_modules +from typing import Dict, Type + +from .common import BaseModuleFileWriter, disable_modules from .lmod import LmodModulefileWriter from .tcl import TclModulefileWriter __all__ = ["TclModulefileWriter", "LmodModulefileWriter", "disable_modules"] -module_types = {"tcl": TclModulefileWriter, "lmod": LmodModulefileWriter} +module_types: Dict[str, Type[BaseModuleFileWriter]] = { + "tcl": TclModulefileWriter, + "lmod": LmodModulefileWriter, +} diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 49040e5ba309a6..465fed0324f15a 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -35,7 +35,7 @@ import os.path import re import string -from typing import Optional +from typing import List, Optional import llnl.util.filesystem import llnl.util.tty as tty @@ -50,6 +50,7 @@ import spack.projections as proj import spack.repo import spack.schema.environment +import spack.spec import spack.store import spack.tengine as tengine import spack.util.environment @@ -395,16 +396,14 @@ class BaseConfiguration: default_projections = {"all": "{name}/{version}-{compiler.name}-{compiler.version}"} - def __init__(self, spec, module_set_name, explicit=None): + def __init__(self, spec: spack.spec.Spec, module_set_name: str, explicit: bool) -> None: # Module where type(self) is defined - self.module = inspect.getmodule(self) + m = inspect.getmodule(self) + assert m is not None # make mypy happy + self.module = m # Spec for which we want to generate a module file self.spec = spec self.name = module_set_name - # Software installation has been explicitly asked (get this information from - # db when querying an existing module, like during a refresh or rm operations) - if explicit is None: - explicit = spec._installed_explicitly() self.explicit = explicit # Dictionary of configuration options that should be applied # to the spec @@ -458,7 +457,11 @@ def suffixes(self): if constraint in self.spec: suffixes.append(suffix) suffixes = list(dedupe(suffixes)) - if self.hash: + # For hidden modules we can always add a fixed length hash as suffix, since it guards + # against file name clashes, and the module is not exposed to the user anyways. + if self.hidden: + suffixes.append(self.spec.dag_hash(length=7)) + elif self.hash: suffixes.append(self.hash) return suffixes @@ -551,8 +554,7 @@ def exclude_env_vars(self): def _create_list_for(self, what): include = [] for item in self.conf[what]: - conf = type(self)(item, self.name) - if not conf.excluded: + if not self.module.make_configuration(item, self.name).excluded: include.append(item) return include @@ -826,8 +828,7 @@ def autoload(self): def _create_module_list_of(self, what): m = self.conf.module name = self.conf.name - explicit = self.conf.explicit - return [m.make_layout(x, name, explicit).use_name for x in getattr(self.conf, what)] + return [m.make_layout(x, name).use_name for x in getattr(self.conf, what)] @tengine.context_property def verbose(self): @@ -836,12 +837,19 @@ def verbose(self): class BaseModuleFileWriter: - def __init__(self, spec, module_set_name, explicit=None): + default_template: str + hide_cmd_format: str + modulerc_header: List[str] + + def __init__( + self, spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None + ) -> None: self.spec = spec # This class is meant to be derived. Get the module of the # actual writer. self.module = inspect.getmodule(self) + assert self.module is not None # make mypy happy m = self.module # Create the triplet of configuration/layout/context diff --git a/lib/spack/spack/modules/lmod.py b/lib/spack/spack/modules/lmod.py index e2bcfa2973ecea..8f529ba21ceb5a 100644 --- a/lib/spack/spack/modules/lmod.py +++ b/lib/spack/spack/modules/lmod.py @@ -6,8 +6,7 @@ import collections import itertools import os.path -import posixpath -from typing import Any, Dict, List +from typing import Dict, List, Optional, Tuple import llnl.util.filesystem as fs import llnl.util.lang as lang @@ -24,18 +23,19 @@ #: lmod specific part of the configuration -def configuration(module_set_name): - config_path = "modules:%s:lmod" % module_set_name - config = spack.config.get(config_path, {}) - return config +def configuration(module_set_name: str) -> dict: + return spack.config.get(f"modules:{module_set_name}:lmod", {}) # Caches the configuration {spec_hash: configuration} -configuration_registry: Dict[str, Any] = {} +configuration_registry: Dict[Tuple[str, str, bool], BaseConfiguration] = {} -def make_configuration(spec, module_set_name, explicit): +def make_configuration( + spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None +) -> BaseConfiguration: """Returns the lmod configuration for spec""" + explicit = bool(spec._installed_explicitly()) if explicit is None else explicit key = (spec.dag_hash(), module_set_name, explicit) try: return configuration_registry[key] @@ -45,16 +45,18 @@ def make_configuration(spec, module_set_name, explicit): ) -def make_layout(spec, module_set_name, explicit): +def make_layout( + spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None +) -> BaseFileLayout: """Returns the layout information for spec""" - conf = make_configuration(spec, module_set_name, explicit) - return LmodFileLayout(conf) + return LmodFileLayout(make_configuration(spec, module_set_name, explicit)) -def make_context(spec, module_set_name, explicit): +def make_context( + spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None +) -> BaseContext: """Returns the context information for spec""" - conf = make_configuration(spec, module_set_name, explicit) - return LmodContext(conf) + return LmodContext(make_configuration(spec, module_set_name, explicit)) def guess_core_compilers(name, store=False) -> List[spack.spec.CompilerSpec]: @@ -97,10 +99,7 @@ def guess_core_compilers(name, store=False) -> List[spack.spec.CompilerSpec]: class LmodConfiguration(BaseConfiguration): """Configuration class for lmod module files.""" - # Note: Posixpath is used here as well as below as opposed to - # os.path.join due to spack.spec.Spec.format - # requiring forward slash path seperators at this stage - default_projections = {"all": posixpath.join("{name}", "{version}")} + default_projections = {"all": "{name}/{version}"} @property def core_compilers(self) -> List[spack.spec.CompilerSpec]: @@ -274,19 +273,16 @@ def filename(self): hierarchy_name = os.path.join(*parts) # Compute the absolute path - fullname = os.path.join( + return os.path.join( self.arch_dirname, # root for lmod files on this architecture hierarchy_name, # relative path - ".".join([self.use_name, self.extension]), # file name + f"{self.use_name}.{self.extension}", # file name ) - return fullname @property def modulerc(self): """Returns the modulerc file associated with current module file""" - return os.path.join( - os.path.dirname(self.filename), ".".join([".modulerc", self.extension]) - ) + return os.path.join(os.path.dirname(self.filename), f".modulerc.{self.extension}") def token_to_path(self, name, value): """Transforms a hierarchy token into the corresponding path part. @@ -319,9 +315,7 @@ def path_part_fmt(token): # we need to append a hash to the version to distinguish # among flavors of the same library (e.g. openblas~openmp vs. # openblas+openmp) - path = path_part_fmt(token=value) - path = "-".join([path, value.dag_hash(length=7)]) - return path + return f"{path_part_fmt(token=value)}-{value.dag_hash(length=7)}" @property def available_path_parts(self): @@ -333,8 +327,7 @@ def available_path_parts(self): # List of services that are part of the hierarchy hierarchy = self.conf.hierarchy_tokens # Tokenize each part that is both in the hierarchy and available - parts = [self.token_to_path(x, available[x]) for x in hierarchy if x in available] - return parts + return [self.token_to_path(x, available[x]) for x in hierarchy if x in available] @property @lang.memoized @@ -452,7 +445,7 @@ def missing(self): @lang.memoized def unlocked_paths(self): """Returns the list of paths that are unlocked unconditionally.""" - layout = make_layout(self.spec, self.conf.name, self.conf.explicit) + layout = make_layout(self.spec, self.conf.name) return [os.path.join(*parts) for parts in layout.unlocked_paths[None]] @tengine.context_property @@ -460,7 +453,7 @@ def conditionally_unlocked_paths(self): """Returns the list of paths that are unlocked conditionally. Each item in the list is a tuple with the structure (condition, path). """ - layout = make_layout(self.spec, self.conf.name, self.conf.explicit) + layout = make_layout(self.spec, self.conf.name) value = [] conditional_paths = layout.unlocked_paths conditional_paths.pop(None) @@ -482,9 +475,9 @@ def manipulate_path(token): class LmodModulefileWriter(BaseModuleFileWriter): """Writer class for lmod module files.""" - default_template = posixpath.join("modules", "modulefile.lua") + default_template = "modules/modulefile.lua" - modulerc_header: list = [] + modulerc_header = [] hide_cmd_format = 'hide_version("%s")' diff --git a/lib/spack/spack/modules/tcl.py b/lib/spack/spack/modules/tcl.py index ed12827c33ef3a..6d7f49b3309f33 100644 --- a/lib/spack/spack/modules/tcl.py +++ b/lib/spack/spack/modules/tcl.py @@ -7,28 +7,29 @@ non-hierarchical modules. """ import os.path -import posixpath -from typing import Any, Dict +from typing import Dict, Optional, Tuple import spack.config +import spack.spec import spack.tengine as tengine from .common import BaseConfiguration, BaseContext, BaseFileLayout, BaseModuleFileWriter #: Tcl specific part of the configuration -def configuration(module_set_name): - config_path = "modules:%s:tcl" % module_set_name - config = spack.config.get(config_path, {}) - return config +def configuration(module_set_name: str) -> dict: + return spack.config.get(f"modules:{module_set_name}:tcl", {}) # Caches the configuration {spec_hash: configuration} -configuration_registry: Dict[str, Any] = {} +configuration_registry: Dict[Tuple[str, str, bool], BaseConfiguration] = {} -def make_configuration(spec, module_set_name, explicit): +def make_configuration( + spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None +) -> BaseConfiguration: """Returns the tcl configuration for spec""" + explicit = bool(spec._installed_explicitly()) if explicit is None else explicit key = (spec.dag_hash(), module_set_name, explicit) try: return configuration_registry[key] @@ -38,16 +39,18 @@ def make_configuration(spec, module_set_name, explicit): ) -def make_layout(spec, module_set_name, explicit): +def make_layout( + spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None +) -> BaseFileLayout: """Returns the layout information for spec""" - conf = make_configuration(spec, module_set_name, explicit) - return TclFileLayout(conf) + return TclFileLayout(make_configuration(spec, module_set_name, explicit)) -def make_context(spec, module_set_name, explicit): +def make_context( + spec: spack.spec.Spec, module_set_name: str, explicit: Optional[bool] = None +) -> BaseContext: """Returns the context information for spec""" - conf = make_configuration(spec, module_set_name, explicit) - return TclContext(conf) + return TclContext(make_configuration(spec, module_set_name, explicit)) class TclConfiguration(BaseConfiguration): @@ -75,10 +78,7 @@ def prerequisites(self): class TclModulefileWriter(BaseModuleFileWriter): """Writer class for tcl module files.""" - # Note: Posixpath is used here as opposed to - # os.path.join due to spack.spec.Spec.format - # requiring forward slash path seperators at this stage - default_template = posixpath.join("modules", "modulefile.tcl") + default_template = "modules/modulefile.tcl" modulerc_header = ["#%Module4.7"] diff --git a/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml b/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml index d13c1a7b975ff1..e9326ab42c4661 100644 --- a/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml +++ b/lib/spack/spack/test/data/modules/lmod/hide_implicits.yaml @@ -2,6 +2,7 @@ enable: - lmod lmod: hide_implicits: true + hash_length: 0 core_compilers: - 'clang@3.3' hierarchy: diff --git a/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml b/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml index 5af22e6e40c272..4835b4ecd93f33 100644 --- a/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml +++ b/lib/spack/spack/test/data/modules/tcl/exclude_implicits.yaml @@ -4,5 +4,6 @@ enable: - tcl tcl: exclude_implicits: true + hash_length: 0 all: autoload: direct diff --git a/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml b/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml index 3ae7517b8f8b2b..136c42f3c7cb50 100644 --- a/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml +++ b/lib/spack/spack/test/data/modules/tcl/hide_implicits.yaml @@ -2,5 +2,6 @@ enable: - tcl tcl: hide_implicits: true + hash_length: 0 all: autoload: direct diff --git a/lib/spack/spack/test/modules/lmod.py b/lib/spack/spack/test/modules/lmod.py index 510006f0a98dda..acaae90f696c8e 100644 --- a/lib/spack/spack/test/modules/lmod.py +++ b/lib/spack/spack/test/modules/lmod.py @@ -435,7 +435,7 @@ def test_modules_no_arch(self, factory, module_configuration): assert str(spec.os) not in path - def test_hide_implicits(self, module_configuration): + def test_hide_implicits(self, module_configuration, temporary_store): """Tests the addition and removal of hide command in modulerc.""" module_configuration("hide_implicits") @@ -446,29 +446,42 @@ def test_hide_implicits(self, module_configuration): writer.write() assert os.path.exists(writer.layout.modulerc) with open(writer.layout.modulerc) as f: - content = f.readlines() - content = "".join(content).split("\n") - hide_cmd = 'hide_version("%s")' % writer.layout.use_name - assert len([x for x in content if hide_cmd == x]) == 1 - - # mpileaks becomes explicit, thus modulerc is removed - writer = writer_cls(spec, "default", True) - writer.write(overwrite=True) - assert not os.path.exists(writer.layout.modulerc) - - # mpileaks is defined as explicit, no modulerc file should exist + content = [line.strip() for line in f.readlines()] + hide_implicit_mpileaks = f'hide_version("{writer.layout.use_name}")' + assert len([x for x in content if hide_implicit_mpileaks == x]) == 1 + + # The direct dependencies are all implicitly installed, and they should all be hidden, + # except for mpich, which is provider for mpi, which is in the hierarchy, and therefore + # can't be hidden. All other hidden modules should have a 7 character hash (the config + # hash_length = 0 only applies to exposed modules). + with open(writer.layout.filename) as f: + depends_statements = [line.strip() for line in f.readlines() if "depends_on" in line] + for dep in spec.dependencies(deptype=("link", "run")): + if dep.satisfies("mpi"): + assert not any(dep.dag_hash(7) in line for line in depends_statements) + else: + assert any(dep.dag_hash(7) in line for line in depends_statements) + + # when mpileaks becomes explicit, its file name changes (hash_length = 0), meaning an + # extra module file is created; the old one still exists and remains hidden. writer = writer_cls(spec, "default", True) writer.write() - assert not os.path.exists(writer.layout.modulerc) - - # explicit module is removed - writer.remove() + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = [line.strip() for line in f.readlines()] + assert hide_implicit_mpileaks in content # old, implicit mpileaks is still hidden + assert f'hide_version("{writer.layout.use_name}")' not in content + + # after removing both the implicit and explicit module, the modulerc file would be empty + # and should be removed. + writer_cls(spec, "default", False).remove() + writer_cls(spec, "default", True).remove() assert not os.path.exists(writer.layout.modulerc) assert not os.path.exists(writer.layout.filename) # implicit module is removed writer = writer_cls(spec, "default", False) - writer.write(overwrite=True) + writer.write() assert os.path.exists(writer.layout.filename) assert os.path.exists(writer.layout.modulerc) writer.remove() @@ -486,35 +499,19 @@ def test_hide_implicits(self, module_configuration): writer_alt2.write(overwrite=True) assert os.path.exists(writer.layout.modulerc) with open(writer.layout.modulerc) as f: - content = f.readlines() - content = "".join(content).split("\n") - hide_cmd = 'hide_version("%s")' % writer.layout.use_name - hide_cmd_alt1 = 'hide_version("%s")' % writer_alt1.layout.use_name - hide_cmd_alt2 = 'hide_version("%s")' % writer_alt2.layout.use_name + content = [line.strip() for line in f.readlines()] + hide_cmd = f'hide_version("{writer.layout.use_name}")' + hide_cmd_alt1 = f'hide_version("{writer_alt1.layout.use_name}")' + hide_cmd_alt2 = f'hide_version("{writer_alt2.layout.use_name}")' assert len([x for x in content if hide_cmd == x]) == 1 assert len([x for x in content if hide_cmd_alt1 == x]) == 1 assert len([x for x in content if hide_cmd_alt2 == x]) == 1 - # one version is removed, a second becomes explicit + # one version is removed writer_alt1.remove() - writer_alt2 = writer_cls(spec_alt2, "default", True) - writer_alt2.write(overwrite=True) assert os.path.exists(writer.layout.modulerc) with open(writer.layout.modulerc) as f: - content = f.readlines() - content = "".join(content).split("\n") + content = [line.strip() for line in f.readlines()] assert len([x for x in content if hide_cmd == x]) == 1 assert len([x for x in content if hide_cmd_alt1 == x]) == 0 - assert len([x for x in content if hide_cmd_alt2 == x]) == 0 - - # disable hide_implicits configuration option - module_configuration("autoload_direct") - writer = writer_cls(spec, "default") - writer.write(overwrite=True) - assert not os.path.exists(writer.layout.modulerc) - - # reenable hide_implicits configuration option - module_configuration("hide_implicits") - writer = writer_cls(spec, "default") - writer.write(overwrite=True) - assert os.path.exists(writer.layout.modulerc) + assert len([x for x in content if hide_cmd_alt2 == x]) == 1 diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py index 4a8d9e10a2fdae..00460b6796b9a1 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -488,7 +488,7 @@ def test_modules_no_arch(self, factory, module_configuration): assert str(spec.os) not in path - def test_hide_implicits(self, module_configuration): + def test_hide_implicits(self, module_configuration, temporary_store): """Tests the addition and removal of hide command in modulerc.""" module_configuration("hide_implicits") @@ -499,29 +499,37 @@ def test_hide_implicits(self, module_configuration): writer.write() assert os.path.exists(writer.layout.modulerc) with open(writer.layout.modulerc) as f: - content = f.readlines() - content = "".join(content).split("\n") - hide_cmd = "module-hide --soft --hidden-loaded %s" % writer.layout.use_name - assert len([x for x in content if hide_cmd == x]) == 1 - - # mpileaks becomes explicit, thus modulerc is removed - writer = writer_cls(spec, "default", True) - writer.write(overwrite=True) - assert not os.path.exists(writer.layout.modulerc) - - # mpileaks is defined as explicit, no modulerc file should exist + content = [line.strip() for line in f.readlines()] + hide_implicit_mpileaks = f"module-hide --soft --hidden-loaded {writer.layout.use_name}" + assert len([x for x in content if hide_implicit_mpileaks == x]) == 1 + + # The direct dependencies are all implicit, and they should have depends-on with fixed + # 7 character hash, even though the config is set to hash_length = 0. + with open(writer.layout.filename) as f: + depends_statements = [line.strip() for line in f.readlines() if "depends-on" in line] + for dep in spec.dependencies(deptype=("link", "run")): + assert any(dep.dag_hash(7) in line for line in depends_statements) + + # when mpileaks becomes explicit, its file name changes (hash_length = 0), meaning an + # extra module file is created; the old one still exists and remains hidden. writer = writer_cls(spec, "default", True) writer.write() - assert not os.path.exists(writer.layout.modulerc) - - # explicit module is removed - writer.remove() + assert os.path.exists(writer.layout.modulerc) + with open(writer.layout.modulerc) as f: + content = [line.strip() for line in f.readlines()] + assert hide_implicit_mpileaks in content # old, implicit mpileaks is still hidden + assert f"module-hide --soft --hidden-loaded {writer.layout.use_name}" not in content + + # after removing both the implicit and explicit module, the modulerc file would be empty + # and should be removed. + writer_cls(spec, "default", False).remove() + writer_cls(spec, "default", True).remove() assert not os.path.exists(writer.layout.modulerc) assert not os.path.exists(writer.layout.filename) # implicit module is removed writer = writer_cls(spec, "default", False) - writer.write(overwrite=True) + writer.write() assert os.path.exists(writer.layout.filename) assert os.path.exists(writer.layout.modulerc) writer.remove() @@ -539,35 +547,19 @@ def test_hide_implicits(self, module_configuration): writer_alt2.write(overwrite=True) assert os.path.exists(writer.layout.modulerc) with open(writer.layout.modulerc) as f: - content = f.readlines() - content = "".join(content).split("\n") - hide_cmd = "module-hide --soft --hidden-loaded %s" % writer.layout.use_name - hide_cmd_alt1 = "module-hide --soft --hidden-loaded %s" % writer_alt1.layout.use_name - hide_cmd_alt2 = "module-hide --soft --hidden-loaded %s" % writer_alt2.layout.use_name + content = [line.strip() for line in f.readlines()] + hide_cmd = f"module-hide --soft --hidden-loaded {writer.layout.use_name}" + hide_cmd_alt1 = f"module-hide --soft --hidden-loaded {writer_alt1.layout.use_name}" + hide_cmd_alt2 = f"module-hide --soft --hidden-loaded {writer_alt2.layout.use_name}" assert len([x for x in content if hide_cmd == x]) == 1 assert len([x for x in content if hide_cmd_alt1 == x]) == 1 assert len([x for x in content if hide_cmd_alt2 == x]) == 1 - # one version is removed, a second becomes explicit + # one version is removed writer_alt1.remove() - writer_alt2 = writer_cls(spec_alt2, "default", True) - writer_alt2.write(overwrite=True) assert os.path.exists(writer.layout.modulerc) with open(writer.layout.modulerc) as f: - content = f.readlines() - content = "".join(content).split("\n") + content = [line.strip() for line in f.readlines()] assert len([x for x in content if hide_cmd == x]) == 1 assert len([x for x in content if hide_cmd_alt1 == x]) == 0 - assert len([x for x in content if hide_cmd_alt2 == x]) == 0 - - # disable hide_implicits configuration option - module_configuration("autoload_direct") - writer = writer_cls(spec, "default") - writer.write(overwrite=True) - assert not os.path.exists(writer.layout.modulerc) - - # reenable hide_implicits configuration option - module_configuration("hide_implicits") - writer = writer_cls(spec, "default") - writer.write(overwrite=True) - assert os.path.exists(writer.layout.modulerc) + assert len([x for x in content if hide_cmd_alt2 == x]) == 1 From f6b23b4653c73f60e826086154cad3040c1b61a7 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 5 Nov 2023 02:15:37 -0800 Subject: [PATCH 502/806] bugfix: compress aliases for first command in completion (#40890) This completes to `spack concretize`: ``` spack conc ``` but this still gets hung up on the difference between `concretize` and `concretise`: ``` spack -e . conc ``` We were checking `"$COMP_CWORD" = 1`, which tracks the word on the command line including any flags and their args, but we should track `"$COMP_CWORD_NO_FLAGS" = 1` to figure out if the arg we're completing is the first real command. --- share/spack/bash/spack-completion.bash | 2 +- share/spack/spack-completion.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/spack/bash/spack-completion.bash b/share/spack/bash/spack-completion.bash index 49c691be4c349b..9a5b367be7a49a 100755 --- a/share/spack/bash/spack-completion.bash +++ b/share/spack/bash/spack-completion.bash @@ -370,7 +370,7 @@ _spack_compress_aliases() { # If there are zero or one completions, don't do anything # If this isn't the first argument, bail because aliases currently only apply # to top-level commands. - if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD" != "1" ]; then + if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD_NO_FLAGS" != "1" ]; then return fi diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 84b6c3dc1ff3f4..91ed9dd1728d88 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -370,7 +370,7 @@ _spack_compress_aliases() { # If there are zero or one completions, don't do anything # If this isn't the first argument, bail because aliases currently only apply # to top-level commands. - if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD" != "1" ]; then + if [ "${#COMPREPLY[@]}" -le "1" ] || [ "$COMP_CWORD_NO_FLAGS" != "1" ]; then return fi From 141c7de5d89f32b203438e1d6fca1efd817299f7 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sun, 5 Nov 2023 23:32:09 +0100 Subject: [PATCH 503/806] Add command and package suggestions (#40895) * Add command suggestions This adds suggestions of similar commands in case users mistype a command. Before: ``` $ spack spack ==> Error: spack is not a recognized Spack command or extension command; check with `spack commands`. ``` After: ``` $ spack spack ==> Error: spack is not a recognized Spack command or extension command; check with `spack commands`. Did you mean one of the following commands? spec patch ``` * Add package name suggestions * Remove suggestion to run spack clean -m --- lib/spack/spack/cmd/dev_build.py | 5 +---- lib/spack/spack/cmd/edit.py | 5 +---- lib/spack/spack/extensions.py | 12 +++++++++++- lib/spack/spack/repo.py | 14 +++++++++++++- lib/spack/spack/test/cmd/dev_build.py | 11 +++++++++-- 5 files changed, 35 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/cmd/dev_build.py b/lib/spack/spack/cmd/dev_build.py index d8a7b447a26fb8..90008c8b3ef601 100644 --- a/lib/spack/spack/cmd/dev_build.py +++ b/lib/spack/spack/cmd/dev_build.py @@ -99,10 +99,7 @@ def dev_build(self, args): spec = specs[0] if not spack.repo.PATH.exists(spec.name): - tty.die( - "No package for '{0}' was found.".format(spec.name), - " Use `spack create` to create a new package", - ) + raise spack.repo.UnknownPackageError(spec.name) if not spec.versions.concrete_range_as_version: tty.die( diff --git a/lib/spack/spack/cmd/edit.py b/lib/spack/spack/cmd/edit.py index 15aeea31b3f22d..79f441a67adf57 100644 --- a/lib/spack/spack/cmd/edit.py +++ b/lib/spack/spack/cmd/edit.py @@ -43,10 +43,7 @@ def edit_package(name, repo_path, namespace): if not os.access(path, os.R_OK): tty.die("Insufficient permissions on '%s'!" % path) else: - tty.die( - "No package for '{0}' was found.".format(spec.name), - " Use `spack create` to create a new package", - ) + raise spack.repo.UnknownPackageError(spec.name) editor(path) diff --git a/lib/spack/spack/extensions.py b/lib/spack/spack/extensions.py index af900722cc9cfd..0ee01a22a12a99 100644 --- a/lib/spack/spack/extensions.py +++ b/lib/spack/spack/extensions.py @@ -5,6 +5,7 @@ """Service functions and classes to implement the hooks for Spack's command extensions. """ +import difflib import importlib import os import re @@ -176,10 +177,19 @@ class CommandNotFoundError(spack.error.SpackError): """ def __init__(self, cmd_name): - super().__init__( + msg = ( "{0} is not a recognized Spack command or extension command;" " check with `spack commands`.".format(cmd_name) ) + long_msg = None + + similar = difflib.get_close_matches(cmd_name, spack.cmd.all_commands()) + + if 1 <= len(similar) <= 5: + long_msg = "\nDid you mean one of the following commands?\n " + long_msg += "\n ".join(similar) + + super().__init__(msg, long_msg) class ExtensionNamingError(spack.error.SpackError): diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index a89b5dd407d536..5918454005df85 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -6,6 +6,7 @@ import abc import collections.abc import contextlib +import difflib import errno import functools import importlib @@ -1516,7 +1517,18 @@ def __init__(self, name, repo=None): long_msg = "Did you mean to specify a filename with './{0}'?" long_msg = long_msg.format(name) else: - long_msg = "You may need to run 'spack clean -m'." + long_msg = "Use 'spack create' to create a new package." + + if not repo: + repo = spack.repo.PATH + + # We need to compare the base package name + pkg_name = name.rsplit(".", 1)[-1] + similar = difflib.get_close_matches(pkg_name, repo.all_package_names()) + + if 1 <= len(similar) <= 5: + long_msg += "\n\nDid you mean one of the following packages?\n " + long_msg += "\n ".join(similar) super().__init__(msg, long_msg) self.name = name diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py index c5a7b5c3bb801a..85199eddd66da2 100644 --- a/lib/spack/spack/test/cmd/dev_build.py +++ b/lib/spack/spack/test/cmd/dev_build.py @@ -163,8 +163,15 @@ def test_dev_build_fails_multiple_specs(mock_packages): def test_dev_build_fails_nonexistent_package_name(mock_packages): - output = dev_build("no_such_package", fail_on_error=False) - assert "No package for 'no_such_package' was found" in output + output = "" + + try: + dev_build("no_such_package") + assert False, "no exception was raised!" + except spack.repo.UnknownPackageError as e: + output = e.message + + assert "Package 'no_such_package' not found" in output def test_dev_build_fails_no_version(mock_packages): From 3c641c85097cef24cbea238f2254ced90f57bd2c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 07:53:26 +0100 Subject: [PATCH 504/806] spack env activate: create & activate default environment without args (#40756) This PR implements the concept of "default environment", which doesn't have to be created explicitly. The aim is to lower the barrier for adopting environments. To (create and) activate the default environment, run ``` $ spack env activate ``` This mimics the behavior of ``` $ cd ``` which brings you to your home directory. This is not a breaking change, since `spack env activate` without arguments currently errors. It is similar to the already existing `spack env activate --temp` command which always creates an env in a temporary directory, the difference is that the default environment is a managed / named environment named `default`. The name `default` is not a reserved name, it's just that `spack env activate` creates it for you if you don't have it already. With this change, you can get started with environments faster: ``` $ spack env activate [--prompt] $ spack install --add x y z ``` instead of ``` $ spack env create default ==> Created environment 'default in /Users/harmenstoppels/spack/var/spack/environments/default ==> You can activate this environment with: ==> spack env activate default $ spack env activate [--prompt] default $ spack install --add x y z ``` Notice that Spack supports switching (but not stacking) environments, so the parallel with `cd` is pretty clear: ``` $ spack env activate named_env $ spack env status ==> In environment named_env $ spack env activate $ spack env status ==> In environment default ``` --- lib/spack/spack/cmd/env.py | 25 +++++++++++++++++++++---- lib/spack/spack/test/cmd/env.py | 19 +++++++++++++++++++ share/spack/qa/setup-env-test.fish | 6 +++++- share/spack/qa/setup-env-test.sh | 6 +++++- share/spack/setup-env.sh | 3 +-- 5 files changed, 51 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index d75cf6b2625c7c..bf1f29d5584f89 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -5,6 +5,7 @@ import argparse import os +import shlex import shutil import sys import tempfile @@ -144,10 +145,13 @@ def create_temp_env_directory(): return tempfile.mkdtemp(prefix="spack-") -def env_activate(args): - if not args.activate_env and not args.dir and not args.temp: - tty.die("spack env activate requires an environment name, directory, or --temp") +def _tty_info(msg): + """tty.info like function that prints the equivalent printf statement for eval.""" + decorated = f'{colorize("@*b{==>}")} {msg}\n' + print(f"printf {shlex.quote(decorated)};") + +def env_activate(args): if not args.shell: spack.cmd.common.shell_init_instructions( "spack env activate", " eval `spack env activate {sh_arg} [...]`" @@ -160,12 +164,25 @@ def env_activate(args): env_name_or_dir = args.activate_env or args.dir + # When executing `spack env activate` without further arguments, activate + # the default environment. It's created when it doesn't exist yet. + if not env_name_or_dir and not args.temp: + short_name = "default" + if not ev.exists(short_name): + ev.create(short_name) + action = "Created and activated" + else: + action = "Activated" + env_path = ev.root(short_name) + _tty_info(f"{action} default environment in {env_path}") + # Temporary environment - if args.temp: + elif args.temp: env = create_temp_env_directory() env_path = os.path.abspath(env) short_name = os.path.basename(env_path) ev.create_in_dir(env).write(regenerate=False) + _tty_info(f"Created and activated temporary environment in {env_path}") # Managed environment elif ev.exists(env_name_or_dir) and not args.dir: diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 308e0b0e90cd1f..e291432a0fbe83 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -2924,6 +2924,25 @@ def test_activate_temp(monkeypatch, tmpdir): assert ev.is_env_dir(str(tmpdir)) +def test_activate_default(monkeypatch): + """Tests whether `spack env activate` creates / activates the default + environment""" + assert not ev.exists("default") + + # Activating it the first time should create it + env("activate", "--sh") + env("deactivate", "--sh") + assert ev.exists("default") + + # Activating it while it already exists should work + env("activate", "--sh") + env("deactivate", "--sh") + assert ev.exists("default") + + env("remove", "-y", "default") + assert not ev.exists("default") + + def test_env_view_fail_if_symlink_points_elsewhere(tmpdir, install_mockery, mock_fetch): view = str(tmpdir.join("view")) # Put a symlink to an actual directory in view diff --git a/share/spack/qa/setup-env-test.fish b/share/spack/qa/setup-env-test.fish index 6474917b70766b..589f4cbfa8c353 100755 --- a/share/spack/qa/setup-env-test.fish +++ b/share/spack/qa/setup-env-test.fish @@ -371,7 +371,6 @@ spt_contains " spack env list " spack env list --help title 'Testing `spack env activate`' spt_contains "No such environment:" spack env activate no_such_environment -spt_contains "env activate requires an environment " spack env activate spt_contains "usage: spack env activate " spack env activate -h spt_contains "usage: spack env activate " spack env activate --help @@ -415,6 +414,11 @@ spt_contains 'spack_test_2_env' 'fish' '-c' 'echo $PATH' spt_does_not_contain 'spack_test_env' 'fish' '-c' 'echo $PATH' despacktivate +echo "Testing default environment" +spack env activate +contains "In environment default" spack env status +despacktivate + echo "Correct error exit codes for activate and deactivate" spt_fails spack env activate nonexisiting_environment spt_fails spack env deactivate diff --git a/share/spack/qa/setup-env-test.sh b/share/spack/qa/setup-env-test.sh index 4172a40155590b..b26619b9cde0a0 100755 --- a/share/spack/qa/setup-env-test.sh +++ b/share/spack/qa/setup-env-test.sh @@ -140,7 +140,6 @@ contains " spack env list " spack env list --help title 'Testing `spack env activate`' contains "No such environment:" spack env activate no_such_environment -contains "env activate requires an environment " spack env activate contains "usage: spack env activate " spack env activate -h contains "usage: spack env activate " spack env activate --help @@ -197,6 +196,11 @@ contains "spack_test_2_env" sh -c 'echo $PATH' does_not_contain "spack_test_env" sh -c 'echo $PATH' despacktivate +echo "Testing default environment" +spack env activate +contains "In environment default" spack env status +despacktivate + echo "Correct error exit codes for activate and deactivate" fails spack env activate nonexisiting_environment fails spack env deactivate diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 91a601e652c386..a42882266cf9fa 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -126,8 +126,7 @@ _spack_shell_wrapper() { # Space needed here to differentiate between `-h` # argument and environments with "-h" in the name. # Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion - if [ -z ${1+x} ] || \ - [ "${_a#* --sh}" != "$_a" ] || \ + if [ "${_a#* --sh}" != "$_a" ] || \ [ "${_a#* --csh}" != "$_a" ] || \ [ "${_a#* -h}" != "$_a" ] || \ [ "${_a#* --help}" != "$_a" ]; From 17656b2ea03dbd699667df81d54b652a8aebee5e Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 6 Nov 2023 07:08:19 -0600 Subject: [PATCH 505/806] qt: new version 5.15.11 (#40884) * qt: new version 5.15.11 * qt: open end patch for qtlocation when gcc-10: --- var/spack/repos/builtin/packages/qt/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 971a3c25052a33..2654a295da4f52 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -31,6 +31,7 @@ class Qt(Package): phases = ["configure", "build", "install"] + version("5.15.11", sha256="7426b1eaab52ed169ce53804bdd05dfe364f761468f888a0f15a308dc1dc2951") version("5.15.10", sha256="b545cb83c60934adc9a6bbd27e2af79e5013de77d46f5b9f5bb2a3c762bf55ca") version("5.15.9", sha256="26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f") version("5.15.8", sha256="776a9302c336671f9406a53bd30b8e36f825742b2ec44a57c08217bff0fa86b9") @@ -145,7 +146,7 @@ class Qt(Package): "https://src.fedoraproject.org/rpms/qt5-qtlocation/raw/b6d99579de9ce5802c592b512a9f644a5e4690b9/f/qtlocation-gcc10.patch", sha256="78c70fbd0c74031c5f0f1f5990e0b4214fc04c5073c67ce1f23863373932ec86", working_dir="qtlocation", - when="@5.15.10 %gcc@10:", + when="@5.15.10: %gcc@10:", ) # https://github.com/microsoft/vcpkg/issues/21055 patch("qt5-macos12.patch", working_dir="qtbase", when="@5.14: %apple-clang@13:") From b8a18f0a78a9af0ee3cda810ce05abbd232c347d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 15:58:50 +0100 Subject: [PATCH 506/806] mpich: remove unnecessary tuples and upperbounds (#40899) * mpich: remove unnecessary tuples * remove redundant :3.3.99 upperbound --- var/spack/repos/builtin/packages/mpich/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index a68c7292b5d687..b66c0b8fd4c52a 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -164,7 +164,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): patch( "https://github.com/pmodels/mpich/commit/8a851b317ee57366cd15f4f28842063d8eff4483.patch?full_index=1", sha256="d2dafc020941d2d8cab82bc1047e4a6a6d97736b62b06e2831d536de1ac01fd0", - when="@3.3:3.3.99 +hwloc", + when="@3.3 +hwloc", ) # fix MPI_Barrier segmentation fault @@ -249,14 +249,14 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): # building from git requires regenerating autotools files depends_on("automake@1.15:", when="@develop", type="build") depends_on("libtool@2.4.4:", when="@develop", type="build") - depends_on("m4", when="@develop", type="build"), + depends_on("m4", when="@develop", type="build") depends_on("autoconf@2.67:", when="@develop", type="build") # building with "+hwloc' also requires regenerating autotools files - depends_on("automake@1.15:", when="@3.3:3.3.99 +hwloc", type="build") - depends_on("libtool@2.4.4:", when="@3.3:3.3.99 +hwloc", type="build") - depends_on("m4", when="@3.3:3.3.99 +hwloc", type="build"), - depends_on("autoconf@2.67:", when="@3.3:3.3.99 +hwloc", type="build") + depends_on("automake@1.15:", when="@3.3 +hwloc", type="build") + depends_on("libtool@2.4.4:", when="@3.3 +hwloc", type="build") + depends_on("m4", when="@3.3 +hwloc", type="build") + depends_on("autoconf@2.67:", when="@3.3 +hwloc", type="build") # MPICH's Yaksa submodule requires python to configure depends_on("python@3.0:", when="@develop", type="build") @@ -462,7 +462,7 @@ def setup_dependent_package(self, module, dependent_spec): def autoreconf(self, spec, prefix): """Not needed usually, configure should be already there""" # If configure exists nothing needs to be done - if os.path.exists(self.configure_abs_path) and not spec.satisfies("@3.3:3.3.99 +hwloc"): + if os.path.exists(self.configure_abs_path) and not spec.satisfies("@3.3 +hwloc"): return # Else bootstrap with autotools bash = which("bash") From abdac36fd5097e8ae6796d946e7c066dafe09ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= <15837247+mofeing@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:03:38 +0100 Subject: [PATCH 507/806] Add Python as build dependency of Julia (#40903) --- var/spack/repos/builtin/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 99e71f0b9a63f3..4115f148726d13 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -166,6 +166,7 @@ class Julia(MakefilePackage): depends_on("patchelf@0.13:", type="build") depends_on("perl", type="build") depends_on("libwhich", type="build") + depends_on("python", type="build") depends_on("blas") # note: for now openblas is fixed... depends_on("curl tls=mbedtls +nghttp2 +libssh2") From ab563c09d2162df0f8cc715952eaa264f29e8e6b Mon Sep 17 00:00:00 2001 From: AMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com> Date: Mon, 6 Nov 2023 22:50:19 +0530 Subject: [PATCH 508/806] enable threading in amdlibflame (#40852) Co-authored-by: vkallesh --- .../repos/builtin/packages/amdlibflame/package.py | 11 ++++++----- .../repos/builtin/packages/amdlibflame/supermat.patch | 11 +++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 var/spack/repos/builtin/packages/amdlibflame/supermat.patch diff --git a/var/spack/repos/builtin/packages/amdlibflame/package.py b/var/spack/repos/builtin/packages/amdlibflame/package.py index d8e06c6b43727c..e1b96e042e02a9 100644 --- a/var/spack/repos/builtin/packages/amdlibflame/package.py +++ b/var/spack/repos/builtin/packages/amdlibflame/package.py @@ -59,10 +59,11 @@ class Amdlibflame(LibflameBase): conflicts("+ilp64", when="@:3.0.0", msg="ILP64 is supported from 3.0.1 onwards") conflicts("threads=pthreads", msg="pthread is not supported") - conflicts("threads=openmp", msg="openmp is not supported") + conflicts("threads=openmp", when="@:3", msg="openmp is not supported by amdlibflame < 4.0") patch("aocc-2.2.0.patch", when="@:2", level=1) patch("cray-compiler-wrapper.patch", when="@:3.0.0", level=1) + patch("supermat.patch", when="@4.0:4.1", level=1) provides("flame@5.2", when="@2:") @@ -109,13 +110,13 @@ def configure_args(self): ) # From 3.2 version, amd optimized flags are encapsulated under: - # enable-amd-flags for gcc compiler - # enable-amd-aocc-flags for aocc compiler + # enable-amd-aocc-flags for AOCC compiler + # enable-amd-flags for all other compilers if "@3.2:" in self.spec: - if "%gcc" in self.spec: - args.append("--enable-amd-flags") if "%aocc" in self.spec: args.append("--enable-amd-aocc-flags") + else: + args.append("--enable-amd-flags") if "@:3.1" in self.spec: args.append("--enable-external-lapack-interfaces") diff --git a/var/spack/repos/builtin/packages/amdlibflame/supermat.patch b/var/spack/repos/builtin/packages/amdlibflame/supermat.patch new file mode 100644 index 00000000000000..374ffa3dc34e44 --- /dev/null +++ b/var/spack/repos/builtin/packages/amdlibflame/supermat.patch @@ -0,0 +1,11 @@ +diff --git a/src/map/lapack2flamec/FLA_getrf.c b/src/map/lapack2flamec/FLA_getrf.c +index af70857e..1ffc63a1 100644 +--- a/src/map/lapack2flamec/FLA_getrf.c ++++ b/src/map/lapack2flamec/FLA_getrf.c +@@ -232,6 +232,7 @@ extern fla_context global_context; + + #else /* FLA_ENABLE_SUPERMATRIX */ + ++#define LAPACK_getrf_body_s LAPACK_getrf_body + #define LAPACK_getrf_body_d LAPACK_getrf_body + #define LAPACK_getrf_body_z LAPACK_getrf_body From c6c689be286a22fa5e7de6a31881961688612245 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 6 Nov 2023 18:33:23 +0100 Subject: [PATCH 509/806] pythia8: fix configure args (#40644) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/pythia8/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py index af355588a891f2..f7ef4ad30bdf5d 100644 --- a/var/spack/repos/builtin/packages/pythia8/package.py +++ b/var/spack/repos/builtin/packages/pythia8/package.py @@ -131,16 +131,16 @@ def configure_args(self): args.append("--with-boost=" + self.spec["boost"].prefix) if "+madgraph5amc" in self.spec: - args += "--with-mg5mes=" + self.spec["madgraph5amc"].prefix + args.append("--with-mg5mes=" + self.spec["madgraph5amc"].prefix) else: - args += "--without-mg5mes" + args.append("--without-mg5mes") args += self.with_or_without("hepmc3", activation_value="prefix") if "+fastjet" in self.spec: - args += "--with-fastjet3=" + self.spec["fastjet"].prefix + args.append("--with-fastjet3=" + self.spec["fastjet"].prefix) else: - args += "--without-fastjet3" + args.append("--without-fastjet3") args += self.with_or_without("evtgen", activation_value="prefix") args += self.with_or_without("root", activation_value="prefix") From 17a9198c78a3ef014242e351ce2ba31e3dccfee7 Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Mon, 6 Nov 2023 09:48:28 -0800 Subject: [PATCH 510/806] Environments: remove environments created with SpackYAMLErrors (#40878) --- lib/spack/spack/cmd/env.py | 4 +- lib/spack/spack/environment/__init__.py | 2 + lib/spack/spack/environment/environment.py | 14 ++++- lib/spack/spack/test/cmd/env.py | 69 ++++++++++++++++------ 4 files changed, 68 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index bf1f29d5584f89..bb1ad13ec2b985 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -402,7 +402,7 @@ def env_remove(args): try: env = ev.read(env_name) read_envs.append(env) - except spack.config.ConfigFormatError: + except (spack.config.ConfigFormatError, ev.SpackEnvironmentConfigError): bad_envs.append(env_name) if not args.yes_to_all: @@ -570,8 +570,8 @@ def env_update_setup_parser(subparser): def env_update(args): manifest_file = ev.manifest_file(args.update_env) backup_file = manifest_file + ".bkp" - needs_update = not ev.is_latest_format(manifest_file) + needs_update = not ev.is_latest_format(manifest_file) if not needs_update: tty.msg('No update needed for the environment "{0}"'.format(args.update_env)) return diff --git a/lib/spack/spack/environment/__init__.py b/lib/spack/spack/environment/__init__.py index ac598e8421d2ad..2f293d9eb8f81b 100644 --- a/lib/spack/spack/environment/__init__.py +++ b/lib/spack/spack/environment/__init__.py @@ -339,6 +339,7 @@ from .environment import ( TOP_LEVEL_KEY, Environment, + SpackEnvironmentConfigError, SpackEnvironmentError, SpackEnvironmentViewError, activate, @@ -372,6 +373,7 @@ __all__ = [ "TOP_LEVEL_KEY", "Environment", + "SpackEnvironmentConfigError", "SpackEnvironmentError", "SpackEnvironmentViewError", "activate", diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index ab6fef6fc016d2..8ddd7f8d3bc2fb 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -342,7 +342,7 @@ def create_in_dir( manifest.flush() - except spack.config.ConfigFormatError as e: + except (spack.config.ConfigFormatError, SpackEnvironmentConfigError) as e: shutil.rmtree(manifest_dir) raise e @@ -396,7 +396,13 @@ def all_environments(): def _read_yaml(str_or_file): """Read YAML from a file for round-trip parsing.""" - data = syaml.load_config(str_or_file) + try: + data = syaml.load_config(str_or_file) + except syaml.SpackYAMLError as e: + raise SpackEnvironmentConfigError( + f"Invalid environment configuration detected: {e.message}" + ) + filename = getattr(str_or_file, "name", None) default_data = spack.config.validate(data, spack.schema.env.schema, filename) return data, default_data @@ -2960,3 +2966,7 @@ class SpackEnvironmentError(spack.error.SpackError): class SpackEnvironmentViewError(SpackEnvironmentError): """Class for errors regarding view generation.""" + + +class SpackEnvironmentConfigError(SpackEnvironmentError): + """Class for Spack environment-specific configuration errors.""" diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index e291432a0fbe83..a06fdbd8cf8b2f 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -1006,21 +1006,7 @@ def test_env_with_included_configs_precedence(tmp_path): assert any(x.satisfies("libelf@0.8.10") for x in specs) -def test_bad_env_yaml_format(environment_from_manifest): - with pytest.raises(spack.config.ConfigFormatError) as e: - environment_from_manifest( - """\ -spack: - spacks: - - mpileaks -""" - ) - - assert "'spacks' was unexpected" in str(e) - - assert "test" not in env("list") - - +@pytest.mark.regression("39248") def test_bad_env_yaml_format_remove(mutable_mock_env_path): badenv = "badenv" env("create", badenv) @@ -1037,6 +1023,55 @@ def test_bad_env_yaml_format_remove(mutable_mock_env_path): assert badenv not in env("list") +@pytest.mark.regression("39248") +@pytest.mark.parametrize( + "error,message,contents", + [ + ( + spack.config.ConfigFormatError, + "not of type", + """\ +spack: + specs: mpi@2.0 +""", + ), + ( + ev.SpackEnvironmentConfigError, + "duplicate key", + """\ +spack: + packages: + all: + providers: + mpi: [mvapich2] + mpi: [mpich] +""", + ), + ( + spack.config.ConfigFormatError, + "'specks' was unexpected", + """\ +spack: + specks: + - libdwarf +""", + ), + ], +) +def test_bad_env_yaml_create_fails(tmp_path, mutable_mock_env_path, error, message, contents): + """Ensure creation with invalid yaml does NOT create or leave the environment.""" + filename = tmp_path / ev.manifest_name + filename.write_text(contents) + env_name = "bad_env" + with pytest.raises(error, match=message): + env("create", env_name, str(filename)) + + assert env_name not in env("list") + manifest = mutable_mock_env_path / env_name / ev.manifest_name + assert not os.path.exists(str(manifest)) + + +@pytest.mark.regression("39248") @pytest.mark.parametrize("answer", ["-y", ""]) def test_multi_env_remove(mutable_mock_env_path, monkeypatch, answer): """Test removal (or not) of a valid and invalid environment""" @@ -1048,7 +1083,7 @@ def test_multi_env_remove(mutable_mock_env_path, monkeypatch, answer): env("create", e) # Ensure the bad environment contains invalid yaml - filename = mutable_mock_env_path / environments[1] / "spack.yaml" + filename = mutable_mock_env_path / environments[1] / ev.manifest_name filename.write_text( """\ - libdwarf @@ -1064,7 +1099,7 @@ def test_multi_env_remove(mutable_mock_env_path, monkeypatch, answer): if remove_environment is True: # Successfully removed (and reported removal) of *both* environments assert not all(e in env("list") for e in environments) - assert output.count("Successfully removed") == 2 + assert output.count("Successfully removed") == len(environments) else: # Not removing any of the environments assert all(e in env("list") for e in environments) From d3d82e8d6b68ba079659549dd60f9fb26fb646e8 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 6 Nov 2023 18:48:42 +0100 Subject: [PATCH 511/806] c-blosc2: add v2.11.1 (#40889) --- var/spack/repos/builtin/packages/c-blosc2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/c-blosc2/package.py b/var/spack/repos/builtin/packages/c-blosc2/package.py index 8eceeca8952917..4b745f426f1093 100644 --- a/var/spack/repos/builtin/packages/c-blosc2/package.py +++ b/var/spack/repos/builtin/packages/c-blosc2/package.py @@ -17,6 +17,7 @@ class CBlosc2(CMakePackage): maintainers("ax3l", "robert-mijakovic") version("develop", branch="master") + version("2.11.1", sha256="1e9923e0f026eb6e6caee608b4b9a523837806076fc79409055a6386cf5de1ea") version("2.10.5", sha256="a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d") # 2.10.2+ fixes regressions with external dependencies version("2.10.2", sha256="069785bc14c006c7dab40ea0c620bdf3eb8752663fd55c706d145bceabc2a31d") From b5538960c325a849bddc35506e4c219cee40a1d8 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Mon, 6 Nov 2023 09:55:21 -0800 Subject: [PATCH 512/806] error messages: condition chaining (#40173) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create chains of causation for error messages. The current implementation is only completed for some of the many errors presented by the concretizer. The rest will need to be filled out over time, but this demonstrates the capability. The basic idea is to associate conditions in the solver with one another in causal relationships, and to associate errors with the proximate causes of their facts in the condition graph. Then we can construct causal trees to explain errors, which will hopefully present users with useful information to avoid the error or report issues. Technically, this is implemented as a secondary solve. The concretizer computes the optimal model, and if the optimal model contains an error, then a secondary solve computes causation information about the error(s) in the concretizer output. Examples: $ spack solve hdf5 ^cmake@3.0.1 ==> Error: concretization failed for the following reasons: 1. Cannot satisfy 'cmake@3.0.1' 2. Cannot satisfy 'cmake@3.0.1' required because hdf5 ^cmake@3.0.1 requested from CLI 3. Cannot satisfy 'cmake@3.18:' and 'cmake@3.0.1 required because hdf5 ^cmake@3.0.1 requested from CLI required because hdf5 depends on cmake@3.18: when @1.13: required because hdf5 ^cmake@3.0.1 requested from CLI 4. Cannot satisfy 'cmake@3.12:' and 'cmake@3.0.1 required because hdf5 depends on cmake@3.12: required because hdf5 ^cmake@3.0.1 requested from CLI required because hdf5 ^cmake@3.0.1 requested from CLI $ spack spec cmake ^curl~ldap # <-- with curl configured non-buildable and an external with `+ldap` ==> Error: concretization failed for the following reasons: 1. Attempted to use external for 'curl' which does not satisfy any configured external spec 2. Attempted to build package curl which is not buildable and does not have a satisfying external attr('variant_value', 'curl', 'ldap', 'True') is an external constraint for curl which was not satisfied 3. Attempted to build package curl which is not buildable and does not have a satisfying external attr('variant_value', 'curl', 'gssapi', 'True') is an external constraint for curl which was not satisfied 4. Attempted to build package curl which is not buildable and does not have a satisfying external 'curl+ldap' is an external constraint for curl which was not satisfied 'curl~ldap' required required because cmake ^curl~ldap requested from CLI $ spack solve yambo+mpi ^hdf5~mpi ==> Error: concretization failed for the following reasons: 1. 'hdf5' required multiple values for single-valued variant 'mpi' 2. 'hdf5' required multiple values for single-valued variant 'mpi' Requested '~mpi' and '+mpi' required because yambo depends on hdf5+mpi when +mpi required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo+mpi ^hdf5~mpi requested from CLI 3. 'hdf5' required multiple values for single-valued variant 'mpi' Requested '~mpi' and '+mpi' required because netcdf-c depends on hdf5+mpi when +mpi required because netcdf-fortran depends on netcdf-c required because yambo depends on netcdf-fortran required because yambo+mpi ^hdf5~mpi requested from CLI required because netcdf-fortran depends on netcdf-c@4.7.4: when @4.5.3: required because yambo depends on netcdf-fortran required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo depends on netcdf-c required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo depends on netcdf-c+mpi when +mpi required because yambo+mpi ^hdf5~mpi requested from CLI required because yambo+mpi ^hdf5~mpi requested from CLI Future work: In addition to fleshing out the causes of other errors, I would like to find a way to associate different components of the error messages with different causes. In this example it's pretty easy to infer which part is which, but I'm not confident that will always be the case. See the previous PR #34500 for discussion of how the condition chains are incomplete. In the future, we may need custom logic for individual attributes to associate some important choice rules with conditions such that clingo choices or other derivations can be part of the explanation. --------- Co-authored-by: Massimiliano Culpo --- lib/spack/spack/solver/asp.py | 251 ++++++++++++++++++---- lib/spack/spack/solver/concretize.lp | 117 +++++----- lib/spack/spack/solver/display.lp | 25 +++ lib/spack/spack/solver/error_messages.lp | 239 ++++++++++++++++++++ lib/spack/spack/solver/heuristic.lp | 5 - lib/spack/spack/test/concretize_errors.py | 68 ++++++ 6 files changed, 592 insertions(+), 113 deletions(-) create mode 100644 lib/spack/spack/solver/error_messages.lp create mode 100644 lib/spack/spack/test/concretize_errors.py diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 63e32a757692c1..6df9a3583ee34e 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -8,11 +8,12 @@ import enum import itertools import os +import pathlib import pprint import re import types import warnings -from typing import Dict, List, NamedTuple, Optional, Sequence, Tuple, Union +from typing import Callable, Dict, List, NamedTuple, Optional, Sequence, Set, Tuple, Union import archspec.cpu @@ -337,6 +338,13 @@ def __getattr__(self, name): fn = AspFunctionBuilder() +TransformFunction = Callable[[spack.spec.Spec, List[AspFunction]], List[AspFunction]] + + +def remove_node(spec: spack.spec.Spec, facts: List[AspFunction]) -> List[AspFunction]: + """Transformation that removes all "node" and "virtual_node" from the input list of facts.""" + return list(filter(lambda x: x.args[0] not in ("node", "virtual_node"), facts)) + def _create_counter(specs, tests): strategy = spack.config.CONFIG.get("concretizer:duplicates:strategy", "none") @@ -684,7 +692,7 @@ def extract_args(model, predicate_name): class ErrorHandler: def __init__(self, model): self.model = model - self.error_args = extract_args(model, "error") + self.full_model = None def multiple_values_error(self, attribute, pkg): return f'Cannot select a single "{attribute}" for package "{pkg}"' @@ -692,6 +700,48 @@ def multiple_values_error(self, attribute, pkg): def no_value_error(self, attribute, pkg): return f'Cannot select a single "{attribute}" for package "{pkg}"' + def _get_cause_tree( + self, + cause: Tuple[str, str], + conditions: Dict[str, str], + condition_causes: List[Tuple[Tuple[str, str], Tuple[str, str]]], + seen: Set, + indent: str = " ", + ) -> List[str]: + """ + Implementation of recursion for self.get_cause_tree. Much of this operates on tuples + (condition_id, set_id) in which the latter idea means that the condition represented by + the former held in the condition set represented by the latter. + """ + seen = set(seen) | set(cause) + parents = [c for e, c in condition_causes if e == cause and c not in seen] + local = "required because %s " % conditions[cause[0]] + + return [indent + local] + [ + c + for parent in parents + for c in self._get_cause_tree( + parent, conditions, condition_causes, seen, indent=indent + " " + ) + ] + + def get_cause_tree(self, cause: Tuple[str, str]) -> List[str]: + """ + Get the cause tree associated with the given cause. + + Arguments: + cause: The root cause of the tree (final condition) + + Returns: + A list of strings describing the causes, formatted to display tree structure. + """ + conditions: Dict[str, str] = dict(extract_args(self.full_model, "condition_reason")) + condition_causes: List[Tuple[Tuple[str, str], Tuple[str, str]]] = list( + ((Effect, EID), (Cause, CID)) + for Effect, EID, Cause, CID in extract_args(self.full_model, "condition_cause") + ) + return self._get_cause_tree(cause, conditions, condition_causes, set()) + def handle_error(self, msg, *args): """Handle an error state derived by the solver.""" if msg == "multiple_values_error": @@ -700,14 +750,31 @@ def handle_error(self, msg, *args): if msg == "no_value_error": return self.no_value_error(*args) + try: + idx = args.index("startcauses") + except ValueError: + msg_args = args + causes = [] + else: + msg_args = args[:idx] + cause_args = args[idx + 1 :] + cause_args_conditions = cause_args[::2] + cause_args_ids = cause_args[1::2] + causes = list(zip(cause_args_conditions, cause_args_ids)) + + msg = msg.format(*msg_args) + # For variant formatting, we sometimes have to construct specs # to format values properly. Find/replace all occurances of # Spec(...) with the string representation of the spec mentioned - msg = msg.format(*args) specs_to_construct = re.findall(r"Spec\(([^)]*)\)", msg) for spec_str in specs_to_construct: msg = msg.replace("Spec(%s)" % spec_str, str(spack.spec.Spec(spec_str))) + for cause in set(causes): + for c in self.get_cause_tree(cause): + msg += f"\n{c}" + return msg def message(self, errors) -> str: @@ -719,11 +786,31 @@ def message(self, errors) -> str: return "\n".join([header] + messages) def raise_if_errors(self): - if not self.error_args: + initial_error_args = extract_args(self.model, "error") + if not initial_error_args: return + error_causation = clingo.Control() + + parent_dir = pathlib.Path(__file__).parent + errors_lp = parent_dir / "error_messages.lp" + + def on_model(model): + self.full_model = model.symbols(shown=True, terms=True) + + with error_causation.backend() as backend: + for atom in self.model: + atom_id = backend.add_atom(atom) + backend.add_rule([atom_id], [], choice=False) + + error_causation.load(str(errors_lp)) + error_causation.ground([("base", []), ("error_messages", [])]) + _ = error_causation.solve(on_model=on_model) + + # No choices so there will be only one model + error_args = extract_args(self.full_model, "error") errors = sorted( - [(int(priority), msg, args) for priority, msg, *args in self.error_args], reverse=True + [(int(priority), msg, args) for priority, msg, *args in error_args], reverse=True ) msg = self.message(errors) raise UnsatisfiableSpecError(msg) @@ -924,7 +1011,7 @@ def on_model(model): if sym.name not in ("attr", "error", "opt_criterion"): tty.debug( "UNKNOWN SYMBOL: %s(%s)" - % (sym.name, ", ".join(intermediate_repr(sym.arguments))) + % (sym.name, ", ".join([str(s) for s in intermediate_repr(sym.arguments)])) ) elif cores: @@ -1116,7 +1203,7 @@ def conflict_rules(self, pkg): default_msg = "{0}: '{1}' conflicts with '{2}'" no_constraint_msg = "{0}: conflicts with '{1}'" for trigger, constraints in pkg.conflicts.items(): - trigger_msg = "conflict trigger %s" % str(trigger) + trigger_msg = f"conflict is triggered when {str(trigger)}" trigger_spec = spack.spec.Spec(trigger) trigger_id = self.condition( trigger_spec, name=trigger_spec.name or pkg.name, msg=trigger_msg @@ -1128,7 +1215,11 @@ def conflict_rules(self, pkg): conflict_msg = no_constraint_msg.format(pkg.name, trigger) else: conflict_msg = default_msg.format(pkg.name, trigger, constraint) - constraint_msg = "conflict constraint %s" % str(constraint) + + spec_for_msg = ( + spack.spec.Spec(pkg.name) if constraint == spack.spec.Spec() else constraint + ) + constraint_msg = f"conflict applies to spec {str(spec_for_msg)}" constraint_id = self.condition(constraint, name=pkg.name, msg=constraint_msg) self.gen.fact( fn.pkg_fact(pkg.name, fn.conflict(trigger_id, constraint_id, conflict_msg)) @@ -1310,7 +1401,7 @@ def trigger_rules(self): self.gen.h2("Trigger conditions") for name in self._trigger_cache: cache = self._trigger_cache[name] - for spec_str, (trigger_id, requirements) in cache.items(): + for (spec_str, _), (trigger_id, requirements) in cache.items(): self.gen.fact(fn.pkg_fact(name, fn.trigger_id(trigger_id))) self.gen.fact(fn.pkg_fact(name, fn.trigger_msg(spec_str))) for predicate in requirements: @@ -1323,7 +1414,7 @@ def effect_rules(self): self.gen.h2("Imposed requirements") for name in self._effect_cache: cache = self._effect_cache[name] - for spec_str, (effect_id, requirements) in cache.items(): + for (spec_str, _), (effect_id, requirements) in cache.items(): self.gen.fact(fn.pkg_fact(name, fn.effect_id(effect_id))) self.gen.fact(fn.pkg_fact(name, fn.effect_msg(spec_str))) for predicate in requirements: @@ -1422,18 +1513,26 @@ def variant_rules(self, pkg): self.gen.newline() - def condition(self, required_spec, imposed_spec=None, name=None, msg=None, node=False): + def condition( + self, + required_spec: spack.spec.Spec, + imposed_spec: Optional[spack.spec.Spec] = None, + name: Optional[str] = None, + msg: Optional[str] = None, + transform_required: Optional[TransformFunction] = None, + transform_imposed: Optional[TransformFunction] = remove_node, + ): """Generate facts for a dependency or virtual provider condition. Arguments: - required_spec (spack.spec.Spec): the spec that triggers this condition - imposed_spec (spack.spec.Spec or None): the spec with constraints that - are imposed when this condition is triggered - name (str or None): name for `required_spec` (required if - required_spec is anonymous, ignored if not) - msg (str or None): description of the condition - node (bool): if False does not emit "node" or "virtual_node" requirements - from the imposed spec + required_spec: the constraints that triggers this condition + imposed_spec: the constraints that are imposed when this condition is triggered + name: name for `required_spec` (required if required_spec is anonymous, ignored if not) + msg: description of the condition + transform_required: transformation applied to facts from the required spec. Defaults + to leave facts as they are. + transform_imposed: transformation applied to facts from the imposed spec. Defaults + to removing "node" and "virtual_node" facts. Returns: int: id of the condition created by this function """ @@ -1451,10 +1550,14 @@ def condition(self, required_spec, imposed_spec=None, name=None, msg=None, node= cache = self._trigger_cache[named_cond.name] - named_cond_key = str(named_cond) + named_cond_key = (str(named_cond), transform_required) if named_cond_key not in cache: trigger_id = next(self._trigger_id_counter) requirements = self.spec_clauses(named_cond, body=True, required_from=name) + + if transform_required: + requirements = transform_required(named_cond, requirements) + cache[named_cond_key] = (trigger_id, requirements) trigger_id, requirements = cache[named_cond_key] self.gen.fact(fn.pkg_fact(named_cond.name, fn.condition_trigger(condition_id, trigger_id))) @@ -1463,14 +1566,14 @@ def condition(self, required_spec, imposed_spec=None, name=None, msg=None, node= return condition_id cache = self._effect_cache[named_cond.name] - imposed_spec_key = str(imposed_spec) + imposed_spec_key = (str(imposed_spec), transform_imposed) if imposed_spec_key not in cache: effect_id = next(self._effect_id_counter) requirements = self.spec_clauses(imposed_spec, body=False, required_from=name) - if not node: - requirements = list( - filter(lambda x: x.args[0] not in ("node", "virtual_node"), requirements) - ) + + if transform_imposed: + requirements = transform_imposed(imposed_spec, requirements) + cache[imposed_spec_key] = (effect_id, requirements) effect_id, requirements = cache[imposed_spec_key] self.gen.fact(fn.pkg_fact(named_cond.name, fn.condition_effect(condition_id, effect_id))) @@ -1530,21 +1633,32 @@ def package_dependencies_rules(self, pkg): if not depflag: continue - msg = "%s depends on %s" % (pkg.name, dep.spec.name) + msg = f"{pkg.name} depends on {dep.spec}" if cond != spack.spec.Spec(): - msg += " when %s" % cond + msg += f" when {cond}" else: pass - condition_id = self.condition(cond, dep.spec, pkg.name, msg) - self.gen.fact( - fn.pkg_fact(pkg.name, fn.dependency_condition(condition_id, dep.spec.name)) - ) + def track_dependencies(input_spec, requirements): + return requirements + [fn.attr("track_dependencies", input_spec.name)] - for t in dt.ALL_FLAGS: - if t & depflag: - # there is a declared dependency of type t - self.gen.fact(fn.dependency_type(condition_id, dt.flag_to_string(t))) + def dependency_holds(input_spec, requirements): + return remove_node(input_spec, requirements) + [ + fn.attr( + "dependency_holds", pkg.name, input_spec.name, dt.flag_to_string(t) + ) + for t in dt.ALL_FLAGS + if t & depflag + ] + + self.condition( + cond, + dep.spec, + name=pkg.name, + msg=msg, + transform_required=track_dependencies, + transform_imposed=dependency_holds, + ) self.gen.newline() @@ -1639,8 +1753,17 @@ def emit_facts_from_requirement_rules(self, rules: List[RequirementRule]): when_spec = spack.spec.Spec(pkg_name) try: + # With virtual we want to emit "node" and "virtual_node" in imposed specs + transform: Optional[TransformFunction] = remove_node + if virtual: + transform = None + member_id = self.condition( - required_spec=when_spec, imposed_spec=spec, name=pkg_name, node=virtual + required_spec=when_spec, + imposed_spec=spec, + name=pkg_name, + transform_imposed=transform, + msg=f"{spec_str} is a requirement for package {pkg_name}", ) except Exception as e: # Do not raise if the rule comes from the 'all' subsection, since usability @@ -1703,8 +1826,16 @@ def external_packages(self): # Declare external conditions with a local index into packages.yaml for local_idx, spec in enumerate(external_specs): msg = "%s available as external when satisfying %s" % (spec.name, spec) - condition_id = self.condition(spec, msg=msg) - self.gen.fact(fn.pkg_fact(pkg_name, fn.possible_external(condition_id, local_idx))) + + def external_imposition(input_spec, _): + return [fn.attr("external_conditions_hold", input_spec.name, local_idx)] + + self.condition( + spec, + spack.spec.Spec(spec.name), + msg=msg, + transform_imposed=external_imposition, + ) self.possible_versions[spec.name].add(spec.version) self.gen.newline() @@ -1918,6 +2049,7 @@ class Body: if not body: for virtual in virtuals: clauses.append(fn.attr("provider_set", spec.name, virtual)) + clauses.append(fn.attr("virtual_node", virtual)) else: for virtual in virtuals: clauses.append(fn.attr("virtual_on_incoming_edges", spec.name, virtual)) @@ -2555,20 +2687,45 @@ def setup( self.define_target_constraints() def literal_specs(self, specs): - for idx, spec in enumerate(specs): + for spec in specs: self.gen.h2("Spec: %s" % str(spec)) - self.gen.fact(fn.literal(idx)) + condition_id = next(self._condition_id_counter) + trigger_id = next(self._trigger_id_counter) - self.gen.fact(fn.literal(idx, "virtual_root" if spec.virtual else "root", spec.name)) - for clause in self.spec_clauses(spec): - self.gen.fact(fn.literal(idx, *clause.args)) - if clause.args[0] == "variant_set": - self.gen.fact( - fn.literal(idx, "variant_default_value_from_cli", *clause.args[1:]) + # Special condition triggered by "literal_solved" + self.gen.fact(fn.literal(trigger_id)) + self.gen.fact(fn.pkg_fact(spec.name, fn.condition_trigger(condition_id, trigger_id))) + self.gen.fact(fn.condition_reason(condition_id, f"{spec} requested from CLI")) + + # Effect imposes the spec + imposed_spec_key = str(spec), None + cache = self._effect_cache[spec.name] + msg = ( + "literal specs have different requirements. clear cache before computing literals" + ) + assert imposed_spec_key not in cache, msg + effect_id = next(self._effect_id_counter) + requirements = self.spec_clauses(spec) + root_name = spec.name + for clause in requirements: + clause_name = clause.args[0] + if clause_name == "variant_set": + requirements.append( + fn.attr("variant_default_value_from_cli", *clause.args[1:]) ) + elif clause_name in ("node", "virtual_node", "hash"): + # These facts are needed to compute the "condition_set" of the root + pkg_name = clause.args[1] + self.gen.fact(fn.mentioned_in_literal(trigger_id, root_name, pkg_name)) + + requirements.append(fn.attr("virtual_root" if spec.virtual else "root", spec.name)) + cache[imposed_spec_key] = (effect_id, requirements) + self.gen.fact(fn.pkg_fact(spec.name, fn.condition_effect(condition_id, effect_id))) if self.concretize_everything: - self.gen.fact(fn.solve_literal(idx)) + self.gen.fact(fn.solve_literal(trigger_id)) + + self.effect_rules() def validate_and_define_versions_from_requirements( self, *, allow_deprecated: bool, require_checksum: bool diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 340e1b04ee29c5..0b2b83dc202965 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -10,9 +10,8 @@ % ID of the nodes in the "root" link-run sub-DAG #const min_dupe_id = 0. -#const link_run = 0. -#const direct_link_run =1. -#const direct_build = 2. +#const direct_link_run = 0. +#const direct_build = 1. % Allow clingo to create nodes { attr("node", node(0..X-1, Package)) } :- max_dupes(Package, X), not virtual(Package). @@ -30,23 +29,21 @@ :- attr("variant_value", PackageNode, _, _), not attr("node", PackageNode). :- attr("node_flag_compiler_default", PackageNode), not attr("node", PackageNode). :- attr("node_flag", PackageNode, _, _), not attr("node", PackageNode). -:- attr("node_flag_source", PackageNode, _, _), not attr("node", PackageNode). :- attr("no_flags", PackageNode, _), not attr("node", PackageNode). :- attr("external_spec_selected", PackageNode, _), not attr("node", PackageNode). :- attr("depends_on", ParentNode, _, _), not attr("node", ParentNode). :- attr("depends_on", _, ChildNode, _), not attr("node", ChildNode). :- attr("node_flag_source", ParentNode, _, _), not attr("node", ParentNode). :- attr("node_flag_source", _, _, ChildNode), not attr("node", ChildNode). +:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode), internal_error("virtual node with no provider"). +:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode), internal_error("provider with no virtual node"). +:- provider(PackageNode, _), not attr("node", PackageNode), internal_error("provider with no real node"). -:- attr("virtual_node", VirtualNode), not provider(_, VirtualNode). -:- provider(_, VirtualNode), not attr("virtual_node", VirtualNode). -:- provider(PackageNode, _), not attr("node", PackageNode). - -:- attr("root", node(ID, PackageNode)), ID > min_dupe_id. +:- attr("root", node(ID, PackageNode)), ID > min_dupe_id, internal_error("root with a non-minimal duplicate ID"). % Nodes in the "root" unification set cannot depend on non-root nodes if the dependency is "link" or "run" -:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "link"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)). -:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "run"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)). +:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "link"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("link dependency out of the root unification set"). +:- attr("depends_on", node(min_dupe_id, Package), node(ID, _), "run"), ID != min_dupe_id, unification_set("root", node(min_dupe_id, Package)), internal_error("run dependency out of the root unification set"). % Rules on "unification sets", i.e. on sets of nodes allowing a single configuration of any given package unify(SetID, PackageName) :- unification_set(SetID, node(_, PackageName)). @@ -86,22 +83,24 @@ unification_set(SetID, VirtualNode) %---- % In the "root" unification set only ID = 0 are allowed -:- unification_set("root", node(ID, _)), ID != 0. +:- unification_set("root", node(ID, _)), ID != 0, internal_error("root unification set has node with non-zero unification set ID"). % In the "root" unification set we allow only packages from the link-run possible subDAG -:- unification_set("root", node(_, Package)), not possible_in_link_run(Package), not virtual(Package). +:- unification_set("root", node(_, Package)), not possible_in_link_run(Package), not virtual(Package), internal_error("package outside possible link/run graph in root unification set"). % Each node must belong to at least one unification set -:- attr("node", PackageNode), not unification_set(_, PackageNode). +:- attr("node", PackageNode), not unification_set(_, PackageNode), internal_error("node belongs to no unification set"). % Cannot have a node with an ID, if lower ID of the same package are not used :- attr("node", node(ID1, Package)), not attr("node", node(ID2, Package)), - max_dupes(Package, X), ID1=0..X-1, ID2=0..X-1, ID2 < ID1. + max_dupes(Package, X), ID1=0..X-1, ID2=0..X-1, ID2 < ID1, + internal_error("node skipped id number"). :- attr("virtual_node", node(ID1, Package)), not attr("virtual_node", node(ID2, Package)), - max_dupes(Package, X), ID1=0..X-1, ID2=0..X-1, ID2 < ID1. + max_dupes(Package, X), ID1=0..X-1, ID2=0..X-1, ID2 < ID1, + internal_error("virtual node skipped id number"). %----------------------------------------------------------------------------- % Map literal input specs to facts that drive the solve @@ -115,29 +114,28 @@ multiple_nodes_attribute("depends_on"). multiple_nodes_attribute("virtual_on_edge"). multiple_nodes_attribute("provider_set"). -% Map constraint on the literal ID to facts on the node -attr(Name, node(min_dupe_id, A1)) :- literal(LiteralID, Name, A1), solve_literal(LiteralID). -attr(Name, node(min_dupe_id, A1), A2) :- literal(LiteralID, Name, A1, A2), solve_literal(LiteralID), not multiple_nodes_attribute(Name). -attr(Name, node(min_dupe_id, A1), A2, A3) :- literal(LiteralID, Name, A1, A2, A3), solve_literal(LiteralID), not multiple_nodes_attribute(Name). -attr(Name, node(min_dupe_id, A1), A2, A3, A4) :- literal(LiteralID, Name, A1, A2, A3, A4), solve_literal(LiteralID). +trigger_condition_holds(TriggerID, node(min_dupe_id, Package)) :- + solve_literal(TriggerID), + pkg_fact(Package, condition_trigger(_, TriggerID)), + literal(TriggerID). -% Special cases where nodes occur in arguments other than A1 -attr("node_flag_source", node(min_dupe_id, A1), A2, node(min_dupe_id, A3)) :- literal(LiteralID, "node_flag_source", A1, A2, A3), solve_literal(LiteralID). -attr("depends_on", node(min_dupe_id, A1), node(min_dupe_id, A2), A3) :- literal(LiteralID, "depends_on", A1, A2, A3), solve_literal(LiteralID). +trigger_node(TriggerID, Node, Node) :- + trigger_condition_holds(TriggerID, Node), + literal(TriggerID). -attr("virtual_node", node(min_dupe_id, Virtual)) :- literal(LiteralID, "provider_set", _, Virtual), solve_literal(LiteralID). -attr("provider_set", node(min_dupe_id, Provider), node(min_dupe_id, Virtual)) :- literal(LiteralID, "provider_set", Provider, Virtual), solve_literal(LiteralID). -provider(node(min_dupe_id, Provider), node(min_dupe_id, Virtual)) :- literal(LiteralID, "provider_set", Provider, Virtual), solve_literal(LiteralID). +% Since we trigger the existence of literal nodes from a condition, we need to construct +% the condition_set/2 manually below +mentioned_in_literal(Root, Mentioned) :- mentioned_in_literal(TriggerID, Root, Mentioned), solve_literal(TriggerID). +condition_set(node(min_dupe_id, Root), node(min_dupe_id, Mentioned)) :- mentioned_in_literal(Root, Mentioned). % Discriminate between "roots" that have been explicitly requested, and roots that are deduced from "virtual roots" -explicitly_requested_root(node(min_dupe_id, A1)) :- literal(LiteralID, "root", A1), solve_literal(LiteralID). +explicitly_requested_root(node(min_dupe_id, Package)) :- + solve_literal(TriggerID), + trigger_and_effect(Package, TriggerID, EffectID), + imposed_constraint(EffectID, "root", Package). #defined concretize_everything/0. #defined literal/1. -#defined literal/3. -#defined literal/4. -#defined literal/5. -#defined literal/6. % Attributes for node packages which must have a single value attr_single_value("version"). @@ -235,7 +233,8 @@ possible_version_weight(node(ID, Package), Weight) 1 { version_weight(node(ID, Package), Weight) : pkg_fact(Package, version_declared(Version, Weight)) } 1 :- attr("version", node(ID, Package), Version), - attr("node", node(ID, Package)). + attr("node", node(ID, Package)), + internal_error("version weights must exist and be unique"). % node_version_satisfies implies that exactly one of the satisfying versions % is the package's version, and vice versa. @@ -249,7 +248,8 @@ possible_version_weight(node(ID, Package), Weight) % bound on the choice rule to avoid false positives with the error below 1 { attr("version", node(ID, Package), Version) : pkg_fact(Package, version_satisfies(Constraint, Version)) } :- attr("node_version_satisfies", node(ID, Package), Constraint), - pkg_fact(Package, version_satisfies(Constraint, _)). + pkg_fact(Package, version_satisfies(Constraint, _)), + internal_error("must choose a single version to satisfy version constraints"). % More specific error message if the version cannot satisfy some constraint % Otherwise covered by `no_version_error` and `versions_conflict_error`. @@ -362,7 +362,7 @@ imposed_nodes(ConditionID, PackageNode, node(X, A1)) % Conditions that hold impose may impose constraints on other specs attr(Name, node(X, A1)) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1), imposed_nodes(ID, PackageNode, node(X, A1)). -attr(Name, node(X, A1), A2) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1, A2), imposed_nodes(ID, PackageNode, node(X, A1)). +attr(Name, node(X, A1), A2) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1, A2), imposed_nodes(ID, PackageNode, node(X, A1)), not multiple_nodes_attribute(Name). attr(Name, node(X, A1), A2, A3) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1, A2, A3), imposed_nodes(ID, PackageNode, node(X, A1)), not multiple_nodes_attribute(Name). attr(Name, node(X, A1), A2, A3, A4) :- impose(ID, PackageNode), imposed_constraint(ID, Name, A1, A2, A3, A4), imposed_nodes(ID, PackageNode, node(X, A1)). @@ -373,6 +373,16 @@ attr("node_flag_source", node(X, A1), A2, node(Y, A3)) imposed_constraint(ID, "node_flag_source", A1, A2, A3), condition_set(node(Y, A3), node(X, A1)). +% Provider set is relevant only for literals, since it's the only place where `^[virtuals=foo] bar` +% might appear in the HEAD of a rule +attr("provider_set", node(min_dupe_id, Provider), node(min_dupe_id, Virtual)) + :- solve_literal(TriggerID), + trigger_and_effect(_, TriggerID, EffectID), + impose(EffectID, _), + imposed_constraint(EffectID, "provider_set", Provider, Virtual). + +provider(ProviderNode, VirtualNode) :- attr("provider_set", ProviderNode, VirtualNode). + % Here we can't use the condition set because it's a recursive definition, that doesn't define the % node index, and leads to unsatisfiability. Hence we say that one and only one node index must % satisfy the dependency. @@ -432,24 +442,11 @@ depends_on(PackageNode, DependencyNode) :- attr("depends_on", PackageNode, Depen % concrete. We chop off dependencies for externals, and dependencies of % concrete specs don't need to be resolved -- they arise from the concrete % specs themselves. -dependency_holds(node(NodeID, Package), Dependency, Type) :- - pkg_fact(Package, dependency_condition(ID, Dependency)), - dependency_type(ID, Type), - build(node(NodeID, Package)), - not external(node(NodeID, Package)), - condition_holds(ID, node(NodeID, Package)). - -% We cut off dependencies of externals (as we don't really know them). -% Don't impose constraints on dependencies that don't exist. -do_not_impose(EffectID, node(NodeID, Package)) :- - not dependency_holds(node(NodeID, Package), Dependency, _), - attr("node", node(NodeID, Package)), - pkg_fact(Package, dependency_condition(ID, Dependency)), - pkg_fact(Package, condition_effect(ID, EffectID)). +attr("track_dependencies", Node) :- build(Node), not external(Node). % If a dependency holds on a package node, there must be one and only one dependency node satisfying it 1 { attr("depends_on", PackageNode, node(0..Y-1, Dependency), Type) : max_dupes(Dependency, Y) } 1 - :- dependency_holds(PackageNode, Dependency, Type), + :- attr("dependency_holds", PackageNode, Dependency, Type), not virtual(Dependency). % all nodes in the graph must be reachable from some root @@ -499,7 +496,7 @@ error(100, "Package '{0}' needs to provide both '{1}' and '{2}' together, but pr % if a package depends on a virtual, it's not external and we have a % provider for that virtual then it depends on the provider node_depends_on_virtual(PackageNode, Virtual, Type) - :- dependency_holds(PackageNode, Virtual, Type), + :- attr("dependency_holds", PackageNode, Virtual, Type), virtual(Virtual), not external(PackageNode). @@ -509,7 +506,7 @@ node_depends_on_virtual(PackageNode, Virtual) :- node_depends_on_virtual(Package :- node_depends_on_virtual(PackageNode, Virtual, Type). attr("virtual_on_edge", PackageNode, ProviderNode, Virtual) - :- dependency_holds(PackageNode, Virtual, Type), + :- attr("dependency_holds", PackageNode, Virtual, Type), attr("depends_on", PackageNode, ProviderNode, Type), provider(ProviderNode, node(_, Virtual)), not external(PackageNode). @@ -624,11 +621,11 @@ possible_provider_weight(node(DependencyID, Dependency), VirtualNode, 100, "fall pkg_fact(Package, version_declared(Version, Weight, "external")) } :- external(node(ID, Package)). -error(100, "Attempted to use external for '{0}' which does not satisfy any configured external spec", Package) +error(100, "Attempted to use external for '{0}' which does not satisfy any configured external spec version", Package) :- external(node(ID, Package)), not external_version(node(ID, Package), _, _). -error(100, "Attempted to use external for '{0}' which does not satisfy any configured external spec", Package) +error(100, "Attempted to use external for '{0}' which does not satisfy a unique configured external spec version", Package) :- external(node(ID, Package)), 2 { external_version(node(ID, Package), Version, Weight) }. @@ -657,18 +654,15 @@ external(PackageNode) :- attr("external_spec_selected", PackageNode, _). % determine if an external spec has been selected attr("external_spec_selected", node(ID, Package), LocalIndex) :- - external_conditions_hold(node(ID, Package), LocalIndex), + attr("external_conditions_hold", node(ID, Package), LocalIndex), attr("node", node(ID, Package)), not attr("hash", node(ID, Package), _). -external_conditions_hold(node(PackageID, Package), LocalIndex) :- - pkg_fact(Package, possible_external(ID, LocalIndex)), condition_holds(ID, node(PackageID, Package)). - % it cannot happen that a spec is external, but none of the external specs % conditions hold. error(100, "Attempted to use external for '{0}' which does not satisfy any configured external spec", Package) :- external(node(ID, Package)), - not external_conditions_hold(node(ID, Package), _). + not attr("external_conditions_hold", node(ID, Package), _). %----------------------------------------------------------------------------- % Config required semantics @@ -887,8 +881,9 @@ variant_default_not_used(node(ID, Package), Variant, Value) % The variant is set in an external spec external_with_variant_set(node(NodeID, Package), Variant, Value) :- attr("variant_value", node(NodeID, Package), Variant, Value), - condition_requirement(ID, "variant_value", Package, Variant, Value), - pkg_fact(Package, possible_external(ID, _)), + condition_requirement(TriggerID, "variant_value", Package, Variant, Value), + trigger_and_effect(Package, TriggerID, EffectID), + imposed_constraint(EffectID, "external_conditions_hold", Package, _), external(node(NodeID, Package)), attr("node", node(NodeID, Package)). diff --git a/lib/spack/spack/solver/display.lp b/lib/spack/spack/solver/display.lp index fffffb2c0430bd..58d04d42ea3002 100644 --- a/lib/spack/spack/solver/display.lp +++ b/lib/spack/spack/solver/display.lp @@ -24,4 +24,29 @@ #show error/5. #show error/6. +% for error causation +#show condition_reason/2. + +% For error messages to use later +#show pkg_fact/2. +#show condition_holds/2. +#show imposed_constraint/3. +#show imposed_constraint/4. +#show imposed_constraint/5. +#show imposed_constraint/6. +#show condition_requirement/3. +#show condition_requirement/4. +#show condition_requirement/5. +#show condition_requirement/6. +#show node_has_variant/2. +#show build/1. +#show external/1. +#show external_version/3. +#show trigger_and_effect/3. +#show unification_set/2. +#show provider/2. +#show condition_nodes/3. +#show trigger_node/3. +#show imposed_nodes/3. + % debug diff --git a/lib/spack/spack/solver/error_messages.lp b/lib/spack/spack/solver/error_messages.lp new file mode 100644 index 00000000000000..7eb383860d8c75 --- /dev/null +++ b/lib/spack/spack/solver/error_messages.lp @@ -0,0 +1,239 @@ +% Copyright 2013-2023 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) + +%============================================================================= +% This logic program adds detailed error messages to Spack's concretizer +%============================================================================= + +#program error_messages. + +% Create a causal tree between trigger conditions by locating the effect conditions +% that are triggers for another condition. Condition2 is caused by Condition1 +condition_cause(Condition2, ID2, Condition1, ID1) :- + condition_holds(Condition2, node(ID2, Package2)), + pkg_fact(Package2, condition_trigger(Condition2, Trigger)), + condition_requirement(Trigger, Name, Package), + condition_nodes(Trigger, TriggerNode, node(ID, Package)), + trigger_node(Trigger, TriggerNode, node(ID2, Package2)), + attr(Name, node(ID, Package)), + condition_holds(Condition1, node(ID1, Package1)), + pkg_fact(Package1, condition_effect(Condition1, Effect)), + imposed_constraint(Effect, Name, Package), + imposed_nodes(Effect, node(ID1, Package1), node(ID, Package)). + +condition_cause(Condition2, ID2, Condition1, ID1) :- + condition_holds(Condition2, node(ID2, Package2)), + pkg_fact(Package2, condition_trigger(Condition2, Trigger)), + condition_requirement(Trigger, Name, Package, A1), + condition_nodes(Trigger, TriggerNode, node(ID, Package)), + trigger_node(Trigger, TriggerNode, node(ID2, Package2)), + attr(Name, node(ID, Package), A1), + condition_holds(Condition1, node(ID1, Package1)), + pkg_fact(Package1, condition_effect(Condition1, Effect)), + imposed_constraint(Effect, Name, Package, A1), + imposed_nodes(Effect, node(ID1, Package1), node(ID, Package)). + +condition_cause(Condition2, ID2, Condition1, ID1) :- + condition_holds(Condition2, node(ID2, Package2)), + pkg_fact(Package2, condition_trigger(Condition2, Trigger)), + condition_requirement(Trigger, Name, Package, A1, A2), + condition_nodes(Trigger, TriggerNode, node(ID, Package)), + trigger_node(Trigger, TriggerNode, node(ID2, Package2)), + attr(Name, node(ID, Package), A1, A2), + condition_holds(Condition1, node(ID1, Package1)), + pkg_fact(Package1, condition_effect(Condition1, Effect)), + imposed_constraint(Effect, Name, Package, A1, A2), + imposed_nodes(Effect, node(ID1, Package1), node(ID, Package)). + +condition_cause(Condition2, ID2, Condition1, ID1) :- + condition_holds(Condition2, node(ID2, Package2)), + pkg_fact(Package2, condition_trigger(Condition2, Trigger)), + condition_requirement(Trigger, Name, Package, A1, A2, A3), + condition_nodes(Trigger, TriggerNode, node(ID, Package)), + trigger_node(Trigger, TriggerNode, node(ID2, Package2)), + attr(Name, node(ID, Package), A1, A2, A3), + condition_holds(Condition1, node(ID1, Package1)), + pkg_fact(Package1, condition_effect(Condition1, Effect)), + imposed_constraint(Effect, Name, Package, A1, A2, A3), + imposed_nodes(Effect, node(ID1, Package1), node(ID, Package)). + +% special condition cause for dependency conditions +% we can't simply impose the existence of the node for dependency conditions +% because we need to allow for the choice of which dupe ID the node gets +condition_cause(Condition2, ID2, Condition1, ID1) :- + condition_holds(Condition2, node(ID2, Package2)), + pkg_fact(Package2, condition_trigger(Condition2, Trigger)), + condition_requirement(Trigger, "node", Package), + condition_nodes(Trigger, TriggerNode, node(ID, Package)), + trigger_node(Trigger, TriggerNode, node(ID2, Package2)), + attr("node", node(ID, Package)), + condition_holds(Condition1, node(ID1, Package1)), + pkg_fact(Package1, condition_effect(Condition1, Effect)), + imposed_constraint(Effect, "dependency_holds", Parent, Package, Type), + imposed_nodes(Effect, node(ID1, Package1), node(ID, Package)), + attr("depends_on", node(X, Parent), node(ID, Package), Type). + +% The literal startcauses is used to separate the variables that are part of the error from the +% ones describing the causal tree of the error. After startcauses, each successive pair must be +% a condition and a condition_set id for which it holds. + +% More specific error message if the version cannot satisfy some constraint +% Otherwise covered by `no_version_error` and `versions_conflict_error`. +error(1, "Cannot satisfy '{0}@{1}'", Package, Constraint, startcauses, ConstraintCause, CauseID) + :- attr("node_version_satisfies", node(ID, Package), Constraint), + pkg_fact(TriggerPkg, condition_effect(ConstraintCause, EffectID)), + imposed_constraint(EffectID, "node_version_satisfies", Package, Constraint), + condition_holds(ConstraintCause, node(CauseID, TriggerPkg)), + attr("version", node(ID, Package), Version), + not pkg_fact(Package, version_satisfies(Constraint, Version)). + +error(0, "Cannot satisfy '{0}@{1}' and '{0}@{2}", Package, Constraint1, Constraint2, startcauses, Cause1, C1ID, Cause2, C2ID) + :- attr("node_version_satisfies", node(ID, Package), Constraint1), + pkg_fact(TriggerPkg1, condition_effect(Cause1, EffectID1)), + imposed_constraint(EffectID1, "node_version_satisfies", Package, Constraint1), + condition_holds(Cause1, node(C1ID, TriggerPkg1)), + % two constraints + attr("node_version_satisfies", node(ID, Package), Constraint2), + pkg_fact(TriggerPkg2, condition_effect(Cause2, EffectID2)), + imposed_constraint(EffectID2, "node_version_satisfies", Package, Constraint2), + condition_holds(Cause2, node(C2ID, TriggerPkg2)), + % version chosen + attr("version", node(ID, Package), Version), + % version satisfies one but not the other + pkg_fact(Package, version_satisfies(Constraint1, Version)), + not pkg_fact(Package, version_satisfies(Constraint2, Version)). + +% causation tracking error for no or multiple virtual providers +error(0, "Cannot find a valid provider for virtual {0}", Virtual, startcauses, Cause, CID) + :- attr("virtual_node", node(X, Virtual)), + not provider(_, node(X, Virtual)), + imposed_constraint(EID, "dependency_holds", Parent, Virtual, Type), + pkg_fact(TriggerPkg, condition_effect(Cause, EID)), + condition_holds(Cause, node(CID, TriggerPkg)). + + +% At most one variant value for single-valued variants +error(0, "'{0}' required multiple values for single-valued variant '{1}'\n Requested 'Spec({1}={2})' and 'Spec({1}={3})'", Package, Variant, Value1, Value2, startcauses, Cause1, X, Cause2, X) + :- attr("node", node(X, Package)), + node_has_variant(node(X, Package), Variant), + pkg_fact(Package, variant_single_value(Variant)), + build(node(X, Package)), + attr("variant_value", node(X, Package), Variant, Value1), + imposed_constraint(EID1, "variant_set", Package, Variant, Value1), + pkg_fact(TriggerPkg1, condition_effect(Cause1, EID1)), + condition_holds(Cause1, node(X, TriggerPkg1)), + attr("variant_value", node(X, Package), Variant, Value2), + imposed_constraint(EID2, "variant_set", Package, Variant, Value2), + pkg_fact(TriggerPkg2, condition_effect(Cause2, EID2)), + condition_holds(Cause2, node(X, TriggerPkg2)), + Value1 < Value2. % see[1] in concretize.lp + +% Externals have to specify external conditions +error(0, "Attempted to use external for {0} which does not satisfy any configured external spec version", Package, startcauses, ExternalCause, CID) + :- external(node(ID, Package)), + attr("external_spec_selected", node(ID, Package), Index), + imposed_constraint(EID, "external_conditions_hold", Package, Index), + pkg_fact(TriggerPkg, condition_effect(ExternalCause, EID)), + condition_holds(ExternalCause, node(CID, TriggerPkg)), + not external_version(node(ID, Package), _, _). + +error(0, "Attempted to build package {0} which is not buildable and does not have a satisfying external\n attr('{1}', '{2}') is an external constraint for {0} which was not satisfied", Package, Name, A1) + :- external(node(ID, Package)), + not attr("external_conditions_hold", node(ID, Package), _), + imposed_constraint(EID, "external_conditions_hold", Package, _), + trigger_and_effect(Package, TID, EID), + condition_requirement(TID, Name, A1), + not attr(Name, node(_, A1)). + +error(0, "Attempted to build package {0} which is not buildable and does not have a satisfying external\n attr('{1}', '{2}', '{3}') is an external constraint for {0} which was not satisfied", Package, Name, A1, A2) + :- external(node(ID, Package)), + not attr("external_conditions_hold", node(ID, Package), _), + imposed_constraint(EID, "external_conditions_hold", Package, _), + trigger_and_effect(Package, TID, EID), + condition_requirement(TID, Name, A1, A2), + not attr(Name, node(_, A1), A2). + +error(0, "Attempted to build package {0} which is not buildable and does not have a satisfying external\n attr('{1}', '{2}', '{3}', '{4}') is an external constraint for {0} which was not satisfied", Package, Name, A1, A2, A3) + :- external(node(ID, Package)), + not attr("external_conditions_hold", node(ID, Package), _), + imposed_constraint(EID, "external_conditions_hold", Package, _), + trigger_and_effect(Package, TID, EID), + condition_requirement(TID, Name, A1, A2, A3), + not attr(Name, node(_, A1), A2, A3). + +error(0, "Attempted to build package {0} which is not buildable and does not have a satisfying external\n 'Spec({0} {1}={2})' is an external constraint for {0} which was not satisfied\n 'Spec({0} {1}={3})' required", Package, Variant, Value, OtherValue, startcauses, OtherValueCause, CID) + :- external(node(ID, Package)), + not attr("external_conditions_hold", node(ID, Package), _), + imposed_constraint(EID, "external_conditions_hold", Package, _), + trigger_and_effect(Package, TID, EID), + condition_requirement(TID, "variant_value", Package, Variant, Value), + not attr("variant_value", node(ID, Package), Variant, Value), + attr("variant_value", node(ID, Package), Variant, OtherValue), + imposed_constraint(EID2, "variant_set", Package, Variant, OtherValue), + pkg_fact(TriggerPkg, condition_effect(OtherValueCause, EID2)), + condition_holds(OtherValueCause, node(CID, TriggerPkg)). + +error(0, "Attempted to build package {0} which is not buildable and does not have a satisfying external\n attr('{1}', '{2}', '{3}', '{4}', '{5}') is an external constraint for {0} which was not satisfied", Package, Name, A1, A2, A3, A4) + :- external(node(ID, Package)), + not attr("external_conditions_hold", node(ID, Package), _), + imposed_constraint(EID, "external_conditions_hold", Package, _), + trigger_and_effect(Package, TID, EID), + condition_requirement(TID, Name, A1, A2, A3, A4), + not attr(Name, node(_, A1), A2, A3, A4). + +% error message with causes for conflicts +error(0, Msg, startcauses, TriggerID, ID1, ConstraintID, ID2) + :- attr("node", node(ID, Package)), + pkg_fact(Package, conflict(TriggerID, ConstraintID, Msg)), + % node(ID1, TriggerPackage) is node(ID2, Package) in most, but not all, cases + condition_holds(TriggerID, node(ID1, TriggerPackage)), + condition_holds(ConstraintID, node(ID2, Package)), + unification_set(X, node(ID2, Package)), + unification_set(X, node(ID1, TriggerPackage)), + not external(node(ID, Package)), % ignore conflicts for externals + not attr("hash", node(ID, Package), _). % ignore conflicts for installed packages + +% variables to show +#show error/2. +#show error/3. +#show error/4. +#show error/5. +#show error/6. +#show error/7. +#show error/8. +#show error/9. +#show error/10. +#show error/11. + +#show condition_cause/4. +#show condition_reason/2. + +% Define all variables used to avoid warnings at runtime when the model doesn't happen to have one +#defined error/2. +#defined error/3. +#defined error/4. +#defined error/5. +#defined error/6. +#defined attr/2. +#defined attr/3. +#defined attr/4. +#defined attr/5. +#defined pkg_fact/2. +#defined imposed_constraint/3. +#defined imposed_constraint/4. +#defined imposed_constraint/5. +#defined imposed_constraint/6. +#defined condition_requirement/3. +#defined condition_requirement/4. +#defined condition_requirement/5. +#defined condition_requirement/6. +#defined condition_holds/2. +#defined unification_set/2. +#defined external/1. +#defined trigger_and_effect/3. +#defined build/1. +#defined node_has_variant/2. +#defined provider/2. +#defined external_version/3. diff --git a/lib/spack/spack/solver/heuristic.lp b/lib/spack/spack/solver/heuristic.lp index 69f925180f59d8..745ea4f9625f17 100644 --- a/lib/spack/spack/solver/heuristic.lp +++ b/lib/spack/spack/solver/heuristic.lp @@ -11,10 +11,6 @@ %----------------- % Domain heuristic %----------------- -#heuristic attr("hash", node(0, Package), Hash) : literal(_, "root", Package). [45, init] -#heuristic attr("root", node(0, Package)) : literal(_, "root", Package). [45, true] -#heuristic attr("node", node(0, Package)) : literal(_, "root", Package). [45, true] -#heuristic attr("node", node(0, Package)) : literal(_, "node", Package). [45, true] % Root node #heuristic attr("version", node(0, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true] @@ -26,4 +22,3 @@ % Providers #heuristic attr("node", node(0, Package)) : default_provider_preference(Virtual, Package, 0), possible_in_link_run(Package). [30, true] - diff --git a/lib/spack/spack/test/concretize_errors.py b/lib/spack/spack/test/concretize_errors.py new file mode 100644 index 00000000000000..2a8be3e0457a46 --- /dev/null +++ b/lib/spack/spack/test/concretize_errors.py @@ -0,0 +1,68 @@ +# Copyright 2013-2023 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) + +import pytest + +import spack.solver.asp +import spack.spec + +pytestmark = [ + pytest.mark.not_on_windows("Windows uses old concretizer"), + pytest.mark.only_clingo("Original concretizer does not support configuration requirements"), +] + +version_error_messages = [ + "Cannot satisfy 'fftw@:1.0' and 'fftw@1.1:", + " required because quantum-espresso depends on fftw@:1.0", + " required because quantum-espresso ^fftw@1.1: requested from CLI", + " required because quantum-espresso ^fftw@1.1: requested from CLI", +] + +external_error_messages = [ + ( + "Attempted to build package quantum-espresso which is not buildable and does not have" + " a satisfying external" + ), + ( + " 'quantum-espresso~veritas' is an external constraint for quantum-espresso" + " which was not satisfied" + ), + " 'quantum-espresso+veritas' required", + " required because quantum-espresso+veritas requested from CLI", +] + +variant_error_messages = [ + "'fftw' required multiple values for single-valued variant 'mpi'", + " Requested '~mpi' and '+mpi'", + " required because quantum-espresso depends on fftw+mpi when +invino", + " required because quantum-espresso+invino ^fftw~mpi requested from CLI", + " required because quantum-espresso+invino ^fftw~mpi requested from CLI", +] + +external_config = { + "packages:quantum-espresso": { + "buildable": False, + "externals": [{"spec": "quantum-espresso@1.0~veritas", "prefix": "/path/to/qe"}], + } +} + + +@pytest.mark.parametrize( + "error_messages,config_set,spec", + [ + (version_error_messages, {}, "quantum-espresso^fftw@1.1:"), + (external_error_messages, external_config, "quantum-espresso+veritas"), + (variant_error_messages, {}, "quantum-espresso+invino^fftw~mpi"), + ], +) +def test_error_messages(error_messages, config_set, spec, mock_packages, mutable_config): + for path, conf in config_set.items(): + spack.config.set(path, conf) + + with pytest.raises(spack.solver.asp.UnsatisfiableSpecError) as e: + _ = spack.spec.Spec(spec).concretized() + + for em in error_messages: + assert em in str(e.value) From 1235084c20f1efabbca680c03f9f4dc023b44c5d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 19:22:29 +0100 Subject: [PATCH 513/806] Introduce `default_args` context manager (#39964) This adds a rather trivial context manager that lets you deduplicate repeated arguments in directives, e.g. ```python depends_on("py-x@1", when="@1", type=("build", "run")) depends_on("py-x@2", when="@2", type=("build", "run")) depends_on("py-x@3", when="@3", type=("build", "run")) depends_on("py-x@4", when="@4", type=("build", "run")) ``` can be condensed to ```python with default_args(type=("build", "run")): depends_on("py-x@1", when="@1") depends_on("py-x@2", when="@2") depends_on("py-x@3", when="@3") depends_on("py-x@4", when="@4") ``` The advantage is it's clear for humans, the downside it's less clear for type checkers due to type erasure. --- lib/spack/docs/packaging_guide.rst | 50 +++++++++++++++++++ lib/spack/spack/directives.py | 19 ++++++- lib/spack/spack/multimethod.py | 8 +++ lib/spack/spack/package.py | 2 +- .../builtin/packages/py-black/package.py | 35 ++++++------- 5 files changed, 95 insertions(+), 19 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 3b05ce8932c713..3dd1c7952d12e7 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -3503,6 +3503,56 @@ is equivalent to: Constraints from nested context managers are also combined together, but they are rarely needed or recommended. +.. _default_args: + +------------------------ +Common default arguments +------------------------ + +Similarly, if directives have a common set of default arguments, you can +group them together in a ``with default_args()`` block: + +.. code-block:: python + + class PyExample(PythonPackage): + + with default_args(type=("build", "run")): + depends_on("py-foo") + depends_on("py-foo@2:", when="@2:") + depends_on("py-bar") + depends_on("py-bz") + +The above is short for: + +.. code-block:: python + + class PyExample(PythonPackage): + + depends_on("py-foo", type=("build", "run")) + depends_on("py-foo@2:", when="@2:", type=("build", "run")) + depends_on("py-bar", type=("build", "run")) + depends_on("py-bz", type=("build", "run")) + +.. note:: + + The ``with when()`` context manager is composable, while ``with default_args()`` + merely overrides the default. For example: + + .. code-block:: python + + with default_args(when="+feature"): + depends_on("foo") + depends_on("bar") + depends_on("baz", when="+baz") + + is equivalent to: + + .. code-block:: python + + depends_on("foo", when="+feature") + depends_on("bar", when="+feature") + depends_on("baz", when="+baz") # Note: not when="+feature+baz" + .. _install-method: ------------------ diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index bfd57fc6f9cade..fcd72d5bfcc12d 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -137,6 +137,7 @@ class DirectiveMeta(type): _directive_dict_names: Set[str] = set() _directives_to_be_executed: List[str] = [] _when_constraints_from_context: List[str] = [] + _default_args: List[dict] = [] def __new__(cls, name, bases, attr_dict): # Initialize the attribute containing the list of directives @@ -199,6 +200,16 @@ def pop_from_context(): """Pop the last constraint from the context""" return DirectiveMeta._when_constraints_from_context.pop() + @staticmethod + def push_default_args(default_args): + """Push default arguments""" + DirectiveMeta._default_args.append(default_args) + + @staticmethod + def pop_default_args(): + """Pop default arguments""" + return DirectiveMeta._default_args.pop() + @staticmethod def directive(dicts=None): """Decorator for Spack directives. @@ -259,7 +270,13 @@ def _decorator(decorated_function): directive_names.append(decorated_function.__name__) @functools.wraps(decorated_function) - def _wrapper(*args, **kwargs): + def _wrapper(*args, **_kwargs): + # First merge default args with kwargs + kwargs = dict() + for default_args in DirectiveMeta._default_args: + kwargs.update(default_args) + kwargs.update(_kwargs) + # Inject when arguments from the context if DirectiveMeta._when_constraints_from_context: # Check that directives not yet supporting the when= argument diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index d3453beb794656..0c661172424751 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -26,6 +26,7 @@ """ import functools import inspect +from contextlib import contextmanager from llnl.util.lang import caller_locals @@ -271,6 +272,13 @@ def __exit__(self, exc_type, exc_val, exc_tb): spack.directives.DirectiveMeta.pop_from_context() +@contextmanager +def default_args(**kwargs): + spack.directives.DirectiveMeta.push_default_args(kwargs) + yield + spack.directives.DirectiveMeta.pop_default_args() + + class MultiMethodError(spack.error.SpackError): """Superclass for multimethod dispatch errors""" diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9bf01be5d4eddd..c537a7103afbca 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -85,7 +85,7 @@ UpstreamPackageError, ) from spack.mixins import filter_compiler_wrappers -from spack.multimethod import when +from spack.multimethod import default_args, when from spack.package_base import ( DependencyConflictError, build_system_flags, diff --git a/var/spack/repos/builtin/packages/py-black/package.py b/var/spack/repos/builtin/packages/py-black/package.py index bb6539d7150aa4..825d37a446f291 100644 --- a/var/spack/repos/builtin/packages/py-black/package.py +++ b/var/spack/repos/builtin/packages/py-black/package.py @@ -37,23 +37,24 @@ class PyBlack(PythonPackage): depends_on("py-hatchling@1.8:", when="@22.10:", type="build") depends_on("py-hatch-vcs", when="@22.10:", type="build") depends_on("py-hatch-fancy-pypi-readme", when="@22.10:", type="build") - depends_on("python@3.8:", when="@23.7:", type=("build", "run")) - # Needed to ensure that Spack can bootstrap black with Python 3.6 - depends_on("python@3.7:", when="@22.10:", type=("build", "run")) - depends_on("py-click@8:", type=("build", "run")) - depends_on("py-mypy-extensions@0.4.3:", type=("build", "run")) - depends_on("py-packaging@22:", when="@23.1:", type=("build", "run")) - depends_on("py-pathspec@0.9:", type=("build", "run")) - depends_on("py-platformdirs@2:", type=("build", "run")) - depends_on("py-tomli@1.1:", when="@22.8: ^python@:3.10", type=("build", "run")) - depends_on("py-tomli@1.1:", when="@21.7:22.6", type=("build", "run")) - depends_on("py-typing-extensions@3.10:", when="^python@:3.9", type=("build", "run")) - - depends_on("py-colorama@0.4.3:", when="+colorama", type=("build", "run")) - depends_on("py-uvloop@0.15.2:", when="+uvloop", type=("build", "run")) - depends_on("py-aiohttp@3.7.4:", when="+d", type=("build", "run")) - depends_on("py-ipython@7.8:", when="+jupyter", type=("build", "run")) - depends_on("py-tokenize-rt@3.2:", when="+jupyter", type=("build", "run")) + + with default_args(type=("build", "run")): + depends_on("python@3.8:", when="@23.7:") + depends_on("python@3.7:", when="@22.10:") + depends_on("py-click@8:") + depends_on("py-mypy-extensions@0.4.3:") + depends_on("py-packaging@22:", when="@23.1:") + depends_on("py-pathspec@0.9:") + depends_on("py-platformdirs@2:") + depends_on("py-tomli@1.1:", when="@22.8: ^python@:3.10") + depends_on("py-tomli@1.1:", when="@21.7:22.6") + depends_on("py-typing-extensions@3.10:", when="^python@:3.9") + + depends_on("py-colorama@0.4.3:", when="+colorama") + depends_on("py-uvloop@0.15.2:", when="+uvloop") + depends_on("py-aiohttp@3.7.4:", when="+d") + depends_on("py-ipython@7.8:", when="+jupyter") + depends_on("py-tokenize-rt@3.2:", when="+jupyter") # Historical dependencies depends_on("py-setuptools@45:", when="@:22.8", type=("build", "run")) From a2f00886e911a8219bfac27752e5c7fd83c65280 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 19:37:29 +0100 Subject: [PATCH 514/806] defaults/modules.yaml: hide implicits (#40906) --- etc/spack/defaults/modules.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/spack/defaults/modules.yaml b/etc/spack/defaults/modules.yaml index 75ec3661174378..6ba4de769b884a 100644 --- a/etc/spack/defaults/modules.yaml +++ b/etc/spack/defaults/modules.yaml @@ -46,10 +46,12 @@ modules: tcl: all: autoload: direct + hide_implicits: true # Default configurations if lmod is enabled lmod: all: autoload: direct + hide_implicits: true hierarchy: - mpi From f0f6e54b295f1ff0d63b39c1932f9ab80d4bc243 Mon Sep 17 00:00:00 2001 From: Vicente Bolea Date: Mon, 6 Nov 2023 15:15:29 -0500 Subject: [PATCH 515/806] adios2: add v2.9.2 release (#40832) --- ...9.2-cmake-find-threads-package-first.patch | 36 +++++++++++++++++++ .../repos/builtin/packages/adios2/package.py | 9 +++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/adios2/2.9.2-cmake-find-threads-package-first.patch diff --git a/var/spack/repos/builtin/packages/adios2/2.9.2-cmake-find-threads-package-first.patch b/var/spack/repos/builtin/packages/adios2/2.9.2-cmake-find-threads-package-first.patch new file mode 100644 index 00000000000000..afc6808d2862a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/adios2/2.9.2-cmake-find-threads-package-first.patch @@ -0,0 +1,36 @@ +From 80e4739fb53b0b7e02dae48b928d8b8247992763 Mon Sep 17 00:00:00 2001 +From: Vicente Adolfo Bolea Sanchez +Date: Thu, 2 Nov 2023 12:18:49 -0400 +Subject: [PATCH] cmake: find threads package first + +--- + cmake/DetectOptions.cmake | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake +index 3f511e02a..615995b71 100644 +--- a/cmake/DetectOptions.cmake ++++ b/cmake/DetectOptions.cmake +@@ -67,6 +67,9 @@ function(lists_get_prefix listVars outVar) + set(${outVar} "${prefix}" PARENT_SCOPE) + endfunction() + ++# Multithreading ++find_package(Threads REQUIRED) ++ + # Blosc2 + if(ADIOS2_USE_Blosc2 STREQUAL AUTO) + # Prefect CONFIG mode +@@ -554,9 +557,6 @@ if(AWSSDK_FOUND) + set(ADIOS2_HAVE_AWSSDK TRUE) + endif() + +-# Multithreading +-find_package(Threads REQUIRED) +- + # Floating point detection + include(CheckTypeRepresentation) + +-- +2.35.3 + diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 218457f3e38a4e..4a038ddcacafc5 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -24,10 +24,11 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version( - "2.9.1", - sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9", + "2.9.2", + sha256="78309297c82a95ee38ed3224c98b93d330128c753a43893f63bbe969320e4979", preferred=True, ) + version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9") version("2.9.0", sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1") version("2.8.3", sha256="4906ab1899721c41dd918dddb039ba2848a1fb0cf84f3a563a1179b9d6ee0d9f") version("2.8.2", sha256="9909f6409dc44b2c28c1fda0042dab4b711f25ec3277ef0cb6ffc40f5483910d") @@ -211,6 +212,10 @@ class Adios2(CMakePackage, CudaPackage, ROCmPackage): sha256="8221073d1b2f8944395a88a5d60a15c7370646b62f5fc6309867bbb6a8c2096c", ) + # cmake: find threads package first + # https://github.com/ornladios/ADIOS2/pull/3893 + patch("2.9.2-cmake-find-threads-package-first.patch", when="@2.9.2:") + @when("%fj") def patch(self): """add fujitsu mpi commands #16864""" From 338418186880ffac9b4eb72846cd1615c26fe5c5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 22:21:16 +0100 Subject: [PATCH 516/806] docs: mention public build cache for GHA (#40908) --- lib/spack/docs/binary_caches.rst | 70 +++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst index 5f11dd6bd6ab55..00194fc96e362c 100644 --- a/lib/spack/docs/binary_caches.rst +++ b/lib/spack/docs/binary_caches.rst @@ -216,29 +216,34 @@ other system dependencies. However, they are still compatible with tools like are `alternative drivers `_. ------------------------------------ -Using a buildcache in GitHub Actions +Spack build cache for GitHub Actions ------------------------------------ -GitHub Actions is a popular CI/CD platform for building and testing software, -but each CI job has limited resources, making from source builds too slow for -many applications. Spack build caches can be used to share binaries between CI -runs, speeding up CI significantly. +To significantly speed up Spack in GitHub Actions, binaries can be cached in +GitHub Packages. This service is an OCI registry that can be linked to a GitHub +repository. A typical workflow is to include a ``spack.yaml`` environment in your repository -that specifies the packages to install: +that specifies the packages to install, the target architecture, and the build +cache to use under ``mirrors``: .. code-block:: yaml spack: - specs: [pkg-x, pkg-y] - packages: - all: - require: target=x86_64_v2 - mirrors: - github_packages: oci://ghcr.io// - -And a GitHub action that sets up Spack, installs packages from the build cache -or from sources, and pushes newly built binaries to the build cache: + specs: + - python@3.11 + config: + install_tree: + root: /opt/spack + padded_length: 128 + packages: + all: + require: target=x86_64_v2 + mirrors: + local-buildcache: oci://ghcr.io// + +A GitHub action can then be used to install the packages and push them to the +build cache: .. code-block:: yaml @@ -252,26 +257,35 @@ or from sources, and pushes newly built binaries to the build cache: jobs: example: runs-on: ubuntu-22.04 + permissions: + packages: write steps: - name: Checkout uses: actions/checkout@v3 - - name: Install Spack - run: | - git clone --depth=1 https://github.com/spack/spack.git - echo "$PWD/spack/bin/" >> "$GITHUB_PATH" + - name: Checkout Spack + uses: actions/checkout@v3 + with: + repository: spack/spack + path: spack + + - name: Setup Spack + run: echo "$PWD/spack/bin" >> "$GITHUB_PATH" - name: Concretize run: spack -e . concretize - name: Install - run: spack -e . install --no-check-signature --fail-fast + run: spack -e . install --no-check-signature + + - name: Run tests + run: ./my_view/bin/python3 -c 'print("hello world")' - name: Push to buildcache run: | - spack -e . mirror set --oci-username --oci-password "${{ secrets.GITHUB_TOKEN }}" github_packages - spack -e . buildcache push --base-image ubuntu:22.04 --unsigned --update-index github_packages - if: always() + spack -e . mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache + spack -e . buildcache push --base-image ubuntu:22.04 --unsigned --update-index local-buildcache + if: ${{ !cancelled() }} The first time this action runs, it will build the packages from source and push them to the build cache. Subsequent runs will pull the binaries from the @@ -281,6 +295,16 @@ over source builds. The build cache entries appear in the GitHub Packages section of your repository, and contain instructions for pulling and running them with ``docker`` or ``podman``. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Using Spack's public build cache for GitHub Actions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Spack offers a public build cache for GitHub Actions with a set of common packages, +which lets you get started quickly. See the following resources for more information: + +* `spack/github-actions-buildcache `_ + ---------- Relocation ---------- From 4700108b5b91c3182c96c4b8468ecf3b536dfd0a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 22:22:13 +0100 Subject: [PATCH 517/806] fix prefix_inspections keys in example (#40904) --- lib/spack/docs/module_file_support.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst index 52d74a56699e3a..f6b292e7553dab 100644 --- a/lib/spack/docs/module_file_support.rst +++ b/lib/spack/docs/module_file_support.rst @@ -519,11 +519,11 @@ inspections and customize them per-module-set. modules: prefix_inspections: - bin: + ./bin: - PATH - man: + ./man: - MANPATH - '': + ./: - CMAKE_PREFIX_PATH Prefix inspections are only applied if the relative path inside the @@ -579,7 +579,7 @@ the view. view_relative_modules: use_view: my_view prefix_inspections: - bin: + ./bin: - PATH view: my_view: From 461eb944bdff103b8e347c272afb2bcbd31f9723 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 23:30:27 +0100 Subject: [PATCH 518/806] Don't let runtime env variables of compiler like deps leak into the build environment (#40916) * Test that setup_run_environment changes to CC/CXX/FC/F77 are dropped in build env * compilers set in run env shouldn't impact build Adds `drop` to EnvironmentModifications courtesy of @haampie, and uses it to clear modifications of CC, CXX, F77 and FC made by `setup_{,dependent_}run_environment` routines when producing an environment in BUILD context. * comment / style * comment --------- Co-authored-by: Tom Scogland --- lib/spack/spack/build_environment.py | 11 ++++++++-- lib/spack/spack/test/build_environment.py | 15 ++++++++++++++ lib/spack/spack/util/environment.py | 8 ++++++++ .../build-env-compiler-var-a/package.py | 14 +++++++++++++ .../build-env-compiler-var-b/package.py | 20 +++++++++++++++++++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py create mode 100644 var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 3f6830ad3345de..4c4eca6567f111 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1016,10 +1016,17 @@ def get_env_modifications(self) -> EnvironmentModifications: self._make_runnable(dspec, env) if self.should_setup_run_env & flag: + run_env_mods = EnvironmentModifications() for spec in dspec.dependents(deptype=dt.LINK | dt.RUN): if id(spec) in self.nodes_in_subdag: - pkg.setup_dependent_run_environment(env, spec) - pkg.setup_run_environment(env) + pkg.setup_dependent_run_environment(run_env_mods, spec) + pkg.setup_run_environment(run_env_mods) + if self.context == Context.BUILD: + # Don't let the runtime environment of comiler like dependencies leak into the + # build env + run_env_mods.drop("CC", "CXX", "F77", "FC") + env.extend(run_env_mods) + return env def _make_buildtime_detectable(self, dep: spack.spec.Spec, env: EnvironmentModifications): diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py index f2bf740272e7b6..cbccbc429eac6f 100644 --- a/lib/spack/spack/test/build_environment.py +++ b/lib/spack/spack/test/build_environment.py @@ -652,3 +652,18 @@ def test_monkey_patching_works_across_virtual(default_mock_concretization): s["mpich"].foo = "foo" assert s["mpich"].foo == "foo" assert s["mpi"].foo == "foo" + + +def test_clear_compiler_related_runtime_variables_of_build_deps(default_mock_concretization): + """Verify that Spack drops CC, CXX, FC and F77 from the dependencies related build environment + variable changes if they are set in setup_run_environment. Spack manages those variables + elsewhere.""" + s = default_mock_concretization("build-env-compiler-var-a") + ctx = spack.build_environment.SetupContext(s, context=Context.BUILD) + result = {} + ctx.get_env_modifications().apply_modifications(result) + assert "CC" not in result + assert "CXX" not in result + assert "FC" not in result + assert "F77" not in result + assert result["ANOTHER_VAR"] == "this-should-be-present" diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 246df65cb88169..d4c352b9935390 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -596,6 +596,14 @@ def group_by_name(self) -> Dict[str, ModificationList]: modifications[item.name].append(item) return modifications + def drop(self, *name) -> bool: + """Drop all modifications to the variable with the given name.""" + old_mods = self.env_modifications + new_mods = [x for x in self.env_modifications if x.name not in name] + self.env_modifications = new_mods + + return len(old_mods) != len(new_mods) + def is_unset(self, variable_name: str) -> bool: """Returns True if the last modification to a variable is to unset it, False otherwise.""" modifications = self.group_by_name() diff --git a/var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py new file mode 100644 index 00000000000000..ea6f0f34e8ee6d --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py @@ -0,0 +1,14 @@ +# Copyright 2013-2023 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 BuildEnvCompilerVarA(Package): + """Package with runtime variable that should be dropped in the parent's build environment.""" + + url = "https://www.example.com" + version("1.0", md5="0123456789abcdef0123456789abcdef") + depends_on("build-env-compiler-var-b", type="build") diff --git a/var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py new file mode 100644 index 00000000000000..7905869b344de6 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 BuildEnvCompilerVarB(Package): + """Package with runtime variable that should be dropped in the parent's build environment.""" + + url = "https://www.example.com" + version("1.0", md5="0123456789abcdef0123456789abcdef") + + def setup_run_environment(self, env): + env.set("CC", "this-should-be-dropped") + env.set("CXX", "this-should-be-dropped") + env.set("FC", "this-should-be-dropped") + env.set("F77", "this-should-be-dropped") + env.set("ANOTHER_VAR", "this-should-be-present") From 5074b7e922fed8276367755832e3263885c8e884 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 6 Nov 2023 23:37:46 +0100 Subject: [PATCH 519/806] Add support for aliases (#17229) Add a new config section: `config:aliases`, which is a dictionary mapping aliases to commands. For instance: ```yaml config: aliases: sp: spec -I ``` will define a new command `sp` that will execute `spec` with the `-I` argument. Aliases cannot override existing commands, and this is ensured with a test. We cannot currently alias subcommands. Spack will warn about any aliases containing a space, but will not error, which leaves room for subcommand aliases in the future. --------- Co-authored-by: Todd Gamblin --- etc/spack/defaults/config.yaml | 8 ++++ lib/spack/docs/config_yaml.rst | 14 ++++++ lib/spack/spack/cmd/commands.py | 10 +++-- lib/spack/spack/main.py | 64 +++++++++++++++++++++++----- lib/spack/spack/schema/config.py | 1 + lib/spack/spack/test/cmd/commands.py | 18 ++++++++ 6 files changed, 101 insertions(+), 14 deletions(-) diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml index b4d81f69da6629..018e8deb55ba17 100644 --- a/etc/spack/defaults/config.yaml +++ b/etc/spack/defaults/config.yaml @@ -229,3 +229,11 @@ config: flags: # Whether to keep -Werror flags active in package builds. keep_werror: 'none' + + # A mapping of aliases that can be used to define new commands. For instance, + # `sp: spec -I` will define a new command `sp` that will execute `spec` with + # the `-I` argument. Aliases cannot override existing commands. + aliases: + concretise: concretize + containerise: containerize + rm: remove diff --git a/lib/spack/docs/config_yaml.rst b/lib/spack/docs/config_yaml.rst index 294f7c34369e20..d54977bebab21c 100644 --- a/lib/spack/docs/config_yaml.rst +++ b/lib/spack/docs/config_yaml.rst @@ -304,3 +304,17 @@ To work properly, this requires your terminal to reset its title after Spack has finished its work, otherwise Spack's status information will remain in the terminal's title indefinitely. Most terminals should already be set up this way and clear Spack's status information. + +----------- +``aliases`` +----------- + +Aliases can be used to define new Spack commands. They can be either shortcuts +for longer commands or include specific arguments for convenience. For instance, +if users want to use ``spack install``'s ``-v`` argument all the time, they can +create a new alias called ``inst`` that will always call ``install -v``: + +.. code-block:: yaml + + aliases: + inst: install -v diff --git a/lib/spack/spack/cmd/commands.py b/lib/spack/spack/cmd/commands.py index 9ebaa62239f26e..25e1a24d0077d0 100644 --- a/lib/spack/spack/cmd/commands.py +++ b/lib/spack/spack/cmd/commands.py @@ -796,7 +796,9 @@ def names(args: Namespace, out: IO) -> None: commands = copy.copy(spack.cmd.all_commands()) if args.aliases: - commands.extend(spack.main.aliases.keys()) + aliases = spack.config.get("config:aliases") + if aliases: + commands.extend(aliases.keys()) colify(commands, output=out) @@ -812,8 +814,10 @@ def bash(args: Namespace, out: IO) -> None: parser = spack.main.make_argument_parser() spack.main.add_all_commands(parser) - aliases = ";".join(f"{key}:{val}" for key, val in spack.main.aliases.items()) - out.write(f'SPACK_ALIASES="{aliases}"\n\n') + aliases_config = spack.config.get("config:aliases") + if aliases_config: + aliases = ";".join(f"{key}:{val}" for key, val in aliases_config.items()) + out.write(f'SPACK_ALIASES="{aliases}"\n\n') writer = BashCompletionWriter(parser.prog, out, args.aliases) writer.write(parser) diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index bc29b6f1f1ead6..87408d363ad1bd 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -16,11 +16,13 @@ import os.path import pstats import re +import shlex import signal import subprocess as sp import sys import traceback import warnings +from typing import List, Tuple import archspec.cpu @@ -49,9 +51,6 @@ #: names of profile statistics stat_names = pstats.Stats.sort_arg_dict_default -#: top-level aliases for Spack commands -aliases = {"concretise": "concretize", "containerise": "containerize", "rm": "remove"} - #: help levels in order of detail (i.e., number of commands shown) levels = ["short", "long"] @@ -359,7 +358,10 @@ def add_command(self, cmd_name): module = spack.cmd.get_module(cmd_name) # build a list of aliases - alias_list = [k for k, v in aliases.items() if v == cmd_name] + alias_list = [] + aliases = spack.config.get("config:aliases") + if aliases: + alias_list = [k for k, v in aliases.items() if shlex.split(v)[0] == cmd_name] subparser = self.subparsers.add_parser( cmd_name, @@ -670,7 +672,6 @@ def __init__(self, command_name, subprocess=False): Windows, where it is always False. """ self.parser = make_argument_parser() - self.command = self.parser.add_command(command_name) self.command_name = command_name # TODO: figure out how to support this on windows self.subprocess = subprocess if sys.platform != "win32" else False @@ -702,13 +703,14 @@ def __call__(self, *argv, **kwargs): if self.subprocess: p = sp.Popen( - [spack.paths.spack_script, self.command_name] + prepend + list(argv), + [spack.paths.spack_script] + prepend + [self.command_name] + list(argv), stdout=sp.PIPE, stderr=sp.STDOUT, ) out, self.returncode = p.communicate() out = out.decode() else: + command = self.parser.add_command(self.command_name) args, unknown = self.parser.parse_known_args( prepend + [self.command_name] + list(argv) ) @@ -716,7 +718,7 @@ def __call__(self, *argv, **kwargs): out = io.StringIO() try: with log_output(out, echo=True): - self.returncode = _invoke_command(self.command, self.parser, args, unknown) + self.returncode = _invoke_command(command, self.parser, args, unknown) except SystemExit as e: self.returncode = e.code @@ -870,6 +872,46 @@ def restore_macos_dyld_vars(): os.environ[dyld_var] = os.environ[stored_var_name] +def resolve_alias(cmd_name: str, cmd: List[str]) -> Tuple[str, List[str]]: + """Resolves aliases in the given command. + + Args: + cmd_name: command name. + cmd: command line arguments. + + Returns: + new command name and arguments. + """ + all_commands = spack.cmd.all_commands() + aliases = spack.config.get("config:aliases") + + if aliases: + for key, value in aliases.items(): + if " " in key: + tty.warn( + f"Alias '{key}' (mapping to '{value}') contains a space" + ", which is not supported." + ) + if key in all_commands: + tty.warn( + f"Alias '{key}' (mapping to '{value}') attempts to override" + " built-in command." + ) + + if cmd_name not in all_commands: + alias = None + + if aliases: + alias = aliases.get(cmd_name) + + if alias is not None: + alias_parts = shlex.split(alias) + cmd_name = alias_parts[0] + cmd = alias_parts + cmd[1:] + + return cmd_name, cmd + + def _main(argv=None): """Logic for the main entry point for the Spack command. @@ -962,7 +1004,7 @@ def _main(argv=None): # Try to load the particular command the caller asked for. cmd_name = args.command[0] - cmd_name = aliases.get(cmd_name, cmd_name) + cmd_name, args.command = resolve_alias(cmd_name, args.command) # set up a bootstrap context, if asked. # bootstrap context needs to include parsing the command, b/c things @@ -974,14 +1016,14 @@ def _main(argv=None): bootstrap_context = bootstrap.ensure_bootstrap_configuration() with bootstrap_context: - return finish_parse_and_run(parser, cmd_name, env_format_error) + return finish_parse_and_run(parser, cmd_name, args.command, env_format_error) -def finish_parse_and_run(parser, cmd_name, env_format_error): +def finish_parse_and_run(parser, cmd_name, cmd, env_format_error): """Finish parsing after we know the command to run.""" # add the found command to the parser and re-run then re-parse command = parser.add_command(cmd_name) - args, unknown = parser.parse_known_args() + args, unknown = parser.parse_known_args(cmd) # Now that we know what command this is and what its args are, determine # whether we can continue with a bad environment and raise if not. diff --git a/lib/spack/spack/schema/config.py b/lib/spack/spack/schema/config.py index 6c30f0aab9869e..6818cd78f39079 100644 --- a/lib/spack/spack/schema/config.py +++ b/lib/spack/spack/schema/config.py @@ -92,6 +92,7 @@ "url_fetch_method": {"type": "string", "enum": ["urllib", "curl"]}, "additional_external_search_paths": {"type": "array", "items": {"type": "string"}}, "binary_index_ttl": {"type": "integer", "minimum": 0}, + "aliases": {"type": "object", "patternProperties": {r"\w[\w-]*": {"type": "string"}}}, }, "deprecatedProperties": { "properties": ["terminal_title"], diff --git a/lib/spack/spack/test/cmd/commands.py b/lib/spack/spack/test/cmd/commands.py index 99faac72b9ef11..3288b092d4d3c0 100644 --- a/lib/spack/spack/test/cmd/commands.py +++ b/lib/spack/spack/test/cmd/commands.py @@ -58,6 +58,24 @@ def test_subcommands(): assert "spack compiler add" in out2 +@pytest.mark.not_on_windows("subprocess not supported on Windows") +def test_override_alias(): + """Test that spack commands cannot be overriden by aliases.""" + + install = spack.main.SpackCommand("install", subprocess=True) + instal = spack.main.SpackCommand("instal", subprocess=True) + + out = install(fail_on_error=False, global_args=["-c", "config:aliases:install:find"]) + assert "install requires a package argument or active environment" in out + assert "Alias 'install' (mapping to 'find') attempts to override built-in command" in out + + out = install(fail_on_error=False, global_args=["-c", "config:aliases:foo bar:find"]) + assert "Alias 'foo bar' (mapping to 'find') contains a space, which is not supported" in out + + out = instal(fail_on_error=False, global_args=["-c", "config:aliases:instal:find"]) + assert "install requires a package argument or active environment" not in out + + def test_rst(): """Do some simple sanity checks of the rst writer.""" out1 = commands("--format=rst") From e7372a54a16c1ddc81383d5cad2bb77d4b78423d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 6 Nov 2023 23:49:54 +0100 Subject: [PATCH 520/806] docs: expand section about relocation, suggest padding (#40909) --- lib/spack/docs/binary_caches.rst | 37 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst index 00194fc96e362c..eeb6c4b783c8d1 100644 --- a/lib/spack/docs/binary_caches.rst +++ b/lib/spack/docs/binary_caches.rst @@ -155,6 +155,33 @@ List of popular build caches * `Extreme-scale Scientific Software Stack (E4S) `_: `build cache `_ +---------- +Relocation +---------- + +When using buildcaches across different machines, it is likely that the install +root will be different from the one used to build the binaries. + +To address this issue, Spack automatically relocates all paths encoded in binaries +and scripts to their new location upon install. + +Note that there are some cases where this is not possible: if binaries are built in +a relatively short path, and then installed to a longer path, there may not be enough +space in the binary to encode the new path. In this case, Spack will fail to install +the package from the build cache, and a source build is required. + +To reduce the likelihood of this happening, it is highly recommended to add padding to +the install root during the build, as specified in the :ref:`config ` +section of the configuration: + +.. code-block:: yaml + + config: + install_tree: + root: /opt/spack + padded_length: 128 + + ----------------------------------------- OCI / Docker V2 registries as build cache @@ -305,16 +332,6 @@ which lets you get started quickly. See the following resources for more informa * `spack/github-actions-buildcache `_ ----------- -Relocation ----------- - -Initial build and later installation do not necessarily happen at the same -location. Spack provides a relocation capability and corrects for RPATHs and -non-relocatable scripts. However, many packages compile paths into binary -artifacts directly. In such cases, the build instructions of this package would -need to be adjusted for better re-locatability. - .. _cmd-spack-buildcache: -------------------- From 8f1f9048ec4b7e55d399d787333d901bc5135973 Mon Sep 17 00:00:00 2001 From: Sinan Date: Mon, 6 Nov 2023 14:55:20 -0800 Subject: [PATCH 521/806] package/qgis: add latest ltr (#40752) * package/qgis: add latest ltr * fix bug * [@spackbot] updating style on behalf of Sinan81 * make flake happy --------- Co-authored-by: sbulut Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/qgis/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py index 45bb05639910f2..8daf503c98b4c7 100644 --- a/var/spack/repos/builtin/packages/qgis/package.py +++ b/var/spack/repos/builtin/packages/qgis/package.py @@ -17,12 +17,14 @@ class Qgis(CMakePackage): maintainers("adamjstewart", "Sinan81") + version("3.34.0", sha256="348a2df4c4520813a319b7f72546b3823e044cacd28646ba189b56a49c7d1b5f") # Prefer latest long term release version( - "3.28.11", - sha256="c5eb703893c7f98de051c45d677c4a34b40f986db51782a4930ddefad4e193b4", + "3.28.12", + sha256="d6d0ea39ed3433d553f8b83324dc14cfa90f8caaf766fa484791df9169800f25", preferred=True, ) + version("3.28.11", sha256="c5eb703893c7f98de051c45d677c4a34b40f986db51782a4930ddefad4e193b4") version("3.28.10", sha256="cff867e97909bbc2facce6343770dcb1b61fc6e4855f57783e30bf63d51c5218") version("3.28.3", sha256="a09124f46465a520f6d735306ba3954c339b84aa396d6f52b476b82edcc4fe0e") version("3.22.16", sha256="dbd1f8a639291bb2492eea61e4ef96079d7b27d3dfa538dab8cd98f31429254a") @@ -63,6 +65,7 @@ class Qgis(CMakePackage): "custom_widgets", default=False, description="Build QGIS custom widgets for Qt Designer" ) variant("desktop", default=True, description="Build QGIS desktop") + # variant("draco", default=True, description="Build with DRACO support") #TODO variant("georeferencer", default=True, description="Build GeoReferencer plugin") variant("globe", default=False, description="Build Globe plugin") variant("grass7", default=False, description="Build with GRASS providers and plugin") @@ -77,6 +80,7 @@ class Qgis(CMakePackage): ) variant("oauth2_plugin", default=True, description="Build OAuth2 authentication method plugin") variant("oracle", default=False, description="Build with Oracle support") + # variant("pdal", default=False, description="Build with PDAL support") #TODO variant("postgresql", default=True, description="Build with PostreSQL support") variant( "py_compile", @@ -244,6 +248,7 @@ def cmake_args(self): "TRUE" if "+custom_widgets" in spec else "FALSE" ), "-DWITH_DESKTOP={0}".format("TRUE" if "+desktop" in spec else "FALSE"), + "-DWITH_DRACO={0}".format("TRUE" if "+draco" in spec else "FALSE"), "-DWITH_GEOREFERENCER={0}".format("TRUE" if "+georeferencer" in spec else "FALSE"), "-DWITH_GLOBE={0}".format("TRUE" if "+globe" in spec else "FALSE"), "-DWITH_GUI={0}".format("TRUE" if "+gui" in spec else "FALSE"), @@ -251,6 +256,7 @@ def cmake_args(self): self.define_from_variant("WITH_INTERNAL_O2", "internal_o2"), "-DWITH_OAUTH2_PLUGIN={0}".format("TRUE" if "+oauth2_plugin" in spec else "FALSE"), "-DWITH_ORACLE={0}".format("TRUE" if "+oracle" in spec else "FALSE"), + "-DWITH_PDAL={0}".format("TRUE" if "+pdal" in spec else "FALSE"), "-DWITH_POSTGRESQL={0}".format("TRUE" if "+postgresql" in spec else "FALSE"), "-DWITH_PY_COMPILE={0}".format("TRUE" if "+py_compile" in spec else "FALSE"), "-DWITH_QSCIAPI={0}".format("TRUE" if "+qsciapi" in spec else "FALSE"), From 4ce80b95f3cbb8b6e8ce6bb4546dee76b1f398dc Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 7 Nov 2023 00:17:31 +0100 Subject: [PATCH 522/806] spack compiler find --[no]-mixed-toolchain (#40902) Currently there's some hacky logic in the AppleClang compiler that makes it also accept `gfortran` as a fortran compiler if `flang` is not found. This is guarded by `if sys.platform` checks s.t. it only applies to Darwin. But on Linux the feature of detecting mixed toolchains is highly requested too, cause it's rather annoying to run into a failed build of `openblas` after dozens of minutes of compiling its dependencies, just because clang doesn't have a fortran compiler. In particular in CI where the system compilers may change during system updates, it's typically impossible to fix compilers in a hand-written compilers.yaml config file: the config will almost certainly be outdated sooner or later, and maintaining one config file per target machine and writing logic to select the correct config is rather undesirable too. --- This PR introduces a flag `spack compiler find --mixed-toolchain` that fills out missing `fc` and `f77` entries in `clang` / `apple-clang` by picking the best matching `gcc`. It is enabled by default on macOS, but not on Linux, matching current behavior of `spack compiler find`. The "best matching gcc" logic and compiler path updates are identical to how compiler path dictionaries are currently flattened "horizontally" (per compiler id). This just adds logic to do the same "vertically" (across different compiler ids). So, with this change on Ubuntu 22.04: ``` $ spack compiler find --mixed-toolchain ==> Added 6 new compilers to /home/harmen/.spack/linux/compilers.yaml gcc@13.1.0 gcc@12.3.0 gcc@11.4.0 gcc@10.5.0 clang@16.0.0 clang@15.0.7 ==> Compilers are defined in the following files: /home/harmen/.spack/linux/compilers.yaml ``` you finally get: ``` compilers: - compiler: spec: clang@=15.0.7 paths: cc: /usr/bin/clang cxx: /usr/bin/clang++ f77: /usr/bin/gfortran fc: /usr/bin/gfortran flags: {} operating_system: ubuntu23.04 target: x86_64 modules: [] environment: {} extra_rpaths: [] - compiler: spec: clang@=16.0.0 paths: cc: /usr/bin/clang-16 cxx: /usr/bin/clang++-16 f77: /usr/bin/gfortran fc: /usr/bin/gfortran flags: {} operating_system: ubuntu23.04 target: x86_64 modules: [] environment: {} extra_rpaths: [] ``` The "best gcc" is automatically default system gcc, since it has no suffixes / prefixes. --- lib/spack/spack/bootstrap/config.py | 4 +- lib/spack/spack/cmd/compiler.py | 17 +++- lib/spack/spack/compilers/__init__.py | 140 +++++++++++++++++++------- lib/spack/spack/compilers/aocc.py | 12 --- lib/spack/spack/compilers/clang.py | 18 +--- lib/spack/spack/test/cmd/compiler.py | 20 ++-- share/spack/spack-completion.bash | 4 +- share/spack/spack-completion.fish | 12 ++- 8 files changed, 151 insertions(+), 76 deletions(-) diff --git a/lib/spack/spack/bootstrap/config.py b/lib/spack/spack/bootstrap/config.py index e38c5669d993a8..6786bc0d3ead00 100644 --- a/lib/spack/spack/bootstrap/config.py +++ b/lib/spack/spack/bootstrap/config.py @@ -143,7 +143,9 @@ def _bootstrap_config_scopes() -> Sequence["spack.config.ConfigScope"]: def _add_compilers_if_missing() -> None: arch = spack.spec.ArchSpec.frontend_arch() if not spack.compilers.compilers_for_arch(arch): - new_compilers = spack.compilers.find_new_compilers() + new_compilers = spack.compilers.find_new_compilers( + mixed_toolchain=sys.platform == "darwin" + ) if new_compilers: spack.compilers.add_compilers_to_config(new_compilers, init_config=False) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 07006afc2cc8f0..76eb8d31508a67 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -31,6 +31,19 @@ def setup_parser(subparser): aliases=["add"], help="search the system for compilers to add to Spack configuration", ) + mixed_toolchain_group = find_parser.add_mutually_exclusive_group() + mixed_toolchain_group.add_argument( + "--mixed-toolchain", + action="store_true", + default=sys.platform == "darwin", + help="Allow mixed toolchains (for example: clang, clang++, gfortran)", + ) + mixed_toolchain_group.add_argument( + "--no-mixed-toolchain", + action="store_false", + dest="mixed_toolchain", + help="Do not allow mixed toolchains (for example: clang, clang++, gfortran)", + ) find_parser.add_argument("add_paths", nargs=argparse.REMAINDER) find_parser.add_argument( "--scope", @@ -86,7 +99,9 @@ def compiler_find(args): # Below scope=None because we want new compilers that don't appear # in any other configuration. - new_compilers = spack.compilers.find_new_compilers(paths, scope=None) + new_compilers = spack.compilers.find_new_compilers( + paths, scope=None, mixed_toolchain=args.mixed_toolchain + ) if new_compilers: spack.compilers.add_compilers_to_config(new_compilers, scope=args.scope, init_config=False) n = len(new_compilers) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 3f9663d21eaff0..6366fc321b3d06 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -10,7 +10,7 @@ import itertools import multiprocessing.pool import os -from typing import Dict, List +from typing import Dict, List, Optional, Tuple import archspec.cpu @@ -21,6 +21,7 @@ import spack.compiler import spack.config import spack.error +import spack.operating_systems import spack.paths import spack.platforms import spack.spec @@ -223,13 +224,16 @@ def all_compiler_specs(scope=None, init_config=True): ] -def find_compilers(path_hints=None): +def find_compilers( + path_hints: Optional[List[str]] = None, *, mixed_toolchain=False +) -> List["spack.compiler.Compiler"]: """Return the list of compilers found in the paths given as arguments. Args: - path_hints (list or None): list of path hints where to look for. - A sensible default based on the ``PATH`` environment variable - will be used if the value is None + path_hints: list of path hints where to look for. A sensible default based on the ``PATH`` + environment variable will be used if the value is None + mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for + a certain language """ if path_hints is None: path_hints = get_path("PATH") @@ -250,7 +254,7 @@ def find_compilers(path_hints=None): finally: tp.close() - def valid_version(item): + def valid_version(item: Tuple[Optional[DetectVersionArgs], Optional[str]]) -> bool: value, error = item if error is None: return True @@ -262,25 +266,37 @@ def valid_version(item): pass return False - def remove_errors(item): + def remove_errors( + item: Tuple[Optional[DetectVersionArgs], Optional[str]] + ) -> DetectVersionArgs: value, _ = item + assert value is not None return value - return make_compiler_list(map(remove_errors, filter(valid_version, detected_versions))) + return make_compiler_list( + [remove_errors(detected) for detected in detected_versions if valid_version(detected)], + mixed_toolchain=mixed_toolchain, + ) -def find_new_compilers(path_hints=None, scope=None): +def find_new_compilers( + path_hints: Optional[List[str]] = None, + scope: Optional[str] = None, + *, + mixed_toolchain: bool = False, +): """Same as ``find_compilers`` but return only the compilers that are not already in compilers.yaml. Args: - path_hints (list or None): list of path hints where to look for. - A sensible default based on the ``PATH`` environment variable - will be used if the value is None - scope (str): scope to look for a compiler. If None consider the - merged configuration. + path_hints: list of path hints where to look for. A sensible default based on the ``PATH`` + environment variable will be used if the value is None + scope: scope to look for a compiler. If None consider the merged configuration. + mixed_toolchain: allow mixing compilers from different toolchains if otherwise missing for + a certain language """ - compilers = find_compilers(path_hints) + compilers = find_compilers(path_hints, mixed_toolchain=mixed_toolchain) + return select_new_compilers(compilers, scope) @@ -638,7 +654,9 @@ def all_compiler_types(): ) -def arguments_to_detect_version_fn(operating_system, paths): +def arguments_to_detect_version_fn( + operating_system: spack.operating_systems.OperatingSystem, paths: List[str] +) -> List[DetectVersionArgs]: """Returns a list of DetectVersionArgs tuples to be used in a corresponding function to detect compiler versions. @@ -646,8 +664,7 @@ def arguments_to_detect_version_fn(operating_system, paths): function by providing a method called with the same name. Args: - operating_system (spack.operating_systems.OperatingSystem): the operating system - on which we are looking for compilers + operating_system: the operating system on which we are looking for compilers paths: paths to search for compilers Returns: @@ -656,10 +673,10 @@ def arguments_to_detect_version_fn(operating_system, paths): compilers in this OS. """ - def _default(search_paths): - command_arguments = [] + def _default(search_paths: List[str]) -> List[DetectVersionArgs]: + command_arguments: List[DetectVersionArgs] = [] files_to_be_tested = fs.files_in(*search_paths) - for compiler_name in spack.compilers.supported_compilers_for_host_platform(): + for compiler_name in supported_compilers_for_host_platform(): compiler_cls = class_for_compiler_name(compiler_name) for language in ("cc", "cxx", "f77", "fc"): @@ -684,7 +701,9 @@ def _default(search_paths): return fn(paths) -def detect_version(detect_version_args): +def detect_version( + detect_version_args: DetectVersionArgs, +) -> Tuple[Optional[DetectVersionArgs], Optional[str]]: """Computes the version of a compiler and adds it to the information passed as input. @@ -693,8 +712,7 @@ def detect_version(detect_version_args): needs to be checked by the code dispatching the calls. Args: - detect_version_args (DetectVersionArgs): information on the - compiler for which we should detect the version. + detect_version_args: information on the compiler for which we should detect the version. Returns: A ``(DetectVersionArgs, error)`` tuple. If ``error`` is ``None`` the @@ -710,7 +728,7 @@ def _default(fn_args): path = fn_args.path # Get compiler names and the callback to detect their versions - callback = getattr(compiler_cls, "{0}_version".format(language)) + callback = getattr(compiler_cls, f"{language}_version") try: version = callback(path) @@ -736,13 +754,15 @@ def _default(fn_args): return fn(detect_version_args) -def make_compiler_list(detected_versions): +def make_compiler_list( + detected_versions: List[DetectVersionArgs], mixed_toolchain: bool = False +) -> List["spack.compiler.Compiler"]: """Process a list of detected versions and turn them into a list of compiler specs. Args: - detected_versions (list): list of DetectVersionArgs containing a - valid version + detected_versions: list of DetectVersionArgs containing a valid version + mixed_toolchain: allow mixing compilers from different toolchains if langauge is missing Returns: list: list of Compiler objects @@ -751,7 +771,7 @@ def make_compiler_list(detected_versions): sorted_compilers = sorted(detected_versions, key=group_fn) # Gather items in a dictionary by the id, name variation and language - compilers_d = {} + compilers_d: Dict[CompilerID, Dict[NameVariation, dict]] = {} for sort_key, group in itertools.groupby(sorted_compilers, key=group_fn): compiler_id, name_variation, language = sort_key by_compiler_id = compilers_d.setdefault(compiler_id, {}) @@ -760,7 +780,7 @@ def make_compiler_list(detected_versions): def _default_make_compilers(cmp_id, paths): operating_system, compiler_name, version = cmp_id - compiler_cls = spack.compilers.class_for_compiler_name(compiler_name) + compiler_cls = class_for_compiler_name(compiler_name) spec = spack.spec.CompilerSpec(compiler_cls.name, f"={version}") paths = [paths.get(x, None) for x in ("cc", "cxx", "f77", "fc")] # TODO: johnwparent - revist the following line as per discussion at: @@ -782,13 +802,14 @@ def _default_make_compilers(cmp_id, paths): getattr(variation, "suffix", None), ) - compilers = [] + # Flatten to a list of compiler id, primary variation and compiler dictionary + flat_compilers: List[Tuple[CompilerID, NameVariation, dict]] = [] for compiler_id, by_compiler_id in compilers_d.items(): ordered = sorted(by_compiler_id, key=sort_fn) selected_variation = ordered[0] selected = by_compiler_id[selected_variation] - # fill any missing parts from subsequent entries + # Fill any missing parts from subsequent entries (without mixing toolchains) for lang in ["cxx", "f77", "fc"]: if lang not in selected: next_lang = next( @@ -797,14 +818,63 @@ def _default_make_compilers(cmp_id, paths): if next_lang: selected[lang] = next_lang - operating_system, _, _ = compiler_id - make_compilers = getattr(operating_system, "make_compilers", _default_make_compilers) + flat_compilers.append((compiler_id, selected_variation, selected)) - compilers.extend(make_compilers(compiler_id, selected)) + # Next, fill out the blanks of missing compilers by creating a mixed toolchain (if requested) + if mixed_toolchain: + make_mixed_toolchain(flat_compilers) + + # Finally, create the compiler list + compilers = [] + for compiler_id, _, compiler in flat_compilers: + make_compilers = getattr(compiler_id.os, "make_compilers", _default_make_compilers) + compilers.extend(make_compilers(compiler_id, compiler)) return compilers +def make_mixed_toolchain(compilers: List[Tuple[CompilerID, NameVariation, dict]]) -> None: + """Add missing compilers across toolchains when they are missing for a particular language. + This currently only adds the most sensible gfortran to (apple)-clang if it doesn't have a + fortran compiler (no flang).""" + + # First collect the clangs that are missing a fortran compiler + clangs_without_flang = [ + (id, variation, compiler) + for id, variation, compiler in compilers + if id.compiler_name in ("clang", "apple-clang") + and "f77" not in compiler + and "fc" not in compiler + ] + if not clangs_without_flang: + return + + # Filter on GCCs with fortran compiler + gccs_with_fortran = [ + (id, variation, compiler) + for id, variation, compiler in compilers + if id.compiler_name == "gcc" and "f77" in compiler and "fc" in compiler + ] + + # Sort these GCCs by "best variation" (no prefix / suffix first) + gccs_with_fortran.sort( + key=lambda x: (getattr(x[1], "prefix", None), getattr(x[1], "suffix", None)) + ) + + # Attach the optimal GCC fortran compiler to the clangs that don't have one + for clang_id, _, clang_compiler in clangs_without_flang: + gcc_compiler = next( + (gcc[2] for gcc in gccs_with_fortran if gcc[0].os == clang_id.os), None + ) + + if not gcc_compiler: + continue + + # Update the fc / f77 entries + clang_compiler["f77"] = gcc_compiler["f77"] + clang_compiler["fc"] = gcc_compiler["fc"] + + def is_mixed_toolchain(compiler): """Returns True if the current compiler is a mixed toolchain, False otherwise. diff --git a/lib/spack/spack/compilers/aocc.py b/lib/spack/spack/compilers/aocc.py index a642960b7df522..326522c93cfc91 100644 --- a/lib/spack/spack/compilers/aocc.py +++ b/lib/spack/spack/compilers/aocc.py @@ -5,7 +5,6 @@ import os import re -import sys import llnl.util.lang @@ -114,17 +113,6 @@ def extract_version_from_output(cls, output): return ".".join(match.groups()) return "unknown" - @classmethod - def fc_version(cls, fortran_compiler): - if sys.platform == "darwin": - return cls.default_version("clang") - - return cls.default_version(fortran_compiler) - - @classmethod - def f77_version(cls, f77): - return cls.fc_version(f77) - @property def stdcxx_libs(self): return ("-lstdc++",) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index a9356227de5d76..71837bfe5e1c81 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -5,7 +5,6 @@ import os import re -import sys import llnl.util.lang @@ -39,10 +38,10 @@ class Clang(Compiler): cxx_names = ["clang++"] # Subclasses use possible names of Fortran 77 compiler - f77_names = ["flang", "gfortran", "xlf_r"] + f77_names = ["flang"] # Subclasses use possible names of Fortran 90 compiler - fc_names = ["flang", "gfortran", "xlf90_r"] + fc_names = ["flang"] version_argument = "--version" @@ -182,16 +181,3 @@ def extract_version_from_output(cls, output): if match: ver = match.group(match.lastindex) return ver - - @classmethod - def fc_version(cls, fc): - # We could map from gcc/gfortran version to clang version, but on macOS - # we normally mix any version of gfortran with any version of clang. - if sys.platform == "darwin": - return cls.default_version("clang") - else: - return cls.default_version(fc) - - @classmethod - def f77_version(cls, f77): - return cls.fc_version(f77) diff --git a/lib/spack/spack/test/cmd/compiler.py b/lib/spack/spack/test/cmd/compiler.py index 9bc2049fdfbe9f..1cea72d3b25ad6 100644 --- a/lib/spack/spack/test/cmd/compiler.py +++ b/lib/spack/spack/test/cmd/compiler.py @@ -4,12 +4,14 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import shutil -import sys import pytest +import spack.cmd.compiler import spack.compilers import spack.main +import spack.spec +import spack.util.pattern import spack.version compiler = spack.main.SpackCommand("compiler") @@ -146,7 +148,7 @@ def test_compiler_add(mutable_config, mock_packages, mock_executable): compilers_before_find = set(spack.compilers.all_compiler_specs()) args = spack.util.pattern.Bunch( - all=None, compiler_spec=None, add_paths=[str(root_dir)], scope=None + all=None, compiler_spec=None, add_paths=[str(root_dir)], scope=None, mixed_toolchain=False ) spack.cmd.compiler.compiler_find(args) compilers_after_find = set(spack.compilers.all_compiler_specs()) @@ -159,10 +161,15 @@ def test_compiler_add(mutable_config, mock_packages, mock_executable): @pytest.mark.not_on_windows("Cannot execute bash script on Windows") @pytest.mark.regression("17590") -def test_compiler_find_mixed_suffixes(no_compilers_yaml, working_env, compilers_dir): +@pytest.mark.parametrize("mixed_toolchain", [True, False]) +def test_compiler_find_mixed_suffixes( + mixed_toolchain, no_compilers_yaml, working_env, compilers_dir +): """Ensure that we'll mix compilers with different suffixes when necessary.""" os.environ["PATH"] = str(compilers_dir) - output = compiler("find", "--scope=site") + output = compiler( + "find", "--scope=site", "--mixed-toolchain" if mixed_toolchain else "--no-mixed-toolchain" + ) assert "clang@11.0.0" in output assert "gcc@8.4.0" in output @@ -176,9 +183,8 @@ def test_compiler_find_mixed_suffixes(no_compilers_yaml, working_env, compilers_ assert clang["paths"] == { "cc": str(compilers_dir / "clang"), "cxx": str(compilers_dir / "clang++"), - # we only auto-detect mixed clang on macos - "f77": gfortran_path if sys.platform == "darwin" else None, - "fc": gfortran_path if sys.platform == "darwin" else None, + "f77": gfortran_path if mixed_toolchain else None, + "fc": gfortran_path if mixed_toolchain else None, } assert gcc["paths"] == { diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 91ed9dd1728d88..20bb886b10d9e3 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -756,7 +756,7 @@ _spack_compiler() { _spack_compiler_find() { if $list_options then - SPACK_COMPREPLY="-h --help --scope" + SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope" else SPACK_COMPREPLY="" fi @@ -765,7 +765,7 @@ _spack_compiler_find() { _spack_compiler_add() { if $list_options then - SPACK_COMPREPLY="-h --help --scope" + SPACK_COMPREPLY="-h --help --mixed-toolchain --no-mixed-toolchain --scope" else SPACK_COMPREPLY="" fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 7ea1d1848417b3..769768c04cc25b 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1045,18 +1045,26 @@ complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -f -a he complete -c spack -n '__fish_spack_using_command compiler' -s h -l help -d 'show this help message and exit' # spack compiler find -set -g __fish_spack_optspecs_spack_compiler_find h/help scope= +set -g __fish_spack_optspecs_spack_compiler_find h/help mixed-toolchain no-mixed-toolchain scope= complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command compiler find' -s h -l help -d 'show this help message and exit' +complete -c spack -n '__fish_spack_using_command compiler find' -l mixed-toolchain -f -a mixed_toolchain +complete -c spack -n '__fish_spack_using_command compiler find' -l mixed-toolchain -d 'Allow mixed toolchains (for example: clang, clang++, gfortran)' +complete -c spack -n '__fish_spack_using_command compiler find' -l no-mixed-toolchain -f -a mixed_toolchain +complete -c spack -n '__fish_spack_using_command compiler find' -l no-mixed-toolchain -d 'Do not allow mixed toolchains (for example: clang, clang++, gfortran)' complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -f -a '_builtin defaults system site user command_line' complete -c spack -n '__fish_spack_using_command compiler find' -l scope -r -d 'configuration scope to modify' # spack compiler add -set -g __fish_spack_optspecs_spack_compiler_add h/help scope= +set -g __fish_spack_optspecs_spack_compiler_add h/help mixed-toolchain no-mixed-toolchain scope= complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command compiler add' -s h -l help -d 'show this help message and exit' +complete -c spack -n '__fish_spack_using_command compiler add' -l mixed-toolchain -f -a mixed_toolchain +complete -c spack -n '__fish_spack_using_command compiler add' -l mixed-toolchain -d 'Allow mixed toolchains (for example: clang, clang++, gfortran)' +complete -c spack -n '__fish_spack_using_command compiler add' -l no-mixed-toolchain -f -a mixed_toolchain +complete -c spack -n '__fish_spack_using_command compiler add' -l no-mixed-toolchain -d 'Do not allow mixed toolchains (for example: clang, clang++, gfortran)' complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -f -a '_builtin defaults system site user command_line' complete -c spack -n '__fish_spack_using_command compiler add' -l scope -r -d 'configuration scope to modify' From 910190f55bb5467305dd75a4dac8c60f1f51e283 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 6 Nov 2023 17:00:37 -0800 Subject: [PATCH 523/806] database: optimize query() by skipping unnecessary virtual checks (#40898) Most queries will end up calling `spec.satisfies(query)` on everything in the DB, which will cause Spack to ask whether the query spec is virtual if its name doesn't match the target spec's. This can be expensive, because it can cause Spack to check if any new virtuals showed up in *all* the packages it knows about. That can currently trigger thousands of `stat()` calls. We can avoid the virtual check for most successful queries if we consider that if there *is* a match by name, the query spec *can't* be virtual. This PR adds an optimization to the query loop to save any comparisons that would trigger a virtual check for last. - [x] Add a `deferred` list to the `query()` loop. - [x] First run through the `query()` loop *only* checks for name matches. - [x] Query loop now returns early if there's a name match, skipping most `satisfies()` calls. - [x] Second run through the `deferred()` list only runs if query spec is virtual. - [x] Fix up handling of concrete specs. - [x] Add test for querying virtuals in DB. - [x] Avoid allocating deferred if not necessary. --------- Co-authored-by: Harmen Stoppels --- lib/spack/spack/database.py | 43 +++++++++++++++++++++++++------- lib/spack/spack/test/database.py | 8 ++++++ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index f252fbc05df944..ecda8c36b0f0ba 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -1522,14 +1522,18 @@ def _query( # TODO: like installed and known that can be queried? Or are # TODO: these really special cases that only belong here? - # Just look up concrete specs with hashes; no fancy search. - if isinstance(query_spec, spack.spec.Spec) and query_spec.concrete: - # TODO: handling of hashes restriction is not particularly elegant. - hash_key = query_spec.dag_hash() - if hash_key in self._data and (not hashes or hash_key in hashes): - return [self._data[hash_key].spec] - else: - return [] + if query_spec is not any: + if not isinstance(query_spec, spack.spec.Spec): + query_spec = spack.spec.Spec(query_spec) + + # Just look up concrete specs with hashes; no fancy search. + if query_spec.concrete: + # TODO: handling of hashes restriction is not particularly elegant. + hash_key = query_spec.dag_hash() + if hash_key in self._data and (not hashes or hash_key in hashes): + return [self._data[hash_key].spec] + else: + return [] # Abstract specs require more work -- currently we test # against everything. @@ -1537,6 +1541,9 @@ def _query( start_date = start_date or datetime.datetime.min end_date = end_date or datetime.datetime.max + # save specs whose name doesn't match for last, to avoid a virtual check + deferred = [] + for key, rec in self._data.items(): if hashes is not None and rec.spec.dag_hash() not in hashes: continue @@ -1561,8 +1568,26 @@ def _query( if not (start_date < inst_date < end_date): continue - if query_spec is any or rec.spec.satisfies(query_spec): + if query_spec is any: results.append(rec.spec) + continue + + # check anon specs and exact name matches first + if not query_spec.name or rec.spec.name == query_spec.name: + if rec.spec.satisfies(query_spec): + results.append(rec.spec) + + # save potential virtual matches for later, but not if we already found a match + elif not results: + deferred.append(rec.spec) + + # Checking for virtuals is expensive, so we save it for last and only if needed. + # If we get here, we didn't find anything in the DB that matched by name. + # If we did fine something, the query spec can't be virtual b/c we matched an actual + # package installation, so skip the virtual check entirely. If we *didn't* find anything, + # check all the deferred specs *if* the query is virtual. + if not results and query_spec is not any and deferred and query_spec.virtual: + results = [spec for spec in deferred if spec.satisfies(query_spec)] return results diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index 3033370ac6f191..ee3e5da81ef679 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -803,6 +803,14 @@ def test_query_spec_with_non_conditional_virtual_dependency(database): assert len(results) == 1 +def test_query_virtual_spec(database): + """Make sure we can query for virtuals in the DB""" + results = spack.store.STORE.db.query_local("mpi") + assert len(results) == 3 + names = [s.name for s in results] + assert all(name in names for name in ["mpich", "mpich2", "zmpi"]) + + def test_failed_spec_path_error(database): """Ensure spec not concrete check is covered.""" s = spack.spec.Spec("a") From 4004f27bc050247f21f8175df1aba81070ac8dc8 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 7 Nov 2023 07:44:52 +0100 Subject: [PATCH 524/806] archspec: update to v0.2.2 (#40917) Adds support for Neoverse V2 --- lib/spack/external/__init__.py | 2 +- lib/spack/external/archspec/__init__.py | 2 +- .../archspec/json/cpu/microarchitectures.json | 202 +++++++++++++++++- 3 files changed, 202 insertions(+), 4 deletions(-) diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py index 23cd44e6044a3f..2e8bf3a4f8b80b 100644 --- a/lib/spack/external/__init__.py +++ b/lib/spack/external/__init__.py @@ -18,7 +18,7 @@ * Homepage: https://pypi.python.org/pypi/archspec * Usage: Labeling, comparison and detection of microarchitectures -* Version: 0.2.1 (commit df43a1834460bf94516136951c4729a3100603ec) +* Version: 0.2.2 (commit 1dc58a5776dd77e6fc6e4ba5626af5b1fb24996e) astunparse ---------------- diff --git a/lib/spack/external/archspec/__init__.py b/lib/spack/external/archspec/__init__.py index dfad9f3743d526..22a430894b4af0 100644 --- a/lib/spack/external/archspec/__init__.py +++ b/lib/spack/external/archspec/__init__.py @@ -1,2 +1,2 @@ """Init file to avoid namespace packages""" -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json index 2ddad29345441b..1e77caba4aea00 100644 --- a/lib/spack/external/archspec/json/cpu/microarchitectures.json +++ b/lib/spack/external/archspec/json/cpu/microarchitectures.json @@ -2318,6 +2318,26 @@ ] } }, + "power10": { + "from": ["power9"], + "vendor": "IBM", + "generation": 10, + "features": [], + "compilers": { + "gcc": [ + { + "versions": "11.1:", + "flags": "-mcpu={name} -mtune={name}" + } + ], + "clang": [ + { + "versions": "11.0:", + "flags": "-mcpu={name} -mtune={name}" + } + ] + } + }, "ppc64le": { "from": [], "vendor": "generic", @@ -2405,6 +2425,29 @@ ] } }, + "power10le": { + "from": ["power9le"], + "vendor": "IBM", + "generation": 10, + "features": [], + "compilers": { + "gcc": [ + { + "name": "power10", + "versions": "11.1:", + "flags": "-mcpu={name} -mtune={name}" + } + ], + "clang": [ + { + "versions": "11.0:", + "family": "ppc64le", + "name": "power10", + "flags": "-mcpu={name} -mtune={name}" + } + ] + } + }, "aarch64": { "from": [], "vendor": "generic", @@ -2592,6 +2635,37 @@ ] } }, + "armv9.0a": { + "from": ["armv8.5a"], + "vendor": "generic", + "features": [], + "compilers": { + "gcc": [ + { + "versions": "12:", + "flags": "-march=armv9-a -mtune=generic" + } + ], + "clang": [ + { + "versions": "14:", + "flags": "-march=armv9-a -mtune=generic" + } + ], + "apple-clang": [ + { + "versions": ":", + "flags": "-march=armv9-a -mtune=generic" + } + ], + "arm": [ + { + "versions": ":", + "flags": "-march=armv9-a -mtune=generic" + } + ] + } + }, "thunderx2": { "from": ["armv8.1a"], "vendor": "Cavium", @@ -2813,8 +2887,12 @@ ], "arm" : [ { - "versions": "20:", + "versions": "20:21.9", "flags" : "-march=armv8.2-a+fp16+rcpc+dotprod+crypto" + }, + { + "versions": "22:", + "flags" : "-mcpu=neoverse-n1" } ], "nvhpc" : [ @@ -2942,7 +3020,7 @@ }, { "versions": "22:", - "flags" : "-march=armv8.4-a+sve+ssbs+fp16+bf16+crypto+i8mm+rng" + "flags" : "-mcpu=neoverse-v1" } ], "nvhpc" : [ @@ -2954,6 +3032,126 @@ ] } }, + "neoverse_v2": { + "from": ["neoverse_n1", "armv9.0a"], + "vendor": "ARM", + "features": [ + "fp", + "asimd", + "evtstrm", + "aes", + "pmull", + "sha1", + "sha2", + "crc32", + "atomics", + "fphp", + "asimdhp", + "cpuid", + "asimdrdm", + "jscvt", + "fcma", + "lrcpc", + "dcpop", + "sha3", + "sm3", + "sm4", + "asimddp", + "sha512", + "sve", + "asimdfhm", + "dit", + "uscat", + "ilrcpc", + "flagm", + "ssbs", + "sb", + "paca", + "pacg", + "dcpodp", + "sve2", + "sveaes", + "svepmull", + "svebitperm", + "svesha3", + "svesm4", + "flagm2", + "frint", + "svei8mm", + "svebf16", + "i8mm", + "bf16", + "dgh", + "bti" + ], + "compilers" : { + "gcc": [ + { + "versions": "4.8:5.99", + "flags": "-march=armv8-a" + }, + { + "versions": "6:6.99", + "flags" : "-march=armv8.1-a" + }, + { + "versions": "7.0:7.99", + "flags" : "-march=armv8.2-a -mtune=cortex-a72" + }, + { + "versions": "8.0:8.99", + "flags" : "-march=armv8.4-a+sve -mtune=cortex-a72" + }, + { + "versions": "9.0:9.99", + "flags" : "-march=armv8.5-a+sve -mtune=cortex-a76" + }, + { + "versions": "10.0:11.99", + "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16 -mtune=cortex-a77" + }, + { + "versions": "12.0:12.99", + "flags" : "-march=armv9-a+i8mm+bf16 -mtune=cortex-a710" + }, + { + "versions": "13.0:", + "flags" : "-mcpu=neoverse-v2" + } + ], + "clang" : [ + { + "versions": "9.0:10.99", + "flags" : "-march=armv8.5-a+sve" + }, + { + "versions": "11.0:13.99", + "flags" : "-march=armv8.5-a+sve+sve2+i8mm+bf16" + }, + { + "versions": "14.0:15.99", + "flags" : "-march=armv9-a+i8mm+bf16" + }, + { + "versions": "16.0:", + "flags" : "-mcpu=neoverse-v2" + } + ], + "arm" : [ + { + "versions": "23.04.0:", + "flags" : "-mcpu=neoverse-v2" + } + ], + "nvhpc" : [ + { + "versions": "23.3:", + "name": "neoverse-v2", + "flags": "-tp {name}" + } + ] + } + }, "m1": { "from": ["armv8.4a"], "vendor": "Apple", From f3537bc66b00c097df092af49cc23b95169c6296 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 7 Nov 2023 07:46:06 +0100 Subject: [PATCH 525/806] ASP: targets, compilers and providers soft-preferences are only global (#31261) Modify the packages.yaml schema so that soft-preferences on targets, compilers and providers can only be specified under the "all" attribute. This makes them effectively global preferences. Version preferences instead can only be specified under a package specific section. If a preference attribute is found in a section where it should not be, it will be ignored and a warning is printed to screen. --- lib/spack/docs/build_settings.rst | 76 ++++---- lib/spack/spack/cmd/config.py | 8 +- lib/spack/spack/schema/packages.py | 173 +++++++++++------- lib/spack/spack/solver/asp.py | 64 +++---- lib/spack/spack/solver/concretize.lp | 38 ++-- lib/spack/spack/solver/heuristic.lp | 4 +- lib/spack/spack/solver/heuristic_separate.lp | 4 +- lib/spack/spack/test/cmd/config.py | 23 +-- lib/spack/spack/test/cmd/env.py | 2 +- .../spack/test/concretize_preferences.py | 16 +- lib/spack/spack/test/config.py | 8 +- 11 files changed, 209 insertions(+), 207 deletions(-) diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst index 402b33f6a2585b..38fe2fb2c06d76 100644 --- a/lib/spack/docs/build_settings.rst +++ b/lib/spack/docs/build_settings.rst @@ -526,56 +526,52 @@ Package Preferences In some cases package requirements can be too strong, and package preferences are the better option. Package preferences do not impose constraints on packages for particular versions or variants values, -they rather only set defaults -- the concretizer is free to change -them if it must due to other constraints. Also note that package -preferences are of lower priority than reuse of already installed -packages. +they rather only set defaults. The concretizer is free to change +them if it must, due to other constraints, and also prefers reusing +installed packages over building new ones that are a better match for +preferences. -Here's an example ``packages.yaml`` file that sets preferred packages: +Most package preferences (``compilers``, ``target`` and ``providers``) +can only be set globally under the ``all`` section of ``packages.yaml``: + +.. code-block:: yaml + + packages: + all: + compiler: [gcc@12.2.0, clang@12:, oneapi@2023:] + target: [x86_64_v3] + providers: + mpi: [mvapich2, mpich, openmpi] + +These preferences override Spack's default and effectively reorder priorities +when looking for the best compiler, target or virtual package provider. Each +preference takes an ordered list of spec constraints, with earlier entries in +the list being preferred over later entries. + +In the example above all packages prefer to be compiled with ``gcc@12.2.0``, +to target the ``x86_64_v3`` microarchitecture and to use ``mvapich2`` if they +depend on ``mpi``. + +The ``variants`` and ``version`` preferences can be set under +package specific sections of the ``packages.yaml`` file: .. code-block:: yaml packages: opencv: - compiler: [gcc@4.9] variants: +debug gperftools: version: [2.2, 2.4, 2.3] - all: - compiler: [gcc@4.4.7, 'gcc@4.6:', intel, clang, pgi] - target: [sandybridge] - providers: - mpi: [mvapich2, mpich, openmpi] -At a high level, this example is specifying how packages are preferably -concretized. The opencv package should prefer using GCC 4.9 and -be built with debug options. The gperftools package should prefer version -2.2 over 2.4. Every package on the system should prefer mvapich2 for -its MPI and GCC 4.4.7 (except for opencv, which overrides this by preferring GCC 4.9). -These options are used to fill in implicit defaults. Any of them can be overwritten -on the command line if explicitly requested. - -Package preferences accept the follow keys or components under -the specific package (or ``all``) section: ``compiler``, ``variants``, -``version``, ``providers``, and ``target``. Each component has an -ordered list of spec ``constraints``, with earlier entries in the -list being preferred over later entries. - -Sometimes a package installation may have constraints that forbid -the first concretization rule, in which case Spack will use the first -legal concretization rule. Going back to the example, if a user -requests gperftools 2.3 or later, then Spack will install version 2.4 -as the 2.4 version of gperftools is preferred over 2.3. - -An explicit concretization rule in the preferred section will always -take preference over unlisted concretizations. In the above example, -xlc isn't listed in the compiler list. Every listed compiler from -gcc to pgi will thus be preferred over the xlc compiler. - -The syntax for the ``provider`` section differs slightly from other -concretization rules. A provider lists a value that packages may -``depends_on`` (e.g, MPI) and a list of rules for fulfilling that -dependency. +In this case, the preference for ``opencv`` is to build with debug options, while +``gperftools`` prefers version 2.2 over 2.4. + +Any preference can be overwritten on the command line if explicitly requested. + +Preferences cannot overcome explicit constraints, as they only set a preferred +ordering among homogeneous attribute values. Going back to the example, if +``gperftools@2.3:`` was requested, then Spack will install version 2.4 +since the most preferred version 2.2 is prohibited by the version constraint. .. _package_permissions: diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index c4446b475afcbe..14514400a86ceb 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -407,7 +407,9 @@ def config_prefer_upstream(args): pkgs = {} for spec in pref_specs: # Collect all the upstream compilers and versions for this package. - pkg = pkgs.get(spec.name, {"version": [], "compiler": []}) + pkg = pkgs.get(spec.name, {"version": []}) + all = pkgs.get("all", {"compiler": []}) + pkgs["all"] = all pkgs[spec.name] = pkg # We have no existing variant if this is our first added version. @@ -418,8 +420,8 @@ def config_prefer_upstream(args): pkg["version"].append(version) compiler = str(spec.compiler) - if compiler not in pkg["compiler"]: - pkg["compiler"].append(compiler) + if compiler not in all["compiler"]: + all["compiler"].append(compiler) # Get and list all the variants that differ from the default. variants = [] diff --git a/lib/spack/spack/schema/packages.py b/lib/spack/spack/schema/packages.py index 2cc4534d0711fa..2e651ec798355d 100644 --- a/lib/spack/spack/schema/packages.py +++ b/lib/spack/spack/schema/packages.py @@ -8,6 +8,66 @@ :lines: 13- """ +permissions = { + "type": "object", + "additionalProperties": False, + "properties": { + "read": {"type": "string", "enum": ["user", "group", "world"]}, + "write": {"type": "string", "enum": ["user", "group", "world"]}, + "group": {"type": "string"}, + }, +} + +variants = {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]} + +requirements = { + "oneOf": [ + # 'require' can be a list of requirement_groups. + # each requirement group is a list of one or more + # specs. Either at least one or exactly one spec + # in the group must be satisfied (depending on + # whether you use "any_of" or "one_of", + # repectively) + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "additionalProperties": False, + "properties": { + "one_of": {"type": "array", "items": {"type": "string"}}, + "any_of": {"type": "array", "items": {"type": "string"}}, + "spec": {"type": "string"}, + "message": {"type": "string"}, + "when": {"type": "string"}, + }, + }, + {"type": "string"}, + ] + }, + }, + # Shorthand for a single requirement group with + # one member + {"type": "string"}, + ] +} + +permissions = { + "type": "object", + "additionalProperties": False, + "properties": { + "read": {"type": "string", "enum": ["user", "group", "world"]}, + "write": {"type": "string", "enum": ["user", "group", "world"]}, + "group": {"type": "string"}, + }, +} + +package_attributes = { + "type": "object", + "additionalProperties": False, + "patternProperties": {r"\w+": {}}, +} #: Properties for inclusion in other schemas properties = { @@ -15,57 +75,14 @@ "type": "object", "default": {}, "additionalProperties": False, - "patternProperties": { - r"\w[\w-]*": { # package name + "properties": { + "all": { # package name "type": "object", "default": {}, "additionalProperties": False, "properties": { - "require": { - "oneOf": [ - # 'require' can be a list of requirement_groups. - # each requirement group is a list of one or more - # specs. Either at least one or exactly one spec - # in the group must be satisfied (depending on - # whether you use "any_of" or "one_of", - # repectively) - { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "additionalProperties": False, - "properties": { - "one_of": { - "type": "array", - "items": {"type": "string"}, - }, - "any_of": { - "type": "array", - "items": {"type": "string"}, - }, - "spec": {"type": "string"}, - "message": {"type": "string"}, - "when": {"type": "string"}, - }, - }, - {"type": "string"}, - ] - }, - }, - # Shorthand for a single requirement group with - # one member - {"type": "string"}, - ] - }, - "version": { - "type": "array", - "default": [], - # version strings (type should be string, number is still possible - # but deprecated. this is to avoid issues with e.g. 3.10 -> 3.1) - "items": {"anyOf": [{"type": "string"}, {"type": "number"}]}, - }, + "require": requirements, + "version": {}, # Here only to warn users on ignored properties "target": { "type": "array", "default": [], @@ -78,22 +95,10 @@ "items": {"type": "string"}, }, # compiler specs "buildable": {"type": "boolean", "default": True}, - "permissions": { - "type": "object", - "additionalProperties": False, - "properties": { - "read": {"type": "string", "enum": ["user", "group", "world"]}, - "write": {"type": "string", "enum": ["user", "group", "world"]}, - "group": {"type": "string"}, - }, - }, + "permissions": permissions, # If 'get_full_repo' is promoted to a Package-level # attribute, it could be useful to set it here - "package_attributes": { - "type": "object", - "additionalProperties": False, - "patternProperties": {r"\w+": {}}, - }, + "package_attributes": package_attributes, "providers": { "type": "object", "default": {}, @@ -106,12 +111,40 @@ } }, }, - "variants": { - "oneOf": [ - {"type": "string"}, - {"type": "array", "items": {"type": "string"}}, - ] + "variants": variants, + }, + "deprecatedProperties": { + "properties": ["version"], + "message": "setting version preferences in the 'all' section of packages.yaml " + "is deprecated and will be removed in v0.22\n\n\tThese preferences " + "will be ignored by Spack. You can set them only in package specific sections " + "of the same file.\n", + "error": False, + }, + } + }, + "patternProperties": { + r"(?!^all$)(^\w[\w-]*)": { # package name + "type": "object", + "default": {}, + "additionalProperties": False, + "properties": { + "require": requirements, + "version": { + "type": "array", + "default": [], + # version strings + "items": {"anyOf": [{"type": "string"}, {"type": "number"}]}, }, + "target": {}, # Here only to warn users on ignored properties + "compiler": {}, # Here only to warn users on ignored properties + "buildable": {"type": "boolean", "default": True}, + "permissions": permissions, + # If 'get_full_repo' is promoted to a Package-level + # attribute, it could be useful to set it here + "package_attributes": package_attributes, + "providers": {}, # Here only to warn users on ignored properties + "variants": variants, "externals": { "type": "array", "items": { @@ -127,6 +160,14 @@ }, }, }, + "deprecatedProperties": { + "properties": ["target", "compiler", "providers"], + "message": "setting compiler, target or provider preferences in a package " + "specific section of packages.yaml is deprecated, and will be removed in " + "v0.22.\n\n\tThese preferences will be ignored by Spack. You " + "can set them only in the 'all' section of the same file.\n", + "error": False, + }, } }, } diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 6df9a3583ee34e..0cca7443595bd7 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1258,32 +1258,9 @@ def compiler_facts(self): matches = sorted(indexed_possible_compilers, key=lambda x: ppk(x[1].spec)) for weight, (compiler_id, cspec) in enumerate(matches): - f = fn.default_compiler_preference(compiler_id, weight) + f = fn.compiler_weight(compiler_id, weight) self.gen.fact(f) - def package_compiler_defaults(self, pkg): - """Facts about packages' compiler prefs.""" - - packages = spack.config.get("packages") - pkg_prefs = packages.get(pkg.name) - if not pkg_prefs or "compiler" not in pkg_prefs: - return - - compiler_list = self.possible_compilers - compiler_list = sorted(compiler_list, key=lambda x: (x.name, x.version), reverse=True) - ppk = spack.package_prefs.PackagePrefs(pkg.name, "compiler", all=False) - matches = sorted(compiler_list, key=lambda x: ppk(x.spec)) - - for i, compiler in enumerate(reversed(matches)): - self.gen.fact( - fn.pkg_fact( - pkg.name, - fn.node_compiler_preference( - compiler.spec.name, compiler.spec.version, -i * 100 - ), - ) - ) - def package_requirement_rules(self, pkg): rules = self.requirement_rules_from_package_py(pkg) rules.extend(self.requirement_rules_from_packages_yaml(pkg)) @@ -1375,9 +1352,6 @@ def pkg_rules(self, pkg, tests): # conflicts self.conflict_rules(pkg) - # default compilers for this package - self.package_compiler_defaults(pkg) - # virtuals self.package_provider_rules(pkg) @@ -1673,6 +1647,7 @@ def virtual_preferences(self, pkg_name, func): for i, provider in enumerate(providers): provider_name = spack.spec.Spec(provider).name func(vspec, provider_name, i) + self.gen.newline() def provider_defaults(self): self.gen.h2("Default virtual providers") @@ -1865,8 +1840,8 @@ def preferred_variants(self, pkg_name): fn.variant_default_value_from_packages_yaml(pkg_name, variant.name, value) ) - def target_preferences(self, pkg_name): - key_fn = spack.package_prefs.PackagePrefs(pkg_name, "target") + def target_preferences(self): + key_fn = spack.package_prefs.PackagePrefs("all", "target") if not self.target_specs_cache: self.target_specs_cache = [ @@ -1876,17 +1851,25 @@ def target_preferences(self, pkg_name): package_targets = self.target_specs_cache[:] package_targets.sort(key=key_fn) - - offset = 0 - best_default = self.default_targets[0][1] for i, preferred in enumerate(package_targets): - if str(preferred.architecture.target) == best_default and i != 0: - offset = 100 - self.gen.fact( - fn.pkg_fact( - pkg_name, fn.target_weight(str(preferred.architecture.target), i + offset) - ) - ) + self.gen.fact(fn.target_weight(str(preferred.architecture.target), i)) + + def flag_defaults(self): + self.gen.h2("Compiler flag defaults") + + # types of flags that can be on specs + for flag in spack.spec.FlagMap.valid_compiler_flags(): + self.gen.fact(fn.flag_type(flag)) + self.gen.newline() + + # flags from compilers.yaml + compilers = all_compilers_in_config() + for compiler in compilers: + for name, flags in compiler.flags.items(): + for flag in flags: + self.gen.fact( + fn.compiler_version_flag(compiler.name, compiler.version, name, flag) + ) def spec_clauses(self, *args, **kwargs): """Wrap a call to `_spec_clauses()` into a try/except block that @@ -2340,6 +2323,8 @@ def target_defaults(self, specs): self.default_targets = list(sorted(set(self.default_targets))) + self.target_preferences() + def virtual_providers(self): self.gen.h2("Virtual providers") msg = ( @@ -2661,7 +2646,6 @@ def setup( self.pkg_rules(pkg, tests=self.tests) self.gen.h2("Package preferences: %s" % pkg) self.preferred_variants(pkg) - self.target_preferences(pkg) self.gen.h1("Develop specs") # Inject dev_path from environment diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 0b2b83dc202965..5e98e5cf116358 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -589,21 +589,15 @@ possible_provider_weight(DependencyNode, VirtualNode, 0, "external") :- provider(DependencyNode, VirtualNode), external(DependencyNode). -% A provider mentioned in packages.yaml can use a weight -% according to its priority in the list of providers -possible_provider_weight(node(DependencyID, Dependency), node(VirtualID, Virtual), Weight, "packages_yaml") - :- provider(node(DependencyID, Dependency), node(VirtualID, Virtual)), - depends_on(node(ID, Package), node(DependencyID, Dependency)), - pkg_fact(Package, provider_preference(Virtual, Dependency, Weight)). - % A provider mentioned in the default configuration can use a weight % according to its priority in the list of providers -possible_provider_weight(node(DependencyID, Dependency), node(VirtualID, Virtual), Weight, "default") - :- provider(node(DependencyID, Dependency), node(VirtualID, Virtual)), - default_provider_preference(Virtual, Dependency, Weight). +possible_provider_weight(node(ProviderID, Provider), node(VirtualID, Virtual), Weight, "default") + :- provider(node(ProviderID, Provider), node(VirtualID, Virtual)), + default_provider_preference(Virtual, Provider, Weight). % Any provider can use 100 as a weight, which is very high and discourage its use -possible_provider_weight(node(DependencyID, Dependency), VirtualNode, 100, "fallback") :- provider(node(DependencyID, Dependency), VirtualNode). +possible_provider_weight(node(ProviderID, Provider), VirtualNode, 100, "fallback") + :- provider(node(ProviderID, Provider), VirtualNode). % do not warn if generated program contains none of these. #defined virtual/1. @@ -1059,7 +1053,7 @@ attr("node_target", PackageNode, Target) node_target_weight(node(ID, Package), Weight) :- attr("node", node(ID, Package)), attr("node_target", node(ID, Package), Target), - pkg_fact(Package, target_weight(Target, Weight)). + target_weight(Target, Weight). % compatibility rules for targets among nodes node_target_match(ParentNode, DependencyNode) @@ -1181,23 +1175,17 @@ compiler_mismatch_required(PackageNode, DependencyNode) #defined allow_compiler/2. % compilers weighted by preference according to packages.yaml -compiler_weight(node(ID, Package), Weight) - :- node_compiler(node(ID, Package), CompilerID), - compiler_name(CompilerID, Compiler), - compiler_version(CompilerID, V), - pkg_fact(Package, node_compiler_preference(Compiler, V, Weight)). -compiler_weight(node(ID, Package), Weight) +node_compiler_weight(node(ID, Package), Weight) :- node_compiler(node(ID, Package), CompilerID), compiler_name(CompilerID, Compiler), compiler_version(CompilerID, V), - not pkg_fact(Package, node_compiler_preference(Compiler, V, _)), - default_compiler_preference(CompilerID, Weight). -compiler_weight(node(ID, Package), 100) + compiler_weight(CompilerID, Weight). + +node_compiler_weight(node(ID, Package), 100) :- node_compiler(node(ID, Package), CompilerID), compiler_name(CompilerID, Compiler), compiler_version(CompilerID, V), - not pkg_fact(Package, node_compiler_preference(Compiler, V, _)), - not default_compiler_preference(CompilerID, _). + not compiler_weight(CompilerID, _). % For the time being, be strict and reuse only if the compiler match one we have on the system error(100, "Compiler {1}@{2} requested for {0} cannot be found. Set install_missing_compilers:true if intended.", Package, Compiler, Version) @@ -1205,7 +1193,7 @@ error(100, "Compiler {1}@{2} requested for {0} cannot be found. Set install_miss not node_compiler(node(ID, Package), _). #defined node_compiler_preference/4. -#defined default_compiler_preference/3. +#defined compiler_weight/3. %----------------------------------------------------------------------------- % Compiler flags @@ -1529,7 +1517,7 @@ opt_criterion(15, "non-preferred compilers"). #minimize{ 0@15: #true }. #minimize{ Weight@15+Priority,PackageNode - : compiler_weight(PackageNode, Weight), + : node_compiler_weight(PackageNode, Weight), build_priority(PackageNode, Priority) }. diff --git a/lib/spack/spack/solver/heuristic.lp b/lib/spack/spack/solver/heuristic.lp index 745ea4f9625f17..cc87207047d438 100644 --- a/lib/spack/spack/solver/heuristic.lp +++ b/lib/spack/spack/solver/heuristic.lp @@ -16,9 +16,9 @@ #heuristic attr("version", node(0, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true] #heuristic version_weight(node(0, Package), 0) : pkg_fact(Package, version_declared(Version, 0)), attr("root", node(0, Package)). [35, true] #heuristic attr("variant_value", node(0, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("root", node(0, Package)). [35, true] -#heuristic attr("node_target", node(0, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("root", node(0, Package)). [35, true] +#heuristic attr("node_target", node(0, Package), Target) : target_weight(Target, 0), attr("root", node(0, Package)). [35, true] #heuristic node_target_weight(node(0, Package), 0) : attr("root", node(0, Package)). [35, true] -#heuristic node_compiler(node(0, Package), CompilerID) : default_compiler_preference(ID, 0), compiler_id(ID), attr("root", node(0, Package)). [35, true] +#heuristic node_compiler(node(0, Package), CompilerID) : compiler_weight(ID, 0), compiler_id(ID), attr("root", node(0, Package)). [35, true] % Providers #heuristic attr("node", node(0, Package)) : default_provider_preference(Virtual, Package, 0), possible_in_link_run(Package). [30, true] diff --git a/lib/spack/spack/solver/heuristic_separate.lp b/lib/spack/spack/solver/heuristic_separate.lp index cb4345f3be3245..caa47aa09d84d1 100644 --- a/lib/spack/spack/solver/heuristic_separate.lp +++ b/lib/spack/spack/solver/heuristic_separate.lp @@ -13,7 +13,7 @@ #heuristic attr("variant_value", node(ID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true] #heuristic attr("node_target", node(ID, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true] #heuristic node_target_weight(node(ID, Package), 0) : attr("node", node(ID, Package)), ID > 0. [25-5*ID, true] -#heuristic node_compiler(node(ID, Package), CompilerID) : default_compiler_preference(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true] +#heuristic node_compiler(node(ID, Package), CompilerID) : compiler_weight(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), ID > 0. [25-5*ID, true] % node(ID, _), split build dependencies #heuristic attr("version", node(ID, Package), Version) : pkg_fact(Package, version_declared(Version, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true] @@ -21,4 +21,4 @@ #heuristic attr("variant_value", node(ID, Package), Variant, Value) : variant_default_value(Package, Variant, Value), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true] #heuristic attr("node_target", node(ID, Package), Target) : pkg_fact(Package, target_weight(Target, 0)), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true] #heuristic node_target_weight(node(ID, Package), 0) : attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true] -#heuristic node_compiler(node(ID, Package), CompilerID) : default_compiler_preference(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true] +#heuristic node_compiler(node(ID, Package), CompilerID) : compiler_weight(CompilerID, 0), compiler_id(CompilerID), attr("node", node(ID, Package)), multiple_unification_sets(Package), ID > 0. [25, true] diff --git a/lib/spack/spack/test/cmd/config.py b/lib/spack/spack/test/cmd/config.py index 4f3d5afe770e0c..7247ce97531dcd 100644 --- a/lib/spack/spack/test/cmd/config.py +++ b/lib/spack/spack/test/cmd/config.py @@ -215,10 +215,10 @@ def test_config_add_override_leaf(mutable_empty_config): def test_config_add_update_dict(mutable_empty_config): - config("add", "packages:all:version:[1.0.0]") + config("add", "packages:hdf5:version:[1.0.0]") output = config("get", "packages") - expected = "packages:\n all:\n version: [1.0.0]\n" + expected = "packages:\n hdf5:\n version: [1.0.0]\n" assert output == expected @@ -352,8 +352,7 @@ def test_config_add_update_dict_from_file(mutable_empty_config, tmpdir): contents = """spack: packages: all: - version: - - 1.0.0 + target: [x86_64] """ # create temp file and add it to config @@ -368,8 +367,7 @@ def test_config_add_update_dict_from_file(mutable_empty_config, tmpdir): # added config comes before prior config expected = """packages: all: - version: - - 1.0.0 + target: [x86_64] compiler: [gcc] """ @@ -381,7 +379,7 @@ def test_config_add_invalid_file_fails(tmpdir): # invalid because version requires a list contents = """spack: packages: - all: + hdf5: version: 1.0.0 """ @@ -631,14 +629,11 @@ def test_config_prefer_upstream( packages = syaml.load(open(cfg_file))["packages"] # Make sure only the non-default variants are set. - assert packages["boost"] == { - "compiler": ["gcc@=10.2.1"], - "variants": "+debug +graph", - "version": ["1.63.0"], - } - assert packages["dependency-install"] == {"compiler": ["gcc@=10.2.1"], "version": ["2.0"]} + assert packages["all"] == {"compiler": ["gcc@=10.2.1"]} + assert packages["boost"] == {"variants": "+debug +graph", "version": ["1.63.0"]} + assert packages["dependency-install"] == {"version": ["2.0"]} # Ensure that neither variant gets listed for hdf5, since they conflict - assert packages["hdf5"] == {"compiler": ["gcc@=10.2.1"], "version": ["2.3"]} + assert packages["hdf5"] == {"version": ["2.3"]} # Make sure a message about the conflicting hdf5's was given. assert "- hdf5" in output diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index a06fdbd8cf8b2f..983a778e969b19 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -2621,7 +2621,7 @@ def test_env_write_only_non_default_nested(tmpdir): - matrix: - [mpileaks] packages: - mpileaks: + all: compiler: [gcc] view: true """ diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index 20d0e1ae91ad84..d061f9a8f555c5 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -105,17 +105,13 @@ def test_preferred_variants_from_wildcard(self): @pytest.mark.parametrize( "compiler_str,spec_str", - [("gcc@4.5.0", "mpileaks"), ("clang@12.0.0", "mpileaks"), ("gcc@4.5.0", "openmpi")], + [("gcc@=4.5.0", "mpileaks"), ("clang@=12.0.0", "mpileaks"), ("gcc@=4.5.0", "openmpi")], ) def test_preferred_compilers(self, compiler_str, spec_str): """Test preferred compilers are applied correctly""" - spec = Spec(spec_str) - update_packages(spec.name, "compiler", [compiler_str]) - spec.concretize() - # note: lhs has concrete compiler version, rhs still abstract. - # Could be made more strict by checking for equality with `gcc@=4.5.0` - # etc. - assert spec.compiler.satisfies(CompilerSpec(compiler_str)) + update_packages("all", "compiler", [compiler_str]) + spec = spack.spec.Spec(spec_str).concretized() + assert spec.compiler == CompilerSpec(compiler_str) @pytest.mark.only_clingo("Use case not supported by the original concretizer") def test_preferred_target(self, mutable_mock_repo): @@ -124,7 +120,7 @@ def test_preferred_target(self, mutable_mock_repo): default = str(spec.target) preferred = str(spec.target.family) - update_packages("mpich", "target", [preferred]) + update_packages("all", "target", [preferred]) spec = concretize("mpich") assert str(spec.target) == preferred @@ -132,7 +128,7 @@ def test_preferred_target(self, mutable_mock_repo): assert str(spec["mpileaks"].target) == preferred assert str(spec["mpich"].target) == preferred - update_packages("mpileaks", "target", [default]) + update_packages("all", "target", [default]) spec = concretize("mpileaks") assert str(spec["mpileaks"].target) == default assert str(spec["mpich"].target) == default diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index f7bf7d75698cd1..5f544a31296a68 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -78,7 +78,7 @@ def env_yaml(tmpdir): verify_ssl: False dirty: False packages: - libelf: + all: compiler: [ 'gcc@4.5.3' ] repos: - /x/y/z @@ -942,7 +942,7 @@ def test_single_file_scope(config, env_yaml): # from the single-file config assert spack.config.get("config:verify_ssl") is False assert spack.config.get("config:dirty") is False - assert spack.config.get("packages:libelf:compiler") == ["gcc@4.5.3"] + assert spack.config.get("packages:all:compiler") == ["gcc@4.5.3"] # from the lower config scopes assert spack.config.get("config:checksum") is True @@ -965,7 +965,7 @@ def test_single_file_scope_section_override(tmpdir, config): config: verify_ssl: False packages:: - libelf: + all: compiler: [ 'gcc@4.5.3' ] repos: - /x/y/z @@ -977,7 +977,7 @@ def test_single_file_scope_section_override(tmpdir, config): with spack.config.override(scope): # from the single-file config assert spack.config.get("config:verify_ssl") is False - assert spack.config.get("packages:libelf:compiler") == ["gcc@4.5.3"] + assert spack.config.get("packages:all:compiler") == ["gcc@4.5.3"] # from the lower config scopes assert spack.config.get("config:checksum") is True From c232bf435ac22cb8aa9e27218a62bb64ad9c759a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 7 Nov 2023 11:53:36 +0100 Subject: [PATCH 526/806] Change container labeling so that "latest" is the latest tag (#40593) * Use `major.minor.patch`, `major.minor`, `major` in tags * Ensure `latest` is the semver largest version, and not "latest in time" * Remove Ubuntu 18.04 from the list of images --- .github/workflows/build-containers.yml | 46 ++++++++++++-------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 807bf6c858d25d..880cf9c64495f5 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -38,12 +38,11 @@ jobs: # Meaning of the various items in the matrix list # 0: Container name (e.g. ubuntu-bionic) # 1: Platforms to build for - # 2: Base image (e.g. ubuntu:18.04) + # 2: Base image (e.g. ubuntu:22.04) dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'], [centos7, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:7'], [centos-stream, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream'], [leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'], - [ubuntu-bionic, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:18.04'], [ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'], [ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'], [almalinux8, 'linux/amd64,linux/arm64,linux/ppc64le', 'almalinux:8'], @@ -58,18 +57,20 @@ jobs: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2 - - name: Set Container Tag Normal (Nightly) - run: | - container="${{ matrix.dockerfile[0] }}:latest" - echo "container=${container}" >> $GITHUB_ENV - echo "versioned=${container}" >> $GITHUB_ENV - - # On a new release create a container with the same tag as the release. - - name: Set Container Tag on Release - if: github.event_name == 'release' - run: | - versioned="${{matrix.dockerfile[0]}}:${GITHUB_REF##*/}" - echo "versioned=${versioned}" >> $GITHUB_ENV + - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 + id: docker_meta + with: + images: | + ghcr.io/${{ github.repository_owner }}/${{ matrix.dockerfile[0] }} + ${{ github.repository_owner }}/${{ matrix.dockerfile[0] }} + tags: | + type=schedule,pattern=nightly + type=schedule,pattern=develop + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=ref,event=pr - name: Generate the Dockerfile env: @@ -92,13 +93,13 @@ jobs: path: dockerfiles - name: Set up QEMU - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # @v1 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # @v1 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 - name: Log in to GitHub Container Registry - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # @v1 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d with: registry: ghcr.io username: ${{ github.actor }} @@ -106,21 +107,18 @@ jobs: - name: Log in to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # @v1 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & Deploy ${{ matrix.dockerfile[0] }} - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # @v2 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} push: ${{ github.event_name != 'pull_request' }} cache-from: type=gha cache-to: type=gha,mode=max - tags: | - spack/${{ env.container }} - spack/${{ env.versioned }} - ghcr.io/spack/${{ env.container }} - ghcr.io/spack/${{ env.versioned }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} From 6301edbd5d8197c5a5fd1aac7fd1817222b21d8b Mon Sep 17 00:00:00 2001 From: Rob Falgout Date: Tue, 7 Nov 2023 06:58:00 -0800 Subject: [PATCH 527/806] Update package.py for new release 2.30.0 (#40907) --- var/spack/repos/builtin/packages/hypre/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 433d60a2ce7765..09116340170f0d 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -24,6 +24,7 @@ class Hypre(AutotoolsPackage, CudaPackage, ROCmPackage): test_requires_compiler = True version("develop", branch="master") + version("2.30.0", sha256="8e2af97d9a25bf44801c6427779f823ebc6f306438066bba7fcbc2a5f9b78421") version("2.29.0", sha256="98b72115407a0e24dbaac70eccae0da3465f8f999318b2c9241631133f42d511") version("2.28.0", sha256="2eea68740cdbc0b49a5e428f06ad7af861d1e169ce6a12d2cf0aa2fc28c4a2ae") version("2.27.0", sha256="507a3d036bb1ac21a55685ae417d769dd02009bde7e09785d0ae7446b4ae1f98") From f3ba20db260c96a5eb9293ac311625cbdfb4192e Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Tue, 7 Nov 2023 08:00:28 -0700 Subject: [PATCH 528/806] fix configure args for darshan-runtime (#40873) Problem: the current configure arguments are added lists to a list, and this needs to be adding strings to the same list. Solution: ensure we add each item (string) separately. Signed-off-by: vsoch Co-authored-by: vsoch --- var/spack/repos/builtin/packages/darshan-runtime/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py index 1b4e06b5919a04..64d95b2ec87de2 100644 --- a/var/spack/repos/builtin/packages/darshan-runtime/package.py +++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py @@ -115,9 +115,9 @@ def configure_args(self): if "+apmpi" in spec: extra_args.append("--enable-apmpi-mod") if "+apmpi_sync" in spec: - extra_args.append(["--enable-apmpi-mod", "--enable-apmpi-coll-sync"]) + extra_args.extend(["--enable-apmpi-mod", "--enable-apmpi-coll-sync"]) if "+apxc" in spec: - extra_args.append(["--enable-apxc-mod"]) + extra_args.append("--enable-apxc-mod") extra_args.append("--with-mem-align=8") extra_args.append("--with-log-path-by-env=DARSHAN_LOG_DIR_PATH") From 75dfad8788f518e740a7e2fb80aabc1db61dd403 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 7 Nov 2023 17:17:31 +0100 Subject: [PATCH 529/806] catch exceptions in which_string (#40935) --- lib/spack/spack/util/executable.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 3aea141d875d7c..36c7e73e0638ae 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -330,8 +330,11 @@ def add_extra_search_paths(paths): for candidate_item in candidate_items: for directory in search_paths: exe = directory / candidate_item - if exe.is_file() and os.access(str(exe), os.X_OK): - return str(exe) + try: + if exe.is_file() and os.access(str(exe), os.X_OK): + return str(exe) + except OSError: + pass if required: raise CommandNotFoundError("spack requires '%s'. Make sure it is in your path." % args[0]) From 32f319157db370b42585ce04d5b4257340435429 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 7 Nov 2023 17:59:48 +0100 Subject: [PATCH 530/806] Update the branch for the tutorial command (#40934) --- lib/spack/spack/cmd/tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/tutorial.py b/lib/spack/spack/cmd/tutorial.py index a07824f922a74d..5759912b66ffc7 100644 --- a/lib/spack/spack/cmd/tutorial.py +++ b/lib/spack/spack/cmd/tutorial.py @@ -23,7 +23,7 @@ # tutorial configuration parameters -tutorial_branch = "releases/v0.20" +tutorial_branch = "releases/v0.21" tutorial_mirror = "file:///mirror" tutorial_key = os.path.join(spack.paths.share_path, "keys", "tutorial.pub") From b8302a8277a2966f6a01c22867301882f309343f Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Tue, 7 Nov 2023 10:44:28 -0700 Subject: [PATCH 531/806] ci: do not retry timed out build jobs (#40936) --- lib/spack/spack/ci.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index afad3b7a45197e..ac308045742f9b 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -46,7 +46,22 @@ from spack.reporters import CDash, CDashConfiguration from spack.reporters.cdash import build_stamp as cdash_build_stamp -JOB_RETRY_CONDITIONS = ["always"] +# See https://docs.gitlab.com/ee/ci/yaml/#retry for descriptions of conditions +JOB_RETRY_CONDITIONS = [ + # "always", + "unknown_failure", + "script_failure", + "api_failure", + "stuck_or_timeout_failure", + "runner_system_failure", + "runner_unsupported", + "stale_schedule", + # "job_execution_timeout", + "archived_failure", + "unmet_prerequisites", + "scheduler_failure", + "data_integrity_failure", +] TEMP_STORAGE_MIRROR_NAME = "ci_temporary_mirror" SPACK_RESERVED_TAGS = ["public", "protected", "notary"] From a093f4a8cee849a63e09065037e3a859306e808f Mon Sep 17 00:00:00 2001 From: Jacob King Date: Tue, 7 Nov 2023 11:21:38 -0700 Subject: [PATCH 532/806] superlu-dist: add +parmetis variant. (#40746) * Expose ability to make parmetis an optional superlu-dist dependency to spack package management. * rename parmetis variant: Enable ParMETIS library --------- Co-authored-by: eugeneswalker --- .../builtin/packages/superlu-dist/package.py | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 241dc4b552c7ff..eb5d51950fd3c3 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -53,14 +53,16 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): ), ) variant("shared", default=True, description="Build shared libraries") + variant("parmetis", default=True, description="Enable ParMETIS library") depends_on("mpi") depends_on("blas") depends_on("lapack") - depends_on("parmetis +int64", when="+int64") - depends_on("metis@5: +int64", when="+int64") - depends_on("parmetis ~int64", when="~int64") - depends_on("metis@5: ~int64", when="~int64") + with when("+parmetis"): + depends_on("metis@5: +int64", when="+int64") + depends_on("parmetis +int64", when="+int64") + depends_on("metis@5: ~int64", when="~int64") + depends_on("parmetis ~int64", when="~int64") depends_on("cmake@3.18.1:", type="build", when="@7.1.0:") depends_on("hipblas", when="+rocm") depends_on("rocsolver", when="+rocm") @@ -93,13 +95,17 @@ def append_from_variant(*args): append_define("TPL_LAPACK_LIBRARIES", spec["lapack"].libs) append_define("TPL_ENABLE_LAPACKLIB", True) append_define("USE_XSDK_DEFAULTS", True) - append_define( - "TPL_PARMETIS_LIBRARIES", [spec["parmetis"].libs.ld_flags, spec["metis"].libs.ld_flags] - ) - append_define( - "TPL_PARMETIS_INCLUDE_DIRS", - [spec["parmetis"].prefix.include, spec["metis"].prefix.include], - ) + + append_from_variant("TPL_ENABLE_PARMETISLIB", "parmetis") + if "+parmetis" in spec: + append_define( + "TPL_PARMETIS_LIBRARIES", + [spec["parmetis"].libs.ld_flags, spec["metis"].libs.ld_flags], + ) + append_define( + "TPL_PARMETIS_INCLUDE_DIRS", + [spec["parmetis"].prefix.include, spec["metis"].prefix.include], + ) append_define("XSDK_INDEX_SIZE", "64" if "+int64" in spec else "32") From 3a2ec729f7fb413aed47eb78abf5dc3d87f79222 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 7 Nov 2023 20:35:56 +0100 Subject: [PATCH 533/806] Ensure global command line arguments end up in args like before (#40929) --- lib/spack/spack/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index 87408d363ad1bd..5f28ab480cb02a 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -1023,7 +1023,7 @@ def finish_parse_and_run(parser, cmd_name, cmd, env_format_error): """Finish parsing after we know the command to run.""" # add the found command to the parser and re-run then re-parse command = parser.add_command(cmd_name) - args, unknown = parser.parse_known_args(cmd) + args, unknown = parser.parse_known_args() # Now that we know what command this is and what its args are, determine # whether we can continue with a bad environment and raise if not. From 3a5c1eb5f370cc532629f70b28067a6711aa24e3 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 7 Nov 2023 20:53:44 +0100 Subject: [PATCH 534/806] tutorial pipeline: force gcc@12.3.0 (#40937) --- share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index 1ff435bc9bfb7c..dc5c4e44649076 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -18,7 +18,7 @@ spack: - hdf5+hl+mpi ^mpich - trilinos - trilinos +hdf5 ^hdf5+hl+mpi ^mpich - - gcc@12 + - gcc@12.3.0 - mpileaks - lmod - macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran From 5774df6b7a295a397e30a843f5ef14b339535b64 Mon Sep 17 00:00:00 2001 From: Richarda Butler <39577672+RikkiButler20@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:04:41 -0800 Subject: [PATCH 535/806] Propagate variant across nodes that don't have that variant (#38512) Before this PR, variant were not propagated to leaf nodes that could accept the propagated value, if some intermediate node couldn't accept it. This PR fixes that issue by marking nodes as "candidate" for propagation and by setting the variant only if it can be accepted by the node. Co-authored-by: Massimiliano Culpo --- lib/spack/spack/solver/asp.py | 8 +-- lib/spack/spack/solver/concretize.lp | 29 ++++++++--- lib/spack/spack/test/concretize.py | 52 ++++++++++++++++--- .../builtin.mock/packages/adios2/package.py | 22 ++++++++ .../builtin.mock/packages/ascent/package.py | 21 ++++++++ .../builtin.mock/packages/bzip2/package.py | 19 +++++++ .../packages/dependency-foo-bar/package.py | 20 +++++++ .../packages/parent-foo-bar/package.py | 22 ++++++++ 8 files changed, 175 insertions(+), 18 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/adios2/package.py create mode 100644 var/spack/repos/builtin.mock/packages/ascent/package.py create mode 100644 var/spack/repos/builtin.mock/packages/bzip2/package.py create mode 100644 var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py create mode 100644 var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 0cca7443595bd7..4514bd0e96bc0f 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1922,7 +1922,7 @@ class Head: node_flag = fn.attr("node_flag_set") node_flag_source = fn.attr("node_flag_source") node_flag_propagate = fn.attr("node_flag_propagate") - variant_propagate = fn.attr("variant_propagate") + variant_propagation_candidate = fn.attr("variant_propagation_candidate") class Body: node = fn.attr("node") @@ -1936,7 +1936,7 @@ class Body: node_flag = fn.attr("node_flag") node_flag_source = fn.attr("node_flag_source") node_flag_propagate = fn.attr("node_flag_propagate") - variant_propagate = fn.attr("variant_propagate") + variant_propagation_candidate = fn.attr("variant_propagation_candidate") f = Body if body else Head @@ -1985,7 +1985,9 @@ class Body: clauses.append(f.variant_value(spec.name, vname, value)) if variant.propagate: - clauses.append(f.variant_propagate(spec.name, vname, value, spec.name)) + clauses.append( + f.variant_propagation_candidate(spec.name, vname, value, spec.name) + ) # Tell the concretizer that this is a possible value for the # variant, to account for things like int/str values where we diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 5e98e5cf116358..d5f24ddc3b33f0 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -757,23 +757,36 @@ node_has_variant(node(ID, Package), Variant) :- pkg_fact(Package, variant(Variant)), attr("node", node(ID, Package)). -attr("variant_propagate", PackageNode, Variant, Value, Source) :- +% Variant propagation is forwarded to dependencies +attr("variant_propagation_candidate", PackageNode, Variant, Value, Source) :- attr("node", PackageNode), depends_on(ParentNode, PackageNode), - attr("variant_propagate", ParentNode, Variant, Value, Source), - not attr("variant_set", PackageNode, Variant). + attr("variant_value", node(_, Source), Variant, Value), + attr("variant_propagation_candidate", ParentNode, Variant, _, Source). -attr("variant_value", node(ID, Package), Variant, Value) :- - attr("node", node(ID, Package)), +% If the node is a candidate, and it has the variant and value, +% then those variant and value should be propagated +attr("variant_propagate", node(ID, Package), Variant, Value, Source) :- + attr("variant_propagation_candidate", node(ID, Package), Variant, Value, Source), node_has_variant(node(ID, Package), Variant), - attr("variant_propagate", node(ID, Package), Variant, Value, _), - pkg_fact(Package, variant_possible_value(Variant, Value)). + pkg_fact(Package, variant_possible_value(Variant, Value)), + not attr("variant_set", node(ID, Package), Variant). + +% Propagate the value, if there is the corresponding attribute +attr("variant_value", PackageNode, Variant, Value) :- attr("variant_propagate", PackageNode, Variant, Value, _). + +% If a variant is propagated, we cannot have extraneous values (this is for multi valued variants) +variant_is_propagated(PackageNode, Variant) :- attr("variant_propagate", PackageNode, Variant, _, _). +:- variant_is_propagated(PackageNode, Variant), + attr("variant_value", PackageNode, Variant, Value), + not attr("variant_propagate", PackageNode, Variant, Value, _). +% Cannot receive different values from different sources on the same variant error(100, "{0} and {1} cannot both propagate variant '{2}' to package {3} with values '{4}' and '{5}'", Source1, Source2, Variant, Package, Value1, Value2) :- attr("variant_propagate", node(X, Package), Variant, Value1, Source1), attr("variant_propagate", node(X, Package), Variant, Value2, Source2), node_has_variant(node(X, Package), Variant), - Value1 < Value2. + Value1 < Value2, Source1 < Source2. % a variant cannot be set if it is not a variant on the package error(100, "Cannot set variant '{0}' for package '{1}' because the variant condition cannot be satisfied for the given spec", Variant, Package) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 0af689ddd5f0eb..eba86d14fcf7f0 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -349,6 +349,9 @@ def test_compiler_flags_differ_identical_compilers(self): spec.concretize() assert spec.satisfies("cflags=-O2") + @pytest.mark.only_clingo( + "Optional compiler propagation isn't deprecated for original concretizer" + ) def test_concretize_compiler_flag_propagate(self): spec = Spec("hypre cflags=='-g' ^openblas") spec.concretize() @@ -458,19 +461,54 @@ def test_concretize_two_virtuals_with_dual_provider_and_a_conflict(self): @pytest.mark.only_clingo( "Optional compiler propagation isn't deprecated for original concretizer" ) - def test_concretize_propagate_disabled_variant(self): + @pytest.mark.parametrize( + "spec_str,expected_propagation", + [ + ("hypre~~shared ^openblas+shared", [("hypre", "~shared"), ("openblas", "+shared")]), + # Propagates past a node that doesn't have the variant + ("hypre~~shared ^openblas", [("hypre", "~shared"), ("openblas", "~shared")]), + ( + "ascent~~shared +adios2", + [("ascent", "~shared"), ("adios2", "~shared"), ("bzip2", "~shared")], + ), + # Propagates below a node that uses the other value explicitly + ( + "ascent~~shared +adios2 ^adios2+shared", + [("ascent", "~shared"), ("adios2", "+shared"), ("bzip2", "~shared")], + ), + ( + "ascent++shared +adios2 ^adios2~shared", + [("ascent", "+shared"), ("adios2", "~shared"), ("bzip2", "+shared")], + ), + ], + ) + def test_concretize_propagate_disabled_variant(self, spec_str, expected_propagation): + """Tests various patterns of boolean variant propagation""" + spec = Spec(spec_str).concretized() + for key, expected_satisfies in expected_propagation: + spec[key].satisfies(expected_satisfies) + + @pytest.mark.only_clingo( + "Optional compiler propagation isn't deprecated for original concretizer" + ) + def test_concretize_propagated_variant_is_not_passed_to_dependent(self): """Test a package variant value was passed from its parent.""" - spec = Spec("hypre~~shared ^openblas") + spec = Spec("ascent~~shared +adios2 ^adios2+shared") spec.concretize() - assert spec.satisfies("^openblas~shared") + assert spec.satisfies("^adios2+shared") + assert spec.satisfies("^bzip2~shared") - def test_concretize_propagated_variant_is_not_passed_to_dependent(self): - """Test a package variant value was passed from its parent.""" - spec = Spec("hypre~~shared ^openblas+shared") + @pytest.mark.only_clingo( + "Optional compiler propagation isn't deprecated for original concretizer" + ) + def test_concretize_propagate_specified_variant(self): + """Test that only the specified variant is propagated to the dependencies""" + spec = Spec("parent-foo-bar ~~foo") spec.concretize() - assert spec.satisfies("^openblas+shared") + assert spec.satisfies("~foo") and spec.satisfies("^dependency-foo-bar~foo") + assert spec.satisfies("+bar") and not spec.satisfies("^dependency-foo-bar+bar") @pytest.mark.only_clingo("Original concretizer is allowed to forego variant propagation") def test_concretize_propagate_multivalue_variant(self): diff --git a/var/spack/repos/builtin.mock/packages/adios2/package.py b/var/spack/repos/builtin.mock/packages/adios2/package.py new file mode 100644 index 00000000000000..fb2f43ea0e154a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/adios2/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 Adios2(Package): + """This packagae has the variants shared and + bzip2, both defaulted to True""" + + homepage = "https://example.com" + url = "https://example.com/adios2.tar.gz" + + version("2.9.1", sha256="ddfa32c14494250ee8a48ef1c97a1bf6442c15484bbbd4669228a0f90242f4f9") + + variant("shared", default=True, description="Build shared libraries") + variant("bzip2", default=True, description="Enable BZip2 compression") + + depends_on("bzip2") diff --git a/var/spack/repos/builtin.mock/packages/ascent/package.py b/var/spack/repos/builtin.mock/packages/ascent/package.py new file mode 100644 index 00000000000000..9a8db472dc07ab --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/ascent/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 Ascent(Package): + """This packagae has the variants shared, defaulted + to True and adios2 defaulted to False""" + + homepage = "https://github.com/Alpine-DAV/ascent" + url = "http://www.example.com/ascent-1.0.tar.gz" + + version("0.9.2", sha256="44cd954aa5db478ab40042cd54fd6fcedf25000c3bb510ca23fcff8090531b91") + + variant("adios2", default=False, description="Build Adios2 filter support") + variant("shared", default=True, description="Build Ascent as shared libs") + + depends_on("adios2", when="+adios2") diff --git a/var/spack/repos/builtin.mock/packages/bzip2/package.py b/var/spack/repos/builtin.mock/packages/bzip2/package.py new file mode 100644 index 00000000000000..326533ac5ea117 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/bzip2/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 Bzip2(Package): + """This packagae has the variants shared + defaulted to True""" + + homepage = "https://example.com" + url = "https://example.com/bzip2-1.0.8tar.gz" + + version("1.0.8", sha256="ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269") + + variant("shared", default=True, description="Enables the build of shared libraries.") diff --git a/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py b/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py new file mode 100644 index 00000000000000..21e67f8a61bc12 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 DependencyFooBar(Package): + """This package has a variant "bar", which is False by default, and + variant "foo" which is True by default. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/dependency-foo-bar-1.0.tar.gz" + + version("1.0", md5="1234567890abcdefg1234567890098765") + + variant("foo", default=True, description="") + variant("bar", default=False, description="") diff --git a/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py b/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py new file mode 100644 index 00000000000000..14516566a9f7d4 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/parent-foo-bar/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 ParentFooBar(Package): + """This package has a variant "bar", which is True by default, and depends on another + package which has the same variant defaulting to False. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/parent-foo-bar-1.0.tar.gz" + + version("1.0", md5="abcdefg0123456789abcdefghfedcba0") + + variant("foo", default=True, description="") + variant("bar", default=True, description="") + + depends_on("dependency-foo-bar") From 8c061e51e30cb56de0e84f9c1ef3aff947c4ad5c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 7 Nov 2023 14:48:59 -0600 Subject: [PATCH 536/806] sleef: build shared libs (#40893) --- var/spack/repos/builtin/packages/sleef/package.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/sleef/package.py b/var/spack/repos/builtin/packages/sleef/package.py index 79227766691a76..43c50e2d3c8156 100644 --- a/var/spack/repos/builtin/packages/sleef/package.py +++ b/var/spack/repos/builtin/packages/sleef/package.py @@ -53,10 +53,9 @@ class Sleef(CMakePackage): # conflicts("^mpfr@4.2:") def cmake_args(self): - # Taken from PyTorch's aten/src/ATen/CMakeLists.txt + # https://salsa.debian.org/science-team/sleef/-/blob/master/debian/rules return [ - self.define("BUILD_SHARED_LIBS", False), self.define("BUILD_DFT", False), - self.define("BUILD_GNUABI_LIBS", False), + self.define("SLEEF_TEST_ALL_IUT", True), self.define("BUILD_TESTS", False), ] From 391940d2eb8ee133ce302bff2ba044490ead41b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 7 Nov 2023 21:06:12 +0000 Subject: [PATCH 537/806] julia: Add v1.9.3 (#40911) --- var/spack/repos/builtin/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 4115f148726d13..03ef815b064153 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -26,6 +26,7 @@ class Julia(MakefilePackage): maintainers("vchuravy", "haampie", "giordano") version("master", branch="master") + version("1.9.3", sha256="8d7dbd8c90e71179e53838cdbe24ff40779a90d7360e29766609ed90d982081d") version("1.9.2", sha256="015438875d591372b80b09d01ba899657a6517b7c72ed41222298fef9d4ad86b") version("1.9.0", sha256="48f4c8a7d5f33d0bc6ce24226df20ab49e385c2d0c3767ec8dfdb449602095b2") version("1.8.5", sha256="d31026cc6b275d14abce26fd9fd5b4552ac9d2ce8bde4291e494468af5743031") From c1f134e2a0062d2ec6049b7f1f2e9cc06eb97012 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 7 Nov 2023 23:04:45 +0100 Subject: [PATCH 538/806] tutorial: use lmod@8.7.18 because @8.7.19: has bugs (#40939) --- share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml | 2 +- var/spack/repos/builtin/packages/lmod/package.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index dc5c4e44649076..161c7a9c6e47d5 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -20,7 +20,7 @@ spack: - trilinos +hdf5 ^hdf5+hl+mpi ^mpich - gcc@12.3.0 - mpileaks - - lmod + - lmod@8.7.18 - macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran - ['%gcc@11'] - gcc_old_packages: diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index f4ca15a3a3eaee..af3b8a7b6cbf3b 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -23,6 +23,7 @@ class Lmod(AutotoolsPackage): version("8.7.24", sha256="8451267652059b6507b652e1b563929ecf9b689ffb20830642085eb6a55bd539") version("8.7.20", sha256="c04deff7d2ca354610a362459a7aa9a1c642a095e45a4b0bb2471bb3254e85f4") + version("8.7.18", sha256="b9912caca1557dd0c17113bceb1a4952e0ae75331d38df6361601db3f80366af") version("8.7.2", sha256="5f44f3783496d2d597ced7531e1714c740dbb2883a7d16fde362135fb0b0fd96") version("8.6.18", sha256="3db1c665c35fb8beb78c02e40d56accd361d82b715df70b2a995bcb10fbc2c80") version("8.6.5", sha256="4a1823264187340be11104d82f8226905daa8149186fa8615dfc742b6d19c2ce") From dc245e87f9ec6f8c1f8904573d2c8b8a96c905d8 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Tue, 7 Nov 2023 16:36:42 -0600 Subject: [PATCH 539/806] intel-xed: fix git hash for mbuild, add version 2023.10.11 (#40922) * intel-xed: fix git hash for mbuild, add version 2023.10.11 Fixes #40912 * Fix the git commit hash for mbuild 2022.04.17. This was broken in commit eef9939c21c6 by mixing up the hashes for xed versus mbuild. * Add versions 2023.08.21 and 2023.10.11. * fix style --- var/spack/repos/builtin/packages/intel-xed/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/intel-xed/package.py b/var/spack/repos/builtin/packages/intel-xed/package.py index 555d4154a220fd..7cda2358e20d37 100644 --- a/var/spack/repos/builtin/packages/intel-xed/package.py +++ b/var/spack/repos/builtin/packages/intel-xed/package.py @@ -21,6 +21,8 @@ class IntelXed(Package): # Current versions now have actual releases and tags. version("main", branch="main") + version("2023.10.11", tag="v2023.10.11", commit="d7d46c73fb04a1742e99c9382a4acb4ed07ae272") + version("2023.08.21", tag="v2023.08.21", commit="01a6da8090af84cd52f6c1070377ae6e885b078f") version("2023.07.09", tag="v2023.07.09", commit="539a6a349cf7538a182ed3ee1f48bb9317eb185f") version("2023.06.07", tag="v2023.06.07", commit="4dc77137f651def2ece4ac0416607b215c18e6e4") version("2023.04.16", tag="v2023.04.16", commit="a3055cd0209f5c63c88e280bbff9579b1e2942e2") @@ -40,7 +42,12 @@ class IntelXed(Package): # Match xed more closely with the version of mbuild at the time. resource( - name="mbuild", placement=mdir, git=mbuild_git, tag="v2022.07.28", when="@2022.07:9999" + name="mbuild", + placement=mdir, + git=mbuild_git, + tag="v2022.07.28", + commit="75cb46e6536758f1a3cdb3d6bd83a4a9fd0338bb", + when="@2022.07:9999", ) resource( @@ -48,7 +55,7 @@ class IntelXed(Package): placement=mdir, git=mbuild_git, tag="v2022.04.17", - commit="ef19f00de14a9c2c253c1c9b1119e1617280e3f2", + commit="b41485956bf65d51b8c2379768de7eaaa7a4245b", when="@:2022.06", ) From 2ff0766aa4d042e6ac6a9e9d8d811545aa8d8ad2 Mon Sep 17 00:00:00 2001 From: "SWAT Team (JSC)" Date: Tue, 7 Nov 2023 23:40:36 +0100 Subject: [PATCH 540/806] adds cubew 4.8.1, cubelib 4.8.1 and cubegui 4.8.1, 4.8.2 (#40612) * exago: fix v1.5.1 tag; only allow python up to 3.10 for for @:1.5 (#40676) * exago: fix v1.5.1 tag; only allow python up to 3.10 for for @:1.5 due to pybind error with py 3.11 * hiop@:1.0 +cuda: constrain to cuda@:11.9 * fixes syntax of maintainers --------- Co-authored-by: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> --- var/spack/repos/builtin/packages/cube/package.py | 3 +++ var/spack/repos/builtin/packages/cubelib/package.py | 1 + var/spack/repos/builtin/packages/cubew/package.py | 1 + 3 files changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py index f3d91693230842..9990ea8a0f65c6 100644 --- a/var/spack/repos/builtin/packages/cube/package.py +++ b/var/spack/repos/builtin/packages/cube/package.py @@ -16,7 +16,10 @@ class Cube(AutotoolsPackage): homepage = "https://www.scalasca.org/software/cube-4.x/download.html" url = "https://apps.fz-juelich.de/scalasca/releases/cube/4.4/dist/cubegui-4.4.2.tar.gz" + maintainers("swat-jsc") + version("4.8.2", sha256="bf2e02002bb2e5c4f61832ce37b62a440675c6453463014b33b2474aac78f86d") + version("4.8.1", sha256="a8a2a62b4e587c012d3d32385bed7c500db14232419795e0f4272d1dcefc55bc") version("4.8", sha256="1df8fcaea95323e7eaf0cc010784a41243532c2123a27ce93cb7e3241557ff76") version("4.7.1", sha256="7c96bf9ffb8cc132945f706657756fe6f88b7f7a5243ecd3741f599c2006d428") version("4.7", sha256="103fe00fa9846685746ce56231f64d850764a87737dc0407c9d0a24037590f68") diff --git a/var/spack/repos/builtin/packages/cubelib/package.py b/var/spack/repos/builtin/packages/cubelib/package.py index 919a001fedaa4f..aa142328607a6e 100644 --- a/var/spack/repos/builtin/packages/cubelib/package.py +++ b/var/spack/repos/builtin/packages/cubelib/package.py @@ -14,6 +14,7 @@ class Cubelib(AutotoolsPackage): maintainers = ("swat-jsc", "wrwilliams") version("4.8.2", sha256="d6fdef57b1bc9594f1450ba46cf08f431dd0d4ae595c47e2f3454e17e4ae74f4") + version("4.8.1", sha256="e4d974248963edab48c5d0fc5831146d391b0ae4632cccafe840bf5f12cd80a9") version("4.8", sha256="171c93ac5afd6bc74c50a9a58efdaf8589ff5cc1e5bd773ebdfb2347b77e2f68") version("4.7.1", sha256="62cf33a51acd9a723fff9a4a5411cd74203e24e0c4ffc5b9e82e011778ed4f2f") version("4.7", sha256="e44352c80a25a49b0fa0748792ccc9f1be31300a96c32de982b92477a8740938") diff --git a/var/spack/repos/builtin/packages/cubew/package.py b/var/spack/repos/builtin/packages/cubew/package.py index bcab0920fd1833..22a56ddda7b22e 100644 --- a/var/spack/repos/builtin/packages/cubew/package.py +++ b/var/spack/repos/builtin/packages/cubew/package.py @@ -14,6 +14,7 @@ class Cubew(AutotoolsPackage): maintainers = ("swat-jsc", "wrwilliams") version("4.8.2", sha256="4f3bcf0622c2429b8972b5eb3f14d79ec89b8161e3c1cc5862ceda417d7975d2") + version("4.8.1", sha256="42cbd743d87c16e805c8e28e79292ab33de259f2cfba46f2682cb35c1bc032d6") version("4.8", sha256="73c7f9e9681ee45d71943b66c01cfe675b426e4816e751ed2e0b670563ca4cf3") version("4.7.1", sha256="0d364a4930ca876aa887ec40d12399d61a225dbab69e57379b293516d7b6db8d") version("4.7", sha256="a7c7fca13e6cb252f08d4380223d7c56a8e86a67de147bcc0279ebb849c884a5") From 62c27b192476f4b4238b91bd60d9213888a8b03b Mon Sep 17 00:00:00 2001 From: Freifrau von Bleifrei Date: Tue, 7 Nov 2023 23:58:48 +0100 Subject: [PATCH 541/806] discotec: add compression variant (#40925) --- var/spack/repos/builtin/packages/discotec/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/discotec/package.py b/var/spack/repos/builtin/packages/discotec/package.py index 7693f97c83c805..31b03bb7661283 100644 --- a/var/spack/repos/builtin/packages/discotec/package.py +++ b/var/spack/repos/builtin/packages/discotec/package.py @@ -18,6 +18,7 @@ class Discotec(CMakePackage): version("main", branch="main") + variant("compression", default=False, description="Write sparse grid files compressed") variant("ft", default=False, description="DisCoTec with algorithm-based fault tolerance") variant("gene", default=False, description="Build for GENE (as task library)") variant("hdf5", default=True, description="Interpolation output with HDF5") @@ -31,6 +32,7 @@ class Discotec(CMakePackage): depends_on("cmake@3.24.2:", type="build") depends_on("glpk") depends_on("highfive+mpi+boost+ipo", when="+hdf5") + depends_on("lz4", when="+compression") depends_on("mpi") depends_on("selalib", when="+selalib") depends_on("vtk", when="+vtk") @@ -38,6 +40,7 @@ class Discotec(CMakePackage): def cmake_args(self): args = [ self.define("DISCOTEC_BUILD_MISSING_DEPS", False), + self.define_from_variant("DISCOTEC_WITH_COMPRESSION", "compression"), self.define_from_variant("DISCOTEC_ENABLEFT", "ft"), self.define_from_variant("DISCOTEC_GENE", "gene"), self.define_from_variant("DISCOTEC_OPENMP", "openmp"), From f6ef2c254ea0360683426952fb0dd3fca43a8519 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 7 Nov 2023 20:36:11 -0500 Subject: [PATCH 542/806] mapl: add v2.41 and v2.42 (#40870) * mapl: add 2.41 and 2.42 * Conflict MPICH 3 --- .../repos/builtin/packages/mapl/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/var/spack/repos/builtin/packages/mapl/package.py b/var/spack/repos/builtin/packages/mapl/package.py index 54cef1e40e96da..299a203f372b4d 100644 --- a/var/spack/repos/builtin/packages/mapl/package.py +++ b/var/spack/repos/builtin/packages/mapl/package.py @@ -36,6 +36,11 @@ class Mapl(CMakePackage): version("develop", branch="develop") version("main", branch="main") + version("2.42.0", sha256="9b6c3434919c14ef79004db5f76cb3dd8ef375584227101c230a372bb0470fdd") + version("2.41.2", sha256="73e1f0961f1b70e8159c0a2ce3499eb5158f3ca6d081f4c7826af7854ebfb44d") + version("2.41.1", sha256="2b384bd4fbaac1bff4ef009922c436c4ab54832172a5cd4d312ea44e32c1ae7c") + version("2.41.0", sha256="1142f9395e161174e3ec1654fba8bda1d0bd93edc7438b1927d8f5d7b42a0a86") + version("2.40.4", sha256="fb843b118d6e56cd4fc4b114c4d6f91956d5c8b3d9389ada56da1dfdbc58904f") version("2.40.3", sha256="4b82a314c88a035fc2b91395750aa7950d6bee838786178ed16a3f39a1e45519") version("2.40.2", sha256="7327f6f5bce6e09e7f7b930013fba86ee7cbfe8ed4c7c087fc9ab5acbf6640fd") version("2.40.1", sha256="6f40f946fabea6ba73b0764092e495505d220455b191b4e454736a0a25ee058c") @@ -116,6 +121,12 @@ class Mapl(CMakePackage): # Versions later than 3.14 remove FindESMF.cmake # from ESMA_CMake. + resource( + name="esma_cmake", + git="https://github.com/GEOS-ESM/ESMA_cmake.git", + tag="v3.36.0", + when="@2.42.0:", + ) resource( name="esma_cmake", git="https://github.com/GEOS-ESM/ESMA_cmake.git", @@ -159,6 +170,12 @@ class Mapl(CMakePackage): # Patch to add missing MPI Fortran target to top-level CMakeLists.txt patch("mapl-2.12.3-mpi-fortran.patch", when="@:2.12.3") + # MAPL only compiles with MPICH from version 2.42.0 and higher so we conflict + # with older versions. Also, it's only been tested with MPICH 4, so we don't + # allow older MPICH + conflicts("mpich@:3") + conflicts("mpich@4", when="@:2.41") + variant("flap", default=False, description="Build with FLAP support", when="@:2.39") variant("pflogger", default=True, description="Build with pFlogger support") variant("fargparse", default=True, description="Build with fArgParse support") From 050d565375b37e3afe0fc5149e79b3109afc4c64 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 8 Nov 2023 08:13:54 +0100 Subject: [PATCH 543/806] julia: constrain patchelf version (#40938) * julia: constrain patchelf version patchelf@0.18 breaks (at least) `libjulea-internal.so`, leading to errors like: ``` $ julia --version ERROR: Unable to load dependent library $SPACK/opt/spack/linux-centos8-x86_64_v3/gcc-12.3.0/julia-1.9.2-6hf5qx2q27jth2fkm6kgqmfdlhzzw6pl/bin/../lib/julia/libjulia-internal.so.1 Message:$SPACK/opt/spack/linux-centos8-x86_64_v3/gcc-12.3.0/julia-1.9.2-6hf5qx2q27jth2fkm6kgqmfdlhzzw6pl/bin/../lib/julia/libjulia-internal.so.1: ELF load command address/offset not properly aligned ``` * patchelf: prefer v0.17.x since v0.18 breaks libraries --- var/spack/repos/builtin/packages/julia/package.py | 3 ++- var/spack/repos/builtin/packages/patchelf/package.py | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 03ef815b064153..55716116d577f2 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -164,7 +164,8 @@ class Julia(MakefilePackage): ) # patchelf 0.13 is required because the rpath patch uses --add-rpath - depends_on("patchelf@0.13:", type="build") + # patchelf 0.18 breaks (at least) libjulia-internal.so + depends_on("patchelf@0.13:0.17", type="build") depends_on("perl", type="build") depends_on("libwhich", type="build") depends_on("python", type="build") diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py index 2630085d4eeaf7..21fc0d62aad485 100644 --- a/var/spack/repos/builtin/packages/patchelf/package.py +++ b/var/spack/repos/builtin/packages/patchelf/package.py @@ -19,7 +19,14 @@ class Patchelf(AutotoolsPackage): maintainers("haampie") version("0.18.0", sha256="64de10e4c6b8b8379db7e87f58030f336ea747c0515f381132e810dbf84a86e7") - version("0.17.2", sha256="20427b718dd130e4b66d95072c2a2bd5e17232e20dad58c1bea9da81fae330e0") + # patchelf 0.18 breaks libraries: + # https://github.com/spack/spack/issues/39252 + # https://github.com/spack/spack/pull/40938 + version( + "0.17.2", + sha256="20427b718dd130e4b66d95072c2a2bd5e17232e20dad58c1bea9da81fae330e0", + preferred=True, + ) version("0.16.1", sha256="1a562ed28b16f8a00456b5f9ee573bb1af7c39c1beea01d94fc0c7b3256b0406") version("0.15.0", sha256="53a8d58ed4e060412b8fdcb6489562b3c62be6f65cee5af30eba60f4423bfa0f") version("0.14.5", sha256="113ada3f1ace08f0a7224aa8500f1fa6b08320d8f7df05ff58585286ec5faa6f") From 15adb308bf943121f554b80579fd280213fb9302 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 7 Nov 2023 23:33:04 -0800 Subject: [PATCH 544/806] RAJA package: find libs (#40885) --- var/spack/repos/builtin/packages/raja/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index 99221b9b08c7d3..30a63bc079eb18 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -162,6 +162,11 @@ def _get_sys_type(self, spec): sys_type = env["SYS_TYPE"] return sys_type + @property + def libs(self): + shared = "+shared" in self.spec + return find_libraries("libRAJA", root=self.prefix, shared=shared, recursive=True) + @property def cache_name(self): hostname = socket.gethostname() From 0b344e0fd32cc21d703d6adda379a9bcc15dd717 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Tue, 7 Nov 2023 23:46:57 -0800 Subject: [PATCH 545/806] tutorial stack: update for changes to the basics section for SC23 (#40942) --- .../cloud_pipelines/stacks/tutorial/spack.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index 161c7a9c6e47d5..1b9eaf3822d609 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -8,11 +8,11 @@ spack: definitions: - gcc_system_packages: - matrix: - - - gmake - - gmake@4.3 - - gmake@4.3 cflags=-O3 + - - zlib-ng + - zlib-ng@2.0.7 + - zlib-ng@2.0.7 cflags=-O3 - tcl - - tcl ^gmake@4.3 cflags=-O3 + - tcl ^zlib-ng@2.0.7 cflags=-O3 - hdf5 - hdf5~mpi - hdf5+hl+mpi ^mpich @@ -24,10 +24,10 @@ spack: - macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran - ['%gcc@11'] - gcc_old_packages: - - gmake%gcc@10 + - zlib-ng%gcc@10 - clang_packages: - matrix: - - [gmake, tcl ^gmake@4.3] + - [zlib-ng, tcl ^zlib-ng@2.0.7] - ['%clang@14'] - gcc_spack_built_packages: - matrix: From 300d53d6f8712bd52558f682420fd4ae3887d66f Mon Sep 17 00:00:00 2001 From: Konstantinos Parasyris Date: Wed, 8 Nov 2023 08:52:53 -0800 Subject: [PATCH 546/806] Add new tag on AMS (#40949) --- var/spack/repos/builtin/packages/ams/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/ams/package.py b/var/spack/repos/builtin/packages/ams/package.py index ba75a25e63f6c3..b95e69abc3d81d 100644 --- a/var/spack/repos/builtin/packages/ams/package.py +++ b/var/spack/repos/builtin/packages/ams/package.py @@ -15,6 +15,12 @@ class Ams(CMakePackage, CudaPackage): maintainers("koparasy", "lpottier") version("develop", branch="develop", submodules=False) + version( + "11.08.23.alpha", + tag="11.08.23.alpha", + commit="1a42b29268bb916dae301654ca0b92fdfe288732", + submodules=False, + ) version( "07.25.23-alpha", tag="07.25.23-alpha", From b0355d6cc02bf06c3d15939fb1508ac5dffb7fc9 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 8 Nov 2023 18:17:58 +0100 Subject: [PATCH 547/806] ScaFaCoS 1.0.4 (#40948) --- .../builtin/packages/scafacos/package.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 var/spack/repos/builtin/packages/scafacos/package.py diff --git a/var/spack/repos/builtin/packages/scafacos/package.py b/var/spack/repos/builtin/packages/scafacos/package.py new file mode 100644 index 00000000000000..84f73ac0e1339c --- /dev/null +++ b/var/spack/repos/builtin/packages/scafacos/package.py @@ -0,0 +1,40 @@ +# Copyright 2013-2023 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 Scafacos(AutotoolsPackage): + """ScaFaCoS is a library of scalable fast coulomb solvers.""" + + homepage = "http://www.scafacos.de/" + url = "https://github.com/scafacos/scafacos/releases/download/v1.0.4/scafacos-1.0.4.tar.gz" + + maintainers("hmenke") + + license("GPL-3.0-or-later OR LGPL-3.0-or-later") + + version("1.0.4", sha256="6634c4202e825e771d1dd75bbe9cac5cee41136c87653fde98fbd634681c1be6") + version("1.0.3", sha256="d3579f4cddb10a562722c190c2452ebc455592d44f6dbde8f155849ba6e2b3d0") + version("1.0.2", sha256="158078665e48e28fd12b7895063db056cee5d135423fc36802e39c9160102b97") + version("1.0.1", sha256="2b125f313795c81b0e87eb920082e91addf94c17444f9486d979e691aaded99b") + version("1.0.0", sha256="cc5762edbecfec0323126b6a6a535dcc3e134fcfef4b00f63eb05fae15244a96") + + depends_on("fftw") + depends_on("file") + depends_on("gmp") + depends_on("gsl") + depends_on("mpi") + depends_on("pfft") + depends_on("pnfft") + + def configure_args(self): + args = [ + "--disable-doc", + "--enable-fcs-solvers=direct,ewald,fmm,p3m", + "FC={0}".format(self.spec["mpi"].mpifc), + "F77={0}".format(self.spec["mpi"].mpif77), + ] + return args From 4ac0e511ad6dee9f9941689e063b08fc511daa5a Mon Sep 17 00:00:00 2001 From: downloadico Date: Wed, 8 Nov 2023 11:15:49 -0700 Subject: [PATCH 548/806] abinit: add v9.10.3 (#40919) * abinit: add v9.10.3 Changed configure arguments for specfying how to use Wannier90 for versions after 9.8. When the mpi variant is requested, set the F90 environment variable to point to the MPI Fortran wrapper when building versions after 9.8 instead of FC. --------- Co-authored-by: Alec Scott --- .../repos/builtin/packages/abinit/package.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index a343bf69d7e3c4..282c673bcc57f4 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -27,6 +27,8 @@ class Abinit(AutotoolsPackage): homepage = "https://www.abinit.org/" url = "https://www.abinit.org/sites/default/files/packages/abinit-8.6.3.tar.gz" + maintainers("downloadico") + version("9.10.3", sha256="3f2a9aebbf1fee9855a09dd687f88d2317b8b8e04f97b2628ab96fb898dce49b") version("9.8.4", sha256="a086d5045f0093b432e6a044d5f71f7edf5a41a62d67b3677cb0751d330c564a") version("9.8.3", sha256="de823878aea2c20098f177524fbb4b60de9b1b5971b2e835ec244dfa3724589b") version("9.6.1", sha256="b6a12760fd728eb4aacca431ae12150609565bedbaa89763f219fcd869f79ac6") @@ -138,19 +140,27 @@ def configure_args(self): oapp(f"--with-optim-flavor={self.spec.variants['optimization-flavor'].value}") if "+wannier90" in spec: - if "@:8" in spec: + if spec.satisfies("@:8"): oapp(f"--with-wannier90-libs=-L{spec['wannier90'].prefix.lib} -lwannier -lm") oapp(f"--with-wannier90-incs=-I{spec['wannier90'].prefix.modules}") oapp(f"--with-wannier90-bins={spec['wannier90'].prefix.bin}") oapp("--enable-connectors") oapp("--with-dft-flavor=atompaw+libxc+wannier90") - else: + elif spec.satisfies("@:9.8"): options.extend( [ f"WANNIER90_CPPFLAGS=-I{spec['wannier90'].prefix.modules}", f"WANNIER90_LIBS=-L{spec['wannier90'].prefix.lib} -lwannier", ] ) + else: + options.extend( + [ + f"WANNIER90_CPPFLAGS=-I{spec['wannier90'].prefix.modules}", + f"WANNIER90_LIBS=-L{spec['wannier90'].prefix.lib}" + "WANNIER90_LDFLAGS=-lwannier", + ] + ) else: if "@:9.8" in spec: oapp(f"--with-fftw={spec['fftw-api'].prefix}") @@ -164,7 +174,10 @@ def configure_args(self): if "+mpi" in spec: oapp(f"CC={spec['mpi'].mpicc}") oapp(f"CXX={spec['mpi'].mpicxx}") - oapp(f"FC={spec['mpi'].mpifc}") + if spec.satisfies("@9.8:"): + oapp(f"F90={spec['mpi'].mpifc}") + else: + oapp(f"FC={spec['mpi'].mpifc}") # MPI version: # let the configure script auto-detect MPI support from mpi_prefix From afc693645a2b523ec45bc781bbfb5b29a3e7c680 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 8 Nov 2023 19:38:41 +0100 Subject: [PATCH 549/806] tcl: filter compiler wrappers to avoid pointing to Spack (#40946) --- .../stacks/tutorial/spack.yaml | 1 + .../packages/environment-modules/package.py | 19 ++++++++++++------- .../repos/builtin/packages/tcl/package.py | 2 ++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index 1b9eaf3822d609..c320442cbe0f84 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -21,6 +21,7 @@ spack: - gcc@12.3.0 - mpileaks - lmod@8.7.18 + - environment-modules - macsio@1.1+scr ^scr@2.0.0~fortran ^silo~fortran ^hdf5~fortran - ['%gcc@11'] - gcc_old_packages: diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index 50c2d11a015a0d..38bcd9b3bac08b 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -59,13 +59,15 @@ class EnvironmentModules(Package): variant("X", default=True, description="Build with X functionality") - depends_on("autoconf", type="build", when="@main") - depends_on("automake", type="build", when="@main") - depends_on("libtool", type="build", when="@main") - depends_on("m4", type="build", when="@main") - depends_on("python", type="build", when="@main") - depends_on("py-sphinx@1.0:", type="build", when="@main") - depends_on("gzip", type="build", when="@main") + depends_on("less", type=("build", "run"), when="@4.1:") + with when("@main"): + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + depends_on("m4", type="build") + depends_on("python", type="build") + depends_on("py-sphinx@1.0:", type="build") + depends_on("gzip", type="build") # Dependencies: depends_on("tcl", type=("build", "link", "run")) @@ -135,6 +137,9 @@ def install(self, spec, prefix): ] ) + if self.spec.satisfies("@4.1:"): + config_args.append(f"--with-pager={str(self.spec['less'].prefix.bin.less)}") + configure(*config_args) make() make("install") diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index c0082dc52cc1f7..dee78161bb1149 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -37,6 +37,8 @@ class Tcl(AutotoolsPackage, SourceforgePackage): configure_directory = "unix" + filter_compiler_wrappers("tclConfig.sh", relative_root="lib") + def install(self, spec, prefix): with working_dir(self.build_directory): make("install") From 89fc9a9d47108c5d34f3f5180eb10d5253689c29 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Wed, 8 Nov 2023 14:23:23 -0500 Subject: [PATCH 550/806] lcov: add version2, embed perl path in binaries (#39342) * lcov: add version2, perl dep at build and runtime * lcov: add runtime deps * namespace-autoclean: new perl package * datetime: dep on autoclean * formatting --- .../repos/builtin/packages/lcov/package.py | 15 +++++++++++++-- .../builtin/packages/perl-datetime/package.py | 17 +++++++++++++++++ .../packages/perl-devel-cover/package.py | 15 +++++++++++++++ .../builtin/packages/perl-file-spec/package.py | 15 +++++++++++++++ .../packages/perl-memory-process/package.py | 15 +++++++++++++++ .../perl-namespace-autoclean/package.py | 15 +++++++++++++++ 6 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/perl-datetime/package.py create mode 100644 var/spack/repos/builtin/packages/perl-devel-cover/package.py create mode 100644 var/spack/repos/builtin/packages/perl-file-spec/package.py create mode 100644 var/spack/repos/builtin/packages/perl-memory-process/package.py create mode 100644 var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py diff --git a/var/spack/repos/builtin/packages/lcov/package.py b/var/spack/repos/builtin/packages/lcov/package.py index dc7d3aa1b637c3..64a8d6a228b450 100644 --- a/var/spack/repos/builtin/packages/lcov/package.py +++ b/var/spack/repos/builtin/packages/lcov/package.py @@ -13,14 +13,25 @@ class Lcov(MakefilePackage): supports statement, function and branch coverage measurement.""" homepage = "http://ltp.sourceforge.net/coverage/lcov.php" - url = "https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz" + url = "https://github.com/linux-test-project/lcov/releases/download/v2.0/lcov-2.0.tar.gz" maintainers("KineticTheory") + version("2.0", sha256="1857bb18e27abe8bcec701a907d5c47e01db4d4c512fc098d1a6acd29267bf46") version("1.16", sha256="987031ad5528c8a746d4b52b380bc1bffe412de1f2b9c2ba5224995668e3240b") version("1.15", sha256="c1cda2fa33bec9aa2c2c73c87226cfe97de0831887176b45ee523c5e30f8053a") version("1.14", sha256="14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a") - depends_on("perl") + # dependencies from + # https://github.com/linux-test-project/lcov/blob/02ece21d54ccd16255d74f8b00f8875b6c15653a/README#L91-L111 + depends_on("perl", type=("build", "run")) + depends_on("perl-capture-tiny", type=("run")) + depends_on("perl-devel-cover", type=("run")) + depends_on("perl-datetime", type=("run")) + depends_on("perl-digest-md5", type=("run")) + depends_on("perl-file-spec", type=("run")) + depends_on("perl-json", type=("run")) + depends_on("perl-memory-process", type=("run")) + depends_on("perl-time-hires", type=("run")) def install(self, spec, prefix): make( diff --git a/var/spack/repos/builtin/packages/perl-datetime/package.py b/var/spack/repos/builtin/packages/perl-datetime/package.py new file mode 100644 index 00000000000000..3bb9f31f819821 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-datetime/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 PerlDatetime(PerlPackage): + """DateTime - A date and time object for Perl""" + + homepage = "https://metacpan.org/pod/DateTime" + url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-1.63.tar.gz" + + version("1.63", sha256="1b11e49ec6e184ae2a10eccd05eda9534f32458fc644c12ab710c29a3a816f6f") + + depends_on("perl-namespace-autoclean", type=("run")) diff --git a/var/spack/repos/builtin/packages/perl-devel-cover/package.py b/var/spack/repos/builtin/packages/perl-devel-cover/package.py new file mode 100644 index 00000000000000..dfadcfb6713ba0 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-devel-cover/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlDevelCover(PerlPackage): + """Devel::Cover - Perl extension for code coverage metrics""" + + homepage = "https://metacpan.org/pod/Devel::Cover" + url = "https://cpan.metacpan.org/authors/id/P/PJ/PJCJ/Devel-Cover-1.40.tar.gz" + + version("1.40", sha256="26e2f431fbcf7bff3851f352f83b84067c09ff206f40ab975cad8d2bafe711a8") diff --git a/var/spack/repos/builtin/packages/perl-file-spec/package.py b/var/spack/repos/builtin/packages/perl-file-spec/package.py new file mode 100644 index 00000000000000..3d4d767b0b7c2b --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-file-spec/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlFileSpec(PerlPackage): + """File::Spec - Perl extension for portably performing operations on file names""" + + homepage = "https://metacpan.org/pod/File::Spec" + url = "https://cpan.metacpan.org/authors/id/K/KW/KWILLIAMS/File-Spec-0.90.tar.gz" + + version("0.90", sha256="695a34604e1b6a98327fe2b374504329735b07c2c45db9f55df1636e4c29bf79") diff --git a/var/spack/repos/builtin/packages/perl-memory-process/package.py b/var/spack/repos/builtin/packages/perl-memory-process/package.py new file mode 100644 index 00000000000000..3cc302b624fe17 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-memory-process/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlMemoryProcess(PerlPackage): + """Memory::Process - Perl class to determine actual memory usage""" + + homepage = "https://metacpan.org/pod/Memory::Process" + url = "https://cpan.metacpan.org/authors/id/S/SK/SKIM/Memory-Process-0.06.tar.gz" + + version("0.06", sha256="35814488ffd29c97621625ea3b3d700afbfa60ed055bd759d4e58d9c8fd44e4e") diff --git a/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py b/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py new file mode 100644 index 00000000000000..8304e7377aa574 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-namespace-autoclean/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlNamespaceAutoclean(PerlPackage): + """Namespace::Autoclean - Keep imports out of your namespace""" + + homepage = "https://metacpan.org/pod/namespace::autoclean" + url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/namespace-autoclean-0.29.tar.gz" + + version("0.29", sha256="45ebd8e64a54a86f88d8e01ae55212967c8aa8fed57e814085def7608ac65804") From e11485311530b849c8f401092038c48c9a5f9eb7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 8 Nov 2023 15:15:23 -0600 Subject: [PATCH 551/806] py-lightning: add v2.1.1 (#40957) --- var/spack/repos/builtin/packages/py-lightning/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-lightning/package.py b/var/spack/repos/builtin/packages/py-lightning/package.py index 8bec9806ee3478..03861f20a56c17 100644 --- a/var/spack/repos/builtin/packages/py-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-lightning/package.py @@ -15,6 +15,7 @@ class PyLightning(PythonPackage): maintainers("adamjstewart") + version("2.1.1", sha256="865491940d20a9754eac7494aa18cab893e0c2b31e83743349eeeaf31dfb52db") version("2.1.0", sha256="1f78f5995ae7dcffa1edf34320db136902b73a0d1b304404c48ec8be165b3a93") version("2.0.9", sha256="2395ece6e29e12064718ff16b8edec5685df7f7095d4fee78edb0a654f5cd7eb") version("2.0.8", sha256="db914e211b5c3b079a821be6e4344e72d0a729163676a65c4e00aae98390ae7b") From c35250b3130ccf80e55f36564ccbd06b5d9b12e3 Mon Sep 17 00:00:00 2001 From: Tom Vander Aa Date: Wed, 8 Nov 2023 22:33:09 +0100 Subject: [PATCH 552/806] libevent: always autogen.sh (#40945) The libevent release tarballs ship with a `configure` script generated by an old `libtool`. The `libtool` generated by `configure` is not compatible with `MACOSX_DEPLOYMENT_VERSION` > 10. Regeneration of the `configure` scripts fixes build on macOS. Original configure contains: ``` case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ``` After re-running `autogen.sh`: ``` case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ``` --- var/spack/repos/builtin/packages/libevent/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index c0ece0386c5a5a..7969fb63d58d23 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -41,6 +41,10 @@ class Libevent(AutotoolsPackage): depends_on("openssl@:1.0", when="@:2.0+openssl") depends_on("openssl", when="+openssl") + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + def url_for_version(self, version): if version >= Version("2.0.22"): url = "https://github.com/libevent/libevent/releases/download/release-{0}-stable/libevent-{0}-stable.tar.gz" @@ -54,6 +58,9 @@ def libs(self): libs = find_libraries("libevent", root=self.prefix, shared=True, recursive=True) return LibraryList(libs) + def autoreconf(self, spec, prefix): + Executable("./autogen.sh")() + def configure_args(self): spec = self.spec configure_args = [] From b2840acd529a6d47db4b9d6f30df26b6d28ee624 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Nov 2023 22:33:50 +0100 Subject: [PATCH 553/806] Revert "defaults/modules.yaml: hide implicits (#40906)" (#40955) This reverts commit a2f00886e911a8219bfac27752e5c7fd83c65280. --- etc/spack/defaults/modules.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/spack/defaults/modules.yaml b/etc/spack/defaults/modules.yaml index 6ba4de769b884a..75ec3661174378 100644 --- a/etc/spack/defaults/modules.yaml +++ b/etc/spack/defaults/modules.yaml @@ -46,12 +46,10 @@ modules: tcl: all: autoload: direct - hide_implicits: true # Default configurations if lmod is enabled lmod: all: autoload: direct - hide_implicits: true hierarchy: - mpi From ed8ecc469e7b87842a876323878831e301f136a2 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 8 Nov 2023 22:53:23 +0100 Subject: [PATCH 554/806] podio: Add the latest tag (0.17.2) (#40956) * podio: Add myself as maintainer * podio: Add 0.17.2 tag --- var/spack/repos/builtin/packages/podio/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/podio/package.py b/var/spack/repos/builtin/packages/podio/package.py index 5f0b94ba3770eb..4d773126defad4 100644 --- a/var/spack/repos/builtin/packages/podio/package.py +++ b/var/spack/repos/builtin/packages/podio/package.py @@ -15,11 +15,12 @@ class Podio(CMakePackage): url = "https://github.com/AIDASoft/podio/archive/v00-09-02.tar.gz" git = "https://github.com/AIDASoft/podio.git" - maintainers("vvolkl", "drbenmorgan", "jmcarcell") + maintainers("vvolkl", "drbenmorgan", "jmcarcell", "tmadlener") tags = ["hep", "key4hep"] version("master", branch="master") + version("0.17.2", sha256="5b519335c4e1708f71ed85b3cac8ca81e544cc4572a5c37019ce9fc414c5e74d") version("0.17.1", sha256="97d6c5f81d50ee42bf7c01f041af2fd333c806f1bbf0a4828ca961a24cea6bb2") version("0.17", sha256="0c19f69970a891459cab227ab009514f1c1ce102b70e8c4b7d204eb6a0c643c1") version("0.16.7", sha256="8af7c947e2637f508b7af053412bacd9218d41a455d69addd7492f05b7a4338d") From 53c266b161db09e38e8e5acc9d28a3506a15eaf5 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Nov 2023 22:56:55 +0100 Subject: [PATCH 555/806] modules: restore exclude_implicits (#40958) --- lib/spack/spack/modules/common.py | 30 ++++++---------- lib/spack/spack/schema/modules.py | 49 -------------------------- lib/spack/spack/test/modules/common.py | 21 ----------- lib/spack/spack/test/modules/tcl.py | 18 +++++----- 4 files changed, 19 insertions(+), 99 deletions(-) diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index 465fed0324f15a..d1afdd22fd5fe3 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -486,43 +486,35 @@ def excluded(self): spec = self.spec conf = self.module.configuration(self.name) - # Compute the list of include rules that match - include_rules = conf.get("include", []) - include_matches = [x for x in include_rules if spec.satisfies(x)] - - # Compute the list of exclude rules that match - exclude_rules = conf.get("exclude", []) - exclude_matches = [x for x in exclude_rules if spec.satisfies(x)] + # Compute the list of matching include / exclude rules, and whether excluded as implicit + include_matches = [x for x in conf.get("include", []) if spec.satisfies(x)] + exclude_matches = [x for x in conf.get("exclude", []) if spec.satisfies(x)] + excluded_as_implicit = not self.explicit and conf.get("exclude_implicits", False) def debug_info(line_header, match_list): if match_list: - msg = "\t{0} : {1}".format(line_header, spec.cshort_spec) - tty.debug(msg) + tty.debug(f"\t{line_header} : {spec.cshort_spec}") for rule in match_list: - tty.debug("\t\tmatches rule: {0}".format(rule)) + tty.debug(f"\t\tmatches rule: {rule}") debug_info("INCLUDE", include_matches) debug_info("EXCLUDE", exclude_matches) - if not include_matches and exclude_matches: - return True + if excluded_as_implicit: + tty.debug(f"\tEXCLUDED_AS_IMPLICIT : {spec.cshort_spec}") - return False + return not include_matches and (exclude_matches or excluded_as_implicit) @property def hidden(self): """Returns True if the module has been hidden, False otherwise.""" - # A few variables for convenience of writing the method - spec = self.spec conf = self.module.configuration(self.name) - hidden_as_implicit = not self.explicit and conf.get( - "hide_implicits", conf.get("exclude_implicits", False) - ) + hidden_as_implicit = not self.explicit and conf.get("hide_implicits", False) if hidden_as_implicit: - tty.debug(f"\tHIDDEN_AS_IMPLICIT : {spec.cshort_spec}") + tty.debug(f"\tHIDDEN_AS_IMPLICIT : {self.spec.cshort_spec}") return hidden_as_implicit diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py index adf1a935861010..3814c6810c53ab 100644 --- a/lib/spack/spack/schema/modules.py +++ b/lib/spack/spack/schema/modules.py @@ -188,52 +188,3 @@ "additionalProperties": False, "properties": properties, } - - -# deprecated keys and their replacements -old_to_new_key = {"exclude_implicits": "hide_implicits"} - - -def update_keys(data, key_translations): - """Change blacklist/whitelist to exclude/include. - - Arguments: - data (dict): data from a valid modules configuration. - key_translations (dict): A dictionary of keys to translate to - their respective values. - - Return: - (bool) whether anything was changed in data - """ - changed = False - - if isinstance(data, dict): - keys = list(data.keys()) - for key in keys: - value = data[key] - - translation = key_translations.get(key) - if translation: - data[translation] = data.pop(key) - changed = True - - changed |= update_keys(value, key_translations) - - elif isinstance(data, list): - for elt in data: - changed |= update_keys(elt, key_translations) - - return changed - - -def update(data): - """Update the data in place to remove deprecated properties. - - Args: - data (dict): dictionary to be updated - - Returns: - True if data was changed, False otherwise - """ - # translate blacklist/whitelist to exclude/include - return update_keys(data, old_to_new_key) diff --git a/lib/spack/spack/test/modules/common.py b/lib/spack/spack/test/modules/common.py index 15656dff259671..11b4305b4844df 100644 --- a/lib/spack/spack/test/modules/common.py +++ b/lib/spack/spack/test/modules/common.py @@ -14,7 +14,6 @@ import spack.package_base import spack.schema.modules import spack.spec -import spack.util.spack_yaml as syaml from spack.modules.common import UpstreamModuleIndex from spack.spec import Spec @@ -191,26 +190,6 @@ def find_nothing(*args): spack.package_base.PackageBase.uninstall_by_spec(spec) -@pytest.mark.parametrize( - "module_type, old_config,new_config", - [("tcl", "exclude_implicits.yaml", "hide_implicits.yaml")], -) -def test_exclude_include_update(module_type, old_config, new_config): - module_test_data_root = os.path.join(spack.paths.test_path, "data", "modules", module_type) - with open(os.path.join(module_test_data_root, old_config)) as f: - old_yaml = syaml.load(f) - with open(os.path.join(module_test_data_root, new_config)) as f: - new_yaml = syaml.load(f) - - # ensure file that needs updating is translated to the right thing. - assert spack.schema.modules.update_keys(old_yaml, spack.schema.modules.old_to_new_key) - assert new_yaml == old_yaml - # ensure a file that doesn't need updates doesn't get updated - original_new_yaml = new_yaml.copy() - assert not spack.schema.modules.update_keys(new_yaml, spack.schema.modules.old_to_new_key) - assert original_new_yaml == new_yaml - - @pytest.mark.regression("37649") def test_check_module_set_name(mutable_config): """Tests that modules set name are validated correctly and an error is reported if the diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py index 00460b6796b9a1..f43f3d041e7df3 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -425,40 +425,38 @@ def test_extend_context(self, modulefile_content, module_configuration): @pytest.mark.regression("4400") @pytest.mark.db - @pytest.mark.parametrize("config_name", ["hide_implicits", "exclude_implicits"]) - def test_hide_implicits_no_arg(self, module_configuration, database, config_name): - module_configuration(config_name) + def test_hide_implicits_no_arg(self, module_configuration, database): + module_configuration("exclude_implicits") # mpileaks has been installed explicitly when setting up # the tests database mpileaks_specs = database.query("mpileaks") for item in mpileaks_specs: writer = writer_cls(item, "default") - assert not writer.conf.hidden + assert not writer.conf.excluded # callpath is a dependency of mpileaks, and has been pulled # in implicitly callpath_specs = database.query("callpath") for item in callpath_specs: writer = writer_cls(item, "default") - assert writer.conf.hidden + assert writer.conf.excluded @pytest.mark.regression("12105") - @pytest.mark.parametrize("config_name", ["hide_implicits", "exclude_implicits"]) - def test_hide_implicits_with_arg(self, module_configuration, config_name): - module_configuration(config_name) + def test_hide_implicits_with_arg(self, module_configuration): + module_configuration("exclude_implicits") # mpileaks is defined as explicit with explicit argument set on writer mpileaks_spec = spack.spec.Spec("mpileaks") mpileaks_spec.concretize() writer = writer_cls(mpileaks_spec, "default", True) - assert not writer.conf.hidden + assert not writer.conf.excluded # callpath is defined as implicit with explicit argument set on writer callpath_spec = spack.spec.Spec("callpath") callpath_spec.concretize() writer = writer_cls(callpath_spec, "default", False) - assert writer.conf.hidden + assert writer.conf.excluded @pytest.mark.regression("9624") @pytest.mark.db From 3405fe60f177d1bfdde1b9828ea2207ecfb5b891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= <15837247+mofeing@users.noreply.github.com> Date: Wed, 8 Nov 2023 23:20:55 +0100 Subject: [PATCH 556/806] libgit2: add python as test dependency (#40863) Libgit2 requires python as build dependency. I was getting an error because it was falling back to system Python which is compiled with Intel compilers and thus, `libgit2` was failing because it couldn't find `libimf.so` (which doesn't make sense). Co-authored-by: Harmen Stoppels --- var/spack/repos/builtin/packages/libgit2/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libgit2/package.py b/var/spack/repos/builtin/packages/libgit2/package.py index dd09fd8e1e843c..20410cf1c6d814 100644 --- a/var/spack/repos/builtin/packages/libgit2/package.py +++ b/var/spack/repos/builtin/packages/libgit2/package.py @@ -83,6 +83,7 @@ class Libgit2(CMakePackage): depends_on("cmake@2.8:", type="build", when="@:0.28") depends_on("cmake@3.5:", type="build", when="@0.99:") depends_on("pkgconfig", type="build") + depends_on("python", type="test") # Runtime Dependencies depends_on("libssh2", when="+ssh") @@ -123,5 +124,6 @@ def cmake_args(self): # Control tests args.append(self.define("BUILD_CLAR", self.run_tests)) + args.append(self.define("BUILD_TESTS", self.run_tests)) return args From 26d6bfbb7fad584ab2fa3f5141cd5833ce748cb2 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 9 Nov 2023 08:15:46 +0100 Subject: [PATCH 557/806] modules: remove deprecated code and test data (#40966) This removes a few deprecated attributes from the schema of the "modules" section. Test data for deprecated options is removed as well. --- lib/spack/spack/schema/modules.py | 18 ++--------- .../test/data/modules/lmod/blacklist.yaml | 14 --------- .../modules/lmod/blacklist_environment.yaml | 30 ------------------- .../test/data/modules/tcl/blacklist.yaml | 12 -------- .../modules/tcl/blacklist_environment.yaml | 25 ---------------- .../data/modules/tcl/blacklist_implicits.yaml | 8 ----- .../tcl/invalid_token_in_env_var_name.yaml | 2 +- 7 files changed, 3 insertions(+), 106 deletions(-) delete mode 100644 lib/spack/spack/test/data/modules/lmod/blacklist.yaml delete mode 100644 lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml delete mode 100644 lib/spack/spack/test/data/modules/tcl/blacklist.yaml delete mode 100644 lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml delete mode 100644 lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml diff --git a/lib/spack/spack/schema/modules.py b/lib/spack/spack/schema/modules.py index 3814c6810c53ab..fb4130d345d02b 100644 --- a/lib/spack/spack/schema/modules.py +++ b/lib/spack/spack/schema/modules.py @@ -18,9 +18,7 @@ #: IS ADDED IMMEDIATELY BELOW THE MODULE TYPE ATTRIBUTE spec_regex = ( r"(?!hierarchy|core_specs|verbose|hash_length|defaults|filter_hierarchy_specs|hide|" - r"whitelist|blacklist|" # DEPRECATED: remove in 0.20. - r"include|exclude|" # use these more inclusive/consistent options - r"projections|naming_scheme|core_compilers|all)(^\w[\w-]*)" + r"include|exclude|projections|naming_scheme|core_compilers|all)(^\w[\w-]*)" ) #: Matches a valid name for a module set @@ -46,14 +44,7 @@ "default": {}, "additionalProperties": False, "properties": { - # DEPRECATED: remove in 0.20. - "environment_blacklist": { - "type": "array", - "default": [], - "items": {"type": "string"}, - }, - # use exclude_env_vars instead - "exclude_env_vars": {"type": "array", "default": [], "items": {"type": "string"}}, + "exclude_env_vars": {"type": "array", "default": [], "items": {"type": "string"}} }, }, "template": {"type": "string"}, @@ -80,11 +71,6 @@ "properties": { "verbose": {"type": "boolean", "default": False}, "hash_length": {"type": "integer", "minimum": 0, "default": 7}, - # DEPRECATED: remove in 0.20. - "whitelist": array_of_strings, - "blacklist": array_of_strings, - "blacklist_implicits": {"type": "boolean", "default": False}, - # whitelist/blacklist have been replaced with include/exclude "include": array_of_strings, "exclude": array_of_strings, "exclude_implicits": {"type": "boolean", "default": False}, diff --git a/lib/spack/spack/test/data/modules/lmod/blacklist.yaml b/lib/spack/spack/test/data/modules/lmod/blacklist.yaml deleted file mode 100644 index 8c88214380f28b..00000000000000 --- a/lib/spack/spack/test/data/modules/lmod/blacklist.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# DEPRECATED: remove this in v0.20 -# See `exclude.yaml` for the new syntax -enable: - - lmod -lmod: - core_compilers: - - 'clang@3.3' - hierarchy: - - mpi - blacklist: - - callpath - - all: - autoload: direct diff --git a/lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml b/lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml deleted file mode 100644 index 997501e08ba454..00000000000000 --- a/lib/spack/spack/test/data/modules/lmod/blacklist_environment.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# DEPRECATED: remove this in v0.20 -# See `alter_environment.yaml` for the new syntax -enable: - - lmod -lmod: - core_compilers: - - 'clang@3.3' - - hierarchy: - - mpi - - all: - autoload: none - filter: - environment_blacklist: - - CMAKE_PREFIX_PATH - environment: - set: - '{name}_ROOT': '{prefix}' - - 'platform=test target=x86_64': - environment: - set: - FOO: 'foo' - unset: - - BAR - - 'platform=test target=core2': - load: - - 'foo/bar' diff --git a/lib/spack/spack/test/data/modules/tcl/blacklist.yaml b/lib/spack/spack/test/data/modules/tcl/blacklist.yaml deleted file mode 100644 index 4ffeb135e95ebe..00000000000000 --- a/lib/spack/spack/test/data/modules/tcl/blacklist.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# DEPRECATED: remove this in v0.20 -# See `exclude.yaml` for the new syntax -enable: - - tcl -tcl: - whitelist: - - zmpi - blacklist: - - callpath - - mpi - all: - autoload: direct diff --git a/lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml b/lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml deleted file mode 100644 index 128200d6ec6f87..00000000000000 --- a/lib/spack/spack/test/data/modules/tcl/blacklist_environment.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# DEPRECATED: remove this in v0.20 -# See `alter_environment.yaml` for the new syntax -enable: - - tcl -tcl: - all: - autoload: none - filter: - environment_blacklist: - - CMAKE_PREFIX_PATH - environment: - set: - '{name}_ROOT': '{prefix}' - - 'platform=test target=x86_64': - environment: - set: - FOO: 'foo' - OMPI_MCA_mpi_leave_pinned: '1' - unset: - - BAR - - 'platform=test target=core2': - load: - - 'foo/bar' diff --git a/lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml b/lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml deleted file mode 100644 index b49bc80b5e82a7..00000000000000 --- a/lib/spack/spack/test/data/modules/tcl/blacklist_implicits.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# DEPRECATED: remove this in v0.20 -# See `exclude_implicits.yaml` for the new syntax -enable: - - tcl -tcl: - blacklist_implicits: true - all: - autoload: direct diff --git a/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml b/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml index b03f966c7c1509..75b4cd09d2ec42 100644 --- a/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml +++ b/lib/spack/spack/test/data/modules/tcl/invalid_token_in_env_var_name.yaml @@ -4,7 +4,7 @@ tcl: all: autoload: none filter: - environment_blacklist: + exclude_env_vars: - CMAKE_PREFIX_PATH environment: set: From 78449ba92b5cbf0ff388ad129f1bfd286bf9c857 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 9 Nov 2023 01:40:12 -0600 Subject: [PATCH 558/806] intel-oneapi-mkl: do not set __INTEL_POST_CFLAGS env variable (#40947) This triggers warnings from icx compiler - that breaks petsc configure $ I_MPI_CC=icx /opt/intel/oneapi/mpi/2021.7.0/bin/mpiicc -E a.c > /dev/null $ __INTEL_POST_CFLAGS=-Wl,-rpath,/opt/intel/oneapi/mkl/2022.2.0/lib/intel64 I_MPI_CC=icx /opt/intel/oneapi/mpi/2021.7.0/bin/mpiicc -E a.c > /dev/null icx: warning: -Wl,-rpath,/opt/intel/oneapi/mkl/2022.2.0/lib/intel64: 'linker' input unused [-Wunused-command-line-argument] --- .../builtin/packages/intel-oneapi-mkl/package.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index 2eef32fa14e0a2..1d80c52f621fa8 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -149,21 +149,6 @@ def libs(self): else: return IntelOneApiStaticLibraryList(libs, system_libs) - def setup_run_environment(self, env): - super().setup_run_environment(env) - - # Support RPATH injection to the library directories when the '-mkl' or '-qmkl' - # flag of the Intel compilers are used outside the Spack build environment. We - # should not try to take care of other compilers because the users have to - # provide the linker flags anyway and are expected to take care of the RPATHs - # flags too. We prefer the __INTEL_POST_CFLAGS/__INTEL_POST_FFLAGS flags over - # the PRE ones so that any other RPATHs provided by the users on the command - # line come before and take precedence over the ones we inject here. - for d in self._find_mkl_libs(self.spec.satisfies("+shared")).directories: - flag = "-Wl,-rpath,{0}".format(d) - env.append_path("__INTEL_POST_CFLAGS", flag, separator=" ") - env.append_path("__INTEL_POST_FFLAGS", flag, separator=" ") - def setup_dependent_build_environment(self, env, dependent_spec): # Only if environment modifications are desired (default is +envmods) if self.spec.satisfies("+envmods"): From cadc2a1aa59d6e1824d2bce8661a5cb1d444e80f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Nov 2023 10:02:29 +0100 Subject: [PATCH 559/806] Set version to 0.22.0.dev0 (#40975) --- lib/spack/spack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 2fd13d0fe38b83..c2fa6aa90e6e39 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) #: PEP440 canonical ... string -__version__ = "0.21.0.dev0" +__version__ = "0.22.0.dev0" spack_version = __version__ From 1baed0d833e75a427467ef5686ea73a6c7700069 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Thu, 9 Nov 2023 06:30:41 -0700 Subject: [PATCH 560/806] buildcache: skip unrecognized metadata files (#40941) This commit improves forward compatibility of Spack with newer build cache metadata formats. Before this commit, invalid or unrecognized metadata would be fatal errors, now they just cause a mirror to be skipped. Co-authored-by: Harmen Stoppels --- lib/spack/spack/binary_distribution.py | 118 ++++++++++++++++++------- lib/spack/spack/test/bindist.py | 76 ++++++++++++++++ 2 files changed, 163 insertions(+), 31 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 6a49ab445e71d1..8cfb891640026c 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -66,8 +66,9 @@ from spack.stage import Stage from spack.util.executable import which -_build_cache_relative_path = "build_cache" -_build_cache_keys_relative_path = "_pgp" +BUILD_CACHE_RELATIVE_PATH = "build_cache" +BUILD_CACHE_KEYS_RELATIVE_PATH = "_pgp" +CURRENT_BUILD_CACHE_LAYOUT_VERSION = 1 class BuildCacheDatabase(spack_db.Database): @@ -481,7 +482,7 @@ def _fetch_and_cache_index(self, mirror_url, cache_entry={}): scheme = urllib.parse.urlparse(mirror_url).scheme if scheme != "oci" and not web_util.url_exists( - url_util.join(mirror_url, _build_cache_relative_path, "index.json") + url_util.join(mirror_url, BUILD_CACHE_RELATIVE_PATH, "index.json") ): return False @@ -600,6 +601,10 @@ def __init__(self, msg): super().__init__(msg) +class InvalidMetadataFile(spack.error.SpackError): + pass + + class UnsignedPackageException(spack.error.SpackError): """ Raised if installation of unsigned package is attempted without @@ -614,11 +619,11 @@ def compute_hash(data): def build_cache_relative_path(): - return _build_cache_relative_path + return BUILD_CACHE_RELATIVE_PATH def build_cache_keys_relative_path(): - return _build_cache_keys_relative_path + return BUILD_CACHE_KEYS_RELATIVE_PATH def build_cache_prefix(prefix): @@ -1401,7 +1406,7 @@ def _build_tarball_in_stage_dir(spec: Spec, out_url: str, stage_dir: str, option spec_dict = sjson.load(content) else: raise ValueError("{0} not a valid spec file type".format(spec_file)) - spec_dict["buildcache_layout_version"] = 1 + spec_dict["buildcache_layout_version"] = CURRENT_BUILD_CACHE_LAYOUT_VERSION spec_dict["binary_cache_checksum"] = {"hash_algorithm": "sha256", "hash": checksum} with open(specfile_path, "w") as outfile: @@ -1560,6 +1565,42 @@ def _delete_staged_downloads(download_result): download_result["specfile_stage"].destroy() +def _get_valid_spec_file(path: str, max_supported_layout: int) -> Tuple[Dict, int]: + """Read and validate a spec file, returning the spec dict with its layout version, or raising + InvalidMetadataFile if invalid.""" + try: + with open(path, "rb") as f: + binary_content = f.read() + except OSError: + raise InvalidMetadataFile(f"No such file: {path}") + + # In the future we may support transparently decompressing compressed spec files. + if binary_content[:2] == b"\x1f\x8b": + raise InvalidMetadataFile("Compressed spec files are not supported") + + try: + as_string = binary_content.decode("utf-8") + if path.endswith(".json.sig"): + spec_dict = Spec.extract_json_from_clearsig(as_string) + else: + spec_dict = json.loads(as_string) + except Exception as e: + raise InvalidMetadataFile(f"Could not parse {path} due to: {e}") from e + + # Ensure this version is not too new. + try: + layout_version = int(spec_dict.get("buildcache_layout_version", 0)) + except ValueError as e: + raise InvalidMetadataFile("Could not parse layout version") from e + + if layout_version > max_supported_layout: + raise InvalidMetadataFile( + f"Layout version {layout_version} is too new for this version of Spack" + ) + + return spec_dict, layout_version + + def download_tarball(spec, unsigned=False, mirrors_for_spec=None): """ Download binary tarball for given package into stage area, returning @@ -1652,6 +1693,18 @@ def download_tarball(spec, unsigned=False, mirrors_for_spec=None): try: local_specfile_stage.fetch() local_specfile_stage.check() + try: + _get_valid_spec_file( + local_specfile_stage.save_filename, + CURRENT_BUILD_CACHE_LAYOUT_VERSION, + ) + except InvalidMetadataFile as e: + tty.warn( + f"Ignoring binary package for {spec.name}/{spec.dag_hash()[:7]} " + f"from {mirror} due to invalid metadata file: {e}" + ) + local_specfile_stage.destroy() + continue except Exception: continue local_specfile_stage.cache_local() @@ -1674,14 +1727,26 @@ def download_tarball(spec, unsigned=False, mirrors_for_spec=None): else: ext = "json.sig" if try_signed else "json" - specfile_path = url_util.join(mirror, _build_cache_relative_path, specfile_prefix) + specfile_path = url_util.join(mirror, BUILD_CACHE_RELATIVE_PATH, specfile_prefix) specfile_url = f"{specfile_path}.{ext}" - spackfile_url = url_util.join(mirror, _build_cache_relative_path, tarball) + spackfile_url = url_util.join(mirror, BUILD_CACHE_RELATIVE_PATH, tarball) local_specfile_stage = try_fetch(specfile_url) if local_specfile_stage: local_specfile_path = local_specfile_stage.save_filename signature_verified = False + try: + _get_valid_spec_file( + local_specfile_path, CURRENT_BUILD_CACHE_LAYOUT_VERSION + ) + except InvalidMetadataFile as e: + tty.warn( + f"Ignoring binary package for {spec.name}/{spec.dag_hash()[:7]} " + f"from {mirror} due to invalid metadata file: {e}" + ) + local_specfile_stage.destroy() + continue + if try_signed and not unsigned: # If we found a signed specfile at the root, try to verify # the signature immediately. We will not download the @@ -2001,24 +2066,16 @@ def extract_tarball(spec, download_result, unsigned=False, force=False, timer=ti ) specfile_path = download_result["specfile_stage"].save_filename - - with open(specfile_path, "r") as inputfile: - content = inputfile.read() - if specfile_path.endswith(".json.sig"): - spec_dict = Spec.extract_json_from_clearsig(content) - else: - spec_dict = sjson.load(content) - + spec_dict, layout_version = _get_valid_spec_file( + specfile_path, CURRENT_BUILD_CACHE_LAYOUT_VERSION + ) bchecksum = spec_dict["binary_cache_checksum"] filename = download_result["tarball_stage"].save_filename signature_verified = download_result["signature_verified"] tmpdir = None - if ( - "buildcache_layout_version" not in spec_dict - or int(spec_dict["buildcache_layout_version"]) < 1 - ): + if layout_version == 0: # Handle the older buildcache layout where the .spack file # contains a spec json, maybe an .asc file (signature), # and another tarball containing the actual install tree. @@ -2029,7 +2086,7 @@ def extract_tarball(spec, download_result, unsigned=False, force=False, timer=ti _delete_staged_downloads(download_result) shutil.rmtree(tmpdir) raise e - else: + elif layout_version == 1: # Newer buildcache layout: the .spack file contains just # in the install tree, the signature, if it exists, is # wrapped around the spec.json at the root. If sig verify @@ -2053,7 +2110,6 @@ def extract_tarball(spec, download_result, unsigned=False, force=False, timer=ti raise NoChecksumException( tarfile_path, size, contents, "sha256", expected, local_checksum ) - try: with closing(tarfile.open(tarfile_path, "r")) as tar: # Remove install prefix from tarfil to extract directly into spec.prefix @@ -2184,10 +2240,10 @@ def try_direct_fetch(spec, mirrors=None): for mirror in binary_mirrors: buildcache_fetch_url_json = url_util.join( - mirror.fetch_url, _build_cache_relative_path, specfile_name + mirror.fetch_url, BUILD_CACHE_RELATIVE_PATH, specfile_name ) buildcache_fetch_url_signed_json = url_util.join( - mirror.fetch_url, _build_cache_relative_path, signed_specfile_name + mirror.fetch_url, BUILD_CACHE_RELATIVE_PATH, signed_specfile_name ) try: _, _, fs = web_util.read_from_url(buildcache_fetch_url_signed_json) @@ -2292,7 +2348,7 @@ def get_keys(install=False, trust=False, force=False, mirrors=None): for mirror in mirror_collection.values(): fetch_url = mirror.fetch_url keys_url = url_util.join( - fetch_url, _build_cache_relative_path, _build_cache_keys_relative_path + fetch_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH ) keys_index = url_util.join(keys_url, "index.json") @@ -2357,7 +2413,7 @@ def push_keys(*mirrors, **kwargs): for mirror in mirrors: push_url = getattr(mirror, "push_url", mirror) keys_url = url_util.join( - push_url, _build_cache_relative_path, _build_cache_keys_relative_path + push_url, BUILD_CACHE_RELATIVE_PATH, BUILD_CACHE_KEYS_RELATIVE_PATH ) keys_local = url_util.local_file_path(keys_url) @@ -2495,11 +2551,11 @@ def download_buildcache_entry(file_descriptions, mirror_url=None): ) if mirror_url: - mirror_root = os.path.join(mirror_url, _build_cache_relative_path) + mirror_root = os.path.join(mirror_url, BUILD_CACHE_RELATIVE_PATH) return _download_buildcache_entry(mirror_root, file_descriptions) for mirror in spack.mirror.MirrorCollection(binary=True).values(): - mirror_root = os.path.join(mirror.fetch_url, _build_cache_relative_path) + mirror_root = os.path.join(mirror.fetch_url, BUILD_CACHE_RELATIVE_PATH) if _download_buildcache_entry(mirror_root, file_descriptions): return True @@ -2590,7 +2646,7 @@ def __init__(self, url, local_hash, urlopen=web_util.urlopen): def get_remote_hash(self): # Failure to fetch index.json.hash is not fatal - url_index_hash = url_util.join(self.url, _build_cache_relative_path, "index.json.hash") + url_index_hash = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json.hash") try: response = self.urlopen(urllib.request.Request(url_index_hash, headers=self.headers)) except urllib.error.URLError: @@ -2611,7 +2667,7 @@ def conditional_fetch(self) -> FetchIndexResult: return FetchIndexResult(etag=None, hash=None, data=None, fresh=True) # Otherwise, download index.json - url_index = url_util.join(self.url, _build_cache_relative_path, "index.json") + url_index = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json") try: response = self.urlopen(urllib.request.Request(url_index, headers=self.headers)) @@ -2655,7 +2711,7 @@ def __init__(self, url, etag, urlopen=web_util.urlopen): def conditional_fetch(self) -> FetchIndexResult: # Just do a conditional fetch immediately - url = url_util.join(self.url, _build_cache_relative_path, "index.json") + url = url_util.join(self.url, BUILD_CACHE_RELATIVE_PATH, "index.json") headers = { "User-Agent": web_util.SPACK_USER_AGENT, "If-None-Match": '"{}"'.format(self.etag), diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index 20802bbdd80e91..ea9caf7fc031ee 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -4,7 +4,9 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import filecmp import glob +import gzip import io +import json import os import platform import sys @@ -1112,3 +1114,77 @@ def test_tarfile_of_spec_prefix(tmpdir): assert tar.getmember(f"{expected_prefix}/b_directory/file").isreg() assert tar.getmember(f"{expected_prefix}/c_directory").isdir() assert tar.getmember(f"{expected_prefix}/c_directory/file").isreg() + + +@pytest.mark.parametrize("layout,expect_success", [(None, True), (1, True), (2, False)]) +def test_get_valid_spec_file(tmp_path, layout, expect_success): + # Test reading a spec.json file that does not specify a layout version. + spec_dict = Spec("example").to_dict() + path = tmp_path / "spec.json" + effective_layout = layout or 0 # If not specified it should be 0 + + # Add a layout version + if layout is not None: + spec_dict["buildcache_layout_version"] = layout + + # Save to file + with open(path, "w") as f: + json.dump(spec_dict, f) + + try: + spec_dict_disk, layout_disk = bindist._get_valid_spec_file( + str(path), max_supported_layout=1 + ) + assert expect_success + assert spec_dict_disk == spec_dict + assert layout_disk == effective_layout + except bindist.InvalidMetadataFile: + assert not expect_success + + +def test_get_valid_spec_file_doesnt_exist(tmp_path): + with pytest.raises(bindist.InvalidMetadataFile, match="No such file"): + bindist._get_valid_spec_file(str(tmp_path / "no-such-file"), max_supported_layout=1) + + +def test_get_valid_spec_file_gzipped(tmp_path): + # Create a gzipped file, contents don't matter + path = tmp_path / "spec.json.gz" + with gzip.open(path, "wb") as f: + f.write(b"hello") + with pytest.raises( + bindist.InvalidMetadataFile, match="Compressed spec files are not supported" + ): + bindist._get_valid_spec_file(str(path), max_supported_layout=1) + + +@pytest.mark.parametrize("filename", ["spec.json", "spec.json.sig"]) +def test_get_valid_spec_file_no_json(tmp_path, filename): + tmp_path.joinpath(filename).write_text("not json") + with pytest.raises(bindist.InvalidMetadataFile): + bindist._get_valid_spec_file(str(tmp_path / filename), max_supported_layout=1) + + +def test_download_tarball_with_unsupported_layout_fails(tmp_path, mutable_config, capsys): + layout_version = bindist.CURRENT_BUILD_CACHE_LAYOUT_VERSION + 1 + spec = Spec("gmake@4.4.1%gcc@13.1.0 arch=linux-ubuntu23.04-zen2") + spec._mark_concrete() + spec_dict = spec.to_dict() + spec_dict["buildcache_layout_version"] = layout_version + + # Setup a basic local build cache structure + path = ( + tmp_path / bindist.build_cache_relative_path() / bindist.tarball_name(spec, ".spec.json") + ) + path.parent.mkdir(parents=True) + with open(path, "w") as f: + json.dump(spec_dict, f) + + # Configure as a mirror. + mirror_cmd("add", "test-mirror", str(tmp_path)) + + # Shouldn't be able "download" this. + assert bindist.download_tarball(spec, unsigned=True) is None + + # And there should be a warning about an unsupported layout version. + assert f"Layout version {layout_version} is too new" in capsys.readouterr().err From 2d35d29e0fc3cb4b4d6ff1a7a5b09f87f639f157 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Thu, 9 Nov 2023 05:38:40 -0800 Subject: [PATCH 561/806] sundials: add v6.6.2 (#40920) --- var/spack/repos/builtin/packages/sundials/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index 71ae9186a00578..c3e6d9986a0412 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -27,6 +27,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage): # Versions # ========================================================================== version("develop", branch="develop") + version("6.6.2", sha256="08f8223a5561327e44c072e46faa7f665c0c0bc8cd7e45d23f486c3d24c65009") version("6.6.1", sha256="21f71e4aef95b18f954c8bbdc90b62877443950533d595c68051ab768b76984b") version("6.6.0", sha256="f90029b8da846c8faff5530fd1fa4847079188d040554f55c1d5d1e04743d29d") version("6.5.1", sha256="4252303805171e4dbdd19a01e52c1dcfe0dafc599c3cfedb0a5c2ffb045a8a75") From 7e6aaf9458bfc5d42b0c7da1f500a17eef16907c Mon Sep 17 00:00:00 2001 From: George Young Date: Thu, 9 Nov 2023 15:44:24 +0000 Subject: [PATCH 562/806] py-macs3: adding zlib dependency (#40979) --- var/spack/repos/builtin/packages/py-macs3/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-macs3/package.py b/var/spack/repos/builtin/packages/py-macs3/package.py index be94b9c290cd7c..1a218e44a6ea98 100644 --- a/var/spack/repos/builtin/packages/py-macs3/package.py +++ b/var/spack/repos/builtin/packages/py-macs3/package.py @@ -24,3 +24,5 @@ class PyMacs3(PythonPackage): depends_on("py-numpy@1.19:", type=("build", "run")) depends_on("py-cykhash@2", type=("build", "run")) depends_on("py-hmmlearn@0.3:", type=("build", "run")) + + depends_on("zlib-api") From 7a4df732e1a6b6eaf6d6a9675c5857e7e53d5445 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Thu, 9 Nov 2023 10:08:37 -0800 Subject: [PATCH 563/806] DiHydrogen, Hydrogen, and Aluminum CachedCMakePackage (#39714) --- lib/spack/spack/build_systems/cached_cmake.py | 16 +- lib/spack/spack/package.py | 1 + .../builtin/packages/aluminum/package.py | 353 +++++++------- .../builtin/packages/dihydrogen/package.py | 439 +++++++++++------- .../builtin/packages/hydrogen/package.py | 352 +++++++------- .../lbann/lbann_v0.104_build_cleanup.patch | 39 ++ .../repos/builtin/packages/lbann/package.py | 200 ++------ 7 files changed, 740 insertions(+), 660 deletions(-) create mode 100644 var/spack/repos/builtin/packages/lbann/lbann_v0.104_build_cleanup.patch diff --git a/lib/spack/spack/build_systems/cached_cmake.py b/lib/spack/spack/build_systems/cached_cmake.py index d85c2b7e199352..74304f1dc63293 100644 --- a/lib/spack/spack/build_systems/cached_cmake.py +++ b/lib/spack/spack/build_systems/cached_cmake.py @@ -34,6 +34,11 @@ def cmake_cache_option(name, boolean_value, comment="", force=False): return 'set({0} {1} CACHE BOOL "{2}"{3})\n'.format(name, value, comment, force_str) +def cmake_cache_filepath(name, value, comment=""): + """Generate a string for a cmake cache variable of type FILEPATH""" + return 'set({0} "{1}" CACHE FILEPATH "{2}")\n'.format(name, value, comment) + + class CachedCMakeBuilder(CMakeBuilder): #: Phases of a Cached CMake package #: Note: the initconfig phase is used for developer builds as a final phase to stop on @@ -257,6 +262,15 @@ def initconfig_hardware_entries(self): entries.append( cmake_cache_path("HIP_CXX_COMPILER", "{0}".format(self.spec["hip"].hipcc)) ) + llvm_bin = spec["llvm-amdgpu"].prefix.bin + llvm_prefix = spec["llvm-amdgpu"].prefix + # Some ROCm systems seem to point to //rocm-/ and + # others point to //rocm-/llvm + if os.path.basename(os.path.normpath(llvm_prefix)) != "llvm": + llvm_bin = os.path.join(llvm_prefix, "llvm/bin/") + entries.append( + cmake_cache_filepath("CMAKE_HIP_COMPILER", os.path.join(llvm_bin, "clang++")) + ) archs = self.spec.variants["amdgpu_target"].value if archs[0] != "none": arch_str = ";".join(archs) @@ -277,7 +291,7 @@ def std_initconfig_entries(self): "#------------------{0}".format("-" * 60), "# CMake executable path: {0}".format(self.pkg.spec["cmake"].command.path), "#------------------{0}\n".format("-" * 60), - cmake_cache_path("CMAKE_PREFIX_PATH", cmake_prefix_path), + cmake_cache_string("CMAKE_PREFIX_PATH", cmake_prefix_path), self.define_cmake_cache_from_variant("CMAKE_BUILD_TYPE", "build_type"), ] diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index c537a7103afbca..ee6fb0ed8c9f41 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -32,6 +32,7 @@ from spack.build_systems.bundle import BundlePackage from spack.build_systems.cached_cmake import ( CachedCMakePackage, + cmake_cache_filepath, cmake_cache_option, cmake_cache_path, cmake_cache_string, diff --git a/var/spack/repos/builtin/packages/aluminum/package.py b/var/spack/repos/builtin/packages/aluminum/package.py index bb085f8681044b..7b15b23856fd77 100644 --- a/var/spack/repos/builtin/packages/aluminum/package.py +++ b/var/spack/repos/builtin/packages/aluminum/package.py @@ -9,7 +9,7 @@ from spack.package import * -class Aluminum(CMakePackage, CudaPackage, ROCmPackage): +class Aluminum(CachedCMakePackage, CudaPackage, ROCmPackage): """Aluminum provides a generic interface to high-performance communication libraries, with a focus on allreduce algorithms. Blocking and non-blocking algorithms and GPU-aware @@ -22,208 +22,207 @@ class Aluminum(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/LLNL/Aluminum.git" tags = ["ecp", "radiuss"] - maintainers("bvanessen") + maintainers("benson31", "bvanessen") version("master", branch="master") + version("1.4.1", sha256="d130a67fef1cb7a9cb3bbec1d0de426f020fe68c9df6e172c83ba42281cd90e3") + version("1.4.0", sha256="ac54de058f38cead895ec8163f7b1fa7674e4dc5aacba683a660a61babbfe0c6") version("1.3.1", sha256="28ce0af6c6f29f97b7f19c5e45184bd2f8a0b1428f1e898b027d96d47cb74b0b") version("1.3.0", sha256="d0442efbebfdfb89eec793ae65eceb8f1ba65afa9f2e48df009f81985a4c27e3") version("1.2.3", sha256="9b214bdf30f9b7e8e017f83e6615db6be2631f5be3dd186205dbe3aa62f4018a") - version( - "1.2.2", - sha256="c01d9dd98be4cab9b944bae99b403abe76d65e9e1750e7f23bf0105636ad5485", - deprecated=True, - ) - version( - "1.2.1", - sha256="869402708c8a102a67667b83527b4057644a32b8cdf4990bcd1a5c4e5f0e30af", - deprecated=True, - ) - version( - "1.2.0", - sha256="2f3725147f4dbc045b945af68d3d747f5dffbe2b8e928deed64136785210bc9a", - deprecated=True, - ) - version( - "1.1.0", - sha256="78b03e36e5422e8651f400feb4d8a527f87302db025d77aa37e223be6b9bdfc9", - deprecated=True, - ) - version("1.0.0-lbann", tag="v1.0.0-lbann", commit="40a062b1f63e84e074489c0f926f36b806c6b8f3") - version("1.0.0", sha256="028d12e271817214db5c07c77b0528f88862139c3e442e1b12f58717290f414a") - version( - "0.7.0", - sha256="bbb73d2847c56efbe6f99e46b41d837763938483f2e2d1982ccf8350d1148caa", - deprecated=True, - ) - version( - "0.6.0", - sha256="6ca329951f4c7ea52670e46e5020e7e7879d9b56fed5ff8c5df6e624b313e925", - deprecated=True, - ) - version( - "0.5.0", - sha256="dc365a5849eaba925355a8efb27005c5f22bcd1dca94aaed8d0d29c265c064c1", - deprecated=True, - ) - version( - "0.4.0", - sha256="4d6fab5481cc7c994b32fb23a37e9ee44041a9f91acf78f981a97cb8ef57bb7d", - deprecated=True, - ) - version( - "0.3.3", - sha256="26e7f263f53c6c6ee0fe216e981a558dfdd7ec997d0dd2a24285a609a6c68f3b", - deprecated=True, - ) - version( - "0.3.2", - sha256="09b6d1bcc02ac54ba269b1123eee7be20f0104b93596956c014b794ba96b037f", - deprecated=True, - ) - version( - "0.2.1-1", - sha256="066b750e9d1134871709a3e2414b96b166e0e24773efc7d512df2f1d96ee8eef", - deprecated=True, - ) - version( - "0.2.1", - sha256="3d5d15853cccc718f60df68205e56a2831de65be4d96e7f7e8497097e7905f89", - deprecated=True, - ) - version( - "0.2", - sha256="fc8f06c6d8faab17a2aedd408d3fe924043bf857da1094d5553f35c4d2af893b", - deprecated=True, - ) - version( - "0.1", - sha256="3880b736866e439dd94e6a61eeeb5bb2abccebbac82b82d52033bc6c94950bdb", - deprecated=True, - ) - variant("nccl", default=False, description="Builds with support for NCCL communication lib") + # Library capabilities + variant( + "cuda_rma", + default=False, + when="+cuda", + description="Builds with support for CUDA intra-node " + " Put/Get and IPC RMA functionality", + ) variant( "ht", default=False, description="Builds with support for host-enabled MPI" " communication of accelerator data", ) + variant("nccl", default=False, description="Builds with support for NCCL communication lib") + variant("shared", default=True, description="Build Aluminum as a shared library") + + # Debugging features + variant("hang_check", default=False, description="Enable hang checking") + variant("trace", default=False, description="Enable runtime tracing") + + # Profiler support + variant("nvtx", default=False, when="+cuda", description="Enable profiling via nvprof/NVTX") variant( - "cuda_rma", + "roctracer", default=False, when="+rocm", description="Enable profiling via rocprof/roctx" + ) + + # Advanced options + variant("mpi_serialize", default=False, description="Serialize MPI operations") + variant("stream_mem_ops", default=False, description="Enable stream memory operations") + variant( + "thread_multiple", default=False, - description="Builds with support for CUDA intra-node " - " Put/Get and IPC RMA functionality", + description="Allow multiple threads to call Aluminum concurrently", ) - variant("rccl", default=False, description="Builds with support for RCCL communication lib") + + # Benchmark/testing support variant( - "ofi_libfabric_plugin", - default=spack.platforms.cray.slingshot_network(), - when="+rccl", - sticky=True, - description="Builds with support for OFI libfabric enhanced RCCL/NCCL communication lib", + "benchmarks", + default=False, + description="Build the Aluminum benchmarking drivers " + "(warning: may significantly increase build time!)", ) variant( - "ofi_libfabric_plugin", - default=spack.platforms.cray.slingshot_network(), - when="+nccl", - sticky=True, - description="Builds with support for OFI libfabric enhanced RCCL/NCCL communication lib", + "tests", + default=False, + description="Build the Aluminum test drivers " + "(warning: may moderately increase build time!)", ) - depends_on("cmake@3.21.0:", type="build", when="@1.0.1:") - depends_on("cmake@3.17.0:", type="build", when="@:1.0.0") - depends_on("mpi") - depends_on("nccl@2.7.0-0:", when="+nccl") - depends_on("hwloc@1.11:") - depends_on("hwloc +cuda +nvml", when="+cuda") - depends_on("hwloc@2.3.0:", when="+rocm") - depends_on("cub", when="@:0.1,0.6.0: +cuda ^cuda@:10") - depends_on("hipcub", when="@:0.1,0.6.0: +rocm") - - depends_on("rccl", when="+rccl") - depends_on("aws-ofi-rccl", when="+rccl +ofi_libfabric_plugin") - depends_on("aws-ofi-nccl", when="+nccl +ofi_libfabric_plugin") + # FIXME: Do we want to expose tuning parameters to the Spack + # recipe? Some are numeric values, some are on/off switches. conflicts("~cuda", when="+cuda_rma", msg="CUDA RMA support requires CUDA") conflicts("+cuda", when="+rocm", msg="CUDA and ROCm support are mutually exclusive") - conflicts("+nccl", when="+rccl", msg="NCCL and RCCL support are mutually exclusive") - generator("ninja") + depends_on("mpi") - def cmake_args(self): - spec = self.spec - args = [ - "-DCMAKE_CXX_STANDARD:STRING=17", - "-DALUMINUM_ENABLE_CUDA:BOOL=%s" % ("+cuda" in spec), - "-DALUMINUM_ENABLE_NCCL:BOOL=%s" % ("+nccl" in spec or "+rccl" in spec), - "-DALUMINUM_ENABLE_ROCM:BOOL=%s" % ("+rocm" in spec), - ] - - if not spec.satisfies("^cmake@3.23.0"): - # There is a bug with using Ninja generator in this version - # of CMake - args.append("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON") - - if "+cuda" in spec: - if self.spec.satisfies("%clang"): - for flag in self.spec.compiler_flags["cxxflags"]: - if "gcc-toolchain" in flag: - args.append("-DCMAKE_CUDA_FLAGS=-Xcompiler={0}".format(flag)) - if spec.satisfies("^cuda@11.0:"): - args.append("-DCMAKE_CUDA_STANDARD=17") - else: - args.append("-DCMAKE_CUDA_STANDARD=14") - archs = spec.variants["cuda_arch"].value - if archs != "none": - arch_str = ";".join(archs) - args.append("-DCMAKE_CUDA_ARCHITECTURES=%s" % arch_str) - - if spec.satisfies("%cce") and spec.satisfies("^cuda+allow-unsupported-compilers"): - args.append("-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler") - - if spec.satisfies("@0.5:"): - args.extend( - [ - "-DALUMINUM_ENABLE_HOST_TRANSFER:BOOL=%s" % ("+ht" in spec), - "-DALUMINUM_ENABLE_MPI_CUDA:BOOL=%s" % ("+cuda_rma" in spec), - "-DALUMINUM_ENABLE_MPI_CUDA_RMA:BOOL=%s" % ("+cuda_rma" in spec), - ] + depends_on("cmake@3.21.0:", type="build", when="@1.0.1:") + depends_on("hwloc@1.11:") + + with when("+cuda"): + depends_on("cub", when="^cuda@:10") + depends_on("hwloc +cuda +nvml") + with when("+nccl"): + depends_on("nccl@2.7.0-0:") + for arch in CudaPackage.cuda_arch_values: + depends_on( + "nccl +cuda cuda_arch={0}".format(arch), + when="+cuda cuda_arch={0}".format(arch), + ) + if spack.platforms.cray.slingshot_network(): + depends_on("aws-ofi-nccl") # Note: NOT a CudaPackage + + with when("+rocm"): + for val in ROCmPackage.amdgpu_targets: + depends_on( + "hipcub +rocm amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val) ) - else: - args.append("-DALUMINUM_ENABLE_MPI_CUDA:BOOL=%s" % ("+ht" in spec)) - - if spec.satisfies("@:0.1,0.6.0: +cuda ^cuda@:10"): - args.append("-DCUB_DIR:FILEPATH=%s" % spec["cub"].prefix) - - # Add support for OS X to find OpenMP (LLVM installed via brew) - if self.spec.satisfies("%clang platform=darwin"): - clang = self.compiler.cc - clang_bin = os.path.dirname(clang) - clang_root = os.path.dirname(clang_bin) - args.extend(["-DOpenMP_DIR={0}".format(clang_root)]) - - if "+rocm" in spec: - args.extend( - [ - "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix), - "-DHIP_CXX_COMPILER={0}".format(self.spec["hip"].hipcc), - "-DCMAKE_CXX_FLAGS=-std=c++17", - ] + depends_on( + "hwloc@2.3.0: +rocm amdgpu_target={0}".format(val), + when="amdgpu_target={0}".format(val), ) - archs = self.spec.variants["amdgpu_target"].value - if archs != "none": - arch_str = ",".join(archs) - if spec.satisfies("%rocmcc@:5"): - args.append( - "-DHIP_HIPCC_FLAGS=--amdgpu-target={0}" - " -g -fsized-deallocation -fPIC -std=c++17".format(arch_str) - ) - args.extend( - [ - "-DCMAKE_HIP_ARCHITECTURES=%s" % arch_str, - "-DAMDGPU_TARGETS=%s" % arch_str, - "-DGPU_TARGETS=%s" % arch_str, - ] - ) + # RCCL is *NOT* implented as a ROCmPackage + depends_on( + "rccl amdgpu_target={0}".format(val), when="+nccl amdgpu_target={0}".format(val) + ) + depends_on( + "roctracer-dev +rocm amdgpu_target={0}".format(val), + when="+roctracer amdgpu_target={0}".format(val), + ) + if spack.platforms.cray.slingshot_network(): + depends_on("aws-ofi-rccl", when="+nccl") + def cmake_args(self): + args = [] return args + + def get_cuda_flags(self): + spec = self.spec + args = [] + if spec.satisfies("^cuda+allow-unsupported-compilers"): + args.append("-allow-unsupported-compiler") + + if spec.satisfies("%clang"): + for flag in spec.compiler_flags["cxxflags"]: + if "gcc-toolchain" in flag: + args.append("-Xcompiler={0}".format(flag)) + return args + + def std_initconfig_entries(self): + entries = super(Aluminum, self).std_initconfig_entries() + + # CMAKE_PREFIX_PATH, in CMake types, is a "STRING", not a "PATH". :/ + entries = [x for x in entries if "CMAKE_PREFIX_PATH" not in x] + cmake_prefix_path = os.environ["CMAKE_PREFIX_PATH"].replace(":", ";") + entries.append(cmake_cache_string("CMAKE_PREFIX_PATH", cmake_prefix_path)) + return entries + + def initconfig_compiler_entries(self): + spec = self.spec + entries = super(Aluminum, self).initconfig_compiler_entries() + + # FIXME: Enforce this better in the actual CMake. + entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17")) + entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) + entries.append(cmake_cache_option("CMAKE_EXPORT_COMPILE_COMMANDS", True)) + entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True)) + + return entries + + def initconfig_hardware_entries(self): + spec = self.spec + entries = super(Aluminum, self).initconfig_hardware_entries() + + entries.append(cmake_cache_option("ALUMINUM_ENABLE_CUDA", "+cuda" in spec)) + if spec.satisfies("+cuda"): + entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "17")) + if not spec.satisfies("cuda_arch=none"): + archs = spec.variants["cuda_arch"].value + arch_str = ";".join(archs) + entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", arch_str)) + + # FIXME: Should this use the "cuda_flags" function of the + # CudaPackage class or something? There might be other + # flags in play, and we need to be sure to get them all. + cuda_flags = self.get_cuda_flags() + if len(cuda_flags) > 0: + entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags))) + + entries.append(cmake_cache_option("ALUMINUM_ENABLE_ROCM", "+rocm" in spec)) + if spec.satisfies("+rocm"): + entries.append(cmake_cache_string("CMAKE_HIP_STANDARD", "17")) + if not spec.satisfies("amdgpu_target=none"): + archs = self.spec.variants["amdgpu_target"].value + arch_str = ";".join(archs) + entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str)) + entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str)) + entries.append(cmake_cache_string("GPU_TARGETS", arch_str)) + entries.append(cmake_cache_path("HIP_ROOT_DIR", spec["hip"].prefix)) + + return entries + + def initconfig_package_entries(self): + spec = self.spec + entries = super(Aluminum, self).initconfig_package_entries() + + # Library capabilities + entries.append(cmake_cache_option("ALUMINUM_ENABLE_MPI_CUDA", "+cuda_rma" in spec)) + entries.append(cmake_cache_option("ALUMINUM_ENABLE_MPI_CUDA_RMA", "+cuda_rma" in spec)) + entries.append(cmake_cache_option("ALUMINUM_ENABLE_HOST_TRANSFER", "+ht" in spec)) + entries.append(cmake_cache_option("ALUMINUM_ENABLE_NCCL", "+nccl" in spec)) + + # Debugging features + entries.append(cmake_cache_option("ALUMINUM_DEBUG_HANG_CHECK", "+hang_check" in spec)) + entries.append(cmake_cache_option("ALUMINUM_ENABLE_TRACE", "+trace" in spec)) + + # Profiler support + entries.append(cmake_cache_option("ALUMINUM_ENABLE_NVPROF", "+nvtx" in spec)) + entries.append(cmake_cache_option("ALUMINUM_ENABLE_ROCTRACER", "+roctracer" in spec)) + + # Advanced options + entries.append(cmake_cache_option("ALUMINUM_MPI_SERIALIZE", "+mpi_serialize" in spec)) + entries.append( + cmake_cache_option("ALUMINUM_ENABLE_STREAM_MEM_OPS", "+stream_mem_ops" in spec) + ) + entries.append( + cmake_cache_option("ALUMINUM_ENABLE_THREAD_MULTIPLE", "+thread_multiple" in spec) + ) + + # Benchmark/testing support + entries.append(cmake_cache_option("ALUMINUM_ENABLE_BENCHMARKS", "+benchmarks" in spec)) + entries.append(cmake_cache_option("ALUMINUM_ENABLE_TESTS", "+tests" in spec)) + + return entries diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py index ca53a897654b33..a6e030d0e8efb1 100644 --- a/var/spack/repos/builtin/packages/dihydrogen/package.py +++ b/var/spack/repos/builtin/packages/dihydrogen/package.py @@ -8,7 +8,39 @@ from spack.package import * -class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage): +# This is a hack to get around some deficiencies in Hydrogen. +def get_blas_entries(inspec): + entries = [] + spec = inspec["hydrogen"] + if "blas=openblas" in spec: + entries.append(cmake_cache_option("DiHydrogen_USE_OpenBLAS", True)) + elif "blas=mkl" in spec or spec.satisfies("^intel-mkl"): + entries.append(cmake_cache_option("DiHydrogen_USE_MKL", True)) + elif "blas=essl" in spec or spec.satisfies("^essl"): + entries.append(cmake_cache_string("BLA_VENDOR", "IBMESSL")) + # IF IBM ESSL is used it needs help finding the proper LAPACK libraries + entries.append( + cmake_cache_string( + "LAPACK_LIBRARIES", + "%s;-llapack;-lblas" + % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), + ) + ) + entries.append( + cmake_cache_string( + "BLAS_LIBRARIES", + "%s;-lblas" + % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), + ) + ) + elif "blas=accelerate" in spec: + entries.append(cmake_cache_option("DiHydrogen_USE_ACCELERATE", True)) + elif spec.satisfies("^netlib-lapack"): + entries.append(cmake_cache_string("BLA_VENDOR", "Generic")) + return entries + + +class Dihydrogen(CachedCMakePackage, CudaPackage, ROCmPackage): """DiHydrogen is the second version of the Hydrogen fork of the well-known distributed linear algebra library, Elemental. DiHydrogen aims to be a basic distributed @@ -20,117 +52,179 @@ class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/LLNL/DiHydrogen.git" tags = ["ecp", "radiuss"] - maintainers("bvanessen") + maintainers("benson31", "bvanessen") version("develop", branch="develop") version("master", branch="master") - version("0.2.1", sha256="11e2c0f8a94ffa22e816deff0357dde6f82cc8eac21b587c800a346afb5c49ac") - version("0.2.0", sha256="e1f597e80f93cf49a0cb2dbc079a1f348641178c49558b28438963bd4a0bdaa4") - version("0.1", sha256="171d4b8adda1e501c38177ec966e6f11f8980bf71345e5f6d87d0a988fef4c4e") + version("0.3.0", sha256="8dd143441a28e0c7662cd92694e9a4894b61fd48508ac1d77435f342bc226dcf") + + # Primary features + + variant("dace", default=False, sticky=True, description="Enable DaCe backend.") + + variant( + "distconv", + default=False, + sticky=True, + description="Enable (legacy) Distributed Convolution support.", + ) + + variant( + "nvshmem", + default=False, + sticky=True, + description="Enable support for NVSHMEM-based halo exchanges.", + when="+distconv", + ) + + variant( + "shared", default=True, sticky=True, description="Enables the build of shared libraries" + ) + + # Some features of developer interest - variant("al", default=True, description="Builds with Aluminum communication library") variant( "developer", default=False, description="Enable extra warnings and force tests to be enabled.", ) - variant("half", default=False, description="Enable FP16 support on the CPU.") + + variant("ci", default=False, description="Use default options for CI builds") + variant( - "distconv", + "coverage", default=False, - description="Support distributed convolutions: spatial, channel, " "filter.", + description="Decorate build with code coverage instrumentation options", + when="%gcc", ) - variant("nvshmem", default=False, description="Builds with support for NVSHMEM") - variant("openmp", default=False, description="Enable CPU acceleration with OpenMP threads.") - variant("rocm", default=False, description="Enable ROCm/HIP language features.") - variant("shared", default=True, description="Enables the build of shared libraries") - - # Variants related to BLAS variant( - "openmp_blas", default=False, description="Use OpenMP for threading in the BLAS library" + "coverage", + default=False, + description="Decorate build with code coverage instrumentation options", + when="%clang", ) - variant("int64_blas", default=False, description="Use 64bit integers for BLAS.") variant( - "blas", - default="openblas", - values=("openblas", "mkl", "accelerate", "essl", "libsci"), - description="Enable the use of OpenBlas/MKL/Accelerate/ESSL/LibSci", + "coverage", + default=False, + description="Decorate build with code coverage instrumentation options", + when="%rocmcc", ) - conflicts("~cuda", when="+nvshmem") + # Package conflicts and requirements - depends_on("mpi") - depends_on("catch2", type="test") + conflicts("+nvshmem", when="~cuda", msg="NVSHMEM requires CUDA support.") - # Specify the correct version of Aluminum - depends_on("aluminum@0.4.0:0.4", when="@0.1 +al") - depends_on("aluminum@0.5.0:0.5", when="@0.2.0 +al") - depends_on("aluminum@0.7.0:0.7", when="@0.2.1 +al") - depends_on("aluminum@0.7.0:", when="@:0.0,0.2.1: +al") + conflicts("+cuda", when="+rocm", msg="CUDA and ROCm are mutually exclusive.") - # Add Aluminum variants - depends_on("aluminum +cuda +nccl +cuda_rma", when="+al +cuda") - depends_on("aluminum +rocm +rccl", when="+al +rocm") - depends_on("aluminum +ht", when="+al +distconv") + requires( + "+cuda", + "+rocm", + when="+distconv", + policy="any_of", + msg="DistConv support requires CUDA or ROCm.", + ) - for arch in CudaPackage.cuda_arch_values: - depends_on("aluminum cuda_arch=%s" % arch, when="+al +cuda cuda_arch=%s" % arch) - depends_on("nvshmem cuda_arch=%s" % arch, when="+nvshmem +cuda cuda_arch=%s" % arch) + # Dependencies - # variants +rocm and amdgpu_targets are not automatically passed to - # dependencies, so do it manually. - for val in ROCmPackage.amdgpu_targets: - depends_on("aluminum amdgpu_target=%s" % val, when="amdgpu_target=%s" % val) + depends_on("catch2@3.0.1:", type=("build", "test"), when="+developer") + depends_on("cmake@3.21.0:", type="build") + depends_on("cuda@11.0:", when="+cuda") + depends_on("spdlog@1.11.0", when="@:0.1,0.2:") - depends_on("roctracer-dev", when="+rocm +distconv") + with when("@0.3.0:"): + depends_on("hydrogen +al") + for arch in CudaPackage.cuda_arch_values: + depends_on( + "hydrogen +cuda cuda_arch={0}".format(arch), + when="+cuda cuda_arch={0}".format(arch), + ) - depends_on("cudnn", when="+cuda") - depends_on("cub", when="^cuda@:10") + for val in ROCmPackage.amdgpu_targets: + depends_on( + "hydrogen amdgpu_target={0}".format(val), + when="+rocm amdgpu_target={0}".format(val), + ) - # Note that #1712 forces us to enumerate the different blas variants - depends_on("openblas", when="blas=openblas") - depends_on("openblas +ilp64", when="blas=openblas +int64_blas") - depends_on("openblas threads=openmp", when="blas=openblas +openmp_blas") + with when("+distconv"): + depends_on("mpi") - depends_on("intel-mkl", when="blas=mkl") - depends_on("intel-mkl +ilp64", when="blas=mkl +int64_blas") - depends_on("intel-mkl threads=openmp", when="blas=mkl +openmp_blas") + # All this nonsense for one silly little package. + depends_on("aluminum@1.4.1:") - depends_on("veclibfort", when="blas=accelerate") - conflicts("blas=accelerate +openmp_blas") + # Add Aluminum variants + depends_on("aluminum +cuda +nccl", when="+distconv +cuda") + depends_on("aluminum +rocm +nccl", when="+distconv +rocm") - depends_on("essl", when="blas=essl") - depends_on("essl +ilp64", when="blas=essl +int64_blas") - depends_on("essl threads=openmp", when="blas=essl +openmp_blas") - depends_on("netlib-lapack +external-blas", when="blas=essl") + # TODO: Debug linker errors when NVSHMEM is built with UCX + depends_on("nvshmem +nccl~ucx", when="+nvshmem") - depends_on("cray-libsci", when="blas=libsci") - depends_on("cray-libsci +openmp", when="blas=libsci +openmp_blas") + # OMP support is only used in DistConv, and only Apple needs + # hand-holding with it. + depends_on("llvm-openmp", when="%apple-clang") + # FIXME: when="platform=darwin"?? - # Distconv builds require cuda or rocm - conflicts("+distconv", when="~cuda ~rocm") + # CUDA/ROCm arch forwarding - conflicts("+distconv", when="+half") - conflicts("+rocm", when="+half") + for arch in CudaPackage.cuda_arch_values: + depends_on( + "aluminum +cuda cuda_arch={0}".format(arch), + when="+cuda cuda_arch={0}".format(arch), + ) + + # This is a workaround for a bug in the Aluminum package, + # as it should be responsible for its own NCCL dependency. + # Rather than failing to concretize, we help it along. + depends_on( + "nccl cuda_arch={0}".format(arch), + when="+distconv +cuda cuda_arch={0}".format(arch), + ) - depends_on("half", when="+half") + # NVSHMEM also needs arch forwarding + depends_on( + "nvshmem +cuda cuda_arch={0}".format(arch), + when="+nvshmem +cuda cuda_arch={0}".format(arch), + ) - generator("ninja") - depends_on("cmake@3.17.0:", type="build") + # Idenfity versions of cuda_arch that are too old from + # lib/spack/spack/build_systems/cuda.py. We require >=60. + illegal_cuda_arch_values = [ + "10", + "11", + "12", + "13", + "20", + "21", + "30", + "32", + "35", + "37", + "50", + "52", + "53", + ] + for value in illegal_cuda_arch_values: + conflicts("cuda_arch=" + value) - depends_on("spdlog", when="@:0.1,0.2:") + for val in ROCmPackage.amdgpu_targets: + depends_on( + "aluminum amdgpu_target={0}".format(val), + when="+rocm amdgpu_target={0}".format(val), + ) - depends_on("llvm-openmp", when="%apple-clang +openmp") + # CUDA-specific distconv dependencies + depends_on("cudnn", when="+cuda") - # TODO: Debug linker errors when NVSHMEM is built with UCX - depends_on("nvshmem +nccl~ucx", when="+nvshmem") + # ROCm-specific distconv dependencies + depends_on("hipcub", when="+rocm") + depends_on("miopen-hip", when="+rocm") + depends_on("roctracer-dev", when="+rocm") - # Idenfity versions of cuda_arch that are too old - # from lib/spack/spack/build_systems/cuda.py - illegal_cuda_arch_values = ["10", "11", "12", "13", "20", "21"] - for value in illegal_cuda_arch_values: - conflicts("cuda_arch=" + value) + with when("+ci+coverage"): + depends_on("lcov", type=("build", "run")) + depends_on("py-gcovr", type=("build", "run")) + # Technically it's not used in the build, but CMake sets up a + # target, so it needs to be found. @property def libs(self): @@ -138,104 +232,127 @@ def libs(self): return find_libraries("libH2Core", root=self.prefix, shared=shared, recursive=True) def cmake_args(self): + args = [] + return args + + def get_cuda_flags(self): spec = self.spec + args = [] + if spec.satisfies("^cuda+allow-unsupported-compilers"): + args.append("-allow-unsupported-compiler") + + if spec.satisfies("%clang"): + for flag in spec.compiler_flags["cxxflags"]: + if "gcc-toolchain" in flag: + args.append("-Xcompiler={0}".format(flag)) + return args - args = [ - "-DCMAKE_CXX_STANDARD=17", - "-DCMAKE_INSTALL_MESSAGE:STRING=LAZY", - "-DBUILD_SHARED_LIBS:BOOL=%s" % ("+shared" in spec), - "-DH2_ENABLE_ALUMINUM=%s" % ("+al" in spec), - "-DH2_ENABLE_CUDA=%s" % ("+cuda" in spec), - "-DH2_ENABLE_DISTCONV_LEGACY=%s" % ("+distconv" in spec), - "-DH2_ENABLE_OPENMP=%s" % ("+openmp" in spec), - "-DH2_ENABLE_FP16=%s" % ("+half" in spec), - "-DH2_DEVELOPER_BUILD=%s" % ("+developer" in spec), - ] + def initconfig_compiler_entries(self): + spec = self.spec + entries = super(Dihydrogen, self).initconfig_compiler_entries() + + # FIXME: Enforce this better in the actual CMake. + entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17")) + entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) + entries.append(cmake_cache_option("CMAKE_EXPORT_COMPILE_COMMANDS", True)) + + # It's possible this should have a `if "platform=cray" in + # spec:` in front of it, but it's not clear to me when this is + # set. In particular, I don't actually see this blurb showing + # up on Tioga builds. Which is causing the obvious problem + # (namely, the one this was added to supposedly solve in the + # first place. + entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True)) + + if spec.satisfies("%clang +distconv platform=darwin"): + clang = self.compiler.cc + clang_bin = os.path.dirname(clang) + clang_root = os.path.dirname(clang_bin) + entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-fopenmp=libomp")) + entries.append(cmake_cache_string("OpenMP_CXX_LIB_NAMES", "libomp")) + entries.append( + cmake_cache_string( + "OpenMP_libomp_LIBRARY", "{0}/lib/libomp.dylib".format(clang_root) + ) + ) + + return entries + + def initconfig_hardware_entries(self): + spec = self.spec + entries = super(Dihydrogen, self).initconfig_hardware_entries() - if spec.version < Version("0.3"): - args.append("-DH2_ENABLE_HIP_ROCM=%s" % ("+rocm" in spec)) - else: - args.append("-DH2_ENABLE_ROCM=%s" % ("+rocm" in spec)) - - if not spec.satisfies("^cmake@3.23.0"): - # There is a bug with using Ninja generator in this version - # of CMake - args.append("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON") - - if "+cuda" in spec: - if self.spec.satisfies("%clang"): - for flag in self.spec.compiler_flags["cxxflags"]: - if "gcc-toolchain" in flag: - args.append("-DCMAKE_CUDA_FLAGS=-Xcompiler={0}".format(flag)) - if spec.satisfies("^cuda@11.0:"): - args.append("-DCMAKE_CUDA_STANDARD=17") - else: - args.append("-DCMAKE_CUDA_STANDARD=14") - archs = spec.variants["cuda_arch"].value - if archs != "none": + entries.append(cmake_cache_option("H2_ENABLE_CUDA", "+cuda" in spec)) + if spec.satisfies("+cuda"): + entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "17")) + if not spec.satisfies("cuda_arch=none"): + archs = spec.variants["cuda_arch"].value arch_str = ";".join(archs) - args.append("-DCMAKE_CUDA_ARCHITECTURES=%s" % arch_str) + entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", arch_str)) + + # FIXME: Should this use the "cuda_flags" function of the + # CudaPackage class or something? There might be other + # flags in play, and we need to be sure to get them all. + cuda_flags = self.get_cuda_flags() + if len(cuda_flags) > 0: + entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags))) + + enable_rocm_var = ( + "H2_ENABLE_ROCM" if spec.version < Version("0.3") else "H2_ENABLE_HIP_ROCM" + ) + entries.append(cmake_cache_option(enable_rocm_var, "+rocm" in spec)) + if spec.satisfies("+rocm"): + entries.append(cmake_cache_string("CMAKE_HIP_STANDARD", "17")) + if not spec.satisfies("amdgpu_target=none"): + archs = self.spec.variants["amdgpu_target"].value + arch_str = ";".join(archs) + entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str)) + entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str)) + entries.append(cmake_cache_string("GPU_TARGETS", arch_str)) + entries.append(cmake_cache_path("HIP_ROOT_DIR", spec["hip"].prefix)) - if spec.satisfies("%cce") and spec.satisfies("^cuda+allow-unsupported-compilers"): - args.append("-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler") + return entries - if "+cuda" in spec: - args.append("-DcuDNN_DIR={0}".format(spec["cudnn"].prefix)) + def initconfig_package_entries(self): + spec = self.spec + entries = super(Dihydrogen, self).initconfig_package_entries() - if spec.satisfies("^cuda@:10"): - if "+cuda" in spec or "+distconv" in spec: - args.append("-DCUB_DIR={0}".format(spec["cub"].prefix)) + # Basic H2 options + entries.append(cmake_cache_option("H2_DEVELOPER_BUILD", "+developer" in spec)) + entries.append(cmake_cache_option("H2_ENABLE_TESTS", "+developer" in spec)) - # Add support for OpenMP with external (Brew) clang - if spec.satisfies("%clang +openmp platform=darwin"): - clang = self.compiler.cc - clang_bin = os.path.dirname(clang) - clang_root = os.path.dirname(clang_bin) - args.extend( - [ - "-DOpenMP_CXX_FLAGS=-fopenmp=libomp", - "-DOpenMP_CXX_LIB_NAMES=libomp", - "-DOpenMP_libomp_LIBRARY={0}/lib/libomp.dylib".format(clang_root), - ] - ) + entries.append(cmake_cache_option("H2_ENABLE_CODE_COVERAGE", "+coverage" in spec)) + entries.append(cmake_cache_option("H2_CI_BUILD", "+ci" in spec)) - if "+rocm" in spec: - args.extend( - [ - "-DCMAKE_CXX_FLAGS=-std=c++17", - "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix), - "-DHIP_CXX_COMPILER={0}".format(self.spec["hip"].hipcc), - ] - ) - if "platform=cray" in spec: - args.extend(["-DMPI_ASSUME_NO_BUILTIN_MPI=ON"]) - archs = self.spec.variants["amdgpu_target"].value - if archs != "none": - arch_str = ",".join(archs) - args.append( - "-DHIP_HIPCC_FLAGS=--amdgpu-target={0}" - " -g -fsized-deallocation -fPIC -std=c++17".format(arch_str) - ) - args.extend( - [ - "-DCMAKE_HIP_ARCHITECTURES=%s" % arch_str, - "-DAMDGPU_TARGETS=%s" % arch_str, - "-DGPU_TARGETS=%s" % arch_str, - ] - ) + entries.append(cmake_cache_option("H2_ENABLE_DACE", "+dace" in spec)) - if self.spec.satisfies("^essl"): - # IF IBM ESSL is used it needs help finding the proper LAPACK libraries - args.extend( - [ - "-DLAPACK_LIBRARIES=%s;-llapack;-lblas" - % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), - "-DBLAS_LIBRARIES=%s;-lblas" - % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), - ] - ) + # DistConv options + entries.append(cmake_cache_option("H2_ENABLE_ALUMINUM", "+distconv" in spec)) + entries.append(cmake_cache_option("H2_ENABLE_DISTCONV_LEGACY", "+distconv" in spec)) + entries.append(cmake_cache_option("H2_ENABLE_OPENMP", "+distconv" in spec)) - return args + # Paths to stuff, just in case. CMAKE_PREFIX_PATH should catch + # all this, but this shouldn't hurt to have. + entries.append(cmake_cache_path("spdlog_ROOT", spec["spdlog"].prefix)) + + if "+developer" in spec: + entries.append(cmake_cache_path("Catch2_ROOT", spec["catch2"].prefix)) + + if "+coverage" in spec: + entries.append(cmake_cache_path("lcov_ROOT", spec["lcov"].prefix)) + entries.append(cmake_cache_path("genhtml_ROOT", spec["lcov"].prefix)) + if "+ci" in spec: + entries.append(cmake_cache_path("gcovr_ROOT", spec["py-gcovr"].prefix)) + + if "+distconv" in spec: + entries.append(cmake_cache_path("Aluminum_ROOT", spec["aluminum"].prefix)) + if "+cuda" in spec: + entries.append(cmake_cache_path("cuDNN_ROOT", spec["cudnn"].prefix)) + + # Currently this is a hack for all Hydrogen versions. WIP to + # fix this at develop. + entries.extend(get_blas_entries(spec)) + return entries def setup_build_environment(self, env): if self.spec.satisfies("%apple-clang +openmp"): diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index df00235725b9f1..bf6e7bd17bece6 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -7,254 +7,268 @@ from spack.package import * +# This limits the versions of lots of things pretty severely. +# +# - Only v1.5.2 and newer are buildable. +# - CMake must be v3.22 or newer. +# - CUDA must be v11.0.0 or newer. + -class Hydrogen(CMakePackage, CudaPackage, ROCmPackage): +class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage): """Hydrogen: Distributed-memory dense and sparse-direct linear algebra and optimization library. Based on the Elemental library.""" homepage = "https://libelemental.org" - url = "https://github.com/LLNL/Elemental/archive/v1.0.1.tar.gz" + url = "https://github.com/LLNL/Elemental/archive/v1.5.1.tar.gz" git = "https://github.com/LLNL/Elemental.git" tags = ["ecp", "radiuss"] maintainers("bvanessen") version("develop", branch="hydrogen") + version("1.5.3", sha256="faefbe738bd364d0e26ce9ad079a11c93a18c6f075719a365fd4fa5f1f7a989a") + version("1.5.2", sha256="a902cad3962471216cfa278ba0561c18751d415cd4d6b2417c02a43b0ab2ea33") version("1.5.1", sha256="447da564278f98366906d561d9c8bc4d31678c56d761679c2ff3e59ee7a2895c") - version("1.5.0", sha256="03dd487fb23b9fdbc715554a8ea48c3196a1021502e61b0172ef3fdfbee75180") - version("1.4.0", sha256="c13374ff4a6c4d1076e47ba8c8d91a7082588b9958d1ed89cffb12f1d2e1452e") - version("1.3.4", sha256="7979f6656f698f0bbad6798b39d4b569835b3013ff548d98089fce7c283c6741") - version("1.3.3", sha256="a51a1cfd40ac74d10923dfce35c2c04a3082477683f6b35e7b558ea9f4bb6d51") - version("1.3.2", sha256="50bc5e87955f8130003d04dfd9dcad63107e92b82704f8107baf95b0ccf98ed6") - version("1.3.1", sha256="a8b8521458e9e747f2b24af87c4c2749a06e500019c383e0cefb33e5df6aaa1d") - version("1.3.0", sha256="0f3006aa1d8235ecdd621e7344c99f56651c6836c2e1bc0cf006331b70126b36") - version("1.2.0", sha256="8545975139582ee7bfe5d00f8d83a8697afc285bf7026b0761e9943355974806") - version("1.1.0-1", sha256="73ce05e4166853a186469269cb00a454de71e126b2019f95bbae703b65606808") - version("1.1.0", sha256="b4c12913acd01c72d31f4522266bfeb8df1d4d3b4aef02e07ccbc9a477894e71") - version("1.0.1", sha256="27cf76e1ef1d58bd8f9b1e34081a14a682b7ff082fb5d1da56713e5e0040e528") - version("1.0", sha256="d8a97de3133f2c6b6bb4b80d32b4a4cc25eb25e0df4f0cec0f8cb19bf34ece98") - - variant("shared", default=True, description="Enables the build of shared libraries") - variant("openmp", default=True, description="Make use of OpenMP within CPU-kernels") - variant( - "openmp_blas", default=False, description="Use OpenMP for threading in the BLAS library" - ) - variant("quad", default=False, description="Enable quad precision") - variant("int64", default=False, description="Use 64bit integers") - variant("int64_blas", default=False, description="Use 64bit integers for BLAS.") - variant("scalapack", default=False, description="Build with ScaLAPACK library") + # Older versions are no longer supported. + + variant("shared", default=True, description="Enables the build of shared libraries.") variant( "build_type", default="Release", description="The build type to build", values=("Debug", "Release"), ) + variant("int64", default=False, description="Use 64-bit integers") + variant("al", default=False, description="Use Aluminum communication library") variant( - "blas", - default="openblas", - values=("openblas", "mkl", "accelerate", "essl", "libsci"), - description="Enable the use of OpenBlas/MKL/Accelerate/ESSL/LibSci", + "cub", default=True, when="+cuda", description="Use CUB/hipCUB for GPU memory management" ) variant( - "mpfr", - default=False, - description="Support GNU MPFR's" "arbitrary-precision floating-point arithmetic", + "cub", default=True, when="+rocm", description="Use CUB/hipCUB for GPU memory management" ) - variant("test", default=False, description="Builds test suite") - variant("al", default=False, description="Builds with Aluminum communication library") + variant("half", default=False, description="Support for FP16 precision data types") + + # TODO: Add netlib-lapack. For GPU-enabled builds, typical + # workflows don't touch host BLAS/LAPACK all that often, and even + # less frequently in performance-critical regions. + variant( + "blas", + default="any", + values=("any", "openblas", "mkl", "accelerate", "essl", "libsci"), + description="Specify a host BLAS library preference", + ) + variant("int64_blas", default=False, description="Use 64-bit integers for (host) BLAS.") + + variant("openmp", default=True, description="Make use of OpenMP within CPU kernels") variant( "omp_taskloops", + when="+openmp", default=False, - description="Use OpenMP taskloops instead of parallel for loops.", + description="Use OpenMP taskloops instead of parallel for loops", ) - variant("half", default=False, description="Builds with support for FP16 precision data types") - conflicts("~openmp", when="+omp_taskloops") + # Users should spec this on their own on the command line, no? + # This doesn't affect Hydrogen itself at all. Not one bit. + # variant( + # "openmp_blas", + # default=False, + # description="Use OpenMP for threading in the BLAS library") + + variant("test", default=False, description="Builds test suite") + conflicts("+cuda", when="+rocm", msg="CUDA and ROCm support are mutually exclusive") + conflicts("+half", when="+rocm", msg="FP16 support not implemented for ROCm.") - depends_on("cmake@3.21.0:", type="build", when="@1.5.2:") - depends_on("cmake@3.17.0:", type="build", when="@:1.5.1") - depends_on("cmake@3.22.0:", type="build", when="%cce") + depends_on("cmake@3.22.0:", type="build", when="@1.5.2:") + depends_on("cmake@3.17.0:", type="build", when="@1.5.1") depends_on("mpi") - depends_on("hwloc@1.11:") - depends_on("hwloc +cuda +nvml", when="+cuda") - depends_on("hwloc@2.3.0:", when="+rocm") + depends_on("blas") + depends_on("lapack") # Note that #1712 forces us to enumerate the different blas variants + # Note that this forces us to use OpenBLAS until #1712 is fixed depends_on("openblas", when="blas=openblas") depends_on("openblas +ilp64", when="blas=openblas +int64_blas") - depends_on("openblas threads=openmp", when="blas=openblas +openmp_blas") depends_on("intel-mkl", when="blas=mkl") depends_on("intel-mkl +ilp64", when="blas=mkl +int64_blas") - depends_on("intel-mkl threads=openmp", when="blas=mkl +openmp_blas") + # I don't think this is true... depends_on("veclibfort", when="blas=accelerate") - conflicts("blas=accelerate +openmp_blas") depends_on("essl", when="blas=essl") depends_on("essl +ilp64", when="blas=essl +int64_blas") - depends_on("essl threads=openmp", when="blas=essl +openmp_blas") + depends_on("netlib-lapack +external-blas", when="blas=essl") depends_on("cray-libsci", when="blas=libsci") - depends_on("cray-libsci +openmp", when="blas=libsci +openmp_blas") # Specify the correct version of Aluminum - depends_on("aluminum@:0.3", when="@:1.3 +al") - depends_on("aluminum@0.4.0:0.4", when="@1.4.0:1.4 +al") - depends_on("aluminum@0.6.0:0.6", when="@1.5.0:1.5.1 +al") - depends_on("aluminum@0.7.0:", when="@:1.0,1.5.2: +al") + depends_on("aluminum@0.7.0:", when="@1.5.2: +al") # Add Aluminum variants - depends_on("aluminum +cuda +nccl +cuda_rma", when="+al +cuda") - depends_on("aluminum +rocm +rccl", when="+al +rocm") + depends_on("aluminum +cuda +ht", when="+al +cuda") + depends_on("aluminum +rocm +ht", when="+al +rocm") for arch in CudaPackage.cuda_arch_values: - depends_on("aluminum cuda_arch=%s" % arch, when="+al +cuda cuda_arch=%s" % arch) + depends_on("aluminum +cuda cuda_arch=%s" % arch, when="+al +cuda cuda_arch=%s" % arch) # variants +rocm and amdgpu_targets are not automatically passed to # dependencies, so do it manually. for val in ROCmPackage.amdgpu_targets: - depends_on("aluminum amdgpu_target=%s" % val, when="+al +rocm amdgpu_target=%s" % val) + depends_on( + "aluminum +rocm amdgpu_target=%s" % val, when="+al +rocm amdgpu_target=%s" % val + ) - # Note that this forces us to use OpenBLAS until #1712 is fixed - depends_on("lapack", when="blas=openblas ~openmp_blas") - - depends_on("scalapack", when="+scalapack") - depends_on("gmp", when="+mpfr") - depends_on("mpc", when="+mpfr") - depends_on("mpfr", when="+mpfr") - - depends_on("cuda", when="+cuda") - depends_on("cub", when="^cuda@:10") - depends_on("hipcub", when="+rocm") + depends_on("cuda@11.0.0:", when="+cuda") + depends_on("hipcub +rocm", when="+rocm +cub") depends_on("half", when="+half") depends_on("llvm-openmp", when="%apple-clang +openmp") - conflicts( - "@0:0.98", - msg="Hydrogen did not exist before v0.99. " + "Did you mean to use Elemental instead?", - ) - - generator("ninja") - @property def libs(self): shared = True if "+shared" in self.spec else False - return find_libraries("libEl", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libHydrogen", root=self.prefix, shared=shared, recursive=True) def cmake_args(self): + args = [] + return args + + def get_cuda_flags(self): spec = self.spec + args = [] + if spec.satisfies("^cuda+allow-unsupported-compilers"): + args.append("-allow-unsupported-compiler") + + if spec.satisfies("%clang"): + for flag in spec.compiler_flags["cxxflags"]: + if "gcc-toolchain" in flag: + args.append("-Xcompiler={0}".format(flag)) + return args - enable_gpu_fp16 = "+cuda" in spec and "+half" in spec - - args = [ - "-DCMAKE_CXX_STANDARD=17", - "-DCMAKE_INSTALL_MESSAGE:STRING=LAZY", - "-DBUILD_SHARED_LIBS:BOOL=%s" % ("+shared" in spec), - "-DHydrogen_ENABLE_OPENMP:BOOL=%s" % ("+openmp" in spec), - "-DHydrogen_ENABLE_QUADMATH:BOOL=%s" % ("+quad" in spec), - "-DHydrogen_USE_64BIT_INTS:BOOL=%s" % ("+int64" in spec), - "-DHydrogen_USE_64BIT_BLAS_INTS:BOOL=%s" % ("+int64_blas" in spec), - "-DHydrogen_ENABLE_MPC:BOOL=%s" % ("+mpfr" in spec), - "-DHydrogen_GENERAL_LAPACK_FALLBACK=ON", - "-DHydrogen_ENABLE_ALUMINUM=%s" % ("+al" in spec), - "-DHydrogen_ENABLE_CUB=%s" % ("+cuda" in spec or "+rocm" in spec), - "-DHydrogen_ENABLE_CUDA=%s" % ("+cuda" in spec), - "-DHydrogen_ENABLE_ROCM=%s" % ("+rocm" in spec), - "-DHydrogen_ENABLE_TESTING=%s" % ("+test" in spec), - "-DHydrogen_ENABLE_HALF=%s" % ("+half" in spec), - "-DHydrogen_ENABLE_GPU_FP16=%s" % enable_gpu_fp16, - ] - - if not spec.satisfies("^cmake@3.23.0"): - # There is a bug with using Ninja generator in this version - # of CMake - args.append("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON") - - if "+cuda" in spec: - if self.spec.satisfies("%clang"): - for flag in self.spec.compiler_flags["cxxflags"]: - if "gcc-toolchain" in flag: - args.append("-DCMAKE_CUDA_FLAGS=-Xcompiler={0}".format(flag)) - args.append("-DCMAKE_CUDA_STANDARD=14") - archs = spec.variants["cuda_arch"].value - if archs != "none": - arch_str = ";".join(archs) - args.append("-DCMAKE_CUDA_ARCHITECTURES=%s" % arch_str) - - if spec.satisfies("%cce") and spec.satisfies("^cuda+allow-unsupported-compilers"): - args.append("-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler") - - if "+rocm" in spec: - args.extend( - [ - "-DCMAKE_CXX_FLAGS=-std=c++17", - "-DHIP_ROOT_DIR={0}".format(spec["hip"].prefix), - "-DHIP_CXX_COMPILER={0}".format(self.spec["hip"].hipcc), - ] - ) - archs = self.spec.variants["amdgpu_target"].value - if archs != "none": - arch_str = ",".join(archs) - cxxflags_str = " ".join(self.spec.compiler_flags["cxxflags"]) - args.append( - "-DHIP_HIPCC_FLAGS=--amdgpu-target={0}" - " -g -fsized-deallocation -fPIC {1}" - " -std=c++17".format(arch_str, cxxflags_str) - ) - args.extend( - [ - "-DCMAKE_HIP_ARCHITECTURES=%s" % arch_str, - "-DAMDGPU_TARGETS=%s" % arch_str, - "-DGPU_TARGETS=%s" % arch_str, - ] - ) + def std_initconfig_entries(self): + entries = super(Hydrogen, self).std_initconfig_entries() + + # CMAKE_PREFIX_PATH, in CMake types, is a "STRING", not a "PATH". :/ + entries = [x for x in entries if "CMAKE_PREFIX_PATH" not in x] + cmake_prefix_path = os.environ["CMAKE_PREFIX_PATH"].replace(":", ";") + entries.append(cmake_cache_string("CMAKE_PREFIX_PATH", cmake_prefix_path)) + # IDK why this is here, but it was in the original recipe. So, yeah. + entries.append(cmake_cache_string("CMAKE_INSTALL_MESSAGE", "LAZY")) + return entries + + def initconfig_compiler_entries(self): + spec = self.spec + entries = super(Hydrogen, self).initconfig_compiler_entries() + + # FIXME: Enforce this better in the actual CMake. + entries.append(cmake_cache_string("CMAKE_CXX_STANDARD", "17")) + entries.append(cmake_cache_option("BUILD_SHARED_LIBS", "+shared" in spec)) + entries.append(cmake_cache_option("CMAKE_EXPORT_COMPILE_COMMANDS", True)) + + entries.append(cmake_cache_option("MPI_ASSUME_NO_BUILTIN_MPI", True)) - # Add support for OS X to find OpenMP (LLVM installed via brew) - if self.spec.satisfies("%clang +openmp platform=darwin"): + if spec.satisfies("%clang +openmp platform=darwin") or spec.satisfies( + "%clang +omp_taskloops platform=darwin" + ): clang = self.compiler.cc clang_bin = os.path.dirname(clang) clang_root = os.path.dirname(clang_bin) - args.extend(["-DOpenMP_DIR={0}".format(clang_root)]) + entries.append(cmake_cache_string("OpenMP_CXX_FLAGS", "-fopenmp=libomp")) + entries.append(cmake_cache_string("OpenMP_CXX_LIB_NAMES", "libomp")) + entries.append( + cmake_cache_string( + "OpenMP_libomp_LIBRARY", "{0}/lib/libomp.dylib".format(clang_root) + ) + ) + + return entries + + def initconfig_hardware_entries(self): + spec = self.spec + entries = super(Hydrogen, self).initconfig_hardware_entries() + + entries.append(cmake_cache_option("Hydrogen_ENABLE_CUDA", "+cuda" in spec)) + if spec.satisfies("+cuda"): + entries.append(cmake_cache_string("CMAKE_CUDA_STANDARD", "17")) + if not spec.satisfies("cuda_arch=none"): + archs = spec.variants["cuda_arch"].value + arch_str = ";".join(archs) + entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", arch_str)) + + # FIXME: Should this use the "cuda_flags" function of the + # CudaPackage class or something? There might be other + # flags in play, and we need to be sure to get them all. + cuda_flags = self.get_cuda_flags() + if len(cuda_flags) > 0: + entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags))) + + entries.append(cmake_cache_option("Hydrogen_ENABLE_ROCM", "+rocm" in spec)) + if spec.satisfies("+rocm"): + entries.append(cmake_cache_string("CMAKE_HIP_STANDARD", "17")) + if not spec.satisfies("amdgpu_target=none"): + archs = self.spec.variants["amdgpu_target"].value + arch_str = ";".join(archs) + entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str)) + entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str)) + entries.append(cmake_cache_string("GPU_TARGETS", arch_str)) + entries.append(cmake_cache_path("HIP_ROOT_DIR", spec["hip"].prefix)) + + return entries + + def initconfig_package_entries(self): + spec = self.spec + entries = super(Hydrogen, self).initconfig_package_entries() + + # Basic Hydrogen options + entries.append(cmake_cache_option("Hydrogen_ENABLE_TESTING", "+test" in spec)) + entries.append(cmake_cache_option("Hydrogen_GENERAL_LAPACK_FALLBACK", True)) + entries.append(cmake_cache_option("Hydrogen_USE_64BIT_INTS", "+int64" in spec)) + entries.append(cmake_cache_option("Hydrogen_USE_64BIT_BLAS_INTS", "+int64_blas" in spec)) + + # Advanced dependency options + entries.append(cmake_cache_option("Hydrogen_ENABLE_ALUMINUM", "+al" in spec)) + entries.append(cmake_cache_option("Hydrogen_ENABLE_CUB", "+cub" in spec)) + entries.append(cmake_cache_option("Hydrogen_ENABLE_GPU_FP16", "+cuda +half" in spec)) + entries.append(cmake_cache_option("Hydrogen_ENABLE_HALF", "+half" in spec)) + entries.append(cmake_cache_option("Hydrogen_ENABLE_OPENMP", "+openmp" in spec)) + entries.append( + cmake_cache_option("Hydrogen_ENABLE_OMP_TASKLOOP", "+omp_taskloops" in spec) + ) + + # Note that CUDA/ROCm are handled above. if "blas=openblas" in spec: - args.extend( - [ - "-DHydrogen_USE_OpenBLAS:BOOL=%s" % ("blas=openblas" in spec), - "-DOpenBLAS_DIR:STRING={0}".format(spec["openblas"].prefix), - ] - ) - elif "blas=mkl" in spec: - args.extend(["-DHydrogen_USE_MKL:BOOL=%s" % ("blas=mkl" in spec)]) - elif "blas=accelerate" in spec: - args.extend(["-DHydrogen_USE_ACCELERATE:BOOL=TRUE"]) - elif "blas=essl" in spec: + entries.append(cmake_cache_option("Hydrogen_USE_OpenBLAS", "blas=openblas" in spec)) + # CMAKE_PREFIX_PATH should handle this + entries.append(cmake_cache_string("OpenBLAS_DIR", spec["openblas"].prefix)) + elif "blas=mkl" in spec or spec.satisfies("^intel-mkl"): + entries.append(cmake_cache_option("Hydrogen_USE_MKL", True)) + elif "blas=essl" in spec or spec.satisfies("^essl"): + entries.append(cmake_cache_string("BLA_VENDOR", "IBMESSL")) # IF IBM ESSL is used it needs help finding the proper LAPACK libraries - args.extend( - [ - "-DLAPACK_LIBRARIES=%s;-llapack;-lblas" - % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), - "-DBLAS_LIBRARIES=%s;-lblas" + entries.append( + cmake_cache_string( + "LAPACK_LIBRARIES", + "%s;-llapack;-lblas" % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), - ] + ) ) - - if "+omp_taskloops" in spec: - args.extend(["-DHydrogen_ENABLE_OMP_TASKLOOP:BOOL=%s" % ("+omp_taskloops" in spec)]) - - if "+al" in spec: - args.extend( - [ - "-DHydrogen_ENABLE_ALUMINUM:BOOL=%s" % ("+al" in spec), - "-DALUMINUM_DIR={0}".format(spec["aluminum"].prefix), - ] + entries.append( + cmake_cache_string( + "BLAS_LIBRARIES", + "%s;-lblas" + % ";".join("-l{0}".format(lib) for lib in self.spec["essl"].libs.names), + ) ) + elif "blas=accelerate" in spec: + entries.append(cmake_cache_option("Hydrogen_USE_ACCELERATE", True)) + elif spec.satisfies("^netlib-lapack"): + entries.append(cmake_cache_string("BLA_VENDOR", "Generic")) - return args + return entries def setup_build_environment(self, env): if self.spec.satisfies("%apple-clang +openmp"): diff --git a/var/spack/repos/builtin/packages/lbann/lbann_v0.104_build_cleanup.patch b/var/spack/repos/builtin/packages/lbann/lbann_v0.104_build_cleanup.patch new file mode 100644 index 00000000000000..3020af37b07d9d --- /dev/null +++ b/var/spack/repos/builtin/packages/lbann/lbann_v0.104_build_cleanup.patch @@ -0,0 +1,39 @@ +diff --git a/src/callbacks/memory_profiler.cpp b/src/callbacks/memory_profiler.cpp +index 0d5cec5d2..6f40705af 100644 +--- a/src/callbacks/memory_profiler.cpp ++++ b/src/callbacks/memory_profiler.cpp +@@ -158,7 +158,10 @@ struct MemUsage + size_t total_mem; + + MemUsage(const std::string& r, size_t m) : report(r), total_mem(m) {} +- bool operator<(const MemUsage& other) { return total_mem < other.total_mem; } ++ bool operator<(const MemUsage& other) const ++ { ++ return total_mem < other.total_mem; ++ } + }; + } // namespace + +diff --git a/src/optimizers/adam.cpp b/src/optimizers/adam.cpp +index d00dfbe7c..1d9ad3949 100644 +--- a/src/optimizers/adam.cpp ++++ b/src/optimizers/adam.cpp +@@ -34,14 +34,12 @@ + + namespace lbann { + +-#if defined (LBANN_HAS_ROCM) && defined (LBANN_HAS_GPU_FP16) ++#if defined(LBANN_HAS_ROCM) && defined(LBANN_HAS_GPU_FP16) + namespace { +-bool isfinite(fp16 const& x) +-{ +- return std::isfinite(float(x)); +-} +-} ++bool isfinite(fp16 const& x) { return std::isfinite(float(x)); } ++} // namespace + #endif ++using std::isfinite; + + template + adam::adam(TensorDataType learning_rate, diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index faae710921e563..ebe68f39db2675 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -5,7 +5,6 @@ import os import socket -import sys from spack.package import * @@ -24,109 +23,42 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): maintainers("bvanessen") version("develop", branch="develop") - version("0.102", sha256="3734a76794991207e2dd2221f05f0e63a86ddafa777515d93d99d48629140f1a") + version("benchmarking", branch="benchmarking") + version("0.104", sha256="a847c7789082ab623ed5922ab1248dd95f5f89d93eed44ac3d6a474703bbc0bf") + version("0.103", sha256="9da1bf308f38323e30cb07f8ecf8efa05c7f50560e8683b9cd961102b1b3e25a") version( - "0.101", - sha256="69d3fe000a88a448dc4f7e263bcb342c34a177bd9744153654528cd86335a1f7", - deprecated=True, - ) - version( - "0.100", - sha256="d1bab4fb6f1b80ae83a7286cc536a32830890f6e5b0c3107a17c2600d0796912", - deprecated=True, - ) - version( - "0.99", - sha256="3358d44f1bc894321ce07d733afdf6cb7de39c33e3852d73c9f31f530175b7cd", - deprecated=True, - ) - version( - "0.98.1", - sha256="9a2da8f41cd8bf17d1845edf9de6d60f781204ebd37bffba96d8872036c10c66", - deprecated=True, - ) - version( - "0.98", - sha256="8d64b9ac0f1d60db553efa4e657f5ea87e790afe65336117267e9c7ae6f68239", - deprecated=True, - ) - version( - "0.97.1", - sha256="2f2756126ac8bb993202cf532d72c4d4044e877f4d52de9fdf70d0babd500ce4", - deprecated=True, - ) - version( - "0.97", - sha256="9794a706fc7ac151926231efdf74564c39fbaa99edca4acb745ee7d20c32dae7", - deprecated=True, - ) - version( - "0.96", - sha256="97af78e9d3c405e963361d0db96ee5425ee0766fa52b43c75b8a5670d48e4b4a", - deprecated=True, - ) - version( - "0.95", - sha256="d310b986948b5ee2bedec36383a7fe79403721c8dc2663a280676b4e431f83c2", - deprecated=True, - ) - version( - "0.94", - sha256="567e99b488ebe6294933c98a212281bffd5220fc13a0a5cd8441f9a3761ceccf", - deprecated=True, - ) - version( - "0.93", - sha256="77bfd7fe52ee7495050f49bcdd0e353ba1730e3ad15042c678faa5eeed55fb8c", - deprecated=True, - ) - version( - "0.92", - sha256="9187c5bcbc562c2828fe619d53884ab80afb1bcd627a817edb935b80affe7b84", - deprecated=True, - ) - version( - "0.91", - sha256="b69f470829f434f266119a33695592f74802cff4b76b37022db00ab32de322f5", + "0.102", + sha256="3734a76794991207e2dd2221f05f0e63a86ddafa777515d93d99d48629140f1a", deprecated=True, ) - variant("al", default=True, description="Builds with support for Aluminum Library") variant( "build_type", default="Release", description="The build type to build", values=("Debug", "Release"), ) - variant( - "conduit", - default=True, - description="Builds with support for Conduit Library " - "(note that for v0.99 conduit is required)", - ) variant( "deterministic", default=False, description="Builds with support for deterministic execution", ) - variant( - "dihydrogen", default=True, description="Builds with support for DiHydrogen Tensor Library" - ) variant( "distconv", default=False, + sticky=True, description="Builds with support for spatial, filter, or channel " "distributed convolutions", ) variant( "dtype", default="float", + sticky=True, description="Type for floating point representation of weights", values=("float", "double"), ) variant("fft", default=False, description="Support for FFT operations") variant("half", default=False, description="Builds with support for FP16 precision data types") - variant("hwloc", default=True, description="Add support for topology aware algorithms") variant("nvprof", default=False, description="Build with region annotations for NVPROF") variant( "numpy", default=False, description="Builds with support for processing NumPy data files" @@ -139,7 +71,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): variant("vtune", default=False, description="Builds with support for Intel VTune") variant("onednn", default=False, description="Support for OneDNN") variant("onnx", default=False, description="Support for exporting models into ONNX format") - variant("nvshmem", default=False, description="Support for NVSHMEM") + variant("nvshmem", default=False, description="Support for NVSHMEM", when="+distconv") variant( "python", default=True, @@ -168,20 +100,13 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): # Don't expose this a dependency until Spack can find the external properly # depends_on('binutils+gold', type='build', when='+gold') + patch("lbann_v0.104_build_cleanup.patch", when="@0.104:") + # Variant Conflicts - conflicts("@:0.90,0.99:", when="~conduit") - conflicts("@0.90:0.101", when="+fft") - conflicts("@:0.90,0.102:", when="~dihydrogen") conflicts("~cuda", when="+nvprof") - conflicts("~hwloc", when="+al") conflicts("~cuda", when="+nvshmem") conflicts("+cuda", when="+rocm", msg="CUDA and ROCm support are mutually exclusive") - conflicts("~vision", when="@0.91:0.101") - conflicts("~numpy", when="@0.91:0.101") - conflicts("~python", when="@0.91:0.101") - conflicts("~pfe", when="@0.91:0.101") - requires("%clang", when="+lld") conflicts("+lld", when="+gold") @@ -191,84 +116,56 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.17.0:", type="build") depends_on("cmake@3.21.0:", type="build", when="@0.103:") - # Specify the correct versions of Hydrogen - depends_on("hydrogen@:1.3.4", when="@0.95:0.100") - depends_on("hydrogen@1.4.0:1.4", when="@0.101:0.101.99") - depends_on("hydrogen@1.5.0:", when="@:0.90,0.102:") + # Specify the core libraries: Hydrogen, DiHydrogen, Aluminum + depends_on("hydrogen@1.5.3:") + depends_on("aluminum@1.4.1:") + depends_on("dihydrogen@0.2.0:") + + # Align the following variants across Hydrogen and DiHydrogen + forwarded_variants = ["cuda", "rocm", "half", "nvshmem"] + for v in forwarded_variants: + if v != "nvshmem": + depends_on("hydrogen +{0}".format(v), when="+{0}".format(v)) + depends_on("hydrogen ~{0}".format(v), when="~{0}".format(v)) + if v != "al" and v != "half": + depends_on("dihydrogen +{0}".format(v), when="+{0}".format(v)) + depends_on("dihydrogen ~{0}".format(v), when="~{0}".format(v)) + if v == "cuda" or v == "rocm": + depends_on("aluminum +{0} +nccl".format(v), when="+{0}".format(v)) # Add Hydrogen variants depends_on("hydrogen +openmp +shared +int64") - depends_on("hydrogen +openmp_blas", when=sys.platform != "darwin") - depends_on("hydrogen ~al", when="~al") - depends_on("hydrogen +al", when="+al") - depends_on("hydrogen ~cuda", when="~cuda") - depends_on("hydrogen +cuda", when="+cuda") - depends_on("hydrogen ~half", when="~half") - depends_on("hydrogen +half", when="+half") - depends_on("hydrogen ~rocm", when="~rocm") - depends_on("hydrogen +rocm", when="+rocm") depends_on("hydrogen build_type=Debug", when="build_type=Debug") - # Older versions depended on Elemental not Hydrogen - depends_on("elemental +openmp_blas +shared +int64", when="@0.91:0.94") - depends_on( - "elemental +openmp_blas +shared +int64 build_type=Debug", - when="build_type=Debug @0.91:0.94", - ) - - # Specify the correct version of Aluminum - depends_on("aluminum@:0.3", when="@0.95:0.100 +al") - depends_on("aluminum@0.4.0:0.4", when="@0.101:0.101.99 +al") - depends_on("aluminum@0.5.0:", when="@:0.90,0.102: +al") + # Add DiHydrogen variants + depends_on("dihydrogen +distconv", when="+distconv") + depends_on("dihydrogen@develop", when="@develop") # Add Aluminum variants - depends_on("aluminum +cuda +nccl", when="+al +cuda") - depends_on("aluminum +rocm +rccl", when="+al +rocm") - - depends_on("dihydrogen@0.2.0:", when="@:0.90,0.102:") - depends_on("dihydrogen +openmp", when="+dihydrogen") - depends_on("dihydrogen +openmp_blas", when=sys.platform != "darwin") - depends_on("dihydrogen ~cuda", when="+dihydrogen ~cuda") - depends_on("dihydrogen +cuda", when="+dihydrogen +cuda") - depends_on("dihydrogen ~al", when="+dihydrogen ~al") - depends_on("dihydrogen +al", when="+dihydrogen +al") - depends_on("dihydrogen +distconv +cuda", when="+distconv +cuda") - depends_on("dihydrogen +distconv +rocm", when="+distconv +rocm") - depends_on("dihydrogen ~half", when="+dihydrogen ~half") - depends_on("dihydrogen +half", when="+dihydrogen +half") - depends_on("dihydrogen ~nvshmem", when="+dihydrogen ~nvshmem") - depends_on("dihydrogen +nvshmem", when="+dihydrogen +nvshmem") - depends_on("dihydrogen ~rocm", when="+dihydrogen ~rocm") - depends_on("dihydrogen +rocm", when="+dihydrogen +rocm") - depends_on("dihydrogen@0.1", when="@0.101:0.101.99 +dihydrogen") - depends_on("dihydrogen@:0.0,0.2:", when="@:0.90,0.102: +dihydrogen") - conflicts("~dihydrogen", when="+distconv") + depends_on("aluminum@master", when="@develop") depends_on("hdf5+mpi", when="+distconv") for arch in CudaPackage.cuda_arch_values: depends_on("hydrogen cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) - depends_on("aluminum cuda_arch=%s" % arch, when="+al +cuda cuda_arch=%s" % arch) - depends_on("dihydrogen cuda_arch=%s" % arch, when="+dihydrogen +cuda cuda_arch=%s" % arch) + depends_on("aluminum cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) + depends_on("dihydrogen cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) depends_on("nccl cuda_arch=%s" % arch, when="+cuda cuda_arch=%s" % arch) # variants +rocm and amdgpu_targets are not automatically passed to # dependencies, so do it manually. for val in ROCmPackage.amdgpu_targets: depends_on("hydrogen amdgpu_target=%s" % val, when="amdgpu_target=%s" % val) - depends_on("aluminum amdgpu_target=%s" % val, when="+al amdgpu_target=%s" % val) - depends_on("dihydrogen amdgpu_target=%s" % val, when="+dihydrogen amdgpu_target=%s" % val) + depends_on("aluminum amdgpu_target=%s" % val, when="amdgpu_target=%s" % val) + depends_on("dihydrogen amdgpu_target=%s" % val, when="amdgpu_target=%s" % val) depends_on("roctracer-dev", when="+rocm +distconv") - depends_on("cudnn", when="@0.90:0.100 +cuda") - depends_on("cudnn@8.0.2:", when="@:0.90,0.101: +cuda") - depends_on("cub", when="@0.94:0.98.2 +cuda ^cuda@:10") - depends_on("cutensor", when="@:0.90,0.102: +cuda") + depends_on("cudnn@8.0.2:", when="+cuda") + depends_on("cutensor", when="+cuda") depends_on("hipcub", when="+rocm") depends_on("mpi") - depends_on("hwloc@1.11:", when="@:0.90,0.102: +hwloc") - depends_on("hwloc@1.11.0:1.11", when="@0.95:0.101 +hwloc") + depends_on("hwloc@1.11:") depends_on("hwloc +cuda +nvml", when="+cuda") depends_on("hwloc@2.3.0:", when="+rocm") depends_on("hiptt", when="+rocm") @@ -296,9 +193,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): # Note that conduit defaults to +fortran +parmetis +python, none of which are # necessary by LBANN: you may want to disable those options in your # packages.yaml - depends_on("conduit@0.4.0: +hdf5", when="@0.94:0 +conduit") - depends_on("conduit@0.5.0:0.6 +hdf5", when="@0.100:0.101 +conduit") - depends_on("conduit@0.6.0: +hdf5", when="@:0.90,0.99:") + depends_on("conduit@0.6.0: +hdf5") # LBANN can use Python in two modes 1) as part of an extensible framework # and 2) to drive the front end model creation and launch @@ -308,12 +203,12 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): extends("python", when="+python") # Python front end and possible extra packages - depends_on("python@3: +shared", type=("build", "run"), when="@:0.90,0.99: +pfe") + depends_on("python@3: +shared", type=("build", "run"), when="+pfe") extends("python", when="+pfe") depends_on("py-setuptools", type="build", when="+pfe") - depends_on("py-protobuf+cpp@3.10.0:", type=("build", "run"), when="@:0.90,0.99: +pfe") + depends_on("py-protobuf+cpp@3.10.0:4.21.12", type=("build", "run"), when="+pfe") - depends_on("protobuf+shared@3.10.0:", when="@:0.90,0.99:") + depends_on("protobuf+shared@3.10.0:3.21.12") depends_on("zlib-api", when="protobuf@3.11.0:") # using cereal@1.3.1 and above requires changing the @@ -328,7 +223,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("onnx", when="+onnx") depends_on("nvshmem", when="+nvshmem") - depends_on("spdlog", when="@:0.90,0.102:") + depends_on("spdlog@1.11.0") depends_on("zstr") depends_on("caliper+adiak+mpi", when="+caliper") @@ -336,6 +231,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): generator("ninja") def setup_build_environment(self, env): + env.append_flags("CXXFLAGS", "-fno-omit-frame-pointer") if self.spec.satisfies("%apple-clang"): env.append_flags("CPPFLAGS", self.compiler.openmp_flag) env.append_flags("CFLAGS", self.spec["llvm-openmp"].headers.include_flags) @@ -357,7 +253,7 @@ def libs(self): def cache_name(self): hostname = socket.gethostname() # Get a hostname that has no node identifier - hostname = hostname.rstrip("1234567890") + hostname = hostname.rstrip("1234567890-") return "LBANN_{0}_{1}-{2}-{3}@{4}.cmake".format( hostname, self.spec.version, @@ -440,12 +336,9 @@ def initconfig_package_entries(self): cmake_variant_fields = [ ("LBANN_WITH_CNPY", "numpy"), ("LBANN_DETERMINISTIC", "deterministic"), - ("LBANN_WITH_HWLOC", "hwloc"), - ("LBANN_WITH_ALUMINUM", "al"), ("LBANN_WITH_ADDRESS_SANITIZER", "asan"), ("LBANN_WITH_BOOST", "boost"), ("LBANN_WITH_CALIPER", "caliper"), - ("LBANN_WITH_CONDUIT", "conduit"), ("LBANN_WITH_NVSHMEM", "nvshmem"), ("LBANN_WITH_FFT", "fft"), ("LBANN_WITH_ONEDNN", "onednn"), @@ -460,6 +353,9 @@ def initconfig_package_entries(self): for opt, val in cmake_variant_fields: entries.append(self.define_cmake_cache_from_variant(opt, val)) + entries.append(cmake_cache_option("LBANN_WITH_ALUMINUM", True)) + entries.append(cmake_cache_option("LBANN_WITH_CONDUIT", True)) + entries.append(cmake_cache_option("LBANN_WITH_HWLOC", True)) entries.append(cmake_cache_option("LBANN_WITH_ROCTRACER", "+rocm +distconv" in spec)) entries.append(cmake_cache_option("LBANN_WITH_TBINF", False)) entries.append( @@ -492,7 +388,7 @@ def initconfig_package_entries(self): ) ) - entries.append(self.define_cmake_cache_from_variant("LBANN_WITH_DIHYDROGEN", "dihydrogen")) + entries.append(cmake_cache_option("LBANN_WITH_DIHYDROGEN", True)) entries.append(self.define_cmake_cache_from_variant("LBANN_WITH_DISTCONV", "distconv")) # IF IBM ESSL is used it needs help finding the proper LAPACK libraries From b5e2f23b6cfbb37cbeb5b600b2ff188271e3601f Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 9 Nov 2023 13:03:03 -0600 Subject: [PATCH 564/806] hypre: add in hipblas dependency due to superlu-dist (#40980) --- var/spack/repos/builtin/packages/hypre/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 09116340170f0d..6968ec8fd6d08b 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -108,6 +108,7 @@ def patch(self): # fix sequential compilation in 'src/seq_mv' depends_on("rocthrust", when="+rocm") depends_on("rocrand", when="+rocm") depends_on("rocprim", when="+rocm") + depends_on("hipblas", when="+rocm +superlu-dist") depends_on("umpire", when="+umpire") depends_on("caliper", when="+caliper") @@ -259,6 +260,8 @@ def configure_args(self): if "+rocm" in spec: rocm_pkgs = ["rocsparse", "rocthrust", "rocprim", "rocrand"] + if "+superlu-dist" in spec: + rocm_pkgs.append("hipblas") rocm_inc = "" for pkg in rocm_pkgs: if "^" + pkg in spec: From b17d7cd0e671a06b8ccc9ccc3cf1bfab39593d43 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Thu, 9 Nov 2023 13:19:48 -0600 Subject: [PATCH 565/806] mfem: add hipblas dependency for superlu-dist (#40981) --- var/spack/repos/builtin/packages/mfem/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index f4821e63c2ba0f..75eeda7b1fd51b 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -967,6 +967,9 @@ def find_optional_library(name, prefix): if "^rocthrust" in spec and not spec["hip"].external: # petsc+rocm needs the rocthrust header path hip_headers += spec["rocthrust"].headers + if "^hipblas" in spec and not spec["hip"].external: + # superlu-dist+rocm needs the hipblas header path + hip_headers += spec["hipblas"].headers if "%cce" in spec: # We assume the proper Cray CCE module (cce) is loaded: craylibs_path = env["CRAYLIBS_" + machine().upper()] From 38f3f57a54381317bbce1c7974095b4ef6d7b856 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Thu, 9 Nov 2023 12:37:38 -0700 Subject: [PATCH 566/806] [lcov] Add build and runtime deps necessary for lcov@2.0.0: (#40974) * [lcov] Add build and runtime deps necessary for lcov@2.0.0: + Many additional Perl package dependecies are required for the new version of lcov. + Some of the new dependencies were not known to spack until now. * Style fix --- .../repos/builtin/packages/lcov/package.py | 19 ++++++++++++++++++- .../packages/perl-class-singleton/package.py | 15 +++++++++++++++ .../packages/perl-datetime-locale/package.py | 17 +++++++++++++++++ .../perl-datetime-timezone/package.py | 15 +++++++++++++++ .../packages/perl-file-sharedir/package.py | 17 +++++++++++++++++ .../perl-params-validationcompiler/package.py | 16 ++++++++++++++++ .../builtin/packages/perl-specio/package.py | 15 +++++++++++++++ 7 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/perl-class-singleton/package.py create mode 100644 var/spack/repos/builtin/packages/perl-datetime-locale/package.py create mode 100644 var/spack/repos/builtin/packages/perl-datetime-timezone/package.py create mode 100644 var/spack/repos/builtin/packages/perl-file-sharedir/package.py create mode 100644 var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py create mode 100644 var/spack/repos/builtin/packages/perl-specio/package.py diff --git a/var/spack/repos/builtin/packages/lcov/package.py b/var/spack/repos/builtin/packages/lcov/package.py index 64a8d6a228b450..0c71a9b7aeda63 100644 --- a/var/spack/repos/builtin/packages/lcov/package.py +++ b/var/spack/repos/builtin/packages/lcov/package.py @@ -24,13 +24,30 @@ class Lcov(MakefilePackage): # dependencies from # https://github.com/linux-test-project/lcov/blob/02ece21d54ccd16255d74f8b00f8875b6c15653a/README#L91-L111 depends_on("perl", type=("build", "run")) + depends_on("perl-b-hooks-endofscope", type=("run")) depends_on("perl-capture-tiny", type=("run")) - depends_on("perl-devel-cover", type=("run")) + depends_on("perl-class-inspector", type=("run")) + depends_on("perl-class-singleton", type=("run")) depends_on("perl-datetime", type=("run")) + depends_on("perl-datetime-locale", type=("run")) + depends_on("perl-datetime-timezone", type=("run")) + depends_on("perl-devel-cover", type=("run")) + depends_on("perl-devel-stacktrace", type=("run")) depends_on("perl-digest-md5", type=("run")) + depends_on("perl-eval-closure", type=("run")) + depends_on("perl-exception-class", type=("run")) + depends_on("perl-file-sharedir", type=("run")) depends_on("perl-file-spec", type=("run")) depends_on("perl-json", type=("run")) depends_on("perl-memory-process", type=("run")) + depends_on("perl-module-implementation", type=("run")) + depends_on("perl-mro-compat", type=("run")) + depends_on("perl-namespace-clean", type=("run")) + depends_on("perl-package-stash", type=("run")) + depends_on("perl-params-validationcompiler", type=("run")) + depends_on("perl-role-tiny", type=("run")) + depends_on("perl-specio", type=("run")) + depends_on("perl-sub-identify", type=("run")) depends_on("perl-time-hires", type=("run")) def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/perl-class-singleton/package.py b/var/spack/repos/builtin/packages/perl-class-singleton/package.py new file mode 100644 index 00000000000000..fa44321b24ee80 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-class-singleton/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlClassSingleton(PerlPackage): + """Class::Singleton - Implementation of a "Singleton" class""" + + homepage = "https://metacpan.org/pod/Class::Singleton" + url = "https://cpan.metacpan.org/authors/id/S/SH/SHAY/Class-Singleton-1.6.tar.gz" + + version("1.6", sha256="27ba13f0d9512929166bbd8c9ef95d90d630fc80f0c9a1b7458891055e9282a4") diff --git a/var/spack/repos/builtin/packages/perl-datetime-locale/package.py b/var/spack/repos/builtin/packages/perl-datetime-locale/package.py new file mode 100644 index 00000000000000..6e341423f06238 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-datetime-locale/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 PerlDatetimeLocale(PerlPackage): + """DateTime::Locale - Localization support for DateTime.pm""" + + homepage = "https://metacpan.org/pod/DateTime::Locale" + url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-1.40.tar.gz" + + version("1.40", sha256="7490b4194b5d23a4e144976dedb3bdbcc6d3364b5d139cc922a86d41fdb87afb") + + depends_on("perl-file-sharedir-install", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py b/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py new file mode 100644 index 00000000000000..b6c9eba506d845 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-datetime-timezone/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlDatetimeTimezone(PerlPackage): + """DateTime::TimeZone - Time zone object base class and factory""" + + homepage = "https://metacpan.org/pod/DateTime::TimeZone" + url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-2.60.tar.gz" + + version("2.60", sha256="f0460d379323905b579bed44e141237a337dc25dd26b6ab0c60ac2b80629323d") diff --git a/var/spack/repos/builtin/packages/perl-file-sharedir/package.py b/var/spack/repos/builtin/packages/perl-file-sharedir/package.py new file mode 100644 index 00000000000000..45c6c5169679e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-file-sharedir/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2023 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 PerlFileSharedir(PerlPackage): + """File::ShareDir - Locate per-dist and per-module shared files""" + + homepage = "https://metacpan.org/pod/File::ShareDir" + url = "https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-1.118.tar.gz" + + version("1.118", sha256="3bb2a20ba35df958dc0a4f2306fc05d903d8b8c4de3c8beefce17739d281c958") + + # depends_on("perl-module-build", type="build") diff --git a/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py b/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py new file mode 100644 index 00000000000000..6f408c960a8df9 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2023 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 PerlParamsValidationcompiler(PerlPackage): + """Params::ValidationCompiler - Build an optimized subroutine parameter validator once, + use it forever""" + + homepage = "https://metacpan.org/pod/Params::ValidationCompiler" + url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-0.31.tar.gz" + + version("0.31", sha256="7b6497173f1b6adb29f5d51d8cf9ec36d2f1219412b4b2410e9d77a901e84a6d") diff --git a/var/spack/repos/builtin/packages/perl-specio/package.py b/var/spack/repos/builtin/packages/perl-specio/package.py new file mode 100644 index 00000000000000..05954d586dee77 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-specio/package.py @@ -0,0 +1,15 @@ +# Copyright 2013-2023 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 PerlSpecio(PerlPackage): + """Type constraints and coercions for Perl .""" + + homepage = "https://metacpan.org/dist/Specio" + url = "http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Specio-0.48.tar.gz" + + version("0.48", sha256="0c85793580f1274ef08173079131d101f77b22accea7afa8255202f0811682b2") From 4636a7f14fa9c1e31a61850667b8bd424a94d0c6 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 9 Nov 2023 12:40:53 -0700 Subject: [PATCH 567/806] Add symlinks for hdf5 library names when built in debug mode (#40965) * Add symlinks for hdf5 library names when built in debug mode * Only apply bug fix for debug libs when build type is Debug --- var/spack/repos/builtin/packages/hdf5/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 0a3903e8015478..a9e0574877bdb4 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -711,6 +711,17 @@ def fix_package_config(self): if not os.path.exists(tgt_filename): symlink(src_filename, tgt_filename) + @run_after("install") + def link_debug_libs(self): + # When build_type is Debug, the hdf5 build appends _debug to all library names. + # Dependents of hdf5 (netcdf-c etc.) can't handle those, thus make symlinks. + if "build_type=Debug" in self.spec: + libs = find(self.prefix.lib, "libhdf5*_debug.*", recursive=False) + with working_dir(self.prefix.lib): + for lib in libs: + libname = os.path.split(lib)[1] + os.symlink(libname, libname.replace("_debug", "")) + @property @llnl.util.lang.memoized def _output_version(self): From 45f8a0e42c735a531a01b1948b107c414fad2095 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 9 Nov 2023 11:55:29 -0800 Subject: [PATCH 568/806] docs: tweak formatting of `+:` and `-:` operators (#40988) Just trying to make these stand out a bit more in the docs. --- lib/spack/docs/configuration.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst index 7026825fa8b3d0..f60c430d2239ee 100644 --- a/lib/spack/docs/configuration.rst +++ b/lib/spack/docs/configuration.rst @@ -243,9 +243,11 @@ lower-precedence settings. Completely ignoring higher-level configuration options is supported with the ``::`` notation for keys (see :ref:`config-overrides` below). -There are also special notations for string concatenation and precendense override. -Using the ``+:`` notation can be used to force *prepending* strings or lists. For lists, this is identical -to the default behavior. Using the ``-:`` works similarly, but for *appending* values. +There are also special notations for string concatenation and precendense override: + +* ``+:`` will force *prepending* strings or lists. For lists, this is the default behavior. +* ``-:`` works similarly, but for *appending* values. + :ref:`config-prepend-append` ^^^^^^^^^^^ From 383ec19a0c157cf6f4588293a711e4a6da0f7e05 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:24:18 -0800 Subject: [PATCH 569/806] Revert "Deactivate Cray sles, due to unavailable runner (#40291)" (#40910) This reverts commit 4b06862a7f3fee9352cd4834b4de7cb400cd4aa1. --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index 880aeb6811a1d0..e73c492c9f01bf 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -894,16 +894,16 @@ e4s-cray-rhel-build: variables: SPACK_CI_STACK_NAME: e4s-cray-sles -# e4s-cray-sles-generate: -# extends: [ ".generate-cray-sles", ".e4s-cray-sles" ] +e4s-cray-sles-generate: + extends: [ ".generate-cray-sles", ".e4s-cray-sles" ] -# e4s-cray-sles-build: -# extends: [ ".build", ".e4s-cray-sles" ] -# trigger: -# include: -# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml -# job: e4s-cray-sles-generate -# strategy: depend -# needs: -# - artifacts: True -# job: e4s-cray-sles-generate +e4s-cray-sles-build: + extends: [ ".build", ".e4s-cray-sles" ] + trigger: + include: + - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml + job: e4s-cray-sles-generate + strategy: depend + needs: + - artifacts: True + job: e4s-cray-sles-generate From da2cc2351c71f1070dc678145f764a08ad67b250 Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Thu, 9 Nov 2023 13:06:56 -0800 Subject: [PATCH 570/806] Release Gotcha v1.0.5 (#40973) --- var/spack/repos/builtin/packages/gotcha/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gotcha/package.py b/var/spack/repos/builtin/packages/gotcha/package.py index 0efc4d986914e8..82bc308fa8f353 100644 --- a/var/spack/repos/builtin/packages/gotcha/package.py +++ b/var/spack/repos/builtin/packages/gotcha/package.py @@ -17,6 +17,7 @@ class Gotcha(CMakePackage): version("develop", branch="develop") version("master", branch="master") + version("1.0.5", tag="1.0.5", commit="e28f10c45a0cda0e1ec225eaea6abfe72c8353aa") version("1.0.4", tag="1.0.4", commit="46f2aaedc885f140a3f31a17b9b9a9d171f3d6f0") version("1.0.3", tag="1.0.3", commit="1aafd1e30d46ce4e6555c8a4ea5f5edf6a5eade5") version("1.0.2", tag="1.0.2", commit="bed1b7c716ebb0604b3e063121649b5611640f25") From dd2b436b5a6d37c13254f9d85cb25b4a67d7e21b Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Thu, 9 Nov 2023 13:08:04 -0800 Subject: [PATCH 571/806] new release cpp-logger v0.0.2 (#40972) --- var/spack/repos/builtin/packages/cpp-logger/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cpp-logger/package.py b/var/spack/repos/builtin/packages/cpp-logger/package.py index f325fa09dfc2ba..14f3fa2d60ab02 100644 --- a/var/spack/repos/builtin/packages/cpp-logger/package.py +++ b/var/spack/repos/builtin/packages/cpp-logger/package.py @@ -16,3 +16,4 @@ class CppLogger(CMakePackage): version("develop", branch="develop") version("master", branch="master") version("0.0.1", tag="v0.0.1", commit="d48b38ab14477bb7c53f8189b8b4be2ea214c28a") + version("0.0.2", tag="v0.0.2", commit="329a48401033d2d2a1f1196141763cab029220ae") From b8bb8a70cea7106a9eb71ad28815b00bdaf85edb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 9 Nov 2023 16:25:54 -0600 Subject: [PATCH 572/806] PyTorch: specify CUDA root directory (#40855) --- var/spack/repos/builtin/packages/py-torch/package.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index d2edd9453837bf..782b0741d23bcd 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -491,9 +491,8 @@ def enable_or_disable(variant, keyword="USE", var=None, newer=False): enable_or_disable("cuda") if "+cuda" in self.spec: - # cmake/public/cuda.cmake - # cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake - env.unset("CUDA_ROOT") + env.set("CUDA_HOME", self.spec["cuda"].prefix) # Linux/macOS + env.set("CUDA_PATH", self.spec["cuda"].prefix) # Windows torch_cuda_arch = ";".join( "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value ) From 4bcfb015664378c69f309074537c423c5ae20825 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 9 Nov 2023 17:10:28 -0600 Subject: [PATCH 573/806] py-black: add v23.10: (#40959) --- .../repos/builtin/packages/py-black/package.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-black/package.py b/var/spack/repos/builtin/packages/py-black/package.py index 825d37a446f291..a2cba61bc88951 100644 --- a/var/spack/repos/builtin/packages/py-black/package.py +++ b/var/spack/repos/builtin/packages/py-black/package.py @@ -17,6 +17,9 @@ class PyBlack(PythonPackage): maintainers("adamjstewart") + version("23.11.0", sha256="4c68855825ff432d197229846f971bc4d6666ce90492e5b02013bcaca4d9ab05") + version("23.10.1", sha256="1f8ce316753428ff68749c65a5f7844631aa18c8679dfd3ca9dc1a289979c258") + version("23.10.0", sha256="31b9f87b277a68d0e99d2905edae08807c007973eaa609da5f0c62def6b7c0bd") version("23.9.1", sha256="24b6b3ff5c6d9ea08a8888f6977eae858e1f340d7260cf56d70a49823236b62d") version("23.9.0", sha256="3511c8a7e22ce653f89ae90dfddaf94f3bb7e2587a245246572d3b9c92adf066") version("23.7.0", sha256="022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb") @@ -48,13 +51,14 @@ class PyBlack(PythonPackage): depends_on("py-platformdirs@2:") depends_on("py-tomli@1.1:", when="@22.8: ^python@:3.10") depends_on("py-tomli@1.1:", when="@21.7:22.6") - depends_on("py-typing-extensions@3.10:", when="^python@:3.9") - - depends_on("py-colorama@0.4.3:", when="+colorama") - depends_on("py-uvloop@0.15.2:", when="+uvloop") - depends_on("py-aiohttp@3.7.4:", when="+d") - depends_on("py-ipython@7.8:", when="+jupyter") - depends_on("py-tokenize-rt@3.2:", when="+jupyter") + depends_on("py-typing-extensions@4.0.1:", when="@23.9: ^python@:3.10") + depends_on("py-typing-extensions@3.10:", when="@:23.7 ^python@:3.9") + + depends_on("py-colorama@0.4.3:", when="+colorama") + depends_on("py-uvloop@0.15.2:", when="+uvloop") + depends_on("py-aiohttp@3.7.4:", when="+d") + depends_on("py-ipython@7.8:", when="+jupyter") + depends_on("py-tokenize-rt@3.2:", when="+jupyter") # Historical dependencies depends_on("py-setuptools@45:", when="@:22.8", type=("build", "run")) From 2e45edf4e371966e5f0f0f03183bb150ecbd23f1 Mon Sep 17 00:00:00 2001 From: David Boehme Date: Thu, 9 Nov 2023 20:23:00 -0800 Subject: [PATCH 574/806] Add adiak v0.4.0 (#40993) * Add adiak v0.4.0 * Fix style checks --- var/spack/repos/builtin/packages/adiak/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/adiak/package.py b/var/spack/repos/builtin/packages/adiak/package.py index 05f936e3f92c5a..e1d757e0827833 100644 --- a/var/spack/repos/builtin/packages/adiak/package.py +++ b/var/spack/repos/builtin/packages/adiak/package.py @@ -20,8 +20,9 @@ class Adiak(CMakePackage): variant("shared", default=True, description="Build dynamic libraries") version( - "0.2.2", commit="3aedd494c81c01df1183af28bc09bade2fabfcd3", submodules=True, preferred=True + "0.4.0", commit="7e8b7233f8a148b402128ed46b2f0c643e3b397e", submodules=True, preferred=True ) + version("0.2.2", commit="3aedd494c81c01df1183af28bc09bade2fabfcd3", submodules=True) version( "0.3.0-alpha", commit="054d2693a977ed0e1f16c665b4966bb90924779e", From f0ced1af42c521ffac780a117f64e01d40c82d27 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 10 Nov 2023 03:31:28 -0800 Subject: [PATCH 575/806] info: rework spack info command to display variants better (#40998) This changes variant display to use a much more legible format, and to use screen space much better (particularly on narrow terminals). It also adds color the variant display to match other parts of `spack info`. Descriptions and variant value lists that were frequently squished into a tiny column before now have closer to the full terminal width. This change also preserves any whitespace formatting present in `package.py`, so package maintainers can make easer-to-read descriptions of variant values if they want. For example, `gasnet` has had a nice description of the `conduits` variant for a while, but it was wrapped and made illegible by `spack info`. That is now fixed and the original newlines are kept. Conditional variants are grouped by their when clauses by default, but if you do not like the grouping, you can display all the variants in order with `--variants-by-name`. I'm not sure when people will prefer this, but it makes it easier to tell that a particular variant is/isn't there. I do think grouping by `when` is the better default. --- lib/spack/spack/cmd/info.py | 217 ++++++++++++++++++++++++------ lib/spack/spack/test/cmd/info.py | 2 +- share/spack/spack-completion.bash | 2 +- share/spack/spack-completion.fish | 4 +- 4 files changed, 184 insertions(+), 41 deletions(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 5e667f487686e1..dd56c25451083a 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import sys import textwrap from itertools import zip_longest @@ -16,6 +17,7 @@ import spack.install_test import spack.repo import spack.spec +import spack.version from spack.package_base import preferred_version description = "get detailed information on a particular package" @@ -53,6 +55,7 @@ def setup_parser(subparser): ("--tags", print_tags.__doc__), ("--tests", print_tests.__doc__), ("--virtuals", print_virtuals.__doc__), + ("--variants-by-name", "list variants in strict name order; don't group by condition"), ] for opt, help_comment in options: subparser.add_argument(opt, action="store_true", help=help_comment) @@ -77,35 +80,10 @@ def license(s): class VariantFormatter: - def __init__(self, variants): - self.variants = variants + def __init__(self, pkg): + self.variants = pkg.variants self.headers = ("Name [Default]", "When", "Allowed values", "Description") - # Formats - fmt_name = "{0} [{1}]" - - # Initialize column widths with the length of the - # corresponding headers, as they cannot be shorter - # than that - self.column_widths = [len(x) for x in self.headers] - - # Expand columns based on max line lengths - for k, e in variants.items(): - v, w = e - candidate_max_widths = ( - len(fmt_name.format(k, self.default(v))), # Name [Default] - len(str(w)), - len(v.allowed_values), # Allowed values - len(v.description), # Description - ) - - self.column_widths = ( - max(self.column_widths[0], candidate_max_widths[0]), - max(self.column_widths[1], candidate_max_widths[1]), - max(self.column_widths[2], candidate_max_widths[2]), - max(self.column_widths[3], candidate_max_widths[3]), - ) - # Don't let name or possible values be less than max widths _, cols = tty.terminal_size() max_name = min(self.column_widths[0], 30) @@ -137,6 +115,8 @@ def default(self, v): def lines(self): if not self.variants: yield " None" + return + else: yield " " + self.fmt % self.headers underline = tuple([w * "=" for w in self.column_widths]) @@ -271,15 +251,165 @@ def print_tests(pkg): color.cprint(" None") -def print_variants(pkg): +def _fmt_value(v): + if v is None or isinstance(v, bool): + return str(v).lower() + else: + return str(v) + + +def _fmt_name_and_default(variant): + """Print colorized name [default] for a variant.""" + return color.colorize(f"@c{{{variant.name}}} @C{{[{_fmt_value(variant.default)}]}}") + + +def _fmt_when(when, indent): + return color.colorize(f"{indent * ' '}@B{{when}} {color.cescape(when)}") + + +def _fmt_variant_description(variant, width, indent): + """Format a variant's description, preserving explicit line breaks.""" + return "\n".join( + textwrap.fill( + line, width=width, initial_indent=indent * " ", subsequent_indent=indent * " " + ) + for line in variant.description.split("\n") + ) + + +def _fmt_variant(variant, max_name_default_len, indent, when=None, out=None): + out = out or sys.stdout + + _, cols = tty.terminal_size() + + name_and_default = _fmt_name_and_default(variant) + name_default_len = color.clen(name_and_default) + + values = variant.values + if not isinstance(variant.values, (tuple, list, spack.variant.DisjointSetsOfValues)): + values = [variant.values] + + # put 'none' first, sort the rest by value + sorted_values = sorted(values, key=lambda v: (v != "none", v)) + + pad = 4 # min padding between 'name [default]' and values + value_indent = (indent + max_name_default_len + pad) * " " # left edge of values + + # This preserves any formatting (i.e., newlines) from how the description was + # written in package.py, but still wraps long lines for small terminals. + # This allows some packages to provide detailed help on their variants (see, e.g., gasnet). + formatted_values = "\n".join( + textwrap.wrap( + f"{', '.join(_fmt_value(v) for v in sorted_values)}", + width=cols - 2, + initial_indent=value_indent, + subsequent_indent=value_indent, + ) + ) + formatted_values = formatted_values[indent + name_default_len + pad :] + + # name [default] value1, value2, value3, ... + padding = pad * " " + color.cprint(f"{indent * ' '}{name_and_default}{padding}@c{{{formatted_values}}}", stream=out) + + # when + description_indent = indent + 4 + if when is not None and when != spack.spec.Spec(): + out.write(_fmt_when(when, description_indent - 2)) + out.write("\n") + + # description, preserving explicit line breaks from the way it's written in the package file + out.write(_fmt_variant_description(variant, cols - 2, description_indent)) + out.write("\n") + + +def _variants_by_name_when(pkg): + """Adaptor to get variants keyed by { name: { when: { [Variant...] } }.""" + # TODO: replace with pkg.variants_by_name(when=True) when unified directive dicts are merged. + variants = {} + for name, (variant, whens) in pkg.variants.items(): + for when in whens: + variants.setdefault(name, {}).setdefault(when, []).append(variant) + return variants + + +def _variants_by_when_name(pkg): + """Adaptor to get variants keyed by { when: { name: Variant } }""" + # TODO: replace with pkg.variants when unified directive dicts are merged. + variants = {} + for name, (variant, whens) in pkg.variants.items(): + for when in whens: + variants.setdefault(when, {})[name] = variant + return variants + + +def _print_variants_header(pkg): """output variants""" + if not pkg.variants: + print(" None") + return + color.cprint("") color.cprint(section_title("Variants:")) - formatter = VariantFormatter(pkg.variants) - for line in formatter.lines: - color.cprint(color.cescape(line)) + variants_by_name = _variants_by_name_when(pkg) + + # Calculate the max length of the "name [default]" part of the variant display + # This lets us know where to print variant values. + max_name_default_len = max( + color.clen(_fmt_name_and_default(variant)) + for name, when_variants in variants_by_name.items() + for variants in when_variants.values() + for variant in variants + ) + + return max_name_default_len, variants_by_name + + +def _unconstrained_ver_first(item): + """sort key that puts specs with open version ranges first""" + spec, _ = item + return (spack.version.any_version not in spec.versions, spec) + + +def print_variants_grouped_by_when(pkg): + max_name_default_len, _ = _print_variants_header(pkg) + + indent = 4 + variants = _variants_by_when_name(pkg) + for when, variants_by_name in sorted(variants.items(), key=_unconstrained_ver_first): + padded_values = max_name_default_len + 4 + start_indent = indent + + if when != spack.spec.Spec(): + sys.stdout.write("\n") + sys.stdout.write(_fmt_when(when, indent)) + sys.stdout.write("\n") + + # indent names slightly inside 'when', but line up values + padded_values -= 2 + start_indent += 2 + + for name, variant in sorted(variants_by_name.items()): + _fmt_variant(variant, padded_values, start_indent, None, out=sys.stdout) + + +def print_variants_by_name(pkg): + max_name_default_len, variants_by_name = _print_variants_header(pkg) + max_name_default_len += 4 + + indent = 4 + for name, when_variants in variants_by_name.items(): + for when, variants in sorted(when_variants.items(), key=_unconstrained_ver_first): + for variant in variants: + _fmt_variant(variant, max_name_default_len, indent, when, out=sys.stdout) + sys.stdout.write("\n") + + +def print_variants(pkg): + """output variants""" + print_variants_grouped_by_when(pkg) def print_versions(pkg): @@ -300,18 +430,24 @@ def print_versions(pkg): pad = padder(pkg.versions, 4) preferred = preferred_version(pkg) - url = "" - if pkg.has_code: - url = fs.for_package_version(pkg, preferred) + def get_url(version): + try: + return fs.for_package_version(pkg, version) + except spack.fetch_strategy.InvalidArgsError: + return "No URL" + + url = get_url(preferred) if pkg.has_code else "" line = version(" {0}".format(pad(preferred))) + color.cescape(url) - color.cprint(line) + color.cwrite(line) + + print() safe = [] deprecated = [] for v in reversed(sorted(pkg.versions)): if pkg.has_code: - url = fs.for_package_version(pkg, v) + url = get_url(v) if pkg.versions[v].get("deprecated", False): deprecated.append((v, url)) else: @@ -384,7 +520,12 @@ def info(parser, args): else: color.cprint(" None") - color.cprint(section_title("Homepage: ") + pkg.homepage) + if getattr(pkg, "homepage"): + color.cprint(section_title("Homepage: ") + pkg.homepage) + + _print_variants = ( + print_variants_by_name if args.variants_by_name else print_variants_grouped_by_when + ) # Now output optional information in expected order sections = [ @@ -392,7 +533,7 @@ def info(parser, args): (args.all or args.detectable, print_detectable), (args.all or args.tags, print_tags), (args.all or not args.no_versions, print_versions), - (args.all or not args.no_variants, print_variants), + (args.all or not args.no_variants, _print_variants), (args.all or args.phases, print_phases), (args.all or not args.no_dependencies, print_dependencies), (args.all or args.virtuals, print_virtuals), diff --git a/lib/spack/spack/test/cmd/info.py b/lib/spack/spack/test/cmd/info.py index c4528f9852e284..5748323d8cba98 100644 --- a/lib/spack/spack/test/cmd/info.py +++ b/lib/spack/spack/test/cmd/info.py @@ -25,7 +25,7 @@ def parser(): def print_buffer(monkeypatch): buffer = [] - def _print(*args): + def _print(*args, **kwargs): buffer.extend(args) monkeypatch.setattr(spack.cmd.info.color, "cprint", _print, raising=False) diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 20bb886b10d9e3..e84fe10134ca21 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1267,7 +1267,7 @@ _spack_help() { _spack_info() { if $list_options then - SPACK_COMPREPLY="-h --help -a --all --detectable --maintainers --no-dependencies --no-variants --no-versions --phases --tags --tests --virtuals" + SPACK_COMPREPLY="-h --help -a --all --detectable --maintainers --no-dependencies --no-variants --no-versions --phases --tags --tests --virtuals --variants-by-name" else _all_packages fi diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 769768c04cc25b..d660c251af9248 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1855,7 +1855,7 @@ complete -c spack -n '__fish_spack_using_command help' -l spec -f -a guide complete -c spack -n '__fish_spack_using_command help' -l spec -d 'help on the package specification syntax' # spack info -set -g __fish_spack_optspecs_spack_info h/help a/all detectable maintainers no-dependencies no-variants no-versions phases tags tests virtuals +set -g __fish_spack_optspecs_spack_info h/help a/all detectable maintainers no-dependencies no-variants no-versions phases tags tests virtuals variants-by-name complete -c spack -n '__fish_spack_using_command_pos 0 info' -f -a '(__fish_spack_packages)' complete -c spack -n '__fish_spack_using_command info' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command info' -s h -l help -d 'show this help message and exit' @@ -1879,6 +1879,8 @@ complete -c spack -n '__fish_spack_using_command info' -l tests -f -a tests complete -c spack -n '__fish_spack_using_command info' -l tests -d 'output relevant build-time and stand-alone tests' complete -c spack -n '__fish_spack_using_command info' -l virtuals -f -a virtuals complete -c spack -n '__fish_spack_using_command info' -l virtuals -d 'output virtual packages' +complete -c spack -n '__fish_spack_using_command info' -l variants-by-name -f -a variants_by_name +complete -c spack -n '__fish_spack_using_command info' -l variants-by-name -d 'list variants in strict name order; don\'t group by condition' # spack install set -g __fish_spack_optspecs_spack_install h/help only= u/until= j/jobs= overwrite fail-fast keep-prefix keep-stage dont-restage use-cache no-cache cache-only use-buildcache= include-build-deps no-check-signature show-log-on-error source n/no-checksum deprecated v/verbose fake only-concrete add no-add f/file= clean dirty test= log-format= log-file= help-cdash cdash-upload-url= cdash-build= cdash-site= cdash-track= cdash-buildstamp= y/yes-to-all U/fresh reuse reuse-deps From 4027a2139b053251dafc2de38d24eac4d69d42a0 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 10 Nov 2023 12:32:48 +0100 Subject: [PATCH 576/806] env: compute env mods only for installed roots (#40997) And improve the error message (load vs unload). Of course you could have some uninstalled dependency too, but as long as it doesn't implement `setup_run_environment` etc, I don't think it hurts to attempt to load the root anyways, given that failure to do so is a warning, not a fatal error. --- lib/spack/spack/environment/environment.py | 7 +++++-- lib/spack/spack/test/cmd/env.py | 6 +++--- lib/spack/spack/user_environment.py | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index 8ddd7f8d3bc2fb..cf6dffcb0d303b 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1739,11 +1739,14 @@ def _env_modifications_for_view( self, view: ViewDescriptor, reverse: bool = False ) -> spack.util.environment.EnvironmentModifications: try: - mods = uenv.environment_modifications_for_specs(*self.concrete_roots(), view=view) + with spack.store.STORE.db.read_transaction(): + installed_roots = [s for s in self.concrete_roots() if s.installed] + mods = uenv.environment_modifications_for_specs(*installed_roots, view=view) except Exception as e: # Failing to setup spec-specific changes shouldn't be a hard error. tty.warn( - "couldn't load runtime environment due to {}: {}".format(e.__class__.__name__, e) + f"could not {'unload' if reverse else 'load'} runtime environment due " + f"to {e.__class__.__name__}: {e}" ) return spack.util.environment.EnvironmentModifications() return mods.reversed() if reverse else mods diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 983a778e969b19..c3a7551e944ddf 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -284,7 +284,7 @@ def setup_error(pkg, env): _, err = capfd.readouterr() assert "cmake-client had issues!" in err - assert "Warning: couldn't load runtime environment" in err + assert "Warning: could not load runtime environment" in err def test_activate_adds_transitive_run_deps_to_path(install_mockery, mock_fetch, monkeypatch): @@ -502,12 +502,12 @@ def test_env_activate_broken_view( # test that Spack detects the missing package and fails gracefully with spack.repo.use_repositories(mock_custom_repository): wrong_repo = env("activate", "--sh", "test") - assert "Warning: couldn't load runtime environment" in wrong_repo + assert "Warning: could not load runtime environment" in wrong_repo assert "Unknown namespace: builtin.mock" in wrong_repo # test replacing repo fixes it normal_repo = env("activate", "--sh", "test") - assert "Warning: couldn't load runtime environment" not in normal_repo + assert "Warning: could not load runtime environment" not in normal_repo assert "Unknown namespace: builtin.mock" not in normal_repo diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py index 5d1561a8eaedb7..6e1c798e51dc1c 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py @@ -11,6 +11,7 @@ import spack.build_environment import spack.config +import spack.error import spack.spec import spack.util.environment as environment import spack.util.prefix as prefix From fbf02b561ae628ea14302d4b55a02e3ee2f4ec2c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 10 Nov 2023 14:56:04 +0100 Subject: [PATCH 577/806] gromacs et al: fix ^mkl pattern (#41002) The ^mkl pattern was used to refer to three packages even though none of software using it was depending on "mkl". This pattern, which follows Hyrum's law, is now being removed in favor of a more explicit one. In this PR gromacs, abinit, lammps, and quantum-espresso are modified. Intel packages are also modified to provide "lapack" and "blas" together. --- lib/spack/spack/build_systems/oneapi.py | 7 +++++-- lib/spack/spack/package.py | 1 + var/spack/repos/builtin/packages/abinit/package.py | 14 ++++++++++---- .../repos/builtin/packages/gromacs/package.py | 7 ++++++- .../repos/builtin/packages/intel-mkl/package.py | 3 +-- .../builtin/packages/intel-oneapi-mkl/package.py | 3 +-- .../packages/intel-parallel-studio/package.py | 3 +-- var/spack/repos/builtin/packages/lammps/package.py | 2 +- .../builtin/packages/quantum-espresso/package.py | 12 +++++++++--- var/spack/repos/builtin/packages/r/package.py | 2 +- 10 files changed, 36 insertions(+), 18 deletions(-) diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py index 1961eb312cee3c..4c432c0cace6d6 100644 --- a/lib/spack/spack/build_systems/oneapi.py +++ b/lib/spack/spack/build_systems/oneapi.py @@ -9,11 +9,10 @@ import shutil from os.path import basename, dirname, isdir -from llnl.util.filesystem import find_headers, find_libraries, join_path +from llnl.util.filesystem import find_headers, find_libraries, join_path, mkdirp from llnl.util.link_tree import LinkTree from spack.directives import conflicts, variant -from spack.package import mkdirp from spack.util.environment import EnvironmentModifications from spack.util.executable import Executable @@ -212,3 +211,7 @@ def link_flags(self): @property def ld_flags(self): return "{0} {1}".format(self.search_flags, self.link_flags) + + +#: Tuple of Intel math libraries, exported to packages +INTEL_MATH_LIBRARIES = ("intel-mkl", "intel-oneapi-mkl", "intel-parallel-studio") diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ee6fb0ed8c9f41..79df48cd175602 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -50,6 +50,7 @@ from spack.build_systems.nmake import NMakePackage from spack.build_systems.octave import OctavePackage from spack.build_systems.oneapi import ( + INTEL_MATH_LIBRARIES, IntelOneApiLibraryPackage, IntelOneApiPackage, IntelOneApiStaticLibraryList, diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 282c673bcc57f4..07a706590456ac 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -87,6 +87,11 @@ class Abinit(AutotoolsPackage): # libxml2 depends_on("libxml2", when="@9:+libxml2") + # If the Intel suite is used for Lapack, it must be used for fftw and vice-versa + for _intel_pkg in INTEL_MATH_LIBRARIES: + requires(f"^[virtuals=fftw-api] {_intel_pkg}", when=f"^[virtuals=lapack] {_intel_pkg}") + requires(f"^[virtuals=lapack] {_intel_pkg}", when=f"^[virtuals=fftw-api] {_intel_pkg}") + # Cannot ask for +scalapack if it does not depend on MPI conflicts("+scalapack", when="~mpi") @@ -199,7 +204,8 @@ def configure_args(self): # BLAS/LAPACK/SCALAPACK-ELPA linalg = spec["lapack"].libs + spec["blas"].libs - if "^mkl" in spec: + is_using_intel_libraries = spec["lapack"].name in INTEL_MATH_LIBRARIES + if is_using_intel_libraries: linalg_flavor = "mkl" elif "@9:" in spec and "^openblas" in spec: linalg_flavor = "openblas" @@ -220,7 +226,7 @@ def configure_args(self): oapp(f"--with-linalg-flavor={linalg_flavor}") - if "^mkl" in spec: + if is_using_intel_libraries: fftflavor = "dfti" else: if "+openmp" in spec: @@ -231,7 +237,7 @@ def configure_args(self): oapp(f"--with-fft-flavor={fftflavor}") if "@:8" in spec: - if "^mkl" in spec: + if is_using_intel_libraries: oapp(f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}") oapp(f"--with-fft-libs={spec['fftw-api'].libs.ld_flags}") else: @@ -242,7 +248,7 @@ def configure_args(self): ] ) else: - if "^mkl" in spec: + if is_using_intel_libraries: options.extend( [ f"FFT_CPPFLAGS={spec['fftw-api'].headers.cpp_flags}", diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 7a4147a6eecab8..66c594c71ef328 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -263,6 +263,11 @@ class Gromacs(CMakePackage, CudaPackage): msg="Only attempt to find gcc libs for Intel compiler if Intel compiler is used.", ) + # If the Intel suite is used for Lapack, it must be used for fftw and vice-versa + for _intel_pkg in INTEL_MATH_LIBRARIES: + requires(f"^[virtuals=fftw-api] {_intel_pkg}", when=f"^[virtuals=lapack] {_intel_pkg}") + requires(f"^[virtuals=lapack] {_intel_pkg}", when=f"^[virtuals=fftw-api] {_intel_pkg}") + patch("gmxDetectCpu-cmake-3.14.patch", when="@2018:2019.3^cmake@3.14.0:") patch("gmxDetectSimd-cmake-3.14.patch", when="@5.0:2017^cmake@3.14.0:") # 2021.2 will always try to build tests (see https://gromacs.bioexcel.eu/t/compilation-failure-for-gromacs-2021-1-and-2021-2-with-cmake-3-20-2/2129) @@ -594,7 +599,7 @@ def cmake_args(self): "-DGMX_OPENMP_MAX_THREADS=%s" % self.spec.variants["openmp_max_threads"].value ) - if "^mkl" in self.spec: + if self.spec["lapack"].name in INTEL_MATH_LIBRARIES: # fftw-api@3 is provided by intel-mkl or intel-parllel-studio # we use the mkl interface of gromacs options.append("-DGMX_FFT_LIBRARY=mkl") diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py index 7dd8ab41227aaa..c66235f382dae8 100644 --- a/var/spack/repos/builtin/packages/intel-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl/package.py @@ -153,8 +153,7 @@ class IntelMkl(IntelPackage): multi=False, ) - provides("blas") - provides("lapack") + provides("blas", "lapack") provides("lapack@3.9.0", when="@2020.4") provides("lapack@3.7.0", when="@11.3") provides("scalapack") diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index 1d80c52f621fa8..db3fdd6d7ea8c0 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -126,8 +126,7 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): provides("fftw-api@3") provides("scalapack", when="+cluster") provides("mkl") - provides("lapack") - provides("blas") + provides("lapack", "blas") @property def component_dir(self): diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 84810bacfa3370..50e7021de85d41 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -536,8 +536,7 @@ class IntelParallelStudio(IntelPackage): provides("ipp", when="+ipp") provides("mkl", when="+mkl") - provides("blas", when="+mkl") - provides("lapack", when="+mkl") + provides("blas", "lapack", when="+mkl") provides("scalapack", when="+mkl") provides("fftw-api@3", when="+mkl@professional.2017:") diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py index a44c7bd603cc6c..b2d3d111334b8e 100644 --- a/var/spack/repos/builtin/packages/lammps/package.py +++ b/var/spack/repos/builtin/packages/lammps/package.py @@ -791,7 +791,7 @@ def cmake_args(self): # FFTW libraries are available and enable them by default. if "^fftw" in spec or "^cray-fftw" in spec or "^amdfftw" in spec: args.append(self.define("FFT", "FFTW3")) - elif "^mkl" in spec: + elif spec["fftw-api"].name in INTEL_MATH_LIBRARIES: args.append(self.define("FFT", "MKL")) elif "^armpl-gcc" in spec or "^acfl" in spec: args.append(self.define("FFT", "FFTW3")) diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index 4d41903cd637d7..40c036320d7a7a 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -242,6 +242,11 @@ class QuantumEspresso(CMakePackage, Package): depends_on("git@2.13:", type="build") depends_on("m4", type="build") + # If the Intel suite is used for Lapack, it must be used for fftw and vice-versa + for _intel_pkg in INTEL_MATH_LIBRARIES: + requires(f"^[virtuals=fftw-api] {_intel_pkg}", when=f"^[virtuals=lapack] {_intel_pkg}") + requires(f"^[virtuals=lapack] {_intel_pkg}", when=f"^[virtuals=fftw-api] {_intel_pkg}") + # CONFLICTS SECTION # Omitted for now due to concretizer bug # MKL with 64-bit integers not supported. @@ -489,7 +494,8 @@ def install(self, pkg, spec, prefix): # you need to pass it in the FFTW_INCLUDE and FFT_LIBS directory. # QE supports an internal FFTW2, but only an external FFTW3 interface. - if "^mkl" in spec: + is_using_intel_libraries = spec["lapack"].name in INTEL_MATH_LIBRARIES + if is_using_intel_libraries: # A seperate FFT library is not needed when linking against MKL options.append("FFTW_INCLUDE={0}".format(join_path(env["MKLROOT"], "include/fftw"))) if "^fftw@3:" in spec: @@ -531,11 +537,11 @@ def install(self, pkg, spec, prefix): if spec.satisfies("@:6.4"): # set even if MKL is selected options.append("BLAS_LIBS={0}".format(lapack_blas.ld_flags)) else: # behavior changed at 6.5 and later - if not spec.satisfies("^mkl"): + if not is_using_intel_libraries: options.append("BLAS_LIBS={0}".format(lapack_blas.ld_flags)) if "+scalapack" in spec: - if "^mkl" in spec: + if is_using_intel_libraries: if "^openmpi" in spec: scalapack_option = "yes" else: # mpich, intel-mpi diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index dfe397ca2c0d7c..7232a7e6c165dc 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -137,7 +137,7 @@ def configure_args(self): ] if "+external-lapack" in spec: - if "^mkl" in spec and "gfortran" in self.compiler.fc: + if spec["lapack"].name in INTEL_MATH_LIBRARIES and "gfortran" in self.compiler.fc: mkl_re = re.compile(r"(mkl_)intel(_i?lp64\b)") config_args.extend( [ From 7aaa17856d41cf8dbd897cb95ffe63ebd6309003 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 10 Nov 2023 06:30:35 -0800 Subject: [PATCH 578/806] pflotran: tweak for building with xsdk rocm/hip (#40990) --- var/spack/repos/builtin/packages/pflotran/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/pflotran/package.py b/var/spack/repos/builtin/packages/pflotran/package.py index 57a409b150c858..37fecbe31c3efd 100644 --- a/var/spack/repos/builtin/packages/pflotran/package.py +++ b/var/spack/repos/builtin/packages/pflotran/package.py @@ -57,3 +57,9 @@ def flag_handler(self, name, flags): if "%gcc@10:" in self.spec and name == "fflags": flags.append("-fallow-argument-mismatch") return flags, None, None + + @when("@5.0.0") + def patch(self): + filter_file( + "use iso_[cC]_binding", "use, intrinsic :: iso_c_binding", "src/pflotran/hdf5_aux.F90" + ) From efe85755d8171bde47f041f62e9b2c197a3dffa8 Mon Sep 17 00:00:00 2001 From: Cody Balos Date: Fri, 10 Nov 2023 06:31:38 -0800 Subject: [PATCH 579/806] alquimia: apply patch for iso_c_binding to latest version (#40989) --- var/spack/repos/builtin/packages/alquimia/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/alquimia/package.py b/var/spack/repos/builtin/packages/alquimia/package.py index d2b33d8524473d..523e0936759f77 100644 --- a/var/spack/repos/builtin/packages/alquimia/package.py +++ b/var/spack/repos/builtin/packages/alquimia/package.py @@ -34,7 +34,7 @@ class Alquimia(CMakePackage): depends_on("pflotran@develop", when="@develop") depends_on("petsc@3.10:", when="@develop") - @when("@1.0.10") + @when("@1.0.10:1.1.0") def patch(self): filter_file( "use iso_[cC]_binding", From 8871bd5ba5c58562b8c20baa00f125aeccba586f Mon Sep 17 00:00:00 2001 From: Victoria Cherkas <87643948+victoria-cherkas@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:54:25 +0000 Subject: [PATCH 580/806] fdb: add dependency on eckit later release (#40737) * depends_on("eckit@1.24.4:", when="@5.11.22:") * Update var/spack/repos/builtin/packages/fdb/package.py Co-authored-by: Alec Scott * make latest tagged release the default install * revert https://github.com/spack/spack/commit/f258f46660ba5fa7d38bbaedfe21cf8cb2d7aa28 --------- Co-authored-by: Alec Scott --- var/spack/repos/builtin/packages/fdb/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fdb/package.py b/var/spack/repos/builtin/packages/fdb/package.py index 7dc2f75e76b031..3beb0efbfb19da 100644 --- a/var/spack/repos/builtin/packages/fdb/package.py +++ b/var/spack/repos/builtin/packages/fdb/package.py @@ -16,7 +16,6 @@ class Fdb(CMakePackage): maintainers("skosukhin") - # master version of fdb is subject to frequent changes and is to be used experimentally. version("master", branch="master") version("5.11.23", sha256="09b1d93f2b71d70c7b69472dfbd45a7da0257211f5505b5fcaf55bfc28ca6c65") version("5.11.17", sha256="375c6893c7c60f6fdd666d2abaccb2558667bd450100817c0e1072708ad5591e") @@ -44,6 +43,7 @@ class Fdb(CMakePackage): depends_on("ecbuild@3.7:", type="build", when="@5.11.6:") depends_on("eckit@1.16:") + depends_on("eckit@1.24.4:", when="@5.11.22:") depends_on("eckit+admin", when="+tools") depends_on("eccodes@2.10:") From f6039d1d45fd1799379cd5fc377966b9429d152c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 10 Nov 2023 17:18:24 +0100 Subject: [PATCH 581/806] builtin.repo: fix ^mkl pattern in minor packages (#41003) Co-authored-by: Harmen Stoppels --- var/spack/repos/builtin/packages/arrayfire/package.py | 2 +- var/spack/repos/builtin/packages/bart/package.py | 2 +- var/spack/repos/builtin/packages/batchedblas/package.py | 2 +- var/spack/repos/builtin/packages/ctffind/package.py | 2 +- var/spack/repos/builtin/packages/dla-future/package.py | 5 ++++- var/spack/repos/builtin/packages/fplo/package.py | 2 +- var/spack/repos/builtin/packages/hpcc/package.py | 5 ++++- var/spack/repos/builtin/packages/itk/package.py | 2 +- var/spack/repos/builtin/packages/ldak/package.py | 2 +- var/spack/repos/builtin/packages/molgw/package.py | 4 ++-- var/spack/repos/builtin/packages/mumps/package.py | 2 +- var/spack/repos/builtin/packages/octave/package.py | 2 +- var/spack/repos/builtin/packages/octopus/package.py | 2 +- var/spack/repos/builtin/packages/q-e-sirius/package.py | 2 +- var/spack/repos/builtin/packages/qmcpack/package.py | 2 +- 15 files changed, 22 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/arrayfire/package.py b/var/spack/repos/builtin/packages/arrayfire/package.py index 70cdfc67b200ab..9befc618417835 100644 --- a/var/spack/repos/builtin/packages/arrayfire/package.py +++ b/var/spack/repos/builtin/packages/arrayfire/package.py @@ -79,7 +79,7 @@ def cmake_args(self): ] args.append(self.define("CUDA_architecture_build_targets", arch_list)) - if "^mkl" in self.spec: + if self.spec["blas"].name in INTEL_MATH_LIBRARIES: if self.version >= Version("3.8.0"): args.append(self.define("AF_COMPUTE_LIBRARY", "Intel-MKL")) else: diff --git a/var/spack/repos/builtin/packages/bart/package.py b/var/spack/repos/builtin/packages/bart/package.py index cc371f4f5c31da..9fa0baa01833d4 100644 --- a/var/spack/repos/builtin/packages/bart/package.py +++ b/var/spack/repos/builtin/packages/bart/package.py @@ -48,7 +48,7 @@ def edit(self, spec, prefix): if spec["blas"].name == "openblas": env["OPENBLAS"] = "1" - if "^mkl" in spec: + elif spec["blas"].name in INTEL_MATH_LIBRARIES: env["MKL"] = "1" env["MKL_BASE"] = spec["mkl"].prefix.mkl else: diff --git a/var/spack/repos/builtin/packages/batchedblas/package.py b/var/spack/repos/builtin/packages/batchedblas/package.py index c44b50bc81e349..712f270e8cf8fc 100644 --- a/var/spack/repos/builtin/packages/batchedblas/package.py +++ b/var/spack/repos/builtin/packages/batchedblas/package.py @@ -23,7 +23,7 @@ class Batchedblas(MakefilePackage): def edit(self, spec, prefix): CCFLAGS = [self.compiler.openmp_flag, "-I./", "-O3"] BLAS = ["-lm", spec["blas"].libs.ld_flags] - if not spec.satisfies("^mkl"): + if spec["blas"].name not in INTEL_MATH_LIBRARIES: CCFLAGS.append("-D_CBLAS_") if spec.satisfies("%intel"): CCFLAGS.extend(["-Os"]) diff --git a/var/spack/repos/builtin/packages/ctffind/package.py b/var/spack/repos/builtin/packages/ctffind/package.py index d1be5c6ea6adbe..ac7bc960c358fb 100644 --- a/var/spack/repos/builtin/packages/ctffind/package.py +++ b/var/spack/repos/builtin/packages/ctffind/package.py @@ -40,7 +40,7 @@ def url_for_version(self, version): def configure_args(self): config_args = [] - if "^mkl" in self.spec: + if self.spec["fftw-api"].name in INTEL_MATH_LIBRARIES: config_args.extend( [ "--enable-mkl", diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index 5b3a3215f39c0a..8c0590d9f7b949 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -44,6 +44,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): depends_on("mpi") depends_on("blaspp@2022.05.00:") depends_on("lapackpp@2022.05.00:") + + depends_on("blas") + depends_on("lapack") depends_on("scalapack", when="+scalapack") depends_on("umpire~examples") @@ -107,7 +110,7 @@ def cmake_args(self): args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) # BLAS/LAPACK - if "^mkl" in spec: + if self.spec["lapack"].name in INTEL_MATH_LIBRARIES: vmap = { "none": "seq", "openmp": "omp", diff --git a/var/spack/repos/builtin/packages/fplo/package.py b/var/spack/repos/builtin/packages/fplo/package.py index 2c025218ac8ac2..a9e8cbc2c2fb11 100644 --- a/var/spack/repos/builtin/packages/fplo/package.py +++ b/var/spack/repos/builtin/packages/fplo/package.py @@ -83,7 +83,7 @@ def edit(self, spec, prefix): filter_file(r"^\s*F90\s*=.*", "F90=" + spack_fc, *files) # patch for 64 bit integers - if "^mkl+ilp64" in spec: + if spec["mkl"].satisfies("+ilp64"): setuphelper = FileFilter(join_path(self.build_directory, "PYTHON", "setuphelper.py")) setuphelper.filter("mkl 64bit integer 32bit", "mkl 64bit integer 64bit") diff --git a/var/spack/repos/builtin/packages/hpcc/package.py b/var/spack/repos/builtin/packages/hpcc/package.py index 4b281cf42426eb..05d08014482541 100644 --- a/var/spack/repos/builtin/packages/hpcc/package.py +++ b/var/spack/repos/builtin/packages/hpcc/package.py @@ -118,7 +118,10 @@ def edit(self, spec, prefix): lin_alg_libs.append(join_path(spec["fftw-api"].prefix.lib, "libsfftw_mpi.so")) lin_alg_libs.append(join_path(spec["fftw-api"].prefix.lib, "libsfftw.so")) - elif self.spec.variants["fft"].value == "mkl" and "^mkl" in spec: + elif ( + self.spec.variants["fft"].value == "mkl" + and spec["fftw-api"].name in INTEL_MATH_LIBRARIES + ): mklroot = env["MKLROOT"] self.config["@LAINC@"] += " -I{0}".format(join_path(mklroot, "include/fftw")) libfftw2x_cdft = join_path( diff --git a/var/spack/repos/builtin/packages/itk/package.py b/var/spack/repos/builtin/packages/itk/package.py index d0123b60f6a4ab..0a956f3dfdb30a 100644 --- a/var/spack/repos/builtin/packages/itk/package.py +++ b/var/spack/repos/builtin/packages/itk/package.py @@ -71,7 +71,7 @@ class Itk(CMakePackage): ) def cmake_args(self): - use_mkl = "^mkl" in self.spec + use_mkl = self.spec["fftw-api"].name in INTEL_MATH_LIBRARIES args = [ self.define("BUILD_SHARED_LIBS", True), self.define("ITK_USE_SYSTEM_LIBRARIES", True), diff --git a/var/spack/repos/builtin/packages/ldak/package.py b/var/spack/repos/builtin/packages/ldak/package.py index 1fbb7de0900b16..d074d90ea6830b 100644 --- a/var/spack/repos/builtin/packages/ldak/package.py +++ b/var/spack/repos/builtin/packages/ldak/package.py @@ -33,8 +33,8 @@ class Ldak(Package): requires("target=x86_64:", when="~glpk", msg="bundled qsopt is only for x86_64") requires( - "^mkl", "^openblas", + *[f"^{intel_pkg}" for intel_pkg in INTEL_MATH_LIBRARIES], policy="one_of", msg="Only mkl or openblas are supported for blas/lapack with ldak", ) diff --git a/var/spack/repos/builtin/packages/molgw/package.py b/var/spack/repos/builtin/packages/molgw/package.py index 17e5283c920558..91026c7abe0b00 100644 --- a/var/spack/repos/builtin/packages/molgw/package.py +++ b/var/spack/repos/builtin/packages/molgw/package.py @@ -78,7 +78,7 @@ def edit(self, spec, prefix): flags["PREFIX"] = prefix # Set LAPACK and SCALAPACK - if "^mkl" in spec: + if spec["lapack"].name not in INTEL_MATH_LIBRARIES: flags["LAPACK"] = self._get_mkl_ld_flags(spec) else: flags["LAPACK"] = spec["lapack"].libs.ld_flags + " " + spec["blas"].libs.ld_flags @@ -105,7 +105,7 @@ def edit(self, spec, prefix): if "+scalapack" in spec: flags["CPPFLAGS"] = flags.get("CPPFLAGS", "") + " -DHAVE_SCALAPACK -DHAVE_MPI " - if "^mkl" in spec: + if spec["lapack"].name in INTEL_MATH_LIBRARIES: flags["CPPFLAGS"] = flags.get("CPPFLAGS", "") + " -DHAVE_MKL " # Write configuration file diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 32bcaf3a812ac1..f9a210407dc8dc 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -223,7 +223,7 @@ def write_makefile_inc(self): # As of version 5.2.0, MUMPS is able to take advantage # of the GEMMT BLAS extension. MKL and amdblis are the only # known BLAS implementation supported. - if "@5.2.0: ^mkl" in self.spec: + if self.spec["blas"].name in INTEL_MATH_LIBRARIES and self.spec.satifies("@5.2.0:"): optf.append("-DGEMMT_AVAILABLE") if "@5.2.0: ^amdblis@3.0:" in self.spec: diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 1098a0332db448..90dbdb44786ee2 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -167,7 +167,7 @@ def configure_args(self): config_args = [] # Required dependencies - if "^mkl" in spec and "gfortran" in self.compiler.fc: + if spec["lapack"].name in INTEL_MATH_LIBRARIES and "gfortran" in self.compiler.fc: mkl_re = re.compile(r"(mkl_)intel(_i?lp64\b)") config_args.extend( [ diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py index 8a88711dad900e..3ccd8719a1758b 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -159,7 +159,7 @@ def configure_args(self): if "^fftw" in spec: args.append("--with-fftw-prefix=%s" % spec["fftw"].prefix) - elif "^mkl" in spec: + elif spec["fftw-api"].name in INTEL_MATH_LIBRARIES: # As of version 10.0, Octopus depends on fftw-api instead # of FFTW. If FFTW is not in the dependency tree, then # it ought to be MKL as it is currently the only providers diff --git a/var/spack/repos/builtin/packages/q-e-sirius/package.py b/var/spack/repos/builtin/packages/q-e-sirius/package.py index ec78ba5702b1a1..1605e4e37d5703 100644 --- a/var/spack/repos/builtin/packages/q-e-sirius/package.py +++ b/var/spack/repos/builtin/packages/q-e-sirius/package.py @@ -93,7 +93,7 @@ def cmake_args(self): # Work around spack issue #19970 where spack sets # rpaths for MKL just during make, but cmake removes # them during make install. - if "^mkl" in self.spec: + if self.spec["lapack"].name in INTEL_MATH_LIBRARIES: args.append("-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON") spec = self.spec args.append(self.define("BLAS_LIBRARIES", spec["blas"].libs.joined(";"))) diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py index 65a02c1cf9dc8f..99612cedf9650b 100644 --- a/var/spack/repos/builtin/packages/qmcpack/package.py +++ b/var/spack/repos/builtin/packages/qmcpack/package.py @@ -376,7 +376,7 @@ def cmake_args(self): # Next two environment variables were introduced in QMCPACK 3.5.0 # Prior to v3.5.0, these lines should be benign but CMake # may issue a warning. - if "^mkl" in spec: + if spec["lapack"].name in INTEL_MATH_LIBRARIES: args.append("-DENABLE_MKL=1") args.append("-DMKL_ROOT=%s" % env["MKLROOT"]) else: From 124e41da2332dfdce031f219193f9f2346019288 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 10 Nov 2023 18:48:50 +0100 Subject: [PATCH 582/806] libpspio 0.3.0 (#40953) Co-authored-by: Alec Scott --- .../tutorial/packages/libpspio/package.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 var/spack/repos/tutorial/packages/libpspio/package.py diff --git a/var/spack/repos/tutorial/packages/libpspio/package.py b/var/spack/repos/tutorial/packages/libpspio/package.py new file mode 100644 index 00000000000000..9cd4e7fc4df251 --- /dev/null +++ b/var/spack/repos/tutorial/packages/libpspio/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2023 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 Libpspio(AutotoolsPackage): + """Library to perform I/O operations on pseudopotential data files.""" + + homepage = "https://gitlab.com/ElectronicStructureLibrary/libpspio" + url = "https://gitlab.com/ElectronicStructureLibrary/libpspio/-/archive/0.3.0/libpspio-0.3.0.tar.gz" + + maintainers("hmenke") + + license("MPL-2.0") + + version("0.3.0", sha256="4dc092457e481e5cd703eeecd87e6f17749941fe274043550c8a2557a649afc5") + + variant("fortran", default=False, description="Enable Fortran bindings") + + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + depends_on("m4", type="build") + depends_on("pkgconfig", type="build") + + depends_on("check") + depends_on("gsl") + + def autoreconf(self, spec, prefix): + Executable("./autogen.sh")() + + def configure_args(self): + args = self.enable_or_disable("fortran") + return args From b41fc1ec79ee8ebcf439f3e3b9d18989274cc561 Mon Sep 17 00:00:00 2001 From: Nils Lehmann <35272119+nilsleh@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:52:59 +0100 Subject: [PATCH 583/806] new release (#41010) --- var/spack/repos/builtin/packages/py-torchgeo/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-torchgeo/package.py b/var/spack/repos/builtin/packages/py-torchgeo/package.py index f5ef2ddc4bc783..b9069126fe0f53 100644 --- a/var/spack/repos/builtin/packages/py-torchgeo/package.py +++ b/var/spack/repos/builtin/packages/py-torchgeo/package.py @@ -16,6 +16,7 @@ class PyTorchgeo(PythonPackage): maintainers("adamjstewart", "calebrob6") version("main", branch="main") + version("0.5.1", sha256="5f86a34d18fe36eeb9146b057b21e5356252ef8ab6a9db33feebb120a01feff8") version("0.5.0", sha256="2bc2f9c4a19a569790cb3396499fdec17496632b0e52b86be390a2cc7a1a7033") version("0.4.1", sha256="a3692436bf63df8d2f9b76d16eea5ee309dd1bd74e0fde6e64456abfdb2a5b58") version("0.4.0", sha256="a0812487205aa2db7bc92119d896ae4bf4f1014e6fdc0ce0f75bcb24fada6613") From 13abfb7013ca282b06cf4069d96c3d7c093bc684 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 10 Nov 2023 14:55:35 -0800 Subject: [PATCH 584/806] `spack deconcretize` command (#38803) We have two ways to concretize now: * `spack concretize` concretizes only the root specs that are not concrete in the environment. * `spack concretize -f` eliminates all cached concretization data and reconcretizes the *entire* environment. This PR adds `spack deconcretize`, which eliminates cached concretization data for a spec. This allows users greater control over what is preserved from their `spack.lock` file and what is reused when not using `spack concretize -f`. If you want to update a spec installed in your environment, you can call `spack deconcretize` on it, and that spec and any relevant dependents will be removed from the lock file. `spack concretize` has two options: * `--root`: limits deconcretized specs to *specific* roots in the environment. You can use this to deconcretize exactly one root in a `unify: false` environment. i.e., if `foo` root is a dependent of `bar`, both roots, `spack deconcretize bar` will *not* deconcretize `foo`. * `--all`: deconcretize *all* specs that match the input spec. By default `spack deconcretize` will complain about multiple matches, like `spack uninstall`. --- lib/spack/spack/cmd/common/confirmation.py | 30 ++++++ lib/spack/spack/cmd/deconcretize.py | 103 +++++++++++++++++++++ lib/spack/spack/cmd/gc.py | 3 +- lib/spack/spack/cmd/uninstall.py | 20 +--- lib/spack/spack/environment/environment.py | 33 +++++-- lib/spack/spack/test/cmd/deconcretize.py | 78 ++++++++++++++++ share/spack/spack-completion.bash | 11 ++- share/spack/spack-completion.fish | 13 +++ 8 files changed, 265 insertions(+), 26 deletions(-) create mode 100644 lib/spack/spack/cmd/common/confirmation.py create mode 100644 lib/spack/spack/cmd/deconcretize.py create mode 100644 lib/spack/spack/test/cmd/deconcretize.py diff --git a/lib/spack/spack/cmd/common/confirmation.py b/lib/spack/spack/cmd/common/confirmation.py new file mode 100644 index 00000000000000..8a5cd2592b44e9 --- /dev/null +++ b/lib/spack/spack/cmd/common/confirmation.py @@ -0,0 +1,30 @@ +# Copyright 2013-2023 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) + +import sys +from typing import List + +import llnl.util.tty as tty + +import spack.cmd + +display_args = {"long": True, "show_flags": False, "variants": False, "indent": 4} + + +def confirm_action(specs: List[spack.spec.Spec], participle: str, noun: str): + """Display the list of specs to be acted on and ask for confirmation. + + Args: + specs: specs to be removed + participle: action expressed as a participle, e.g. "uninstalled" + noun: action expressed as a noun, e.g. "uninstallation" + """ + tty.msg(f"The following {len(specs)} packages will be {participle}:\n") + spack.cmd.display_specs(specs, **display_args) + print("") + answer = tty.get_yes_or_no("Do you want to proceed?", default=False) + if not answer: + tty.msg(f"Aborting {noun}") + sys.exit(0) diff --git a/lib/spack/spack/cmd/deconcretize.py b/lib/spack/spack/cmd/deconcretize.py new file mode 100644 index 00000000000000..dbcf72ea8b3a29 --- /dev/null +++ b/lib/spack/spack/cmd/deconcretize.py @@ -0,0 +1,103 @@ +# Copyright 2013-2023 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) + +import argparse +import sys +from typing import List + +import llnl.util.tty as tty + +import spack.cmd +import spack.cmd.common.arguments as arguments +import spack.cmd.common.confirmation as confirmation +import spack.environment as ev +import spack.spec + +description = "remove specs from the concretized lockfile of an environment" +section = "environments" +level = "long" + +# Arguments for display_specs when we find ambiguity +display_args = {"long": True, "show_flags": False, "variants": False, "indent": 4} + + +def setup_parser(subparser): + subparser.add_argument( + "--root", action="store_true", help="deconcretize only specific environment roots" + ) + arguments.add_common_arguments(subparser, ["yes_to_all", "specs"]) + subparser.add_argument( + "-a", + "--all", + action="store_true", + dest="all", + help="deconcretize ALL specs that match each supplied spec", + ) + + +def get_deconcretize_list( + args: argparse.Namespace, specs: List[spack.spec.Spec], env: ev.Environment +) -> List[spack.spec.Spec]: + """ + Get list of environment roots to deconcretize + """ + env_specs = [s for _, s in env.concretized_specs()] + to_deconcretize = [] + errors = [] + + for s in specs: + if args.root: + # find all roots matching given spec + to_deconc = [e for e in env_specs if e.satisfies(s)] + else: + # find all roots matching or depending on a matching spec + to_deconc = [e for e in env_specs if any(d.satisfies(s) for d in e.traverse())] + + if len(to_deconc) < 1: + tty.warn(f"No matching specs to deconcretize for {s}") + + elif len(to_deconc) > 1 and not args.all: + errors.append((s, to_deconc)) + + to_deconcretize.extend(to_deconc) + + if errors: + for spec, matching in errors: + tty.error(f"{spec} matches multiple concrete specs:") + sys.stderr.write("\n") + spack.cmd.display_specs(matching, output=sys.stderr, **display_args) + sys.stderr.write("\n") + sys.stderr.flush() + tty.die("Use '--all' to deconcretize all matching specs, or be more specific") + + return to_deconcretize + + +def deconcretize_specs(args, specs): + env = spack.cmd.require_active_env(cmd_name="deconcretize") + + if args.specs: + deconcretize_list = get_deconcretize_list(args, specs, env) + else: + deconcretize_list = [s for _, s in env.concretized_specs()] + + if not args.yes_to_all: + confirmation.confirm_action(deconcretize_list, "deconcretized", "deconcretization") + + with env.write_transaction(): + for spec in deconcretize_list: + env.deconcretize(spec) + env.write() + + +def deconcretize(parser, args): + if not args.specs and not args.all: + tty.die( + "deconcretize requires at least one spec argument.", + " Use `spack deconcretize --all` to deconcretize ALL specs.", + ) + + specs = spack.cmd.parse_specs(args.specs) if args.specs else [any] + deconcretize_specs(args, specs) diff --git a/lib/spack/spack/cmd/gc.py b/lib/spack/spack/cmd/gc.py index e4da6a103daf75..9918bf7479fd05 100644 --- a/lib/spack/spack/cmd/gc.py +++ b/lib/spack/spack/cmd/gc.py @@ -6,6 +6,7 @@ import llnl.util.tty as tty import spack.cmd.common.arguments +import spack.cmd.common.confirmation import spack.cmd.uninstall import spack.environment as ev import spack.store @@ -41,6 +42,6 @@ def gc(parser, args): return if not args.yes_to_all: - spack.cmd.uninstall.confirm_removal(specs) + spack.cmd.common.confirmation.confirm_action(specs, "uninstalled", "uninstallation") spack.cmd.uninstall.do_uninstall(specs, force=False) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index bc6a71cef10f1f..3288404151d230 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -11,10 +11,9 @@ import spack.cmd import spack.cmd.common.arguments as arguments +import spack.cmd.common.confirmation as confirmation import spack.environment as ev -import spack.error import spack.package_base -import spack.repo import spack.spec import spack.store import spack.traverse as traverse @@ -278,7 +277,7 @@ def uninstall_specs(args, specs): return if not args.yes_to_all: - confirm_removal(uninstall_list) + confirmation.confirm_action(uninstall_list, "uninstalled", "uninstallation") # Uninstall everything on the list do_uninstall(uninstall_list, args.force) @@ -292,21 +291,6 @@ def uninstall_specs(args, specs): env.regenerate_views() -def confirm_removal(specs: List[spack.spec.Spec]): - """Display the list of specs to be removed and ask for confirmation. - - Args: - specs: specs to be removed - """ - tty.msg("The following {} packages will be uninstalled:\n".format(len(specs))) - spack.cmd.display_specs(specs, **display_args) - print("") - answer = tty.get_yes_or_no("Do you want to proceed?", default=False) - if not answer: - tty.msg("Aborting uninstallation") - sys.exit(0) - - def uninstall(parser, args): if not args.specs and not args.all: tty.die( diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py index cf6dffcb0d303b..5d6273506ec9c6 100644 --- a/lib/spack/spack/environment/environment.py +++ b/lib/spack/spack/environment/environment.py @@ -1358,7 +1358,7 @@ def concretize(self, force=False, tests=False): # Remove concrete specs that no longer correlate to a user spec for spec in set(self.concretized_user_specs) - set(self.user_specs): - self.deconcretize(spec) + self.deconcretize(spec, concrete=False) # Pick the right concretization strategy if self.unify == "when_possible": @@ -1373,15 +1373,36 @@ def concretize(self, force=False, tests=False): msg = "concretization strategy not implemented [{0}]" raise SpackEnvironmentError(msg.format(self.unify)) - def deconcretize(self, spec): + def deconcretize(self, spec: spack.spec.Spec, concrete: bool = True): + """ + Remove specified spec from environment concretization + + Arguments: + spec: Spec to deconcretize. This must be a root of the environment + concrete: If True, find all instances of spec as concrete in the environemnt. + If False, find a single instance of the abstract spec as root of the environment. + """ # spec has to be a root of the environment - index = self.concretized_user_specs.index(spec) - dag_hash = self.concretized_order.pop(index) - del self.concretized_user_specs[index] + if concrete: + dag_hash = spec.dag_hash() + + pairs = zip(self.concretized_user_specs, self.concretized_order) + filtered = [(spec, h) for spec, h in pairs if h != dag_hash] + # Cannot use zip and unpack two values; it fails if filtered is empty + self.concretized_user_specs = [s for s, _ in filtered] + self.concretized_order = [h for _, h in filtered] + else: + index = self.concretized_user_specs.index(spec) + dag_hash = self.concretized_order.pop(index) + + del self.concretized_user_specs[index] # If this was the only user spec that concretized to this concrete spec, remove it if dag_hash not in self.concretized_order: - del self.specs_by_hash[dag_hash] + # if we deconcretized a dependency that doesn't correspond to a root, it + # won't be here. + if dag_hash in self.specs_by_hash: + del self.specs_by_hash[dag_hash] def _get_specs_to_concretize( self, diff --git a/lib/spack/spack/test/cmd/deconcretize.py b/lib/spack/spack/test/cmd/deconcretize.py new file mode 100644 index 00000000000000..30e39604bf4d4d --- /dev/null +++ b/lib/spack/spack/test/cmd/deconcretize.py @@ -0,0 +1,78 @@ +# Copyright 2013-2023 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) + +import pytest + +import spack.environment as ev +from spack.main import SpackCommand, SpackCommandError + +deconcretize = SpackCommand("deconcretize") + + +@pytest.fixture(scope="function") +def test_env(mutable_mock_env_path, config, mock_packages): + ev.create("test") + with ev.read("test") as e: + e.add("a@2.0 foobar=bar ^b@1.0") + e.add("a@1.0 foobar=bar ^b@0.9") + e.concretize() + e.write() + + +def test_deconcretize_dep(test_env): + with ev.read("test") as e: + deconcretize("-y", "b@1.0") + specs = [s for s, _ in e.concretized_specs()] + + assert len(specs) == 1 + assert specs[0].satisfies("a@1.0") + + +def test_deconcretize_all_dep(test_env): + with ev.read("test") as e: + with pytest.raises(SpackCommandError): + deconcretize("-y", "b") + deconcretize("-y", "--all", "b") + specs = [s for s, _ in e.concretized_specs()] + + assert len(specs) == 0 + + +def test_deconcretize_root(test_env): + with ev.read("test") as e: + output = deconcretize("-y", "--root", "b@1.0") + assert "No matching specs to deconcretize" in output + assert len(e.concretized_order) == 2 + + deconcretize("-y", "--root", "a@2.0") + specs = [s for s, _ in e.concretized_specs()] + + assert len(specs) == 1 + assert specs[0].satisfies("a@1.0") + + +def test_deconcretize_all_root(test_env): + with ev.read("test") as e: + with pytest.raises(SpackCommandError): + deconcretize("-y", "--root", "a") + + output = deconcretize("-y", "--root", "--all", "b") + assert "No matching specs to deconcretize" in output + assert len(e.concretized_order) == 2 + + deconcretize("-y", "--root", "--all", "a") + specs = [s for s, _ in e.concretized_specs()] + + assert len(specs) == 0 + + +def test_deconcretize_all(test_env): + with ev.read("test") as e: + with pytest.raises(SpackCommandError): + deconcretize() + deconcretize("-y", "--all") + specs = [s for s, _ in e.concretized_specs()] + + assert len(specs) == 0 diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index e84fe10134ca21..a54f7db414e409 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -401,7 +401,7 @@ _spack() { then SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -b --bootstrap -p --profile --sorted-profile --lines -v --verbose --stacktrace --backtrace -V --version --print-shell-vars" else - SPACK_COMPREPLY="add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize concretise config containerize containerise create debug dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view" + SPACK_COMPREPLY="add arch audit blame bootstrap build-env buildcache cd change checksum ci clean clone commands compiler compilers concretize concretise config containerize containerise create debug deconcretize dependencies dependents deprecate dev-build develop diff docs edit env extensions external fetch find gc gpg graph help info install license list load location log-parse maintainers make-installer mark mirror module patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style tags test test-env tutorial undevelop uninstall unit-test unload url verify versions view" fi } @@ -937,6 +937,15 @@ _spack_debug_report() { SPACK_COMPREPLY="-h --help" } +_spack_deconcretize() { + if $list_options + then + SPACK_COMPREPLY="-h --help --root -y --yes-to-all -a --all" + else + _all_packages + fi +} + _spack_dependencies() { if $list_options then diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index d660c251af9248..1029fa6b45e06c 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -371,6 +371,7 @@ complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a containerize -d ' complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a containerise -d 'creates recipes to build images for different container runtimes' complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a create -d 'create a new package file' complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a debug -d 'debugging commands for troubleshooting Spack' +complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a deconcretize -d 'remove specs from the concretized lockfile of an environment' complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dependencies -d 'show dependencies of a package' complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a dependents -d 'show packages that depend on another' complete -c spack -n '__fish_spack_using_command_pos 0 ' -f -a deprecate -d 'replace one package with another via symlinks' @@ -1290,6 +1291,18 @@ set -g __fish_spack_optspecs_spack_debug_report h/help complete -c spack -n '__fish_spack_using_command debug report' -s h -l help -f -a help complete -c spack -n '__fish_spack_using_command debug report' -s h -l help -d 'show this help message and exit' +# spack deconcretize +set -g __fish_spack_optspecs_spack_deconcretize h/help root y/yes-to-all a/all +complete -c spack -n '__fish_spack_using_command_pos_remainder 0 deconcretize' -f -k -a '(__fish_spack_specs)' +complete -c spack -n '__fish_spack_using_command deconcretize' -s h -l help -f -a help +complete -c spack -n '__fish_spack_using_command deconcretize' -s h -l help -d 'show this help message and exit' +complete -c spack -n '__fish_spack_using_command deconcretize' -l root -f -a root +complete -c spack -n '__fish_spack_using_command deconcretize' -l root -d 'deconcretize only specific environment roots' +complete -c spack -n '__fish_spack_using_command deconcretize' -s y -l yes-to-all -f -a yes_to_all +complete -c spack -n '__fish_spack_using_command deconcretize' -s y -l yes-to-all -d 'assume "yes" is the answer to every confirmation request' +complete -c spack -n '__fish_spack_using_command deconcretize' -s a -l all -f -a all +complete -c spack -n '__fish_spack_using_command deconcretize' -s a -l all -d 'deconcretize ALL specs that match each supplied spec' + # spack dependencies set -g __fish_spack_optspecs_spack_dependencies h/help i/installed t/transitive deptype= V/no-expand-virtuals complete -c spack -n '__fish_spack_using_command_pos_remainder 0 dependencies' -f -k -a '(__fish_spack_specs)' From 57b63228cede688a964bbeea41ebf53cafde0181 Mon Sep 17 00:00:00 2001 From: Terry Cojean Date: Sat, 11 Nov 2023 10:00:52 -0500 Subject: [PATCH 585/806] Ginkgo: 1.7.0, change compatibility, update option oneapi->sycl (#40874) Signed-off-by: Terry Cojean --- .../repos/builtin/packages/ginkgo/package.py | 64 +++++++++++++------ 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/var/spack/repos/builtin/packages/ginkgo/package.py b/var/spack/repos/builtin/packages/ginkgo/package.py index 7bdfdb390370d5..37d974f9b70eb0 100644 --- a/var/spack/repos/builtin/packages/ginkgo/package.py +++ b/var/spack/repos/builtin/packages/ginkgo/package.py @@ -24,7 +24,8 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") - version("1.6.0", commit="1f1ed46e724334626f016f105213c047e16bc1ae", preferred=True) # v1.6.0 + version("1.7.0", commit="49242ff89af1e695d7794f6d50ed9933024b66fe") # v1.7.0 + version("1.6.0", commit="1f1ed46e724334626f016f105213c047e16bc1ae") # v1.6.0 version("1.5.0", commit="234594c92b58e2384dfb43c2d08e7f43e2b58e7a") # v1.5.0 version("1.5.0.glu_experimental", branch="glu_experimental") version("1.4.0", commit="f811917c1def4d0fcd8db3fe5c948ce13409e28e") # v1.4.0 @@ -37,13 +38,18 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): variant("shared", default=True, description="Build shared libraries") variant("full_optimizations", default=False, description="Compile with all optimizations") variant("openmp", default=sys.platform != "darwin", description="Build with OpenMP") - variant("oneapi", default=False, description="Build with oneAPI support") + variant("sycl", default=False, description="Enable SYCL backend") variant("develtools", default=False, description="Compile with develtools enabled") variant("hwloc", default=False, description="Enable HWLOC support") variant("mpi", default=False, description="Enable MPI support") - depends_on("cmake@3.9:", type="build") - depends_on("cuda@9:", when="+cuda") + depends_on("cmake@3.9:", type="build", when="@:1.3.0") + depends_on("cmake@3.13:", type="build", when="@1.4.0:1.6.0") + depends_on("cmake@3.16:", type="build", when="@1.7.0:") + depends_on("cmake@3.18:", type="build", when="+cuda@1.7.0:") + depends_on("cuda@9:", when="+cuda @:1.4.0") + depends_on("cuda@9.2:", when="+cuda @1.5.0:") + depends_on("cuda@10.1:", when="+cuda @1.7.0:") depends_on("mpi", when="+mpi") depends_on("rocthrust", when="+rocm") @@ -60,14 +66,13 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): depends_on("googletest", type="test") depends_on("numactl", type="test", when="+hwloc") - depends_on("intel-oneapi-mkl", when="+oneapi") - depends_on("intel-oneapi-dpl", when="+oneapi") + depends_on("intel-oneapi-mkl", when="+sycl") + depends_on("intel-oneapi-dpl", when="+sycl") + depends_on("intel-oneapi-tbb", when="+sycl") conflicts("%gcc@:5.2.9") conflicts("+rocm", when="@:1.1.1") conflicts("+mpi", when="@:1.4.0") - conflicts("+cuda", when="+rocm") - conflicts("+openmp", when="+oneapi") # ROCm 4.1.0 breaks platform settings which breaks Ginkgo's HIP support. conflicts("^hip@4.1.0:", when="@:1.3.0") @@ -76,22 +81,35 @@ class Ginkgo(CMakePackage, CudaPackage, ROCmPackage): conflicts("^rocthrust@4.1.0:", when="@:1.3.0") conflicts("^rocprim@4.1.0:", when="@:1.3.0") + # Ginkgo 1.6.0 start relying on ROCm 4.5.0 + conflicts("^hip@:4.3.1", when="@1.6.0:") + conflicts("^hipblas@:4.3.1", when="@1.6.0:") + conflicts("^hipsparse@:4.3.1", when="@1.6.0:") + conflicts("^rocthrust@:4.3.1", when="@1.6.0:") + conflicts("^rocprim@:4.3.1", when="@1.6.0:") + + conflicts( + "+sycl", when="@:1.4.0", msg="For SYCL support, please use Ginkgo version 1.4.0 and newer." + ) + # Skip smoke tests if compatible hardware isn't found patch("1.4.0_skip_invalid_smoke_tests.patch", when="@1.4.0") - # Newer DPC++ compilers use the updated SYCL 2020 standard which change - # kernel attribute propagation rules. This doesn't work well with the - # initial Ginkgo oneAPI support. - patch("1.4.0_dpcpp_use_old_standard.patch", when="+oneapi @1.4.0") - # Add missing include statement patch("thrust-count-header.patch", when="+rocm @1.5.0") def setup_build_environment(self, env): spec = self.spec - if "+oneapi" in spec: + if "+sycl" in spec: env.set("MKLROOT", join_path(spec["intel-oneapi-mkl"].prefix, "mkl", "latest")) env.set("DPL_ROOT", join_path(spec["intel-oneapi-dpl"].prefix, "dpl", "latest")) + # The `IntelSYCLConfig.cmake` is broken with spack. By default, it + # relies on the CMAKE_CXX_COMPILER being the real ipcx/dpcpp + # compiler. If not, the variable SYCL_COMPILER of that script is + # broken, and all the SYCL detection mechanism is wrong. We fix it + # by giving hint environment variables. + env.set("SYCL_LIBRARY_DIR_HINT", os.path.dirname(os.path.dirname(self.compiler.cxx))) + env.set("SYCL_INCLUDE_DIR_HINT", os.path.dirname(os.path.dirname(self.compiler.cxx))) def cmake_args(self): # Check that the have the correct C++ standard is available @@ -106,18 +124,19 @@ def cmake_args(self): except UnsupportedCompilerFlag: raise InstallError("Ginkgo requires a C++14-compliant C++ compiler") - cxx_is_dpcpp = os.path.basename(self.compiler.cxx) == "dpcpp" - if self.spec.satisfies("+oneapi") and not cxx_is_dpcpp: - raise InstallError( - "Ginkgo's oneAPI backend requires the" + "DPC++ compiler as main CXX compiler." - ) + if self.spec.satisfies("@1.4.0:1.6.0 +sycl") and not self.spec.satisfies( + "%oneapi@2021.3.0:" + ): + raise InstallError("ginkgo +sycl requires %oneapi@2021.3.0:") + elif self.spec.satisfies("@1.7.0: +sycl") and not self.spec.satisfies("%oneapi@2022.1.0:"): + raise InstallError("ginkgo +sycl requires %oneapi@2022.1.0:") spec = self.spec from_variant = self.define_from_variant args = [ from_variant("GINKGO_BUILD_CUDA", "cuda"), from_variant("GINKGO_BUILD_HIP", "rocm"), - from_variant("GINKGO_BUILD_DPCPP", "oneapi"), + from_variant("GINKGO_BUILD_SYCL", "sycl"), from_variant("GINKGO_BUILD_OMP", "openmp"), from_variant("GINKGO_BUILD_MPI", "mpi"), from_variant("BUILD_SHARED_LIBS", "shared"), @@ -161,6 +180,11 @@ def cmake_args(self): args.append( self.define("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip) ) + + if "+sycl" in self.spec: + sycl_compatible_compilers = ["dpcpp", "icpx"] + if not (os.path.basename(self.compiler.cxx) in sycl_compatible_compilers): + raise InstallError("ginkgo +sycl requires DPC++ (dpcpp) or icpx compiler.") return args @property From 15f6368c7ffcf4309fd668ae8da7fe0032150179 Mon Sep 17 00:00:00 2001 From: Adrien Berchet Date: Sat, 11 Nov 2023 22:55:08 +0100 Subject: [PATCH 586/806] Add geomdl package (#40933) --- .../builtin/packages/py-geomdl/package.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-geomdl/package.py diff --git a/var/spack/repos/builtin/packages/py-geomdl/package.py b/var/spack/repos/builtin/packages/py-geomdl/package.py new file mode 100644 index 00000000000000..6a2e9f27603796 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-geomdl/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 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 PyGeomdl(PythonPackage): + """Object-oriented pure Python B-Spline and NURBS library.""" + + homepage = "https://pypi.org/project/geomdl" + pypi = "geomdl/geomdl-5.3.1.tar.gz" + + version("5.3.1", sha256="e81a31b4d5f111267b16045ba1d9539235a98b2cff5e4bad18f7ddcd4cb804c8") + + depends_on("py-setuptools@40.6.3:", type="build") + + # For compiling geomdl.core module + depends_on("py-cython@:2", type="build") + + variant("viz", default=False, description="Add viz dependencies") + + depends_on("py-numpy@1.15.4:", type="run", when="+viz") + depends_on("py-matplotlib@2.2.3:", type="run", when="+viz") + depends_on("py-plotly", type="run", when="+viz") From 1ae37f6720feddc46ecbf13de650ede0ba24cbd9 Mon Sep 17 00:00:00 2001 From: Stephen Hudson Date: Sat, 11 Nov 2023 16:15:43 -0600 Subject: [PATCH 587/806] libEnsemble: add v1.1.0 (#40969) --- var/spack/repos/builtin/packages/py-libensemble/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-libensemble/package.py b/var/spack/repos/builtin/packages/py-libensemble/package.py index d47a3d68fb932e..57dd42fe76b7c0 100644 --- a/var/spack/repos/builtin/packages/py-libensemble/package.py +++ b/var/spack/repos/builtin/packages/py-libensemble/package.py @@ -12,13 +12,14 @@ class PyLibensemble(PythonPackage): """Library for managing ensemble-like collections of computations.""" homepage = "https://libensemble.readthedocs.io" - pypi = "libensemble/libensemble-1.0.0.tar.gz" + pypi = "libensemble/libensemble-1.1.0.tar.gz" git = "https://github.com/Libensemble/libensemble.git" maintainers("shuds13", "jlnav") tags = ["e4s"] version("develop", branch="develop") + version("1.1.0", sha256="3e3ddc4233272d3651e9d62c7bf420018930a4b9b135ef9ede01d5356235c1c6") version("1.0.0", sha256="b164e044f16f15b68fd565684ad8ce876c93aaeb84e5078f4ea2a29684b110ca") version("0.10.2", sha256="ef8dfe5d233dcae2636a3d6aa38f3c2ad0f42c65bd38f664e99b3e63b9f86622") version("0.10.1", sha256="56ae42ec9a28d3df8f46bdf7d016db9526200e9df2a28d849902e3c44fe5c1ba") From 49c2894def4877713aaddd4cae302705ab59eeba Mon Sep 17 00:00:00 2001 From: Matthew Archer <36638242+ma595@users.noreply.github.com> Date: Sat, 11 Nov 2023 22:16:45 +0000 Subject: [PATCH 588/806] update to latest version (#40905) --- var/spack/repos/builtin/packages/py-nanobind/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-nanobind/package.py b/var/spack/repos/builtin/packages/py-nanobind/package.py index 5c39cf271cfc14..95a38f5b763c0a 100644 --- a/var/spack/repos/builtin/packages/py-nanobind/package.py +++ b/var/spack/repos/builtin/packages/py-nanobind/package.py @@ -23,6 +23,9 @@ class PyNanobind(PythonPackage): maintainers("chrisrichardson", "garth-wells", "ma595") version("master", branch="master", submodules=True) + version( + "1.8.0", tag="v1.8.0", commit="1a309ba444a47e081dc6213d72345a2fbbd20795", submodules=True + ) version( "1.7.0", tag="v1.7.0", commit="555ec7595c89c60ce7cf53e803bc226dc4899abb", submodules=True ) From 15dcd3c65c6bbf36127c4cc4d0ed767c14d396b2 Mon Sep 17 00:00:00 2001 From: Christian Glusa Date: Sat, 11 Nov 2023 15:24:12 -0700 Subject: [PATCH 589/806] py-pynucleus: Add variant, modify dependencies (#41006) --- .../builtin/packages/py-pynucleus/package.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pynucleus/package.py b/var/spack/repos/builtin/packages/py-pynucleus/package.py index c4f2f82b7a24ef..4194bb2c609e77 100644 --- a/var/spack/repos/builtin/packages/py-pynucleus/package.py +++ b/var/spack/repos/builtin/packages/py-pynucleus/package.py @@ -19,6 +19,9 @@ class PyPynucleus(PythonPackage): for ref in refs: version(ref, branch=ref) + variant("examples", default=True, description="Install examples") + variant("tests", default=True, description="Install tests") + depends_on("python@3.10:", type=("build", "run")) depends_on("py-mpi4py@2.0.0:", type=("build", "link", "run")) depends_on("py-cython@0.29.32:", type=("build", "run")) @@ -30,14 +33,14 @@ class PyPynucleus(PythonPackage): depends_on("py-h5py", type=("build", "run")) depends_on("py-tabulate", type=("build", "run")) depends_on("py-pyyaml", type=("build", "run")) - depends_on("py-matplotlib+latex", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) depends_on("py-scikit-sparse", type=("build", "run")) depends_on("py-modepy", type=("build", "run")) depends_on("py-meshpy", type=("build", "run")) depends_on("py-pytools", type=("build", "run")) depends_on("py-psutil", type="run") - - variant("examples", default=True, description="Install examples") + depends_on("py-pytest", when="+tests", type="run") + depends_on("py-pytest-html", when="+tests", type="run") import_modules = [ "PyNucleus", @@ -64,5 +67,9 @@ def install_python(self): def install_additional_files(self): spec = self.spec prefix = self.prefix - if "+examples" in spec: + if "+examples" in spec or "+tests" in spec: install_tree("drivers", prefix.drivers) + if "+examples" in spec: + install_tree("examples", prefix.examples) + if "+tests" in spec: + install_tree("tests", prefix.tests) From e2f274a634caac81950205b12418f72cbd468748 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Nov 2023 03:07:18 -0600 Subject: [PATCH 590/806] PyTorch: allow +openmp on macOS (#41025) --- .../packages/py-torch-cluster/package.py | 19 ++++++++++++------- .../builtin/packages/py-torch/package.py | 3 --- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch-cluster/package.py b/var/spack/repos/builtin/packages/py-torch-cluster/package.py index 13f59512b7faa7..69bb2161e0dfe3 100644 --- a/var/spack/repos/builtin/packages/py-torch-cluster/package.py +++ b/var/spack/repos/builtin/packages/py-torch-cluster/package.py @@ -7,24 +7,29 @@ class PyTorchCluster(PythonPackage): - """This package consists of a small extension library of - highly optimized graph cluster algorithms for the use in - PyTorch.""" + """This package consists of a small extension library of highly optimized graph cluster + algorithms for the use in PyTorch. + """ homepage = "https://github.com/rusty1s/pytorch_cluster" url = "https://github.com/rusty1s/pytorch_cluster/archive/1.5.7.tar.gz" + version("1.6.3", sha256="0e2b08095e03cf87ce9b23b7a7352236a25d3ed92d92351dc020fd927ea8dbfe") version("1.5.8", sha256="95c6e81e9c4a6235e1b2152ab917021d2060ad995199f6bd7fb39986d37310f0") version("1.5.7", sha256="71701d2f7f3e458ebe5904c982951349fdb60e6f1654e19c7e102a226e2de72e") variant("cuda", default=False, description="Enables CUDA support") - depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools", type="build") - depends_on("py-pytest-runner", type="build") depends_on("py-scipy", type=("build", "run")) - depends_on("py-torch+cuda", when="+cuda") - depends_on("py-torch~cuda", when="~cuda") + depends_on("py-torch+cuda", when="+cuda", type=("build", "link", "run")) + depends_on("py-torch~cuda", when="~cuda", type=("build", "link", "run")) + + # https://github.com/rusty1s/pytorch_cluster/issues/120 + depends_on("py-torch~openmp", when="@:1.5 %apple-clang", type=("build", "link", "run")) + + # Historical dependencies + depends_on("py-pytest-runner", when="@:1.5", type="build") def setup_build_environment(self, env): if "+cuda" in self.spec: diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 782b0741d23bcd..e4ff3b29b8f5e4 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -114,9 +114,6 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # https://github.com/pytorch/pytorch/issues/77811 conflicts("+qnnpack", when="platform=darwin target=aarch64:") - # https://github.com/pytorch/pytorch/issues/80805 - conflicts("+openmp", when="platform=darwin target=aarch64:") - # https://github.com/pytorch/pytorch/issues/97397 conflicts( "~tensorpipe", From da4f2776d262cff7b05ee434198afa0dc772d0db Mon Sep 17 00:00:00 2001 From: David Gardner Date: Mon, 13 Nov 2023 01:08:28 -0800 Subject: [PATCH 591/806] sundials: add license directive (#41028) --- var/spack/repos/builtin/packages/sundials/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index c3e6d9986a0412..b05d31f360e328 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -22,6 +22,7 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage): test_requires_compiler = True maintainers("balos1", "cswoodward", "gardner48") + license("BSD-3-Clause") # ========================================================================== # Versions From b4f6c49bc03f3fe02547eb68192327038a4d6f67 Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Mon, 13 Nov 2023 10:09:39 +0100 Subject: [PATCH 592/806] likwid: add 5.3.0 version (#41008) --- .../repos/builtin/packages/likwid/package.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/var/spack/repos/builtin/packages/likwid/package.py b/var/spack/repos/builtin/packages/likwid/package.py index f7ebb21048c4c4..6dd5b420302dc5 100644 --- a/var/spack/repos/builtin/packages/likwid/package.py +++ b/var/spack/repos/builtin/packages/likwid/package.py @@ -24,6 +24,7 @@ class Likwid(Package): git = "https://github.com/RRZE-HPC/likwid.git" maintainers("TomTheBear") + version("5.3.0", sha256="c290e554c4253124ac2ab8b056e14ee4d23966b8c9fbfa10ba81f75ae543ce4e") version("5.2.2", sha256="7dda6af722e04a6c40536fc9f89766ce10f595a8569b29e80563767a6a8f940e") version("5.2.1", sha256="1b8e668da117f24302a344596336eca2c69d2bc2f49fa228ca41ea0688f6cbc2") version("5.2.0", sha256="aa6dccacfca59e52d8f3be187ffcf292b2a2fa1f51a81bf8912b9d48e5a257e0") @@ -65,6 +66,7 @@ class Likwid(Package): ) variant("fortran", default=True, description="with fortran interface") variant("cuda", default=False, description="with Nvidia GPU profiling support") + variant("rocm", default=False, description="with AMD GPU profiling support") variant( "accessmode", @@ -83,6 +85,10 @@ class Likwid(Package): depends_on("lua", when="@5.0.2:") depends_on("cuda", when="@5: +cuda") depends_on("hwloc", when="@5.2.0:") + depends_on("rocprofiler-dev", when="@5.3: +rocm") + depends_on("rocm-core", when="@5.3: +rocm") + depends_on("rocm-smi", when="@5.3: +rocm") + depends_on("rocm-smi-lib", when="@5.3: +rocm") # TODO: check # depends_on('gnuplot', type='run') @@ -103,6 +109,31 @@ def setup_run_environment(self, env): ) for lib in libs.directories: env.append_path("LD_LIBRARY_PATH", lib) + if "+rocm" in self.spec: + libs = find_libraries( + "librocprofiler64.so.1", + root=self.spec["rocprofiler-dev"].prefix, + shared=True, + recursive=True, + ) + for lib in libs.directories: + env.append_path("LD_LIBRARY_PATH", lib) + libs = find_libraries( + "libhsa-runtime64.so", + root=self.spec["rocm-core"].prefix, + shared=True, + recursive=True, + ) + for lib in libs.directories: + env.append_path("LD_LIBRARY_PATH", lib) + libs = find_libraries( + "librocm_smi64.so", + root=self.spec["rocm-smi-lib"].prefix, + shared=True, + recursive=True, + ) + for lib in libs.directories: + env.append_path("LD_LIBRARY_PATH", lib) @run_before("install") def filter_sbang(self): @@ -170,6 +201,13 @@ def install(self, spec, prefix): else: filter_file("^NVIDIA_INTERFACE.*", "NVIDIA_INTERFACE = false", "config.mk") + if "+rocm" in self.spec: + env["ROCM_HOME"] = spec["rocm-core"].prefix + filter_file("^ROCM_INTERFACE.*", "ROCM_INTERFACE = true", "config.mk") + filter_file("^BUILDAPPDAEMON.*", "BUILDAPPDAEMON = true", "config.mk") + else: + filter_file("^ROCM_INTERFACE.*", "ROCM_INTERFACE = false", "config.mk") + if spec.satisfies("^lua"): filter_file( "^#LUA_INCLUDE_DIR.*", From 420bce5cd2c78a6dac9bc913a7c25718444ec663 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Nov 2023 03:09:58 -0600 Subject: [PATCH 593/806] GEOS: add new versions (#41030) --- var/spack/repos/builtin/packages/geos/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py index dc23024cdc2116..8675db20f0b25f 100644 --- a/var/spack/repos/builtin/packages/geos/package.py +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -21,20 +21,30 @@ class Geos(CMakePackage): maintainers("adamjstewart") + version("3.12.1", sha256="d6ea7e492224b51193e8244fe3ec17c4d44d0777f3c32ca4fb171140549a0d03") version("3.12.0", sha256="d96db96011259178a35555a0f6d6e75a739e52a495a6b2aa5efb3d75390fbc39") + version("3.11.3", sha256="80d60a2bbc0cde7745a3366b9eb8c0d65a142b03e063ea0a52c364758cd5ee89") version("3.11.2", sha256="b1f077669481c5a3e62affc49e96eb06f281987a5d36fdab225217e5b825e4cc") version("3.11.1", sha256="6d0eb3cfa9f92d947731cc75f1750356b3bdfc07ea020553daf6af1c768e0be2") version("3.11.0", sha256="79ab8cabf4aa8604d161557b52e3e4d84575acdc0d08cb09ab3f7aaefa4d858a") + version("3.10.6", sha256="078403158da66cad8be39ad1ede5e2fe4b70dcf7bb292fb06a65bdfe8afa6daf") + version("3.10.5", sha256="cc47d95e846e2745c493d8f9f3a9913b1c61f26717a1165898da64352aec4dde") version("3.10.4", sha256="d6fc11bcfd265cbf2714199174e4c3392d657551e5fd84c74c07c863b29357e3") version("3.10.3", sha256="3c141b07d61958a758345d5f54e3c735834b2f4303edb9f67fb26914f0d44770") version("3.10.2", sha256="50bbc599ac386b4c2b3962dcc411f0040a61f204aaef4eba7225ecdd0cf45715") version("3.10.1", sha256="a8148eec9636814c8ab0f8f5266ce6f9b914ed65b0d083fc43bb0bbb01f83648") version("3.10.0", sha256="097d70e3c8f688e59633ceb8d38ad5c9b0d7ead5729adeb925dbc489437abe13") + version("3.9.5", sha256="c6c9aedfa8864fb44ba78911408442382bfd0690cf2d4091ae3805c863789036") version("3.9.4", sha256="70dff2530d8cd2dfaeeb91a5014bd17afb1baee8f0e3eb18e44d5b4dbea47b14") version("3.9.3", sha256="f8b2314e311456f7a449144efb5e3188c2a28774752bc50fc882a3cd5c89ee35") version("3.9.2", sha256="44a5a9be21d7d473436bf621c2ddcc3cf5a8bbe3c786e13229618a3b9d861297") version("3.9.1", sha256="7e630507dcac9dc07565d249a26f06a15c9f5b0c52dd29129a0e3d381d7e382a") + version("3.9.0", sha256="bd8082cf12f45f27630193c78bdb5a3cba847b81e72b20268356c2a4fc065269") + version("3.8.4", sha256="6de8c98c1ae7cb0cd2d726a8dc9b7467308c4b4e05f9df94742244e64e441499") + version("3.8.3", sha256="f98315d1ba35c8d1a94a2947235f9e9dfb7057fdec343683f64ff9ad1061255c") + version("3.8.2", sha256="5a102f4614b0c9291504bbefd847ebac18ea717843506bd251d015c7cf9726b4") version("3.8.1", sha256="4258af4308deb9dbb5047379026b4cd9838513627cb943a44e16c40e42ae17f7") + version("3.8.0", sha256="99114c3dc95df31757f44d2afde73e61b9f742f0b683fd1894cbbee05dda62d5") version("3.7.2", sha256="2166e65be6d612317115bfec07827c11b403c3f303e0a7420a2106bc999d7707") version("3.6.2", sha256="045a13df84d605a866602f6020fc6cbf8bf4c42fb50de237a08926e1d7d7652a") version("3.6.1", sha256="4a2e4e3a7a09a7cfda3211d0f4a235d9fd3176ddf64bd8db14b4ead266189fc5") From 4e171453c0da84f10f6cfbb78f07368dbd971115 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:13:26 +0100 Subject: [PATCH 594/806] build(deps): bump mypy from 1.6.1 to 1.7.0 in /lib/spack/docs (#41020) Bumps [mypy](https://github.com/python/mypy) from 1.6.1 to 1.7.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.1...v1.7.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 10e19f093e5eec..5fbee6c763cbe4 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -10,4 +10,4 @@ pytest==7.4.3 isort==5.12.0 black==23.10.1 flake8==6.1.0 -mypy==1.6.1 +mypy==1.7.0 From bd6c5ec82dac1d611c064f7c36e029946a9ae79e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Nov 2023 03:26:56 -0600 Subject: [PATCH 595/806] py-pandas: add v2.1.3 (#41017) --- var/spack/repos/builtin/packages/py-pandas/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 3dea26ff2c4111..9d91ef08ace82c 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -17,6 +17,7 @@ class PyPandas(PythonPackage): maintainers("adamjstewart") + version("2.1.3", sha256="22929f84bca106921917eb73c1521317ddd0a4c71b395bcf767a106e3494209f") version("2.1.2", sha256="52897edc2774d2779fbeb6880d2cfb305daa0b1a29c16b91f531a18918a6e0f3") version("2.1.1", sha256="fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b") version("2.1.0", sha256="62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918") From 15e7aaf94d5a4798f7b4b9bb44d068ff80c8282a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Nov 2023 03:33:33 -0600 Subject: [PATCH 596/806] py-mypy: add v1.4:v1.7 (#41015) --- .../repos/builtin/packages/py-mypy/package.py | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-mypy/package.py b/var/spack/repos/builtin/packages/py-mypy/package.py index 68896c792adb98..9f7e22c2bcc634 100644 --- a/var/spack/repos/builtin/packages/py-mypy/package.py +++ b/var/spack/repos/builtin/packages/py-mypy/package.py @@ -15,6 +15,13 @@ class PyMypy(PythonPackage): maintainers("adamjstewart") + version("1.7.0", sha256="1e280b5697202efa698372d2f39e9a6713a0395a756b1c6bd48995f8d72690dc") + version("1.6.1", sha256="4d01c00d09a0be62a4ca3f933e315455bde83f37f892ba4b08ce92f3cf44bcc1") + version("1.6.0", sha256="4f3d27537abde1be6d5f2c96c29a454da333a2a271ae7d5bc7110e6d4b7beb3f") + version("1.5.1", sha256="b031b9601f1060bf1281feab89697324726ba0c0bae9d7cd7ab4b690940f0b92") + version("1.5.0", sha256="f3460f34b3839b9bc84ee3ed65076eb827cd99ed13ed08d723f9083cada4a212") + version("1.4.1", sha256="9bbcd9ab8ea1f2e1c8031c21445b511442cc45c89951e49bbf852cbb70755b1b") + version("1.4.0", sha256="de1e7e68148a213036276d1f5303b3836ad9a774188961eb2684eddff593b042") version("1.3.0", sha256="e1f4d16e296f5135624b34e8fb741eb0eadedca90862405b1f1fde2040b9bd11") version("1.2.0", sha256="f70a40410d774ae23fcb4afbbeca652905a04de7948eaf0b1789c8d1426b72d1") version("1.1.1", sha256="ae9ceae0f5b9059f33dbc62dea087e942c0ccab4b7a003719cb70f9b8abfa32f") @@ -43,31 +50,34 @@ class PyMypy(PythonPackage): version("0.670", sha256="e80fd6af34614a0e898a57f14296d0dacb584648f0339c2e000ddbf0f4cc2f8d") # pyproject.toml - depends_on("py-setuptools@40.6.2:", when="@0.790:", type=("build", "run")) - depends_on("py-setuptools", type=("build", "run")) + depends_on("py-setuptools@40.6.2:", when="@0.790:", type="build") + depends_on("py-setuptools", type="build") depends_on("py-wheel@0.30:", when="@0.790:", type="build") + depends_on("py-types-psutil", when="@0.981:", type="build") + depends_on("py-types-setuptools", when="@0.981:", type="build") + + # setup.py + depends_on("python@3.8:", when="@1.5:", type=("build", "run")) + depends_on("python@3.7:", when="@0.981:", type=("build", "run")) + depends_on("py-typing-extensions@4.1:", when="@1.5:", type=("build", "run")) depends_on("py-typing-extensions@3.10:", when="@0.930:", type=("build", "run")) depends_on("py-typing-extensions@3.7.4:", when="@0.700:", type=("build", "run")) depends_on("py-mypy-extensions@1:", when="@1.1:", type=("build", "run")) depends_on("py-mypy-extensions@0.4.3:", when="@0.930:1.0", type=("build", "run")) depends_on("py-mypy-extensions@0.4.3:0.4", when="@0.700:0.929", type=("build", "run")) depends_on("py-mypy-extensions@0.4.0:0.4", when="@:0.699", type=("build", "run")) - depends_on("py-typed-ast@1.4.0:1", when="@0.920: ^python@:3.7", type=("build", "run")) - depends_on("py-typed-ast@1.4.0:1.4", when="@0.900:0.910 ^python@:3.7", type=("build", "run")) - depends_on("py-typed-ast@1.4.0:1.4", when="@0.700:0.899", type=("build", "run")) - depends_on("py-typed-ast@1.3.1:1.3", when="@:0.699", type=("build", "run")) depends_on("py-tomli@1.1:", when="@0.950: ^python@:3.10", type=("build", "run")) depends_on("py-tomli@1.1:", when="@0.930:0.949", type=("build", "run")) depends_on("py-tomli@1.1:2", when="@0.920:0.929", type=("build", "run")) - depends_on("py-types-psutil", when="@0.981:", type="build") - depends_on("py-types-setuptools", when="@0.981:", type="build") - depends_on("py-types-typed-ast@1.5.8:1.5", when="@0.981:", type="build") - - # setup.py - depends_on("python@3.7:", when="@0.981:", type=("build", "run")) # Historical dependencies + depends_on("py-types-typed-ast@1.5.8.5:1.5", when="@1.2:1.4", type="build") + depends_on("py-types-typed-ast@1.5.8:1.5", when="@0.981:1.1", type="build") depends_on("py-toml", when="@0.900:0.910", type=("build", "run")) + depends_on("py-typed-ast@1.4.0:1", when="@0.920:1.4 ^python@:3.7", type=("build", "run")) + depends_on("py-typed-ast@1.4.0:1.4", when="@0.900:0.910 ^python@:3.7", type=("build", "run")) + depends_on("py-typed-ast@1.4.0:1.4", when="@0.700:0.899", type=("build", "run")) + depends_on("py-typed-ast@1.3.1:1.3", when="@:0.699", type=("build", "run")) # https://github.com/python/mypy/issues/13627 conflicts("^python@3.10.7:", when="@:0.971") From 420eff11b72305d4d896bd69bb50927d607b5a77 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Mon, 13 Nov 2023 03:55:05 -0600 Subject: [PATCH 597/806] superlu-dist: add v8.2.0 (#41004) --- var/spack/repos/builtin/packages/superlu-dist/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index eb5d51950fd3c3..7336f4ed8850ff 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -20,6 +20,7 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="master") version("amd", branch="amd") + version("8.2.0", sha256="d53573e5a399b2b4ab1fcc36e8421c1b6fab36345c0af14f8fa20326e3365f1f") version("8.1.2", sha256="7b16c442bb01ea8b298c0aab9a2584aa4615d09786aac968cb2f3118c058206b") version("8.1.1", sha256="766d70b84ece79d88249fe10ff51d2a397a29f274d9fd1e4a4ac39179a9ef23f") version("8.1.0", sha256="9308844b99a7e762d5704934f7e9f79daf158b0bfc582994303c2e0b31518b34") From ad4878f77020ac5c531d0bbb904b52828c41a3be Mon Sep 17 00:00:00 2001 From: Victoria Cherkas <87643948+victoria-cherkas@users.noreply.github.com> Date: Mon, 13 Nov 2023 09:56:52 +0000 Subject: [PATCH 598/806] metkit: add v1.10.2 and v1.10.17 (#40668) --- var/spack/repos/builtin/packages/metkit/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/metkit/package.py b/var/spack/repos/builtin/packages/metkit/package.py index 784e028068daff..41246cf6da9ab6 100644 --- a/var/spack/repos/builtin/packages/metkit/package.py +++ b/var/spack/repos/builtin/packages/metkit/package.py @@ -15,6 +15,8 @@ class Metkit(CMakePackage): maintainers("skosukhin") + version("1.10.17", sha256="1c525891d77ed28cd4c87b065ba4d1aea24d0905452c18d885ccbd567bbfc9b1") + version("1.10.2", sha256="a038050962aecffda27b755c40b0a6ed0db04a2c22cad3d8c93e6109c8ab4b34") version("1.9.2", sha256="35d5f67196197cc06e5c2afc6d1354981e7c85a441df79a2fbd774e0c343b0b4") version("1.7.0", sha256="8c34f6d8ea5381bd1bcfb22462349d03e1592e67d8137e76b3cecf134a9d338c") @@ -26,8 +28,10 @@ class Metkit(CMakePackage): depends_on("ecbuild@3.4:", type="build") depends_on("eckit@1.16:") + depends_on("eckit@1.21:", when="@1.10:") depends_on("eccodes@2.5:", when="+grib") + depends_on("eccodes@2.27:", when="@1.10.2: +grib") depends_on("odc", when="+odb") From 491bd48897ba3732dac7de84591a8d99f406f5a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:18:52 +0100 Subject: [PATCH 599/806] build(deps): bump black in /.github/workflows/style (#40968) Bumps [black](https://github.com/psf/black) from 23.10.1 to 23.11.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.10.1...23.11.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt index 0822ba39339737..aadcd83c09fd32 100644 --- a/.github/workflows/style/requirements.txt +++ b/.github/workflows/style/requirements.txt @@ -1,4 +1,4 @@ -black==23.10.1 +black==23.11.0 clingo==5.6.2 flake8==6.1.0 isort==5.12.0 From e6125061e183765505f9c4bf3ed578ea6f1e1b8d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 13 Nov 2023 11:33:40 +0100 Subject: [PATCH 600/806] Compiler.debug_flags: drop -gz (#40900) That enables compression of the debug symbols, it doesn't toggle them on or off. --- lib/spack/spack/compilers/aocc.py | 1 - lib/spack/spack/compilers/clang.py | 1 - lib/spack/spack/test/compilers/basics.py | 2 -- 3 files changed, 4 deletions(-) diff --git a/lib/spack/spack/compilers/aocc.py b/lib/spack/spack/compilers/aocc.py index 326522c93cfc91..33039bf07d1874 100644 --- a/lib/spack/spack/compilers/aocc.py +++ b/lib/spack/spack/compilers/aocc.py @@ -40,7 +40,6 @@ def debug_flags(self): "-gdwarf-5", "-gline-tables-only", "-gmodules", - "-gz", "-g", ] diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 71837bfe5e1c81..5e63526df619c2 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -55,7 +55,6 @@ def debug_flags(self): "-gdwarf-5", "-gline-tables-only", "-gmodules", - "-gz", "-g", ] diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py index 512defb195370f..910c9e87d9335f 100644 --- a/lib/spack/spack/test/compilers/basics.py +++ b/lib/spack/spack/test/compilers/basics.py @@ -422,7 +422,6 @@ def test_clang_flags(): "-gdwarf-5", "-gline-tables-only", "-gmodules", - "-gz", "-g", ], "clang@3.3", @@ -445,7 +444,6 @@ def test_aocc_flags(): "-gdwarf-5", "-gline-tables-only", "-gmodules", - "-gz", "-g", ], "aocc@2.2.0", From b6864fb1c3db2d13a4b8916d5fa5b9086bc3950c Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Mon, 13 Nov 2023 12:03:48 +0100 Subject: [PATCH 601/806] Add license directives to various packages (#41039) --- var/spack/repos/builtin/packages/asio/package.py | 2 ++ var/spack/repos/builtin/packages/dla-future/package.py | 2 ++ var/spack/repos/builtin/packages/fmt/package.py | 2 ++ var/spack/repos/builtin/packages/gperftools/package.py | 2 ++ var/spack/repos/builtin/packages/hpx-kokkos/package.py | 2 ++ var/spack/repos/builtin/packages/hpx/package.py | 2 ++ var/spack/repos/builtin/packages/mimalloc/package.py | 2 ++ var/spack/repos/builtin/packages/pika-algorithms/package.py | 2 ++ var/spack/repos/builtin/packages/pika/package.py | 2 ++ var/spack/repos/builtin/packages/stdexec/package.py | 2 ++ var/spack/repos/builtin/packages/tracy-client/package.py | 2 ++ var/spack/repos/builtin/packages/tracy/package.py | 2 ++ var/spack/repos/builtin/packages/ut/package.py | 2 ++ var/spack/repos/builtin/packages/whip/package.py | 2 ++ 14 files changed, 28 insertions(+) diff --git a/var/spack/repos/builtin/packages/asio/package.py b/var/spack/repos/builtin/packages/asio/package.py index 3c66d7df9e3ba1..05f391caa31ecd 100644 --- a/var/spack/repos/builtin/packages/asio/package.py +++ b/var/spack/repos/builtin/packages/asio/package.py @@ -16,6 +16,8 @@ class Asio(AutotoolsPackage): git = "https://github.com/chriskohlhoff/asio.git" maintainers("msimberg", "pauleonix") + license("BSL-1.0") + # As uneven minor versions of asio are not considered stable, they wont be added anymore version("1.28.0", sha256="226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328") version("1.26.0", sha256="935583f86825b7b212479277d03543e0f419a55677fa8cb73a79a927b858a72d") diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index 8c0590d9f7b949..894bc97de40e0d 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -14,6 +14,8 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/eth-cscs/DLA-Future.git" maintainers = ["rasolca", "albestro", "msimberg", "aurianer"] + license("BSD-3-Clause") + version("0.2.1", sha256="4c2669d58f041304bd618a9d69d9879a42e6366612c2fc932df3894d0326b7fe") version("0.2.0", sha256="da73cbd1b88287c86d84b1045a05406b742be924e65c52588bbff200abd81a10") version("0.1.0", sha256="f7ffcde22edabb3dc24a624e2888f98829ee526da384cd752b2b271c731ca9b1") diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py index ea7abc909284ec..d88823705d2efa 100644 --- a/var/spack/repos/builtin/packages/fmt/package.py +++ b/var/spack/repos/builtin/packages/fmt/package.py @@ -15,6 +15,8 @@ class Fmt(CMakePackage): url = "https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip" maintainers("msimberg") + license("MIT") + version("10.1.1", sha256="b84e58a310c9b50196cda48d5678d5fa0849bca19e5fdba6b684f0ee93ed9d1b") version("10.1.0", sha256="d725fa83a8b57a3cedf238828fa6b167f963041e8f9f7327649bddc68ae316f4") version("10.0.0", sha256="4943cb165f3f587f26da834d3056ee8733c397e024145ca7d2a8a96bb71ac281") diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py index 6dd96c36678682..38ff5a25d4b535 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -17,6 +17,8 @@ class Gperftools(AutotoolsPackage): url = "https://github.com/gperftools/gperftools/releases/download/gperftools-2.7/gperftools-2.7.tar.gz" maintainers("albestro", "eschnett", "msimberg", "teonnik") + license("BSD-3-Clause") + version("2.13", sha256="4882c5ece69f8691e51ffd6486df7d79dbf43b0c909d84d3c0883e30d27323e7") version("2.12", sha256="fb611b56871a3d9c92ab0cc41f9c807e8dfa81a54a4a9de7f30e838756b5c7c6") version("2.11", sha256="8ffda10e7c500fea23df182d7adddbf378a203c681515ad913c28a64b87e24dc") diff --git a/var/spack/repos/builtin/packages/hpx-kokkos/package.py b/var/spack/repos/builtin/packages/hpx-kokkos/package.py index 27e88238294c6d..e98c0bb17ccd78 100644 --- a/var/spack/repos/builtin/packages/hpx-kokkos/package.py +++ b/var/spack/repos/builtin/packages/hpx-kokkos/package.py @@ -16,6 +16,8 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/STEllAR-GROUP/hpx-kokkos.git" maintainers("G-071", "msimberg") + license("BSL-1.0") + version("master", branch="master") version("0.4.0", sha256="dafef55521cf4bf7ab28ebad546ea1d3fb83fac3a9932e292db4ab3666cd833f") version("0.3.0", sha256="83c1d11dab95552ad0abdae767c71f757811d7b51d82bd231653dc942e89a45d") diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py index 5c0d390e590441..628358b38caf8f 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -18,6 +18,8 @@ class Hpx(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/STEllAR-GROUP/hpx.git" maintainers("msimberg", "albestro", "teonnik", "hkaiser") + license("BSL-1.0") + tags = ["e4s"] version("master", branch="master") diff --git a/var/spack/repos/builtin/packages/mimalloc/package.py b/var/spack/repos/builtin/packages/mimalloc/package.py index fed6e5bf783543..a88aaed0db8463 100644 --- a/var/spack/repos/builtin/packages/mimalloc/package.py +++ b/var/spack/repos/builtin/packages/mimalloc/package.py @@ -14,6 +14,8 @@ class Mimalloc(CMakePackage): git = "https://github.com/microsoft/mimalloc.git" maintainers("msimberg") + license("MIT") + version("dev-slice", branch="dev-slice") version("dev", branch="dev") version("master", branch="master") diff --git a/var/spack/repos/builtin/packages/pika-algorithms/package.py b/var/spack/repos/builtin/packages/pika-algorithms/package.py index 3387dfdb2736cb..48ca6fe2f0129b 100644 --- a/var/spack/repos/builtin/packages/pika-algorithms/package.py +++ b/var/spack/repos/builtin/packages/pika-algorithms/package.py @@ -15,6 +15,8 @@ class PikaAlgorithms(CMakePackage): git = "https://github.com/pika-org/pika-algorithms.git" maintainers("msimberg", "albestro", "teonnik", "aurianer") + license("BSL-1.0") + version("0.1.4", sha256="67ea5e8545b234f82dcc75612a774f2e3df8425a283f2034c2d1e2e5ac74f945") version("0.1.3", sha256="53b79fcc0e5decc0a4d70abf0897a4f66141b85eea6d65013f51eec02ad123b7") version("0.1.2", sha256="286cf5c4db06717fa66c681cec8c99207154dd07e72d72f2b5b4a3cb9ff698bf") diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index 949475650240dc..1dcd4d2613a5a2 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -17,6 +17,8 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/pika-org/pika.git" maintainers("msimberg", "albestro", "teonnik", "aurianer") + license("BSL-1.0") + version("0.20.0", sha256="f338cceea66a0e3954806b2aca08f6560bba524ecea222f04bc18b483851c877") version("0.19.1", sha256="674675abf0dd4c6f5a0b2fa3db944b277ed65c62f654029d938a8cab608a9c1d") version("0.19.0", sha256="f45cc16e4e50cbb183ed743bdc8b775d49776ee33c13ea39a650f4230a5744cb") diff --git a/var/spack/repos/builtin/packages/stdexec/package.py b/var/spack/repos/builtin/packages/stdexec/package.py index eeebe847d91bd0..ae6b2bfed39d34 100644 --- a/var/spack/repos/builtin/packages/stdexec/package.py +++ b/var/spack/repos/builtin/packages/stdexec/package.py @@ -14,6 +14,8 @@ class Stdexec(CMakePackage): git = "https://github.com/NVIDIA/stdexec.git" maintainers("msimberg", "aurianer") + license("Apache-2.0") + version("23.03", sha256="2c9dfb6e56a190543049d2300ccccd1b626f4bb82af5b607869c626886fadd15") version("main", branch="main") diff --git a/var/spack/repos/builtin/packages/tracy-client/package.py b/var/spack/repos/builtin/packages/tracy-client/package.py index dd219f31ee039a..c0ff6a7b712ed2 100644 --- a/var/spack/repos/builtin/packages/tracy-client/package.py +++ b/var/spack/repos/builtin/packages/tracy-client/package.py @@ -14,6 +14,8 @@ class TracyClient(CMakePackage): url = "https://github.com/wolfpld/tracy/archive/v0.0.0.tar.gz" maintainers("msimberg") + license("BSD-3-Clause") + version("master", git="https://github.com/wolfpld/tracy.git", branch="master") version("0.10", sha256="a76017d928f3f2727540fb950edd3b736caa97b12dbb4e5edce66542cbea6600") version("0.9", sha256="93a91544e3d88f3bc4c405bad3dbc916ba951cdaadd5fcec1139af6fa56e6bfc") diff --git a/var/spack/repos/builtin/packages/tracy/package.py b/var/spack/repos/builtin/packages/tracy/package.py index 111b4a86534600..021e18d00f4f73 100644 --- a/var/spack/repos/builtin/packages/tracy/package.py +++ b/var/spack/repos/builtin/packages/tracy/package.py @@ -14,6 +14,8 @@ class Tracy(MakefilePackage): url = "https://github.com/wolfpld/tracy/archive/v0.0.0.tar.gz" maintainers("msimberg") + license("BSD-3-Clause") + version("master", git="https://github.com/wolfpld/tracy.git", branch="master") version("0.10", sha256="a76017d928f3f2727540fb950edd3b736caa97b12dbb4e5edce66542cbea6600") version("0.9", sha256="93a91544e3d88f3bc4c405bad3dbc916ba951cdaadd5fcec1139af6fa56e6bfc") diff --git a/var/spack/repos/builtin/packages/ut/package.py b/var/spack/repos/builtin/packages/ut/package.py index 9c5d9f44603de7..7d7d2b573ab92d 100644 --- a/var/spack/repos/builtin/packages/ut/package.py +++ b/var/spack/repos/builtin/packages/ut/package.py @@ -15,6 +15,8 @@ class Ut(CMakePackage): maintainers("msimberg") + license("BSL-1.0") + version("master", branch="master") version("1.1.9", sha256="1a666513157905aa0e53a13fac602b5673dcafb04a869100a85cd3f000c2ed0d") diff --git a/var/spack/repos/builtin/packages/whip/package.py b/var/spack/repos/builtin/packages/whip/package.py index a269097ad6bc8f..44c6f1ad57391e 100644 --- a/var/spack/repos/builtin/packages/whip/package.py +++ b/var/spack/repos/builtin/packages/whip/package.py @@ -15,6 +15,8 @@ class Whip(CMakePackage, CudaPackage, ROCmPackage): git = "https://github.com/eth-cscs/whip.git" maintainers("msimberg", "rasolca") + license("BSD-3-Clause") + version("main", branch="main") version("0.2.0", sha256="d8fec662526accbd1624922fdf01a077d6f312cf253382660e4a2f65e28e8686") version("0.1.0", sha256="5d557794f4afc8332fc660948a342f69e22bc9e5d575ffb3e3944cf526db5ec9") From d7869da36bd290c68ca8007fec0663ddb52a1c66 Mon Sep 17 00:00:00 2001 From: Tuomas Koskela Date: Mon, 13 Nov 2023 11:13:53 +0000 Subject: [PATCH 602/806] conquest: add build system changes and library paths (#40718) --- .../builtin/packages/conquest/package.py | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/conquest/package.py b/var/spack/repos/builtin/packages/conquest/package.py index 29e9fa5777bc3f..4478881b91e98c 100644 --- a/var/spack/repos/builtin/packages/conquest/package.py +++ b/var/spack/repos/builtin/packages/conquest/package.py @@ -49,6 +49,15 @@ class Conquest(MakefilePackage): build_directory = "src" + # The SYSTEM variable is required above version 1.2. + # Versions 1.2 and older should ignore it. + @property + def build_targets(self): + if self.version > Version("1.2"): + return ["SYSTEM = example", "Conquest"] + else: + return ["Conquest"] + def edit(self, spec, prefix): fflags = "-O3 -fallow-argument-mismatch" ldflags = "" @@ -63,12 +72,23 @@ def edit(self, spec, prefix): lapack_ld = self.spec["lapack"].libs.ld_flags blas_ld = self.spec["blas"].libs.ld_flags - - defs_file = FileFilter("./src/system.make") - - defs_file.filter("COMPFLAGS=.*", f"COMPFLAGS= {fflags}") - defs_file.filter("LINKFLAGS=.*", f"LINKFLAGS= {ldflags}") - defs_file.filter("# BLAS=.*", f"BLAS= {lapack_ld} -llapack {blas_ld} -lblas") + fftw_ld = self.spec["fftw"].libs.ld_flags + libxc_ld = self.spec["libxc"].libs.ld_flags + + # Starting from 1.3 there's automated logic in the Makefile that picks + # from a list of possible files for system/compiler-specific definitions. + # This is useful for manual builds, but since the spack will do its own + # automation of compiler-specific flags, we will override it. + if self.version > Version("1.2"): + defs_file = FileFilter("./src/system/system.example.make") + else: + defs_file = FileFilter("./src/system.make") + + defs_file.filter(".*COMPFLAGS=.*", f"COMPFLAGS= {fflags}") + defs_file.filter(".*LINKFLAGS=.*", f"LINKFLAGS= {ldflags}") + defs_file.filter(".*BLAS=.*", f"BLAS= {lapack_ld} {blas_ld}") + defs_file.filter(".*FFT_LIB=.*", f"FFT_LIB={fftw_ld}") + defs_file.filter(".*XC_LIB=.*", f"XC_LIB={libxc_ld} -lxcf90 -lxc") if "+openmp" in self.spec: defs_file.filter("OMP_DUMMY = DUMMY", "OMP_DUMMY = ") @@ -81,3 +101,5 @@ def edit(self, spec, prefix): def install(self, spec, prefix): mkdirp(prefix.bin) install("./bin/Conquest", prefix.bin) + if self.version > Version("1.2"): + install_tree("./benchmarks/", join_path(prefix, "benchmarks")) From 09d66168c46ad2f7518acc542041c59ad7c41416 Mon Sep 17 00:00:00 2001 From: Wanlin Wang <32032219+wanlinwang@users.noreply.github.com> Date: Mon, 13 Nov 2023 19:19:09 +0800 Subject: [PATCH 603/806] riscv-gnu-toolchain: add v2023.09.13 -> v2023.10.18 (#40854) --- .../packages/riscv-gnu-toolchain/package.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py index 71ff595e64247e..d0d4f1f6e9292d 100644 --- a/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py +++ b/var/spack/repos/builtin/packages/riscv-gnu-toolchain/package.py @@ -18,6 +18,48 @@ class RiscvGnuToolchain(AutotoolsPackage): maintainers("wanlinwang") version("develop", branch="master", submodules=True) + version( + "2023.10.18", + tag="2023.10.18", + commit="b86b2b37d0acc607156ff56ff17ee105a9b48897", + submodules=True, + ) + version( + "2023.10.17", + tag="2023.10.17", + commit="c11f0748276c58df4f9d9602cdc2de5f17cbae8c", + submodules=True, + ) + version( + "2023.10.12", + tag="2023.10.12", + commit="e65e7fc58543c821baf4f1fb6d0ef700177b9d89", + submodules=True, + ) + version( + "2023.10.06", + tag="2023.10.06", + commit="6e7190e8c95e09d541e69f6f6e39163f808570d5", + submodules=True, + ) + version( + "2023.09.27", + tag="2023.09.27", + commit="5afde2de23c6597aaa5069f36574c61bcb39b007", + submodules=True, + ) + version( + "2023.09.26", + tag="2023.09.26", + commit="ffb5968884630c7baebba7b2af493f6b5f74ad80", + submodules=True, + ) + version( + "2023.09.13", + tag="2023.09.13", + commit="5437780994b830e9eabf467f85f22ed24b5fade1", + submodules=True, + ) version( "2022.08.08", tag="2022.08.08", From 62b32080a826f809633a2319f30fe0629cf15350 Mon Sep 17 00:00:00 2001 From: Glenn Horton-Smith Date: Mon, 13 Nov 2023 05:29:51 -0600 Subject: [PATCH 604/806] epics-base: patch to avoid failure on "perl xsubpp" when "xsubpp" otherwise works fine. (#40849) --- var/spack/repos/builtin/packages/epics-base/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/epics-base/package.py b/var/spack/repos/builtin/packages/epics-base/package.py index 9aae46a46bea54..e3ef52ffe3b3c9 100644 --- a/var/spack/repos/builtin/packages/epics-base/package.py +++ b/var/spack/repos/builtin/packages/epics-base/package.py @@ -26,6 +26,7 @@ class EpicsBase(MakefilePackage): def patch(self): filter_file(r"^\s*CC\s*=.*", "CC = " + spack_cc, "configure/CONFIG.gnuCommon") filter_file(r"^\s*CCC\s*=.*", "CCC = " + spack_cxx, "configure/CONFIG.gnuCommon") + filter_file(r"\$\(PERL\)\s+\$\(XSUBPP\)", "$(XSUBPP)", "modules/ca/src/perl/Makefile") @property def install_targets(self): From 3892fadbf681b10154ce95e49f0244a74568be39 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 13 Nov 2023 05:42:37 -0600 Subject: [PATCH 605/806] qwt: conflict with qt-base (Qt6) (#40883) --- var/spack/repos/builtin/packages/qwt/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/qwt/package.py b/var/spack/repos/builtin/packages/qwt/package.py index e2d7a8e0ee5656..7bc3d51ece7dce 100644 --- a/var/spack/repos/builtin/packages/qwt/package.py +++ b/var/spack/repos/builtin/packages/qwt/package.py @@ -31,7 +31,9 @@ class Qwt(QMakePackage): depends_on("qt+tools", when="+designer") depends_on("qt+opengl", when="+opengl") - depends_on("qt") + # Qwt does not support Qt6; this picks the right qmake provider + conflicts("^qt-base", msg="Qwt requires Qt5") + # the qt@5.14.2 limitation was lifted in qwt@6.1.5 # https://sourceforge.net/p/qwt/code/HEAD/tree/tags/qwt-6.1.6/CHANGES-6.1 depends_on("qt@:5.14.2", when="@:6.1.4") From d9de93a0fc816ae5b3d939173d2d8a861e222551 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 08:18:06 -0700 Subject: [PATCH 606/806] build(deps): bump black from 23.10.1 to 23.11.0 in /lib/spack/docs (#40967) Bumps [black](https://github.com/psf/black) from 23.10.1 to 23.11.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.10.1...23.11.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index 5fbee6c763cbe4..df199912d77104 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -8,6 +8,6 @@ pygments==2.16.1 urllib3==2.0.7 pytest==7.4.3 isort==5.12.0 -black==23.10.1 +black==23.11.0 flake8==6.1.0 mypy==1.7.0 From 9c74eda61f2b2848d6b24e8ce7d142746a6ee300 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Mon, 13 Nov 2023 12:18:02 -0600 Subject: [PATCH 607/806] hdf5: add a new variant for enabling sub-filing VFD (#40804) --- var/spack/repos/builtin/packages/hdf5/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index a9e0574877bdb4..ffd91d30288202 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -207,6 +207,7 @@ class Hdf5(CMakePackage): variant("hl", default=False, description="Enable the high-level library") variant("cxx", default=False, description="Enable C++ support") variant("map", when="@1.14:", default=False, description="Enable MAP API support") + variant("subfiling", when="@1.14:", default=False, description="Enable Subfiling VFD support") variant("fortran", default=False, description="Enable Fortran support") variant("java", when="@1.10:", default=False, description="Enable Java support") variant("threadsafe", default=False, description="Enable thread-safe capabilities") @@ -329,7 +330,7 @@ class Hdf5(CMakePackage): patch("fortran-kinds.patch", when="@1.10.7") - # This patch may only be needed with GCC11.2 on macOS, but it's valid for + # This patch may only be needed with GCC 11.2 on macOS, but it's valid for # any of the head HDF5 versions as of 12/2021. Since it's impossible to # tell what Fortran version is part of a mixed apple-clang toolchain on # macOS (which is the norm), and this might be an issue for other compilers @@ -607,6 +608,7 @@ def cmake_args(self): # are enabled but the tests are disabled. spec.satisfies("@1.8.22+shared+tools"), ), + self.define_from_variant("HDF5_ENABLE_SUBFILING_VFD", "subfiling"), self.define_from_variant("HDF5_ENABLE_MAP_API", "map"), self.define("HDF5_ENABLE_Z_LIB_SUPPORT", True), self.define_from_variant("HDF5_ENABLE_SZIP_SUPPORT", "szip"), From 96f3c76052139ee420c7a2c758ef1ee3681928c4 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 13 Nov 2023 11:29:55 -0700 Subject: [PATCH 608/806] dealii: add v9.5.0, v9.5.1 (#40747) * dealii: 9.5.0 * kokkos+cuda_lambda * dealii ^kokkos@3.7: require +cuda +cuda_lambda +wrapper * Added 9.5.1, try ~cgal when +cuda * Forward Cuda architecture request * Remove workaround * Try not enforcing the Kokkos compiler * Enforce using nvcc_wrapper with Trilinos+Cuda * Don't define CMAKE_*_COMPILER to point to MPI wrappers * Use the same compiler as Trilinos/Kokkos * Only check for Trilinos compiler * Disable Trilinos+Cuda * Disable Cuda support * Try CUDA build without ninja * Combined examples and examples_compile * Use f-string for cuda_arch * p -> _package * Indentation * Fix up f-string --------- Co-authored-by: Luca Heltai Co-authored-by: eugeneswalker --- .../repos/builtin/packages/dealii/package.py | 130 +++++++++++------- 1 file changed, 84 insertions(+), 46 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index df6f514134a799..1e9b3acb19fbb7 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -23,9 +23,13 @@ class Dealii(CMakePackage, CudaPackage): # only add for immediate deps. transitive_rpaths = False - generator("ninja") + # FIXME nvcc_wrapper (used for +clang) doesn't handle response files + # correctly when ninja is used. Those are used automatically if paths get too long. + generator("make") version("master", branch="master") + version("9.5.1", sha256="a818b535e6488d3aef7853311657c7b4fadc29a9abe91b7b202b131aad630f5e") + version("9.5.0", sha256="a81f41565f0d3a22d491ee687957dd48053225da72e8d6d628d210358f4a0464") version("9.4.2", sha256="45a76cb400bfcff25cc2d9093d9a5c91545c8367985e6798811c5e9d2a6a6fd4") version("9.4.1", sha256="bfe5e4bf069159f93feb0f78529498bfee3da35baf5a9c6852aa59d7ea7c7a48") version("9.4.0", sha256="238677006cd9173658e5b69cdd1861f800556982db6005a3cc5eb8329cc1e36c") @@ -70,10 +74,11 @@ class Dealii(CMakePackage, CudaPackage): values=("default", "11", "14", "17"), ) variant("doc", default=False, description="Compile with documentation") - variant("examples", default=True, description="Compile tutorial programs") + variant("examples", default=True, description="Compile and install tutorial programs") variant("int64", default=False, description="Compile with 64 bit indices support") variant("mpi", default=True, description="Compile with MPI") variant("optflags", default=False, description="Compile using additional optimization flags") + variant("platform-introspection", default=True, description="Enable platform introspection") variant("python", default=False, description="Compile with Python bindings") # Package variants @@ -81,11 +86,12 @@ class Dealii(CMakePackage, CudaPackage): variant("arborx", default=True, description="Compile with Arborx support") variant("arpack", default=True, description="Compile with Arpack and PArpack (only with MPI)") variant("adol-c", default=True, description="Compile with ADOL-C") - variant("cgal", default=True, when="@9.4:", description="Compile with CGAL") + variant("cgal", default=True, when="@9.4:~cuda", description="Compile with CGAL") variant("ginkgo", default=True, description="Compile with Ginkgo") variant("gmsh", default=True, description="Compile with GMSH") variant("gsl", default=True, description="Compile with GSL") variant("hdf5", default=True, description="Compile with HDF5 (only with MPI)") + variant("kokkos", default=True, when="@9.5:", description="Compile with Kokkos") variant("metis", default=True, description="Compile with Metis") variant("muparser", default=True, description="Compile with muParser") variant("nanoflann", default=False, description="Compile with Nanoflann") @@ -98,14 +104,15 @@ class Dealii(CMakePackage, CudaPackage): variant("slepc", default=True, description="Compile with Slepc (only with Petsc and MPI)") variant("symengine", default=True, description="Compile with SymEngine") variant("simplex", default=True, description="Compile with Simplex support") - # TODO @9.3: enable by default, when we know what to do - # variant('taskflow', default=False, - # description='Compile with multi-threading via Taskflow') - # TODO @9.3: disable by default - # (NB: only if tbb is removed in 9.3, as planned!!!) + variant( + "taskflow", + default=True, + when="@9.6:", + description="Compile with multi-threading via Taskflow", + ) variant("threads", default=True, description="Compile with multi-threading via TBB") variant("trilinos", default=True, description="Compile with Trilinos (only with MPI)") - variant("platform-introspection", default=True, description="Enable platform introspection") + variant("vtk", default=True, when="@9.6:", description="Compile with VTK") # Required dependencies: Light version depends_on("blas") @@ -179,6 +186,8 @@ class Dealii(CMakePackage, CudaPackage): # TODO: next line fixes concretization with petsc depends_on("hdf5+mpi+hl+fortran", when="+hdf5+mpi+petsc") depends_on("hdf5+mpi+hl", when="+hdf5+mpi~petsc") + depends_on("kokkos@3.7:", when="@9.5:+kokkos~trilinos") + depends_on("kokkos@3.7:+cuda+cuda_lambda+wrapper", when="@9.5:+kokkos~trilinos+cuda") # TODO: concretizer bug. The two lines mimic what comes from PETSc # but we should not need it depends_on("metis@5:+int64", when="+metis+int64") @@ -198,7 +207,7 @@ class Dealii(CMakePackage, CudaPackage): depends_on("sundials@:3~pthread", when="@9.0:9.2+sundials") depends_on("sundials@5:5.8", when="@9.3:9.3.3+sundials") depends_on("sundials@5:", when="@9.3.4:+sundials") - # depends_on('taskflow', when='@9.3:+taskflow') + depends_on("taskflow", when="@9.6:+taskflow") depends_on("trilinos gotype=int", when="+trilinos@12.18.1:") # TODO: next line fixes concretization with trilinos and adol-c depends_on("trilinos~exodus", when="@9.0:+adol-c+trilinos") @@ -222,12 +231,11 @@ class Dealii(CMakePackage, CudaPackage): # do not require +rol to make concretization of xsdk possible depends_on("trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado", when="+trilinos") depends_on("trilinos~hypre", when="+trilinos+int64") - # TODO: temporary disable Tpetra when using CUDA due to - # namespace "Kokkos::Impl" has no member "cuda_abort" - depends_on( - "trilinos@master+rol~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2", - when="+trilinos+cuda", - ) + for _arch in CudaPackage.cuda_arch_values: + arch_str = f"+cuda cuda_arch={_arch}" + trilinos_spec = f"trilinos +wrapper {arch_str}" + depends_on(trilinos_spec, when=f"@9.5:+trilinos {arch_str}") + depends_on("vtk", when="@9.6:+vtk") # Explicitly provide a destructor in BlockVector, # otherwise deal.II may fail to build with Intel compilers. @@ -296,44 +304,60 @@ class Dealii(CMakePackage, CudaPackage): msg="CGAL requires the C++ standard to be set explicitly to 17 or later.", ) + conflicts( + "cxxstd=14", + when="@9.6:", + msg="Deal.II 9.6 onwards requires the C++ standard to be set to 17 or later.", + ) + # Interfaces added in 8.5.0: - for p in ["gsl", "python"]: + for _package in ["gsl", "python"]: conflicts( - "+{0}".format(p), + "+{0}".format(_package), when="@:8.4.2", msg="The interface to {0} is supported from version 8.5.0 " "onwards. Please explicitly disable this variant " - "via ~{0}".format(p), + "via ~{0}".format(_package), ) # Interfaces added in 9.0.0: - for p in ["assimp", "gmsh", "nanoflann", "scalapack", "sundials", "adol-c"]: + for _package in ["assimp", "gmsh", "nanoflann", "scalapack", "sundials", "adol-c"]: conflicts( - "+{0}".format(p), + "+{0}".format(_package), when="@:8.5.1", msg="The interface to {0} is supported from version 9.0.0 " "onwards. Please explicitly disable this variant " - "via ~{0}".format(p), + "via ~{0}".format(_package), ) # interfaces added in 9.1.0: - for p in ["ginkgo", "symengine"]: + for _package in ["ginkgo", "symengine"]: conflicts( - "+{0}".format(p), + "+{0}".format(_package), when="@:9.0", msg="The interface to {0} is supported from version 9.1.0 " "onwards. Please explicitly disable this variant " - "via ~{0}".format(p), + "via ~{0}".format(_package), ) # interfaces added in 9.3.0: - for p in ["simplex", "arborx"]: # , 'taskflow']: + for _package in ["simplex", "arborx"]: conflicts( - "+{0}".format(p), + "+{0}".format(_package), when="@:9.2", msg="The interface to {0} is supported from version 9.3.0 " "onwards. Please explicitly disable this variant " - "via ~{0}".format(p), + "via ~{0}".format(_package), + ) + + # interfaces added after 9.5.0: + for _package in ["vtk", "taskflow"]: + conflicts( + "+{0}".format(_package), + when="@:9.5", + msg="The interface to {0} is supported from version 9.6.0 " + "onwards. Please explicitly disable this variant " + "via ~{0}".format(_package), ) # Interfaces removed in 9.3.0: @@ -346,18 +370,29 @@ class Dealii(CMakePackage, CudaPackage): # Check that the combination of variants makes sense # 64-bit BLAS: - for p in ["openblas", "intel-mkl", "intel-parallel-studio+mkl"]: + for _package in ["openblas", "intel-mkl", "intel-parallel-studio+mkl"]: conflicts( - "^{0}+ilp64".format(p), when="@:8.5.1", msg="64bit BLAS is only supported from 9.0.0" + "^{0}+ilp64".format(_package), + when="@:8.5.1", + msg="64bit BLAS is only supported from 9.0.0", ) # MPI requirements: - for p in ["arpack", "hdf5", "netcdf", "p4est", "petsc", "scalapack", "slepc", "trilinos"]: + for _package in [ + "arpack", + "hdf5", + "netcdf", + "p4est", + "petsc", + "scalapack", + "slepc", + "trilinos", + ]: conflicts( - "+{0}".format(p), + "+{0}".format(_package), when="~mpi", msg="To enable {0} it is necessary to build deal.II with " - "MPI support enabled.".format(p), + "MPI support enabled.".format(_package), ) # Optional dependencies: @@ -432,6 +467,7 @@ def cmake_args(self): # Examples / tutorial programs options.append(self.define_from_variant("DEAL_II_COMPONENT_EXAMPLES", "examples")) + options.append(self.define_from_variant("DEAL_II_COMPILE_EXAMPLES", "examples")) # Enforce the specified C++ standard if spec.variants["cxxstd"].value != "default": @@ -478,9 +514,6 @@ def cmake_args(self): if "+mpi" in spec: options.extend( [ - self.define("CMAKE_C_COMPILER", spec["mpi"].mpicc), - self.define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx), - self.define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc), self.define("MPI_C_COMPILER", spec["mpi"].mpicc), self.define("MPI_CXX_COMPILER", spec["mpi"].mpicxx), self.define("MPI_Fortran_COMPILER", spec["mpi"].mpifc), @@ -499,6 +532,9 @@ def cmake_args(self): self.define("CUDA_HOST_COMPILER", spec["mpi"].mpicxx), ] ) + # Make sure we use the same compiler that Trilinos uses + if "+trilinos" in spec: + options.extend([self.define("CMAKE_CXX_COMPILER", spec["trilinos"].kokkos_cxx)]) # Python bindings if spec.satisfies("@8.5.0:"): @@ -542,23 +578,25 @@ def cmake_args(self): # Optional dependencies for which library names are the same as CMake # variables: for library in ( + "arborx", + "assimp", + "cgal", + "ginkgo", + "gmsh", "gsl", "hdf5", + "metis", + "muparser", + "nanoflann", "p4est", "petsc", "slepc", - "trilinos", - "metis", "sundials", - "nanoflann", - "assimp", - "gmsh", - "muparser", "symengine", - "ginkgo", - "arborx", - "cgal", - ): # 'taskflow'): + "taskflow", + "trilinos", + "vtk", + ): options.append( self.define_from_variant("DEAL_II_WITH_{0}".format(library.upper()), library) ) From 4bd47d89dbc7110299a0714e6dcaae9f07c6c4d8 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Mon, 13 Nov 2023 13:27:52 -0700 Subject: [PATCH 609/806] spack diff: allow hashes from mirrors (#41043) --- lib/spack/spack/cmd/diff.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/cmd/diff.py b/lib/spack/spack/cmd/diff.py index c654f6a5b8c6db..e321c28afbf43f 100644 --- a/lib/spack/spack/cmd/diff.py +++ b/lib/spack/spack/cmd/diff.py @@ -200,6 +200,8 @@ def diff(parser, args): specs = [] for spec in spack.cmd.parse_specs(args.specs): + # If the spec has a hash, check it before disambiguating + spec.replace_hash() if spec.concrete: specs.append(spec) else: From 5b9d260054a50ef994fc4db2a2df24760d302cb9 Mon Sep 17 00:00:00 2001 From: heatherkellyucl Date: Mon, 13 Nov 2023 20:38:16 +0000 Subject: [PATCH 610/806] gzip: deprecate <1.13 for vulnerability (#41044) --- .../repos/builtin/packages/gzip/package.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/gzip/package.py b/var/spack/repos/builtin/packages/gzip/package.py index 76a06818251e37..6645969dd0e4fd 100644 --- a/var/spack/repos/builtin/packages/gzip/package.py +++ b/var/spack/repos/builtin/packages/gzip/package.py @@ -12,9 +12,22 @@ class Gzip(AutotoolsPackage): homepage = "https://www.gnu.org/software/gzip/" url = "https://ftp.gnu.org/gnu/gzip/gzip-1.10.tar.gz" - version("1.12", sha256="5b4fb14d38314e09f2fc8a1c510e7cd540a3ea0e3eb9b0420046b82c3bf41085") - version("1.11", sha256="3e8a0e0c45bad3009341dce17d71536c4c655d9313039021ce7554a26cd50ed9") - version("1.10", sha256="c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68") + version("1.13", sha256="20fc818aeebae87cdbf209d35141ad9d3cf312b35a5e6be61bfcfbf9eddd212a") + version( + "1.12", + sha256="5b4fb14d38314e09f2fc8a1c510e7cd540a3ea0e3eb9b0420046b82c3bf41085", + deprecated=True, + ) + version( + "1.11", + sha256="3e8a0e0c45bad3009341dce17d71536c4c655d9313039021ce7554a26cd50ed9", + deprecated=True, + ) + version( + "1.10", + sha256="c91f74430bf7bc20402e1f657d0b252cb80aa66ba333a25704512af346633c68", + deprecated=True, + ) # Gzip makes a recursive symlink if built in-source build_directory = "spack-build" From f74b083a15bba3b1bd34eba3c85bd20b75ff1604 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 13 Nov 2023 14:45:18 -0700 Subject: [PATCH 611/806] info: improve coverage (#41001) Tests didn't cover the new `--variants-by-name` parameter in #40998. Add some parameterization to hit that. This changeset makes me think that the main section-printing loop in `spack info` isn't factored so well. It makes it difficult to pass different arguments to different helper functions. I could break it out into if statements if folks think that would be cleaner. --- lib/spack/spack/cmd/info.py | 33 ++++++++++++++++---------------- lib/spack/spack/test/cmd/info.py | 12 +++++++----- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index dd56c25451083a..1f90831f65ebd3 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -139,7 +139,7 @@ def lines(self): yield " " + self.fmt % t -def print_dependencies(pkg): +def print_dependencies(pkg, args): """output build, link, and run package dependencies""" for deptype in ("build", "link", "run"): @@ -152,7 +152,7 @@ def print_dependencies(pkg): color.cprint(" None") -def print_detectable(pkg): +def print_detectable(pkg, args): """output information on external detection""" color.cprint("") @@ -180,7 +180,7 @@ def print_detectable(pkg): color.cprint(" False") -def print_maintainers(pkg): +def print_maintainers(pkg, args): """output package maintainers""" if len(pkg.maintainers) > 0: @@ -189,7 +189,7 @@ def print_maintainers(pkg): color.cprint(section_title("Maintainers: ") + mnt) -def print_phases(pkg): +def print_phases(pkg, args): """output installation phases""" if hasattr(pkg.builder, "phases") and pkg.builder.phases: @@ -201,7 +201,7 @@ def print_phases(pkg): color.cprint(phase_str) -def print_tags(pkg): +def print_tags(pkg, args): """output package tags""" color.cprint("") @@ -213,7 +213,7 @@ def print_tags(pkg): color.cprint(" None") -def print_tests(pkg): +def print_tests(pkg, args): """output relevant build-time and stand-alone tests""" # Some built-in base packages (e.g., Autotools) define callback (e.g., @@ -407,12 +407,15 @@ def print_variants_by_name(pkg): sys.stdout.write("\n") -def print_variants(pkg): +def print_variants(pkg, args): """output variants""" - print_variants_grouped_by_when(pkg) + if args.variants_by_name: + print_variants_by_name(pkg) + else: + print_variants_grouped_by_when(pkg) -def print_versions(pkg): +def print_versions(pkg, args): """output versions""" color.cprint("") @@ -465,7 +468,7 @@ def get_url(version): color.cprint(line) -def print_virtuals(pkg): +def print_virtuals(pkg, args): """output virtual packages""" color.cprint("") @@ -488,7 +491,7 @@ def print_virtuals(pkg): color.cprint(" None") -def print_licenses(pkg): +def print_licenses(pkg, args): """Output the licenses of the project.""" color.cprint("") @@ -523,17 +526,13 @@ def info(parser, args): if getattr(pkg, "homepage"): color.cprint(section_title("Homepage: ") + pkg.homepage) - _print_variants = ( - print_variants_by_name if args.variants_by_name else print_variants_grouped_by_when - ) - # Now output optional information in expected order sections = [ (args.all or args.maintainers, print_maintainers), (args.all or args.detectable, print_detectable), (args.all or args.tags, print_tags), (args.all or not args.no_versions, print_versions), - (args.all or not args.no_variants, _print_variants), + (args.all or not args.no_variants, print_variants), (args.all or args.phases, print_phases), (args.all or not args.no_dependencies, print_dependencies), (args.all or args.virtuals, print_virtuals), @@ -542,6 +541,6 @@ def info(parser, args): ] for print_it, func in sections: if print_it: - func(pkg) + func(pkg, args) color.cprint("") diff --git a/lib/spack/spack/test/cmd/info.py b/lib/spack/spack/test/cmd/info.py index 5748323d8cba98..9493e1d17fef8b 100644 --- a/lib/spack/spack/test/cmd/info.py +++ b/lib/spack/spack/test/cmd/info.py @@ -33,10 +33,11 @@ def _print(*args, **kwargs): @pytest.mark.parametrize( - "pkg", ["openmpi", "trilinos", "boost", "python", "dealii", "xsdk"] # a BundlePackage + "pkg", ["openmpi", "trilinos", "boost", "python", "dealii", "xsdk", "gasnet", "warpx"] ) -def test_it_just_runs(pkg): - info(pkg) +@pytest.mark.parametrize("extra_args", [[], ["--variants-by-name"]]) +def test_it_just_runs(pkg, extra_args): + info(pkg, *extra_args) def test_info_noversion(mock_packages, print_buffer): @@ -78,7 +79,8 @@ def test_is_externally_detectable(pkg_query, expected, parser, print_buffer): "gcc", # This should ensure --test's c_names processing loop covered ], ) -def test_info_fields(pkg_query, parser, print_buffer): +@pytest.mark.parametrize("extra_args", [[], ["--variants-by-name"]]) +def test_info_fields(pkg_query, extra_args, parser, print_buffer): expected_fields = ( "Description:", "Homepage:", @@ -91,7 +93,7 @@ def test_info_fields(pkg_query, parser, print_buffer): "Licenses:", ) - args = parser.parse_args(["--all", pkg_query]) + args = parser.parse_args(["--all", pkg_query] + extra_args) spack.cmd.info.info(parser, args) for text in expected_fields: From 388f141a92fe5c9562f04fb64cfd162ce551661b Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Mon, 13 Nov 2023 23:25:12 +0100 Subject: [PATCH 612/806] Release Brahma v0.0.2 (#40994) --- var/spack/repos/builtin/packages/brahma/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/brahma/package.py b/var/spack/repos/builtin/packages/brahma/package.py index 3932de204f7c92..00f20c1e1c2c5f 100644 --- a/var/spack/repos/builtin/packages/brahma/package.py +++ b/var/spack/repos/builtin/packages/brahma/package.py @@ -15,11 +15,14 @@ class Brahma(CMakePackage): version("develop", branch="dev") version("master", branch="master") + version("0.0.2", tag="v0.0.2", commit="bac58d5aa8962a5c902d401fbf8021aff9104d3c") version("0.0.1", tag="v0.0.1", commit="15156036f14e36511dfc3f3751dc953540526a2b") variant("mpi", default=False, description="Enable MPI support") - depends_on("cpp-logger@0.0.1") - depends_on("gotcha@develop") + depends_on("cpp-logger@0.0.1", when="@:0.0.1") + depends_on("cpp-logger@0.0.2", when="@0.0.2:") + depends_on("gotcha@1.0.4", when="@:0.0.1") + depends_on("gotcha@1.0.5", when="@0.0.2:") depends_on("catch2@3.0.1") depends_on("mpi", when="+mpi") From 8bcc3e28200c6c674b20c680de87bb42fd625214 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Mon, 13 Nov 2023 17:26:33 -0500 Subject: [PATCH 613/806] CMake Package: support building `~ownlibs` on Windows (#38758) --- .../repos/builtin/packages/cmake/package.py | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 44f6b596aa1dd5..15eccd6d3e2646 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -20,7 +20,7 @@ class Cmake(Package): url = "https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0.tar.gz" git = "https://gitlab.kitware.com/cmake/cmake.git" - maintainers("alalazo") + maintainers("alalazo", "johnwparent") tags = ["build-tools", "windows"] @@ -234,13 +234,15 @@ class Cmake(Package): with when("~ownlibs"): depends_on("expat") # expat/zlib are used in CMake/CTest, so why not require them in libarchive. - depends_on("libarchive@3.1.0: xar=expat compression=zlib") - depends_on("libarchive@3.3.3:", when="@3.15.0:") - depends_on("libuv@1.0.0:1.10", when="@3.7.0:3.10.3") - depends_on("libuv@1.10.0:1.10", when="@3.11.0:3.11") - depends_on("libuv@1.10.0:", when="@3.12.0:") - depends_on("rhash", when="@3.8.0:") - depends_on("jsoncpp build_system=meson", when="@3.2:") + for plat in ["darwin", "cray", "linux"]: + with when("platform=%s" % plat): + depends_on("libarchive@3.1.0: xar=expat compression=zlib") + depends_on("libarchive@3.3.3:", when="@3.15.0:") + depends_on("libuv@1.0.0:1.10", when="@3.7.0:3.10.3") + depends_on("libuv@1.10.0:1.10", when="@3.11.0:3.11") + depends_on("libuv@1.10.0:", when="@3.12.0:") + depends_on("rhash", when="@3.8.0:") + depends_on("jsoncpp build_system=meson", when="@3.2:") depends_on("ncurses", when="+ncurses") @@ -248,9 +250,6 @@ class Cmake(Package): depends_on("python@2.7.11:", type="build") depends_on("py-sphinx", type="build") - # TODO: update curl package to build with Windows SSL implementation - # at which point we can build with +ownlibs on Windows - conflicts("~ownlibs", when="platform=windows") # Cannot build with Intel, should be fixed in 3.6.2 # https://gitlab.kitware.com/cmake/cmake/issues/16226 patch("intel-c-gnu11.patch", when="@3.6.0:3.6.1") From ab60bfe36aa16128182d3fc240f9466740568d9c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Nov 2023 17:41:05 -0600 Subject: [PATCH 614/806] py-numpy: add v1.26.2 (#41046) --- var/spack/repos/builtin/packages/py-numpy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 8ee118d98e917e..05f5ceec494098 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -20,6 +20,7 @@ class PyNumpy(PythonPackage): maintainers("adamjstewart", "rgommers") version("main", branch="main") + version("1.26.2", sha256="f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea") version("1.26.1", sha256="c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe") version("1.26.0", sha256="f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf") version("1.25.2", sha256="fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760") From 769474fcb0875759a5e6fa37b2b624b6c368a278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Tue, 14 Nov 2023 09:25:08 +0100 Subject: [PATCH 615/806] DLA-future: add v0.3.0 (#41042) --- var/spack/repos/builtin/packages/dla-future/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index 894bc97de40e0d..29e60f73398084 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -16,6 +16,7 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") + version("0.3.0", sha256="9887ac0b466ca03d704a8738bc89e68550ed33509578c576390e98e76b64911b") version("0.2.1", sha256="4c2669d58f041304bd618a9d69d9879a42e6366612c2fc932df3894d0326b7fe") version("0.2.0", sha256="da73cbd1b88287c86d84b1045a05406b742be924e65c52588bbff200abd81a10") version("0.1.0", sha256="f7ffcde22edabb3dc24a624e2888f98829ee526da384cd752b2b271c731ca9b1") @@ -44,12 +45,12 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.22:", type="build") depends_on("doxygen", type="build", when="+doc") depends_on("mpi") - depends_on("blaspp@2022.05.00:") - depends_on("lapackpp@2022.05.00:") depends_on("blas") depends_on("lapack") depends_on("scalapack", when="+scalapack") + depends_on("blaspp@2022.05.00:") + depends_on("lapackpp@2022.05.00:") depends_on("umpire~examples") depends_on("umpire~cuda", when="~cuda") @@ -60,8 +61,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): depends_on("pika@0.15.1:", when="@0.1") depends_on("pika@0.16:", when="@0.2.0") - depends_on("pika@0.17:", when="@0.2.1:") - depends_on("pika-algorithms@0.1:") + depends_on("pika@0.17:", when="@0.2.1") + depends_on("pika@0.18:", when="@0.3.0:") + depends_on("pika-algorithms@0.1:", when="@:0.2") depends_on("pika +mpi") depends_on("pika +cuda", when="+cuda") depends_on("pika +rocm", when="+rocm") From c264cf12a21c44358739fbe1fa674d2cb497ab5d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 14 Nov 2023 02:25:56 -0600 Subject: [PATCH 616/806] dd4hep: avoid IndexError in setup_run_environment (#41051) Some environments may have `dd4hep` as a concretized package without having it installed (yet). For those environments, `dd4hep` has property `libs` that is an empty list. Nevertheless, it can be added to a run environment (for example in case `dd4hep` is part of an environment). This results in an IndexError: ``` ==> Warning: couldn't load runtime environment due to IndexError: list index out of range ``` To avoid the IndexError, only prepend the `dd4hep` libs if there are actually libs found. --- var/spack/repos/builtin/packages/dd4hep/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index 77c3934bdff7fd..a9ca9fe12dcc09 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -254,7 +254,8 @@ def setup_run_environment(self, env): env.set("DD4HEP", self.prefix.examples) env.set("DD4hep_DIR", self.prefix) env.set("DD4hep_ROOT", self.prefix) - env.prepend_path("LD_LIBRARY_PATH", self.libs.directories[0]) + if len(self.libs.directories) > 0: + env.prepend_path("LD_LIBRARY_PATH", self.libs.directories[0]) def url_for_version(self, version): # dd4hep releases are dashes and padded with a leading zero From a80b4fd20ddd9c6361cf0982beea68ca7a1a5994 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:33:41 +0100 Subject: [PATCH 617/806] build(deps): bump urllib3 from 2.0.7 to 2.1.0 in /lib/spack/docs (#41055) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.7 to 2.1.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.0.7...2.1.0) --- updated-dependencies: - dependency-name: urllib3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index df199912d77104..f4333b9aaef672 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -5,7 +5,7 @@ sphinx-rtd-theme==1.3.0 python-levenshtein==0.23.0 docutils==0.18.1 pygments==2.16.1 -urllib3==2.0.7 +urllib3==2.1.0 pytest==7.4.3 isort==5.12.0 black==23.11.0 From 0dc73884c7335afdd39385c292fb5ba07abdce89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Tue, 14 Nov 2023 09:38:08 +0100 Subject: [PATCH 618/806] ispc: add v1.21 and v1.21.1 (#41053) --- .../repos/builtin/packages/ispc/package.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/ispc/package.py b/var/spack/repos/builtin/packages/ispc/package.py index 8bef2ce2f584c1..0a2d60a9108b11 100644 --- a/var/spack/repos/builtin/packages/ispc/package.py +++ b/var/spack/repos/builtin/packages/ispc/package.py @@ -25,6 +25,8 @@ class Ispc(CMakePackage): executables = ["^ispc$"] version("main", branch="main") + version("1.21.1", sha256="99bbb1d1f15bc4433d6a63b5bb35b321af3e3af753c3b28a61850d1748e8a89f") + version("1.21.0", sha256="023782f721bfb5893bac24bc2153a8214c916be82c290bf63a3ec6678949b5ef") version("1.20.0", sha256="8bd30ded7f96859451ead1cecf6f58ac8e937288fe0e5b98c56f6eba4be370b4") version("1.19.0", sha256="c1aeae4bdfb28004a6949394ea1b3daa3fdf12f646e17fcc0614861077dc8b6a") version("1.18.1", sha256="fee76d42fc0129f81489b7c2b9143e22a44c281940693c1c13cf1e3dd2ab207f") @@ -45,15 +47,17 @@ class Ispc(CMakePackage): depends_on("tbb", type="link", when="platform=linux @1.20:") depends_on("llvm+clang") depends_on("llvm libcxx=none", when="platform=darwin") - depends_on("llvm@13:15", when="@1.19:") - depends_on("llvm@11.0:14.0", when="@1.18") - depends_on("llvm@11:14", when="@1.17") - depends_on("llvm@:12", when="@:1.16") - depends_on("llvm@11:", when="@1.16") - depends_on("llvm@10:11", when="@1.15.0:1.15") - depends_on("llvm@10.0:10", when="@1.13:1.14") depends_on("llvm targets=arm,aarch64", when="target=arm:") depends_on("llvm targets=arm,aarch64", when="target=aarch64:") + depends_on("llvm@:17", when="@:1.21") + depends_on("llvm@:15", when="@:1.20") + depends_on("llvm@:14", when="@:1.18") + depends_on("llvm@:12", when="@:1.16") + depends_on("llvm@:11", when="@:1.15") + depends_on("llvm@:10", when="@:1.14") + depends_on("llvm@13:", when="@1.19:") + depends_on("llvm@11:", when="@1.16:") + depends_on("llvm@10:", when="@1.13:") patch( "don-t-assume-that-ncurses-zlib-are-system-libraries.patch", From a6179f26b96e66020243196fbfa7828ac6b65c4b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 14 Nov 2023 03:01:31 -0600 Subject: [PATCH 619/806] GDAL: add v3.8.0 (#41047) --- .../repos/builtin/packages/gdal/package.py | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 6528d366d747cc..39b9afcb08596d 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -30,6 +30,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): maintainers("adamjstewart") + version("3.8.0", sha256="ec0f78d9dc32352aeac6edc9c3b27a991b91f9dc6f92c452207d84431c58757d") version("3.7.3", sha256="e0a6f0c453ea7eb7c09967f50ac49426808fcd8f259dbc9888140eb69d7ffee6") version("3.7.2", sha256="40c0068591d2c711c699bbb734319398485ab169116ac28005d8302f80b923ad") version("3.7.1", sha256="9297948f0a8ba9e6369cd50e87c7e2442eda95336b94d2b92ef1829d260b9a06") @@ -90,6 +91,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): version("2.0.0", sha256="91704fafeea2349c5e268dc1e2d03921b3aae64b05ee01d59fdfc1a6b0ffc061") # Optional dependencies + variant("archive", default=False, when="@3.7:", description="Optional for vsi7z VFS driver") variant( "armadillo", default=False, @@ -137,9 +139,11 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): variant("kdu", default=False, description="Required for JP2KAK and JPIPKAK drivers") variant("kea", default=False, description="Required for KEA driver") variant("lerc", default=False, when="@2.4:", description="Required for LERC compression") + variant("libaec", default=False, when="@3.8:", description="Optional for GRIB driver") variant("libcsf", default=False, description="Required for PCRaster driver") variant("libkml", default=False, description="Required for LIBKML driver") variant("liblzma", default=False, description="Required for Zarr driver") + variant("libqb3", default=False, when="@3.6:", description="Required for MRF driver") variant( "libxml2", default=False, description="Required for XML validation in many OGR drivers" ) @@ -190,7 +194,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): ) variant("pcidsk", default=False, description="Required for PCIDSK driver") variant( - "pcre", default=False, description="Required for REGEXP operator in drivers using SQLite3" + "pcre2", default=False, description="Required for REGEXP operator in drivers using SQLite3" ) variant("pdfium", default=False, when="@2.1:", description="Possible backend for PDF driver") variant("png", default=True, description="Required for PNG driver") @@ -201,7 +205,6 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): default=False, description="Required for PostgreSQL and PostGISRaster drivers", ) - variant("qb3", default=False, when="@3.6:", description="Required for MRF driver") variant( "qhull", default=False, @@ -262,6 +265,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): depends_on("json-c@0.12.1", when="@:2.2") # Optional dependencies + depends_on("libarchive", when="+archive") depends_on("armadillo", when="+armadillo") depends_on("blas", when="+armadillo") depends_on("lapack", when="+armadillo") @@ -303,6 +307,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): # depends_on('kakadu', when='+kdu') depends_on("kealib", when="+kea") depends_on("lerc", when="+lerc") + depends_on("libaec", when="+libaec") # depends_on('libcsf', when='+libcsf') depends_on("libkml@1.3:", when="+libkml") depends_on("xz", when="+liblzma") @@ -330,8 +335,8 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): depends_on("oracle-instant-client", when="+oracle") depends_on("parquet-cpp", when="+parquet") # depends_on('pcidsk', when='+pcidsk') - depends_on("pcre2", when="@3.5:+pcre") - depends_on("pcre", when="@:3.4+pcre") + depends_on("pcre2", when="@3.5:+pcre2") + depends_on("pcre", when="@:3.4+pcre2") # depends_on('pdfium', when='+pdfium') depends_on("libpng", when="+png") # depends_on('podofo', when='+podofo') @@ -341,7 +346,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension): depends_on("poppler@:0.71", when="@:2.4 +poppler") depends_on("poppler@:21", when="@:3.4.1 +poppler") depends_on("postgresql", when="+postgresql") - depends_on("qb3", when="+qb3") + depends_on("qb3", when="+libqb3") depends_on("qhull", when="+qhull") depends_on("qhull@2015:", when="@3.5:+qhull") depends_on("qhull@:2020.1", when="@:3.3+qhull") @@ -490,6 +495,7 @@ def cmake_args(self): # be necessary. self.define("ENABLE_DEFLATE64", "zlib-ng" not in self.spec), # Optional dependencies + self.define_from_variant("GDAL_USE_ARCHIVE", "archive"), self.define_from_variant("GDAL_USE_ARMADILLO", "armadillo"), self.define_from_variant("GDAL_USE_ARROW", "arrow"), self.define_from_variant("GDAL_USE_BASISU", "basisu"), @@ -519,9 +525,11 @@ def cmake_args(self): self.define_from_variant("GDAL_USE_KDU", "kdu"), self.define_from_variant("GDAL_USE_KEA", "kea"), self.define_from_variant("GDAL_USE_LERC", "lerc"), + self.define_from_variant("GDAL_USE_LIBAEC", "libaec"), self.define_from_variant("GDAL_USE_LIBCSF", "libcsf"), self.define_from_variant("GDAL_USE_LIBKML", "libkml"), self.define_from_variant("GDAL_USE_LIBLZMA", "liblzma"), + self.define_from_variant("GDAL_USE_LIBQB3", "libqb3"), self.define_from_variant("GDAL_USE_LIBXML2", "libxml2"), self.define_from_variant("GDAL_USE_LURATECH", "luratech"), self.define_from_variant("GDAL_USE_LZ4", "lz4"), @@ -541,13 +549,12 @@ def cmake_args(self): self.define_from_variant("GDAL_USE_OPENSSL", "openssl"), self.define_from_variant("GDAL_USE_ORACLE", "oracle"), self.define_from_variant("GDAL_USE_PARQUET", "parquet"), - self.define_from_variant("GDAL_USE_PCRE2", "pcre"), + self.define_from_variant("GDAL_USE_PCRE2", "pcre2"), self.define_from_variant("GDAL_USE_PDFIUM", "pdfium"), self.define_from_variant("GDAL_USE_PNG", "png"), self.define_from_variant("GDAL_USE_PODOFO", "podofo"), self.define_from_variant("GDAL_USE_POPPLER", "poppler"), self.define_from_variant("GDAL_USE_POSTGRESQL", "postgresql"), - self.define_from_variant("GDAL_USE_LIBQB3", "qb3"), self.define_from_variant("GDAL_USE_QHULL", "qhull"), self.define_from_variant("GDAL_USE_RASDAMAN", "rasdaman"), self.define_from_variant("GDAL_USE_RASTERLITE2", "rasterlite2"), @@ -669,7 +676,7 @@ def configure_args(self): self.with_or_without("crypto", variant="openssl", package="openssl"), self.with_or_without("oci", variant="oracle", package="oracle-instant-client"), self.with_or_without("pcidsk", package="pcidsk"), - self.with_or_without("pcre"), + self.with_or_without("pcre", variant="pcre2"), self.with_or_without("pdfium", package="pdfium"), self.with_or_without("png", package="libpng"), self.with_or_without("podofo", package="podofo"), From 8a8dcb9479add8fefaa6ecf3beb74cfe9b73d193 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 14 Nov 2023 11:29:28 +0100 Subject: [PATCH 620/806] modules: unit-tests without polluted user scope (#41041) --- lib/spack/spack/modules/common.py | 34 +++++++-------- lib/spack/spack/test/cmd/env.py | 4 +- lib/spack/spack/test/conftest.py | 12 ++++++ lib/spack/spack/test/data/config/modules.yaml | 7 +-- lib/spack/spack/test/modules/common.py | 6 ++- lib/spack/spack/test/modules/conftest.py | 43 ++++++------------- lib/spack/spack/test/modules/lmod.py | 5 ++- lib/spack/spack/test/modules/tcl.py | 9 ++-- 8 files changed, 62 insertions(+), 58 deletions(-) diff --git a/lib/spack/spack/modules/common.py b/lib/spack/spack/modules/common.py index d1afdd22fd5fe3..bccc6805cb8c6e 100644 --- a/lib/spack/spack/modules/common.py +++ b/lib/spack/spack/modules/common.py @@ -62,7 +62,7 @@ #: config section for this file def configuration(module_set_name): - config_path = "modules:%s" % module_set_name + config_path = f"modules:{module_set_name}" return spack.config.get(config_path, {}) @@ -96,10 +96,10 @@ def _check_tokens_are_valid(format_string, message): named_tokens = re.findall(r"{(\w*)}", format_string) invalid_tokens = [x for x in named_tokens if x.lower() not in _valid_tokens] if invalid_tokens: - msg = message - msg += " [{0}]. ".format(", ".join(invalid_tokens)) - msg += 'Did you check your "modules.yaml" configuration?' - raise RuntimeError(msg) + raise RuntimeError( + f"{message} [{', '.join(invalid_tokens)}]. " + f"Did you check your 'modules.yaml' configuration?" + ) def update_dictionary_extending_lists(target, update): @@ -219,7 +219,7 @@ def root_path(name, module_set_name): """ defaults = {"lmod": "$spack/share/spack/lmod", "tcl": "$spack/share/spack/modules"} # Root folders where the various module files should be written - roots = spack.config.get("modules:%s:roots" % module_set_name, {}) + roots = spack.config.get(f"modules:{module_set_name}:roots", {}) # Merge config values into the defaults so we prefer configured values roots = spack.config.merge_yaml(defaults, roots) @@ -262,7 +262,7 @@ def read_module_index(root): index_path = os.path.join(root, "module-index.yaml") if not os.path.exists(index_path): return {} - with open(index_path, "r") as index_file: + with open(index_path) as index_file: return _read_module_index(index_file) @@ -310,21 +310,21 @@ def upstream_module(self, spec, module_type): if db_for_spec in self.upstream_dbs: db_index = self.upstream_dbs.index(db_for_spec) elif db_for_spec: - raise spack.error.SpackError("Unexpected: {0} is installed locally".format(spec)) + raise spack.error.SpackError(f"Unexpected: {spec} is installed locally") else: - raise spack.error.SpackError("Unexpected: no install DB found for {0}".format(spec)) + raise spack.error.SpackError(f"Unexpected: no install DB found for {spec}") module_index = self.module_indices[db_index] module_type_index = module_index.get(module_type, {}) if not module_type_index: tty.debug( - "No {0} modules associated with the Spack instance where" - " {1} is installed".format(module_type, spec) + f"No {module_type} modules associated with the Spack instance " + f"where {spec} is installed" ) return None if spec.dag_hash() in module_type_index: return module_type_index[spec.dag_hash()] else: - tty.debug("No module is available for upstream package {0}".format(spec)) + tty.debug(f"No module is available for upstream package {spec}") return None @@ -603,7 +603,7 @@ def filename(self): # Just the name of the file filename = self.use_name if self.extension: - filename = "{0}.{1}".format(self.use_name, self.extension) + filename = f"{self.use_name}.{self.extension}" # Architecture sub-folder arch_folder_conf = spack.config.get("modules:%s:arch_folder" % self.conf.name, True) if arch_folder_conf: @@ -671,7 +671,7 @@ def configure_options(self): return msg if os.path.exists(pkg.install_configure_args_path): - with open(pkg.install_configure_args_path, "r") as args_file: + with open(pkg.install_configure_args_path) as args_file: return spack.util.path.padding_filter(args_file.read()) # Returning a false-like value makes the default templates skip @@ -886,7 +886,7 @@ def _get_template(self): # 2. template specified in a package directly # 3. default template (must be defined, check in __init__) module_system_name = str(self.module.__name__).split(".")[-1] - package_attribute = "{0}_template".format(module_system_name) + package_attribute = f"{module_system_name}_template" choices = [ self.conf.template, getattr(self.spec.package, package_attribute, None), @@ -952,7 +952,7 @@ def write(self, overwrite=False): # Attribute from package module_name = str(self.module.__name__).split(".")[-1] - attr_name = "{0}_context".format(module_name) + attr_name = f"{module_name}_context" pkg_update = getattr(self.spec.package, attr_name, {}) context.update(pkg_update) @@ -1002,7 +1002,7 @@ def update_module_hiddenness(self, remove=False): if modulerc_exists: # retrieve modulerc content - with open(modulerc_path, "r") as f: + with open(modulerc_path) as f: content = f.readlines() content = "".join(content).split("\n") # remove last empty item if any diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index c3a7551e944ddf..3fd40867eb7133 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -53,6 +53,7 @@ stage = SpackCommand("stage") uninstall = SpackCommand("uninstall") find = SpackCommand("find") +module = SpackCommand("module") sep = os.sep @@ -1105,13 +1106,14 @@ def test_multi_env_remove(mutable_mock_env_path, monkeypatch, answer): assert all(e in env("list") for e in environments) -def test_env_loads(install_mockery, mock_fetch): +def test_env_loads(install_mockery, mock_fetch, mock_modules_root): env("create", "test") with ev.read("test"): add("mpileaks") concretize() install("--fake") + module("tcl", "refresh", "-y") with ev.read("test"): env("loads") diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 514b1e91542403..fb7608a56bd377 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -6,6 +6,7 @@ import collections import datetime import errno +import functools import inspect import itertools import json @@ -1967,3 +1968,14 @@ def __exit__(self, *args): pass monkeypatch.setattr(spack.cmd.buildcache, "_make_pool", MockPool) + + +def _root_path(x, y, *, path): + return path + + +@pytest.fixture +def mock_modules_root(tmp_path, monkeypatch): + """Sets the modules root to a temporary directory, to avoid polluting configuration scopes.""" + fn = functools.partial(_root_path, path=str(tmp_path)) + monkeypatch.setattr(spack.modules.common, "root_path", fn) diff --git a/lib/spack/spack/test/data/config/modules.yaml b/lib/spack/spack/test/data/config/modules.yaml index 28e2ec91b3d962..f217dd7eaf3379 100644 --- a/lib/spack/spack/test/data/config/modules.yaml +++ b/lib/spack/spack/test/data/config/modules.yaml @@ -14,12 +14,7 @@ # ~/.spack/modules.yaml # ------------------------------------------------------------------------- modules: - default: - enable: - - tcl - roots: - tcl: $user_cache_path/tcl - lmod: $user_cache_path/lmod + default: {} prefix_inspections: bin: - PATH diff --git a/lib/spack/spack/test/modules/common.py b/lib/spack/spack/test/modules/common.py index 11b4305b4844df..906c1d5c2a134c 100644 --- a/lib/spack/spack/test/modules/common.py +++ b/lib/spack/spack/test/modules/common.py @@ -17,7 +17,10 @@ from spack.modules.common import UpstreamModuleIndex from spack.spec import Spec -pytestmark = pytest.mark.not_on_windows("does not run on windows") +pytestmark = [ + pytest.mark.not_on_windows("does not run on windows"), + pytest.mark.usefixtures("mock_modules_root"), +] def test_update_dictionary_extending_list(): @@ -174,6 +177,7 @@ def test_load_installed_package_not_in_repo(install_mockery, mock_fetch, monkeyp """Test that installed packages that have been removed are still loadable""" spec = Spec("trivial-install-test-package").concretized() spec.package.do_install() + spack.modules.module_types["tcl"](spec, "default", True).write() def find_nothing(*args): raise spack.repo.UnknownPackageError("Repo package access is disabled for test") diff --git a/lib/spack/spack/test/modules/conftest.py b/lib/spack/spack/test/modules/conftest.py index 210a88a65f8ad3..12ee5c1fcd9443 100644 --- a/lib/spack/spack/test/modules/conftest.py +++ b/lib/spack/spack/test/modules/conftest.py @@ -2,6 +2,8 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import pathlib + import pytest import spack.config @@ -13,26 +15,15 @@ @pytest.fixture() def modulefile_content(request): - """Returns a function that generates the content of a module file - as a list of lines. - """ - + """Returns a function that generates the content of a module file as a list of lines.""" writer_cls = getattr(request.module, "writer_cls") def _impl(spec_str, module_set_name="default", explicit=True): - # Write the module file - spec = spack.spec.Spec(spec_str) - spec.concretize() + spec = spack.spec.Spec(spec_str).concretized() generator = writer_cls(spec, module_set_name, explicit) generator.write(overwrite=True) - - # Get its filename - filename = generator.layout.filename - - # Retrieve the content - with open(filename) as f: - content = f.readlines() - content = "".join(content).split("\n") + written_module = pathlib.Path(generator.layout.filename) + content = written_module.read_text().splitlines() generator.remove() return content @@ -40,27 +31,21 @@ def _impl(spec_str, module_set_name="default", explicit=True): @pytest.fixture() -def factory(request): - """Function that, given a spec string, returns an instance of the writer - and the corresponding spec. - """ - - # Class of the module file writer +def factory(request, mock_modules_root): + """Given a spec string, returns an instance of the writer and the corresponding spec.""" writer_cls = getattr(request.module, "writer_cls") def _mock(spec_string, module_set_name="default", explicit=True): - spec = spack.spec.Spec(spec_string) - spec.concretize() + spec = spack.spec.Spec(spec_string).concretized() return writer_cls(spec, module_set_name, explicit), spec return _mock @pytest.fixture() -def mock_module_filename(monkeypatch, tmpdir): - filename = str(tmpdir.join("module")) +def mock_module_filename(monkeypatch, tmp_path): + filename = tmp_path / "module" # Set for both module types so we can test both - monkeypatch.setattr(spack.modules.lmod.LmodFileLayout, "filename", filename) - monkeypatch.setattr(spack.modules.tcl.TclFileLayout, "filename", filename) - - yield filename + monkeypatch.setattr(spack.modules.lmod.LmodFileLayout, "filename", str(filename)) + monkeypatch.setattr(spack.modules.tcl.TclFileLayout, "filename", str(filename)) + yield str(filename) diff --git a/lib/spack/spack/test/modules/lmod.py b/lib/spack/spack/test/modules/lmod.py index acaae90f696c8e..35c3f3cd97a5db 100644 --- a/lib/spack/spack/test/modules/lmod.py +++ b/lib/spack/spack/test/modules/lmod.py @@ -21,7 +21,10 @@ #: Class of the writer tested in this module writer_cls = spack.modules.lmod.LmodModulefileWriter -pytestmark = pytest.mark.not_on_windows("does not run on windows") +pytestmark = [ + pytest.mark.not_on_windows("does not run on windows"), + pytest.mark.usefixtures("mock_modules_root"), +] @pytest.fixture(params=["clang@=12.0.0", "gcc@=10.2.1"]) diff --git a/lib/spack/spack/test/modules/tcl.py b/lib/spack/spack/test/modules/tcl.py index f43f3d041e7df3..e2f1235db0083b 100644 --- a/lib/spack/spack/test/modules/tcl.py +++ b/lib/spack/spack/test/modules/tcl.py @@ -18,7 +18,10 @@ #: Class of the writer tested in this module writer_cls = spack.modules.tcl.TclModulefileWriter -pytestmark = pytest.mark.not_on_windows("does not run on windows") +pytestmark = [ + pytest.mark.not_on_windows("does not run on windows"), + pytest.mark.usefixtures("mock_modules_root"), +] @pytest.mark.usefixtures("config", "mock_packages", "mock_module_filename") @@ -279,7 +282,7 @@ def test_projections_all(self, factory, module_configuration): projection = writer.spec.format(writer.conf.projections["all"]) assert projection in writer.layout.use_name - def test_invalid_naming_scheme(self, factory, module_configuration, mock_module_filename): + def test_invalid_naming_scheme(self, factory, module_configuration): """Tests the evaluation of an invalid naming scheme.""" module_configuration("invalid_naming_scheme") @@ -290,7 +293,7 @@ def test_invalid_naming_scheme(self, factory, module_configuration, mock_module_ with pytest.raises(RuntimeError): writer.layout.use_name - def test_invalid_token_in_env_name(self, factory, module_configuration, mock_module_filename): + def test_invalid_token_in_env_name(self, factory, module_configuration): """Tests setting environment variables with an invalid name.""" module_configuration("invalid_token_in_env_var_name") From 6fc8679fb48f2cdbbc36bf8326867451796d2baa Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Tue, 14 Nov 2023 12:55:09 +0100 Subject: [PATCH 621/806] fairmq: add v1.8.1 (#41007) --- .../repos/builtin/packages/fairmq/package.py | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/var/spack/repos/builtin/packages/fairmq/package.py b/var/spack/repos/builtin/packages/fairmq/package.py index 2af3ce52c1a8b6..4639e25e791ecf 100644 --- a/var/spack/repos/builtin/packages/fairmq/package.py +++ b/var/spack/repos/builtin/packages/fairmq/package.py @@ -14,31 +14,15 @@ class Fairmq(CMakePackage): maintainers("dennisklein", "ChristianTackeGSI") version("dev", branch="dev", submodules=True, get_full_repo=True) - version( - "1.7.0", - tag="v1.7.0", - commit="d1c99f7e150c1177dc1cab1b2adc16475cade24e", - submodules=True, - no_cache=True, - ) - version( - "1.6.0", - tag="v1.6.0", - commit="42d27af20fb5cbbbc0b0fdfef1c981d51a8baf87", - submodules=True, - no_cache=True, - ) - version( - "1.5.0", - tag="v1.5.0", - commit="c8fde17b6a10a467035590fd800bb693f50c4826", - submodules=True, - no_cache=True, - ) - # no_cache=True is currently needed, because FairMQ's build system - # depends on the git metadata, see also - # https://github.com/spack/spack/issues/19972 - # https://github.com/spack/spack/issues/14344 + with default_args(submodules=True, no_cache=True): + # no_cache=True is currently needed, because FairMQ's build system + # depends on the git metadata, see also + # https://github.com/spack/spack/issues/19972 + # https://github.com/spack/spack/issues/14344 + version("1.8.1", tag="v1.8.1", commit="961eca52761a31a0200c567b44e2b2d6d6e50df3") + version("1.7.0", tag="v1.7.0", commit="d1c99f7e150c1177dc1cab1b2adc16475cade24e") + version("1.6.0", tag="v1.6.0", commit="42d27af20fb5cbbbc0b0fdfef1c981d51a8baf87") + version("1.5.0", tag="v1.5.0", commit="c8fde17b6a10a467035590fd800bb693f50c4826") variant( "autobind", default=True, when="@1.7:", description="Override the channel autoBind default" @@ -61,9 +45,10 @@ class Fairmq(CMakePackage): generator("make", "ninja", default="ninja") - depends_on("cmake@3.15:", type="build") - depends_on("faircmakemodules", type="build") - depends_on("git", type="build") + with default_args(type="build"): + depends_on("cmake@3.15:") + depends_on("faircmakemodules") + depends_on("git") depends_on("boost@1.66: +container+program_options+filesystem+date_time+regex") depends_on("fairlogger@1.6: +pretty") @@ -72,6 +57,7 @@ class Fairmq(CMakePackage): def cmake_args(self): args = [ self.define("DISABLE_COLOR", True), + self.define("BUILD_TESTING", self.run_tests), self.define_from_variant("BUILD_EXAMPLES", "examples"), self.define_from_variant("FAIRMQ_CHANNEL_DEFAULT_AUTOBIND", "autobind"), ] From 18ebef60aab93728e26d9aa5d18450f1d6c7bbd1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 14 Nov 2023 14:44:36 +0100 Subject: [PATCH 622/806] R: cleanup recipe and fix linking to lapack libraries (#41040) --- var/spack/repos/builtin/packages/r/package.py | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 7232a7e6c165dc..a12d089808e1e2 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os -import re from spack.package import * @@ -60,21 +59,20 @@ class R(AutotoolsPackage): version("3.1.3", sha256="07e98323935baa38079204bfb9414a029704bb9c0ca5ab317020ae521a377312") version("3.1.2", sha256="bcd150afcae0e02f6efb5f35a6ab72432be82e849ec52ce0bb89d8c342a8fa7a") - variant( - "external-lapack", default=False, description="Links to externally installed BLAS/LAPACK" - ) variant("X", default=False, description="Enable X11 support (TCLTK, PNG, JPEG, TIFF, CAIRO)") variant("memory_profiling", default=False, description="Enable memory profiling") variant("rmath", default=False, description="Build standalone Rmath library") - depends_on("blas", when="+external-lapack") - depends_on("lapack", when="+external-lapack") + depends_on("blas") + depends_on("lapack") + depends_on("bzip2") depends_on("curl+libidn2") # R didn't anticipate the celebratory non-breaking major version bump of curl 8. depends_on("curl@:7", when="@:4.2") depends_on("icu4c") depends_on("java") + depends_on("libtirpc") depends_on("ncurses") depends_on("pcre", when="@:3.6.3") depends_on("pcre2", when="@4:") @@ -84,16 +82,18 @@ class R(AutotoolsPackage): depends_on("zlib-api") depends_on("zlib@1.2.5:", when="^zlib") depends_on("texinfo", type="build") - depends_on("cairo+X+gobject+pdf", when="+X") - depends_on("pango+X", when="+X") - depends_on("harfbuzz+graphite2", when="+X") - depends_on("jpeg", when="+X") - depends_on("libpng", when="+X") - depends_on("libtiff", when="+X") - depends_on("libx11", when="+X") - depends_on("libxmu", when="+X") - depends_on("libxt", when="+X") - depends_on("tk", when="+X") + + with when("+X"): + depends_on("cairo+X+gobject+pdf") + depends_on("pango+X") + depends_on("harfbuzz+graphite2") + depends_on("jpeg") + depends_on("libpng") + depends_on("libtiff") + depends_on("libx11") + depends_on("libxmu") + depends_on("libxt") + depends_on("tk") patch("zlib.patch", when="@:3.3.2") @@ -126,32 +126,34 @@ def configure_args(self): spec = self.spec prefix = self.prefix + extra_rpath = join_path(prefix, "rlib", "R", "lib") + + blas_flags: str = spec["blas"].libs.ld_flags + lapack_flags: str = spec["lapack"].libs.ld_flags + + # R uses LAPACK in Fortran, which requires libmkl_gf_* when gfortran is used. + # TODO: cleaning this up seem to require both compilers as dependencies and use variants. + if spec["lapack"].name in INTEL_MATH_LIBRARIES and "gfortran" in self.compiler.fc: + xlp64 = "ilp64" if spec["lapack"].satisfies("+ilp64") else "lp64" + blas_flags = blas_flags.replace(f"mkl_intel_{xlp64}", f"mkl_gf_{xlp64}") + lapack_flags = lapack_flags.replace(f"mkl_intel_{xlp64}", f"mkl_gf_{xlp64}") + config_args = [ "--with-internal-tzcode", "--libdir={0}".format(join_path(prefix, "rlib")), "--enable-R-shlib", - "--enable-BLAS-shlib", "--enable-R-framework=no", "--without-recommended-packages", - "LDFLAGS=-L{0} -Wl,-rpath,{0}".format(join_path(prefix, "rlib", "R", "lib")), + f"LDFLAGS=-Wl,-rpath,{extra_rpath}", + f"--with-blas={blas_flags}", + f"--with-lapack={lapack_flags}", + # cannot disable docs with a normal configure option + "ac_cv_path_PDFLATEX=", + "ac_cv_path_PDFTEX=", + "ac_cv_path_TEX=", + "ac_cv_path_TEXI2DVI=", ] - if "+external-lapack" in spec: - if spec["lapack"].name in INTEL_MATH_LIBRARIES and "gfortran" in self.compiler.fc: - mkl_re = re.compile(r"(mkl_)intel(_i?lp64\b)") - config_args.extend( - [ - mkl_re.sub( - r"\g<1>gf\g<2>", "--with-blas={0}".format(spec["blas"].libs.ld_flags) - ), - "--with-lapack", - ] - ) - else: - config_args.extend( - ["--with-blas={0}".format(spec["blas"].libs.ld_flags), "--with-lapack"] - ) - if "+X" in spec: config_args.append("--with-cairo") config_args.append("--with-jpeglib") From 1255620a14afa3ad4aad681a847a3a1704141976 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 14 Nov 2023 14:44:58 +0100 Subject: [PATCH 623/806] Fix infinite recursion when computing concretization errors (#41061) --- lib/spack/spack/solver/asp.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 4514bd0e96bc0f..806bbac28f936c 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -713,7 +713,7 @@ def _get_cause_tree( (condition_id, set_id) in which the latter idea means that the condition represented by the former held in the condition set represented by the latter. """ - seen = set(seen) | set(cause) + seen.add(cause) parents = [c for e, c in condition_causes if e == cause and c not in seen] local = "required because %s " % conditions[cause[0]] @@ -812,7 +812,14 @@ def on_model(model): errors = sorted( [(int(priority), msg, args) for priority, msg, *args in error_args], reverse=True ) - msg = self.message(errors) + try: + msg = self.message(errors) + except Exception as e: + msg = ( + f"unexpected error during concretization [{str(e)}]. " + f"Please report a bug at https://github.com/spack/spack/issues" + ) + raise spack.error.SpackError(msg) raise UnsatisfiableSpecError(msg) From 2ac128a3adfc0916f3745fdbe18b798eddc29763 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 14 Nov 2023 16:37:29 +0100 Subject: [PATCH 624/806] Add papyrus to the list of broken tests (#40923) * Disable papyrus in the neoverse v1 pipeline See https://gitlab.spack.io/spack/spack/-/jobs/8983875 The job is hanging on tests for 6 hrs. * Add papyrus to broken tests instead of removing it --- share/spack/gitlab/cloud_pipelines/configs/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml index 29dc993a15578c..f1f77c20b0286b 100644 --- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml +++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml @@ -4,6 +4,7 @@ ci: broken-tests-packages: - gptune - superlu-dist # srun -n 4 hangs + - papyrus broken-specs-url: "https://dummy.io" # s3://spack-binaries/broken-specs" From 25eca56909b0e51ebc7a347214016af9bcb3430a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 14 Nov 2023 17:44:48 +0100 Subject: [PATCH 625/806] gmake: fix bootstrap (#41060) --- var/spack/repos/builtin/packages/bzip2/package.py | 4 ++++ var/spack/repos/builtin/packages/gmake/package.py | 2 ++ var/spack/repos/builtin/packages/openssl/package.py | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 58f598ac15286d..e3c618bb303835 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -44,6 +44,10 @@ class Bzip2(Package, SourcewarePackage): if sys.platform != "win32": depends_on("diffutils", type="build") + depends_on("gmake", type="build", when="platform=linux") + depends_on("gmake", type="build", when="platform=cray") + depends_on("gmake", type="build", when="platform=darwin") + @classmethod def determine_version(cls, exe): output = Executable(exe)("--help", output=str, error=str) diff --git a/var/spack/repos/builtin/packages/gmake/package.py b/var/spack/repos/builtin/packages/gmake/package.py index 0cfbccb80e6739..29469758c5a2a7 100644 --- a/var/spack/repos/builtin/packages/gmake/package.py +++ b/var/spack/repos/builtin/packages/gmake/package.py @@ -67,6 +67,8 @@ def configure_args(self): return [ "--with-guile" if self.spec.satisfies("+guile") else "--without-guile", "--disable-nls", + # configure needs make to enable dependency tracking, disable explicitly + "--disable-dependency-tracking", ] def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 358a008088883a..8e2cd947bb54ed 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -381,6 +381,10 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package depends_on("ca-certificates-mozilla", type="build", when="certs=mozilla") depends_on("nasm", when="platform=windows") + depends_on("gmake", type="build", when="platform=linux") + depends_on("gmake", type="build", when="platform=cray") + depends_on("gmake", type="build", when="platform=darwin") + patch( "https://github.com/openssl/openssl/commit/f9e578e720bb35228948564192adbe3bc503d5fb.patch?full_index=1", sha256="3fdcf2d1e47c34f3a012f23306322c5a35cad55b180c9b6fb34537b55884645c", From ee1a2d94ad78b90314f7e7887a9fa1625b4d1bbe Mon Sep 17 00:00:00 2001 From: Thomas-Ulrich Date: Tue, 14 Nov 2023 17:58:17 +0100 Subject: [PATCH 626/806] bison: conflict %oneapi due to possible miscompilation (#40860) --- var/spack/repos/builtin/packages/bison/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index 1ad363f747a667..e42e823bbb64bd 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -65,6 +65,13 @@ class Bison(AutotoolsPackage, GNUMirrorPackage): patch("nvhpc-3.7.patch", when="@3.7.0:3.7 %nvhpc") conflicts("%intel@:14", when="@3.4.2:", msg="Intel 14 has immature C11 support") + conflicts( + "%oneapi", + msg=( + "bison is likely miscompiled by oneapi compilers, " + "see https://github.com/spack/spack/issues/37172" + ), + ) if sys.platform == "darwin" and macos_version() >= Version("10.13"): patch("secure_snprintf.patch", level=0, when="@3.0.4") From 43a94e981ac223d235ae1afbf55de8f0aead4c66 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Tue, 14 Nov 2023 11:00:19 -0600 Subject: [PATCH 627/806] xsdk: add version 1.0.0 (#40825) xsdk: add +sycl variant - with amrex, arborx, ginkgo, petsc, sundials xsdk: add +pflotran variant xsdk: enable hypre+rocm xsdk: enable superlu-dist for GPU - but use trilinos~superlu-dist [as that breaks builds] xsdk: dealii: disable oce as it can cause intel-tbb-2017.6 to be picked up for some builds (for ex: gcc=13) and result in subsequent build failures --- .../repos/builtin/packages/xsdk/package.py | 97 +++++++++++++++++-- 1 file changed, 89 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py index 3e02dbd8b36a61..2087df88a14c5e 100644 --- a/var/spack/repos/builtin/packages/xsdk/package.py +++ b/var/spack/repos/builtin/packages/xsdk/package.py @@ -85,9 +85,11 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): maintainers("balay", "luszczek", "balos1", "shuds13", "v-dobrev") version("develop") + version("1.0.0") version("0.8.0") version("0.7.0", deprecated=True) + variant("sycl", default=False, sticky=True, description="Enable sycl variant of xsdk packages") variant("trilinos", default=True, sticky=True, description="Enable trilinos package build") variant("datatransferkit", default=True, description="Enable datatransferkit package build") variant("omega-h", default=True, description="Enable omega-h package build") @@ -107,8 +109,14 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): variant("exago", default=True, description="Enable exago build") variant("hiop", default=True, description="Enable hiop build") variant("raja", default=(sys.platform != "darwin"), description="Enable raja for hiop, exago") + variant("pflotran", default=True, description="Enable pflotran package build") - xsdk_depends_on("hypre@develop+superlu-dist+shared", when="@develop", cuda_var="cuda") + xsdk_depends_on( + "hypre@develop+superlu-dist+shared", when="@develop", cuda_var="cuda", rocm_var="rocm" + ) + xsdk_depends_on( + "hypre@2.30.0+superlu-dist+shared", when="@1.0.0", cuda_var="cuda", rocm_var="rocm" + ) xsdk_depends_on("hypre@2.26.0+superlu-dist+shared", when="@0.8.0", cuda_var="cuda") xsdk_depends_on("hypre@2.23.0+superlu-dist+shared", when="@0.7.0", cuda_var="cuda") @@ -118,6 +126,12 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): cuda_var="cuda", rocm_var="rocm", ) + xsdk_depends_on( + "mfem@4.6.0+shared+mpi+superlu-dist+petsc+sundials+examples+miniapps", + when="@1.0.0", + cuda_var="cuda", + rocm_var="rocm", + ) xsdk_depends_on( "mfem@4.5.0+shared+mpi+superlu-dist+petsc+sundials+examples+miniapps", when="@0.8.0", @@ -131,16 +145,26 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): rocm_var="rocm", ) - xsdk_depends_on("superlu-dist@develop", when="@develop") + xsdk_depends_on("superlu-dist@develop", when="@develop", cuda_var="cuda", rocm_var="rocm") + xsdk_depends_on("superlu-dist@8.2.0", when="@1.0.0", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("superlu-dist@8.1.2", when="@0.8.0") xsdk_depends_on("superlu-dist@7.1.1", when="@0.7.0") + + xsdk_depends_on("trilinos +superlu-dist", when="@1.0.0: +trilinos ~cuda ~rocm") xsdk_depends_on( - "trilinos@develop+hypre+superlu-dist+hdf5~mumps+boost" + "trilinos@develop+hypre+hdf5~mumps+boost" + "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2" + "~exodus~dtk+intrepid2+shards+stratimikos gotype=int" + " cxxstd=14", when="@develop +trilinos", ) + xsdk_depends_on( + "trilinos@14.4.0+hypre+hdf5~mumps+boost" + + "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2" + + "~exodus~dtk+intrepid2+shards+stratimikos gotype=int" + + " cxxstd=17", + when="@1.0.0 +trilinos", + ) xsdk_depends_on( "trilinos@13.4.1+hypre+superlu-dist+hdf5~mumps+boost" + "~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2" @@ -157,17 +181,25 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): ) xsdk_depends_on("datatransferkit@master", when="@develop +trilinos +datatransferkit") + xsdk_depends_on("datatransferkit@3.1.1", when="@1.0.0 +trilinos +datatransferkit") dtk7ver = "3.1-rc2" if sys.platform == "darwin" else "3.1-rc3" xsdk_depends_on("datatransferkit@" + dtk7ver, when="@0.8.0 +trilinos +datatransferkit") xsdk_depends_on("datatransferkit@" + dtk7ver, when="@0.7.0 +trilinos +datatransferkit") xsdk_depends_on("petsc +batch", when="@0.7.0: ^cray-mpich") + xsdk_depends_on("petsc +sycl +kokkos", when="@1.0.0: +sycl") xsdk_depends_on( "petsc@main+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64", when="@develop", cuda_var="cuda", rocm_var="rocm", ) + xsdk_depends_on( + "petsc@3.20.1+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64", + when="@1.0.0", + cuda_var="cuda", + rocm_var="rocm", + ) xsdk_depends_on( "petsc@3.18.1+mpi+hypre+superlu-dist+metis+hdf5~mumps+double~int64", when="@0.8.0", @@ -184,9 +216,14 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on("dealii ~trilinos", when="~trilinos +dealii") xsdk_depends_on( "dealii@master~assimp~python~doc~gmsh+petsc+slepc+mpi~int64" - + "~netcdf+metis+sundials~ginkgo~symengine~nanoflann~simplex~arborx~cgal", + + "~netcdf+metis+sundials~ginkgo~symengine~nanoflann~simplex~arborx~cgal~oce", when="@develop +dealii", ) + xsdk_depends_on( + "dealii@9.5.1~assimp~python~doc~gmsh+petsc+slepc+mpi~int64" + + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal~oce", + when="@1.0.0 +dealii", + ) xsdk_depends_on( "dealii@9.4.0~assimp~python~doc~gmsh+petsc+slepc+mpi~int64" + "~netcdf+metis+sundials~ginkgo~symengine~simplex~arborx~cgal", @@ -198,22 +235,31 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): when="@0.7.0 +dealii", ) - xsdk_depends_on("pflotran@develop", when="@develop") - xsdk_depends_on("pflotran@4.0.1", when="@0.8.0") - xsdk_depends_on("pflotran@3.0.2", when="@0.7.0") + xsdk_depends_on("pflotran@develop", when="@develop +pflotran") + xsdk_depends_on("pflotran@5.0.0", when="@1.0.0 +pflotran") + xsdk_depends_on("pflotran@4.0.1", when="@0.8.0 +pflotran") + xsdk_depends_on("pflotran@3.0.2", when="@0.7.0 +pflotran") xsdk_depends_on("alquimia@master", when="@develop +alquimia") + xsdk_depends_on("alquimia@1.1.0", when="@1.0.0 +alquimia") xsdk_depends_on("alquimia@1.0.10", when="@0.8.0 +alquimia") xsdk_depends_on("alquimia@1.0.9", when="@0.7.0 +alquimia") xsdk_depends_on("sundials +trilinos", when="+trilinos @0.7.0:") xsdk_depends_on("sundials +ginkgo", when="+ginkgo @0.8.0:") + xsdk_depends_on("sundials +sycl cxxstd=17", when="@1.0.0: +sycl") xsdk_depends_on( "sundials@develop~int64+hypre+petsc+superlu-dist", when="@develop", cuda_var=["cuda", "?magma"], rocm_var=["rocm", "?magma"], ) + xsdk_depends_on( + "sundials@6.6.2~int64+hypre+petsc+superlu-dist", + when="@1.0.0", + cuda_var=["cuda", "?magma"], + rocm_var=["rocm", "?magma"], + ) xsdk_depends_on( "sundials@6.4.1~int64+hypre+petsc+superlu-dist", when="@0.8.0", @@ -228,13 +274,16 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): ) xsdk_depends_on("plasma@develop:", when="@develop %gcc@6.0:") + xsdk_depends_on("plasma@23.8.2:", when="@1.0.0 %gcc@6.0:") xsdk_depends_on("plasma@22.9.29:", when="@0.8.0 %gcc@6.0:") xsdk_depends_on("plasma@21.8.29:", when="@0.7.0 %gcc@6.0:") xsdk_depends_on("magma@master", when="@develop", cuda_var="?cuda", rocm_var="?rocm") + xsdk_depends_on("magma@2.7.1", when="@1.0.0", cuda_var="?cuda", rocm_var="?rocm") xsdk_depends_on("magma@2.7.0", when="@0.8.0", cuda_var="?cuda", rocm_var="?rocm") xsdk_depends_on("magma@2.6.1", when="@0.7.0", cuda_var="?cuda", rocm_var="?rocm") + xsdk_depends_on("amrex +sycl", when="@1.0.0: +sycl") xsdk_depends_on( "amrex@develop+sundials", when="@develop %intel", cuda_var="cuda", rocm_var="rocm" ) @@ -244,6 +293,9 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on( "amrex@develop+sundials", when="@develop %cce", cuda_var="cuda", rocm_var="rocm" ) + xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 %intel", cuda_var="cuda", rocm_var="rocm") + xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 %gcc", cuda_var="cuda", rocm_var="rocm") + xsdk_depends_on("amrex@23.08+sundials", when="@1.0.0 %cce", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 %intel", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 %gcc", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("amrex@22.09+sundials", when="@0.8.0 %cce", cuda_var="cuda", rocm_var="rocm") @@ -252,32 +304,39 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on("amrex@21.10+sundials", when="@0.7.0 %cce", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("slepc@main", when="@develop") + xsdk_depends_on("slepc@3.20.0", when="@1.0.0", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("slepc@3.18.1", when="@0.8.0", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("slepc@3.16.0", when="@0.7.0") xsdk_depends_on("omega-h +trilinos", when="+trilinos +omega-h") xsdk_depends_on("omega-h ~trilinos", when="~trilinos +omega-h") xsdk_depends_on("omega-h@main", when="@develop +omega-h") + xsdk_depends_on("omega-h@scorec.10.6.0", when="@1.0.0 +omega-h") xsdk_depends_on("omega-h@9.34.13", when="@0.8.0 +omega-h") xsdk_depends_on("omega-h@9.34.1", when="@0.7.0 +omega-h") xsdk_depends_on("strumpack ~cuda", when="~cuda @0.7.0: +strumpack") xsdk_depends_on("strumpack ~slate~openmp", when="~slate @0.8.0: +strumpack") xsdk_depends_on("strumpack@master", when="@develop +strumpack", cuda_var=["cuda"]) + xsdk_depends_on("strumpack@7.2.0", when="@1.0.0 +strumpack", cuda_var=["cuda"]) xsdk_depends_on("strumpack@7.0.1", when="@0.8.0 +strumpack", cuda_var=["cuda"]) xsdk_depends_on("strumpack@6.1.0~slate~openmp", when="@0.7.0 +strumpack") xsdk_depends_on("pumi@master+shared", when="@develop") + xsdk_depends_on("pumi@2.2.8+shared", when="@1.0.0") xsdk_depends_on("pumi@2.2.7+shared", when="@0.8.0") xsdk_depends_on("pumi@2.2.6", when="@0.7.0") tasmanian_openmp = "~openmp" if sys.platform == "darwin" else "+openmp" xsdk_depends_on( - "tasmanian@develop+xsdkflags+blas" + tasmanian_openmp, + "tasmanian@develop+blas" + tasmanian_openmp, when="@develop", cuda_var=["cuda", "?magma"], rocm_var=["rocm", "?magma"], ) + xsdk_depends_on( + "tasmanian@8.0+mpi+blas" + tasmanian_openmp, when="@1.0.0", cuda_var=["cuda", "?magma"] + ) xsdk_depends_on( "tasmanian@7.9+xsdkflags+mpi+blas" + tasmanian_openmp, when="@0.8.0", @@ -290,6 +349,8 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): ) xsdk_depends_on("arborx@master", when="@develop +arborx") + xsdk_depends_on("arborx+sycl", when="@1.0.0: +arborx +sycl") + xsdk_depends_on("arborx@1.4.1", when="@1.0.0 +arborx") xsdk_depends_on("arborx@1.2", when="@0.8.0 +arborx") xsdk_depends_on("arborx@1.1", when="@0.7.0 +arborx") @@ -302,12 +363,17 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on("phist kernel_lib=tpetra", when="+trilinos +phist") xsdk_depends_on("phist kernel_lib=petsc", when="~trilinos +phist") xsdk_depends_on("phist@develop ~fortran ~scamac ~openmp ~host ~int64", when="@develop +phist") + xsdk_depends_on("phist@1.12.0 ~fortran ~scamac ~openmp ~host ~int64", when="@1.0.0 +phist") xsdk_depends_on("phist@1.11.2 ~fortran ~scamac ~openmp ~host ~int64", when="@0.8.0 +phist") xsdk_depends_on("phist@1.9.5 ~fortran ~scamac ~openmp ~host ~int64", when="@0.7.0 +phist") + xsdk_depends_on("ginkgo+sycl", when="@1.0.0: +ginkgo +sycl") xsdk_depends_on( "ginkgo@develop +mpi ~openmp", when="@develop +ginkgo", cuda_var="cuda", rocm_var="rocm" ) + xsdk_depends_on( + "ginkgo@1.7.0 +mpi ~openmp", when="@1.0.0 +ginkgo", cuda_var="cuda", rocm_var="rocm" + ) xsdk_depends_on( "ginkgo@1.5.0 +mpi ~openmp", when="@0.8.0 +ginkgo", cuda_var="cuda", rocm_var="rocm" ) @@ -317,6 +383,8 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on("py-libensemble@develop+petsc4py", when="@develop +libensemble") xsdk_depends_on("py-petsc4py@main", when="@develop +libensemble") + xsdk_depends_on("py-libensemble@1.0.0+petsc4py", when="@1.0.0 +libensemble") + xsdk_depends_on("py-petsc4py@3.20.1", when="@1.0.0 +libensemble") xsdk_depends_on("py-libensemble@0.9.3+petsc4py", when="@0.8.0 +libensemble") xsdk_depends_on("py-petsc4py@3.18.1", when="@0.8.0 +libensemble") xsdk_depends_on("py-libensemble@0.8.0+petsc4py", when="@0.7.0 +libensemble") @@ -324,11 +392,13 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): xsdk_depends_on("precice ~petsc", when="+precice ^cray-mpich") xsdk_depends_on("precice@develop", when="@develop +precice") + xsdk_depends_on("precice@2.5.0", when="@1.0.0 +precice") xsdk_depends_on("precice@2.5.0", when="@0.8.0 +precice") xsdk_depends_on("precice@2.3.0", when="@0.7.0 +precice") bfpk_openmp = "~openmp" if sys.platform == "darwin" else "+openmp" xsdk_depends_on("butterflypack@master", when="@develop +butterflypack") + xsdk_depends_on("butterflypack@2.4.0" + bfpk_openmp, when="@1.0.0 +butterflypack") xsdk_depends_on("butterflypack@2.2.2" + bfpk_openmp, when="@0.8.0 +butterflypack") xsdk_depends_on("butterflypack@2.0.0", when="@0.7.0 +butterflypack") @@ -338,6 +408,12 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): cuda_var=["cuda", "?magma"], rocm_var=["rocm", "?magma"], ) + xsdk_depends_on( + "heffte@2.4.0+fftw", + when="@1.0.0 +heffte", + cuda_var=["cuda", "?magma"], + rocm_var=["rocm", "?magma"], + ) xsdk_depends_on( "heffte@2.3.0+fftw", when="@0.8.0 +heffte", @@ -352,15 +428,20 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): ) xsdk_depends_on("slate@master", when="@develop +slate", cuda_var="cuda") + xsdk_depends_on("slate@2023.08.25", when="@1.0.0 +slate", cuda_var="cuda") xsdk_depends_on("slate@2022.07.00", when="@0.8.0 +slate", cuda_var="cuda") xsdk_depends_on("slate@2021.05.02", when="@0.7.0 +slate %gcc@6.0:", cuda_var="cuda") xsdk_depends_on("exago@develop~ipopt~hiop~python", when="@develop +exago ~raja") xsdk_depends_on("exago@develop~ipopt+hiop+raja", when="@develop +exago +raja", cuda_var="cuda") + xsdk_depends_on("exago@1.6.0~ipopt~hiop~python", when="@1.0.0 +exago ~raja") + xsdk_depends_on("exago@1.6.0~ipopt+hiop+raja", when="@1.0.0 +exago +raja", cuda_var="cuda") xsdk_depends_on("exago@1.5.0~ipopt~hiop~python", when="@0.8.0 +exago ~raja") xsdk_depends_on("exago@1.5.0~ipopt+hiop+raja", when="@0.8.0 +exago +raja", cuda_var="cuda") xsdk_depends_on("hiop@develop", when="@develop +hiop ~raja") xsdk_depends_on("hiop@develop+raja", when="@develop +hiop +raja", cuda_var="cuda") + xsdk_depends_on("hiop@1.0.0", when="@1.0.0 +hiop ~raja") + xsdk_depends_on("hiop@1.0.0+raja", when="@1.0.0 +hiop +raja", cuda_var="cuda") xsdk_depends_on("hiop@0.7.1", when="@0.8.0 +hiop ~raja") xsdk_depends_on("hiop@0.7.1+raja", when="@0.8.0 +hiop +raja", cuda_var="cuda") From 9792625d1f2adcf0f6f8398c16edf412e4f76e4a Mon Sep 17 00:00:00 2001 From: Julien Cortial <101571984+jcortial-safran@users.noreply.github.com> Date: Tue, 14 Nov 2023 18:43:40 +0100 Subject: [PATCH 628/806] Fix typo in mumps recipe (#41062) * Fix typo in mumps recipe * Adopt mumps package --- var/spack/repos/builtin/packages/mumps/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index f9a210407dc8dc..1befb5acef9b84 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -16,6 +16,8 @@ class Mumps(Package): homepage = "https://graal.ens-lyon.fr/MUMPS/index.php" url = "https://graal.ens-lyon.fr/MUMPS/MUMPS_5.5.1.tar.gz" + maintainers("jcortial-safran") + version("5.5.1", sha256="1abff294fa47ee4cfd50dfd5c595942b72ebfcedce08142a75a99ab35014fa15") version("5.5.0", sha256="e54d17c5e42a36c40607a03279e0704d239d71d38503aab68ef3bfe0a9a79c13") version("5.4.1", sha256="93034a1a9fe0876307136dcde7e98e9086e199de76f1c47da822e7d4de987fa8") @@ -223,7 +225,7 @@ def write_makefile_inc(self): # As of version 5.2.0, MUMPS is able to take advantage # of the GEMMT BLAS extension. MKL and amdblis are the only # known BLAS implementation supported. - if self.spec["blas"].name in INTEL_MATH_LIBRARIES and self.spec.satifies("@5.2.0:"): + if self.spec["blas"].name in INTEL_MATH_LIBRARIES and self.spec.satisfies("@5.2.0:"): optf.append("-DGEMMT_AVAILABLE") if "@5.2.0: ^amdblis@3.0:" in self.spec: From d97d73fad17ef5d378a4ac0616ec95eada2f4150 Mon Sep 17 00:00:00 2001 From: Gerhard Theurich Date: Tue, 14 Nov 2023 21:23:37 -0800 Subject: [PATCH 629/806] esmf: add v8.6.0 (#41066) --- var/spack/repos/builtin/packages/esmf/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py index 2d9cde52f7ffa1..7cf4fb67675d24 100644 --- a/var/spack/repos/builtin/packages/esmf/package.py +++ b/var/spack/repos/builtin/packages/esmf/package.py @@ -28,7 +28,8 @@ class Esmf(MakefilePackage): # Develop is a special name for spack and is always considered the newest version version("develop", branch="develop") - # generate chksum with spack checksum esmf@x.y.z + # generate chksum with 'spack checksum esmf@x.y.z' + version("8.6.0", sha256="ed057eaddb158a3cce2afc0712b49353b7038b45b29aee86180f381457c0ebe7") version("8.5.0", sha256="acd0b2641587007cc3ca318427f47b9cae5bfd2da8d2a16ea778f637107c29c4") version("8.4.2", sha256="969304efa518c7859567fa6e65efd960df2b4f6d72dbf2c3f29e39e4ab5ae594") version("8.4.1", sha256="1b54cee91aacaa9df400bd284614cbb0257e175f6f3ec9977a2d991ed8aa1af6") From c7157d13a8c8e536fac0e97cfde55033309db635 Mon Sep 17 00:00:00 2001 From: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> Date: Wed, 15 Nov 2023 01:27:27 -0600 Subject: [PATCH 630/806] ParaView: Add release candidate 5.12.0-RC1 (#41009) * ParaView: Add release candidate 5.12.0-RC1 * [@spackbot] updating style on behalf of kwryankrattiger --- var/spack/repos/builtin/packages/paraview/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 5ca64f29c08610..aae15f3c11d4fa 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -28,6 +28,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): tags = ["e4s"] version("master", branch="master", submodules=True) + version( + "5.12.0-RC1", sha256="892eda2ae72831bbadd846be465d496ada35739779229c604cddd56e018a1aea" + ) version( "5.11.2", sha256="5c5d2f922f30d91feefc43b4a729015dbb1459f54c938896c123d2ac289c7a1e", From de850e97e882de6bfffa53ce5ccd45d69cc788ce Mon Sep 17 00:00:00 2001 From: Jonathon Anderson <17242663+blue42u@users.noreply.github.com> Date: Wed, 15 Nov 2023 02:11:49 -0600 Subject: [PATCH 631/806] libevent: call autoreconf directly instead of via autogen.sh (#41057) --- var/spack/repos/builtin/packages/libevent/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index 7969fb63d58d23..dc0c34191c8387 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -59,7 +59,7 @@ def libs(self): return LibraryList(libs) def autoreconf(self, spec, prefix): - Executable("./autogen.sh")() + autoreconf("--force", "--install", "--symlink") def configure_args(self): spec = self.spec From 84e33b496ff1a49a23a46b299036cd674ae510d1 Mon Sep 17 00:00:00 2001 From: moloney Date: Wed, 15 Nov 2023 00:13:21 -0800 Subject: [PATCH 632/806] mrtrix3: fix some issues w/ 3.0.3 and add 3.0.4 (#41036) --- .../packages/mrtrix3/fix_includes.patch | 26 +++++++++++++++++++ .../repos/builtin/packages/mrtrix3/package.py | 11 +++++--- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/mrtrix3/fix_includes.patch diff --git a/var/spack/repos/builtin/packages/mrtrix3/fix_includes.patch b/var/spack/repos/builtin/packages/mrtrix3/fix_includes.patch new file mode 100644 index 00000000000000..667e412acc1cee --- /dev/null +++ b/var/spack/repos/builtin/packages/mrtrix3/fix_includes.patch @@ -0,0 +1,26 @@ +--- ./configure.orig 2023-11-12 14:48:25.802025918 -0800 ++++ ./configure 2023-11-12 14:48:56.177057419 -0800 +@@ -571,10 +571,7 @@ + try: + flags = [] + for flag in shlex.split (execute ([ 'pkg-config' ] + pkg_config_flags.split(), RunError)[1]): +- if flag.startswith ('-I'): +- flags += [ '-idirafter', flag[2:] ] +- else: +- flags += [ flag ] ++ flags += [ flag ] + return flags + except Exception: + log('error running "pkg-config ' + pkg_config_flags + '"\n\n') +@@ -1323,10 +1320,7 @@ + for entry in qt: + if entry[0] != '$' and not entry == '-I.': + entry = entry.replace('\"','').replace("'",'') +- if entry.startswith('-I'): +- qt_cflags += [ '-idirafter', entry[2:] ] +- else: +- qt_cflags += [ entry ] ++ qt_cflags += [ entry ] + + qt = qt_ldflags + qt_libs + qt_ldflags = [] diff --git a/var/spack/repos/builtin/packages/mrtrix3/package.py b/var/spack/repos/builtin/packages/mrtrix3/package.py index 2a59d7ec22a8e9..53bf19ae53065d 100644 --- a/var/spack/repos/builtin/packages/mrtrix3/package.py +++ b/var/spack/repos/builtin/packages/mrtrix3/package.py @@ -17,21 +17,26 @@ class Mrtrix3(Package): git = "https://github.com/MRtrix3/mrtrix3.git" version( - "3.0.3", - sha256="6ec7d5a567d8d7338e85575a74565189a26ec8971cbe8fb24a49befbc446542e", + "3.0.4", + sha256="f1d1aa289cfc3e46e3a8eca93594b23d061c6d50a0cd03727433a7e2cd14f71a", preferred=True, ) + version("3.0.3", sha256="6ec7d5a567d8d7338e85575a74565189a26ec8971cbe8fb24a49befbc446542e") version("2017-09-25", commit="72aca89e3d38c9d9e0c47104d0fb5bd2cbdb536d") depends_on("python@2.7:", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) depends_on("glu") depends_on("qt+opengl@4.7:") - depends_on("eigen") + # MRTrix <= 3.0.3 can't build with eigen >= 3.4 due to conflicting declarations + depends_on("eigen@3.3", when="@3.0.3") + depends_on("eigen@3.4:", when="@3.0.4:") depends_on("zlib-api") depends_on("libtiff") depends_on("fftw") + patch("fix_includes.patch", when="@3.0.3:3.0.4") + conflicts("%gcc@7:", when="@2017-09-25") # MRtrix3/mrtrix3#1041 def install(self, spec, prefix): From b3146559fbc411eeacb4e2aae74b18f8880c9295 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson <17242663+blue42u@users.noreply.github.com> Date: Wed, 15 Nov 2023 02:19:02 -0600 Subject: [PATCH 633/806] hpctoolkit: Add depends on autotools for @develop (#41067) --- var/spack/repos/builtin/packages/hpctoolkit/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index 8d58956508a1d9..bb1e28f13cd0ee 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -109,6 +109,11 @@ class Hpctoolkit(AutotoolsPackage): "python", default=False, description="Support unwinding Python source.", when="@2023.03:" ) + with when("@develop build_system=autotools"): + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + boost_libs = ( "+atomic +chrono +date_time +filesystem +system +thread +timer" " +graph +regex +shared +multithreaded visibility=global" From 1d30e78b5419af674140084c5c355e376aa3f93b Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Wed, 15 Nov 2023 09:44:38 +0100 Subject: [PATCH 634/806] cp2k: add hipfft and hipblas explicitly (#41074) --- var/spack/repos/builtin/packages/cp2k/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 2e765c7539fffb..0d90d0d123c4ac 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -297,6 +297,10 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): depends_on("dbcsr+cuda", when="+cuda") depends_on("dbcsr+rocm", when="+rocm") + with when("@2022: +rocm"): + depends_on("hipblas") + depends_on("hipfft") + # CP2K needs compiler specific compilation flags, e.g. optflags conflicts("%apple-clang") conflicts("%clang") From 2f24aeb7f690a7cc73996479b0028a273e91d9df Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 15 Nov 2023 16:49:16 +0100 Subject: [PATCH 635/806] docs: packages config on separate page, demote bootstrapping (#41085) --- lib/spack/docs/build_settings.rst | 544 ----------------- lib/spack/docs/build_systems/intelpackage.rst | 2 +- lib/spack/docs/configuration.rst | 2 +- lib/spack/docs/index.rst | 3 +- lib/spack/docs/packages_yaml.rst | 549 ++++++++++++++++++ 5 files changed, 553 insertions(+), 547 deletions(-) create mode 100644 lib/spack/docs/packages_yaml.rst diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst index 38fe2fb2c06d76..9fa7eafcbec7e5 100644 --- a/lib/spack/docs/build_settings.rst +++ b/lib/spack/docs/build_settings.rst @@ -99,547 +99,3 @@ while `py-numpy` still needs an older version: Up to Spack v0.20 ``duplicates:strategy:none`` was the default (and only) behavior. From Spack v0.21 the default behavior is ``duplicates:strategy:minimal``. - -.. _build-settings: - -================================ -Package Settings (packages.yaml) -================================ - -Spack allows you to customize how your software is built through the -``packages.yaml`` file. Using it, you can make Spack prefer particular -implementations of virtual dependencies (e.g., MPI or BLAS/LAPACK), -or you can make it prefer to build with particular compilers. You can -also tell Spack to use *external* software installations already -present on your system. - -At a high level, the ``packages.yaml`` file is structured like this: - -.. code-block:: yaml - - packages: - package1: - # settings for package1 - package2: - # settings for package2 - # ... - all: - # settings that apply to all packages. - -So you can either set build preferences specifically for *one* package, -or you can specify that certain settings should apply to *all* packages. -The types of settings you can customize are described in detail below. - -Spack's build defaults are in the default -``etc/spack/defaults/packages.yaml`` file. You can override them in -``~/.spack/packages.yaml`` or ``etc/spack/packages.yaml``. For more -details on how this works, see :ref:`configuration-scopes`. - -.. _sec-external-packages: - ------------------ -External Packages ------------------ - -Spack can be configured to use externally-installed -packages rather than building its own packages. This may be desirable -if machines ship with system packages, such as a customized MPI -that should be used instead of Spack building its own MPI. - -External packages are configured through the ``packages.yaml`` file. -Here's an example of an external configuration: - -.. code-block:: yaml - - packages: - openmpi: - externals: - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.4.3 - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" - prefix: /opt/openmpi-1.4.3-debug - - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.6.5-intel - -This example lists three installations of OpenMPI, one built with GCC, -one built with GCC and debug information, and another built with Intel. -If Spack is asked to build a package that uses one of these MPIs as a -dependency, it will use the pre-installed OpenMPI in -the given directory. Note that the specified path is the top-level -install prefix, not the ``bin`` subdirectory. - -``packages.yaml`` can also be used to specify modules to load instead -of the installation prefixes. The following example says that module -``CMake/3.7.2`` provides cmake version 3.7.2. - -.. code-block:: yaml - - cmake: - externals: - - spec: cmake@3.7.2 - modules: - - CMake/3.7.2 - -Each ``packages.yaml`` begins with a ``packages:`` attribute, followed -by a list of package names. To specify externals, add an ``externals:`` -attribute under the package name, which lists externals. -Each external should specify a ``spec:`` string that should be as -well-defined as reasonably possible. If a -package lacks a spec component, such as missing a compiler or -package version, then Spack will guess the missing component based -on its most-favored packages, and it may guess incorrectly. - -Each package version and compiler listed in an external should -have entries in Spack's packages and compiler configuration, even -though the package and compiler may not ever be built. - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Prevent packages from being built from sources -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Adding an external spec in ``packages.yaml`` allows Spack to use an external location, -but it does not prevent Spack from building packages from sources. In the above example, -Spack might choose for many valid reasons to start building and linking with the -latest version of OpenMPI rather than continue using the pre-installed OpenMPI versions. - -To prevent this, the ``packages.yaml`` configuration also allows packages -to be flagged as non-buildable. The previous example could be modified to -be: - -.. code-block:: yaml - - packages: - openmpi: - externals: - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.4.3 - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" - prefix: /opt/openmpi-1.4.3-debug - - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.6.5-intel - buildable: False - -The addition of the ``buildable`` flag tells Spack that it should never build -its own version of OpenMPI from sources, and it will instead always rely on a pre-built -OpenMPI. - -.. note:: - - If ``concretizer:reuse`` is on (see :ref:`concretizer-options` for more information on that flag) - pre-built specs include specs already available from a local store, an upstream store, a registered - buildcache or specs marked as externals in ``packages.yaml``. If ``concretizer:reuse`` is off, only - external specs in ``packages.yaml`` are included in the list of pre-built specs. - -If an external module is specified as not buildable, then Spack will load the -external module into the build environment which can be used for linking. - -The ``buildable`` does not need to be paired with external packages. -It could also be used alone to forbid packages that may be -buggy or otherwise undesirable. - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Non-buildable virtual packages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Virtual packages in Spack can also be specified as not buildable, and -external implementations can be provided. In the example above, -OpenMPI is configured as not buildable, but Spack will often prefer -other MPI implementations over the externally available OpenMPI. Spack -can be configured with every MPI provider not buildable individually, -but more conveniently: - -.. code-block:: yaml - - packages: - mpi: - buildable: False - openmpi: - externals: - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.4.3 - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" - prefix: /opt/openmpi-1.4.3-debug - - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.6.5-intel - -Spack can then use any of the listed external implementations of MPI -to satisfy a dependency, and will choose depending on the compiler and -architecture. - -In cases where the concretizer is configured to reuse specs, and other ``mpi`` providers -(available via stores or buildcaches) are not wanted, Spack can be configured to require -specs matching only the available externals: - -.. code-block:: yaml - - packages: - mpi: - buildable: False - require: - - one_of: [ - "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64", - "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug", - "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" - ] - openmpi: - externals: - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.4.3 - - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" - prefix: /opt/openmpi-1.4.3-debug - - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" - prefix: /opt/openmpi-1.6.5-intel - -This configuration prevents any spec using MPI and originating from stores or buildcaches to be reused, -unless it matches the requirements under ``packages:mpi:require``. For more information on requirements see -:ref:`package-requirements`. - -.. _cmd-spack-external-find: - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Automatically Find External Packages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -You can run the :ref:`spack external find ` command -to search for system-provided packages and add them to ``packages.yaml``. -After running this command your ``packages.yaml`` may include new entries: - -.. code-block:: yaml - - packages: - cmake: - externals: - - spec: cmake@3.17.2 - prefix: /usr - -Generally this is useful for detecting a small set of commonly-used packages; -for now this is generally limited to finding build-only dependencies. -Specific limitations include: - -* Packages are not discoverable by default: For a package to be - discoverable with ``spack external find``, it needs to add special - logic. See :ref:`here ` for more details. -* The logic does not search through module files, it can only detect - packages with executables defined in ``PATH``; you can help Spack locate - externals which use module files by loading any associated modules for - packages that you want Spack to know about before running - ``spack external find``. -* Spack does not overwrite existing entries in the package configuration: - If there is an external defined for a spec at any configuration scope, - then Spack will not add a new external entry (``spack config blame packages`` - can help locate all external entries). - -.. _package-requirements: - --------------------- -Package Requirements --------------------- - -Spack can be configured to always use certain compilers, package -versions, and variants during concretization through package -requirements. - -Package requirements are useful when you find yourself repeatedly -specifying the same constraints on the command line, and wish that -Spack respects these constraints whether you mention them explicitly -or not. Another use case is specifying constraints that should apply -to all root specs in an environment, without having to repeat the -constraint everywhere. - -Apart from that, requirements config is more flexible than constraints -on the command line, because it can specify constraints on packages -*when they occur* as a dependency. In contrast, on the command line it -is not possible to specify constraints on dependencies while also keeping -those dependencies optional. - -^^^^^^^^^^^^^^^^^^^ -Requirements syntax -^^^^^^^^^^^^^^^^^^^ - -The package requirements configuration is specified in ``packages.yaml``, -keyed by package name and expressed using the Spec syntax. In the simplest -case you can specify attributes that you always want the package to have -by providing a single spec string to ``require``: - -.. code-block:: yaml - - packages: - libfabric: - require: "@1.13.2" - -In the above example, ``libfabric`` will always build with version 1.13.2. If you -need to compose multiple configuration scopes ``require`` accepts a list of -strings: - -.. code-block:: yaml - - packages: - libfabric: - require: - - "@1.13.2" - - "%gcc" - -In this case ``libfabric`` will always build with version 1.13.2 **and** using GCC -as a compiler. - -For more complex use cases, require accepts also a list of objects. These objects -must have either a ``any_of`` or a ``one_of`` field, containing a list of spec strings, -and they can optionally have a ``when`` and a ``message`` attribute: - -.. code-block:: yaml - - packages: - openmpi: - require: - - any_of: ["@4.1.5", "%gcc"] - message: "in this example only 4.1.5 can build with other compilers" - -``any_of`` is a list of specs. One of those specs must be satisfied -and it is also allowed for the concretized spec to match more than one. -In the above example, that means you could build ``openmpi@4.1.5%gcc``, -``openmpi@4.1.5%clang`` or ``openmpi@3.9%gcc``, but -not ``openmpi@3.9%clang``. - -If a custom message is provided, and the requirement is not satisfiable, -Spack will print the custom error message: - -.. code-block:: console - - $ spack spec openmpi@3.9%clang - ==> Error: in this example only 4.1.5 can build with other compilers - -We could express a similar requirement using the ``when`` attribute: - -.. code-block:: yaml - - packages: - openmpi: - require: - - any_of: ["%gcc"] - when: "@:4.1.4" - message: "in this example only 4.1.5 can build with other compilers" - -In the example above, if the version turns out to be 4.1.4 or less, we require the compiler to be GCC. -For readability, Spack also allows a ``spec`` key accepting a string when there is only a single -constraint: - -.. code-block:: yaml - - packages: - openmpi: - require: - - spec: "%gcc" - when: "@:4.1.4" - message: "in this example only 4.1.5 can build with other compilers" - -This code snippet and the one before it are semantically equivalent. - -Finally, instead of ``any_of`` you can use ``one_of`` which also takes a list of specs. The final -concretized spec must match one and only one of them: - -.. code-block:: yaml - - packages: - mpich: - require: - - one_of: ["+cuda", "+rocm"] - -In the example above, that means you could build ``mpich+cuda`` or ``mpich+rocm`` but not ``mpich+cuda+rocm``. - -.. note:: - - For ``any_of`` and ``one_of``, the order of specs indicates a - preference: items that appear earlier in the list are preferred - (note that these preferences can be ignored in favor of others). - -.. note:: - - When using a conditional requirement, Spack is allowed to actively avoid the triggering - condition (the ``when=...`` spec) if that leads to a concrete spec with better scores in - the optimization criteria. To check the current optimization criteria and their - priorities you can run ``spack solve zlib``. - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Setting default requirements -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -You can also set default requirements for all packages under ``all`` -like this: - -.. code-block:: yaml - - packages: - all: - require: '%clang' - -which means every spec will be required to use ``clang`` as a compiler. - -Note that in this case ``all`` represents a *default set of requirements* - -if there are specific package requirements, then the default requirements -under ``all`` are disregarded. For example, with a configuration like this: - -.. code-block:: yaml - - packages: - all: - require: '%clang' - cmake: - require: '%gcc' - -Spack requires ``cmake`` to use ``gcc`` and all other nodes (including ``cmake`` -dependencies) to use ``clang``. - -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Setting requirements on virtual specs -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -A requirement on a virtual spec applies whenever that virtual is present in the DAG. -This can be useful for fixing which virtual provider you want to use: - -.. code-block:: yaml - - packages: - mpi: - require: 'mvapich2 %gcc' - -With the configuration above the only allowed ``mpi`` provider is ``mvapich2 %gcc``. - -Requirements on the virtual spec and on the specific provider are both applied, if -present. For instance with a configuration like: - -.. code-block:: yaml - - packages: - mpi: - require: 'mvapich2 %gcc' - mvapich2: - require: '~cuda' - -you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider. - -.. _package-preferences: - -------------------- -Package Preferences -------------------- - -In some cases package requirements can be too strong, and package -preferences are the better option. Package preferences do not impose -constraints on packages for particular versions or variants values, -they rather only set defaults. The concretizer is free to change -them if it must, due to other constraints, and also prefers reusing -installed packages over building new ones that are a better match for -preferences. - -Most package preferences (``compilers``, ``target`` and ``providers``) -can only be set globally under the ``all`` section of ``packages.yaml``: - -.. code-block:: yaml - - packages: - all: - compiler: [gcc@12.2.0, clang@12:, oneapi@2023:] - target: [x86_64_v3] - providers: - mpi: [mvapich2, mpich, openmpi] - -These preferences override Spack's default and effectively reorder priorities -when looking for the best compiler, target or virtual package provider. Each -preference takes an ordered list of spec constraints, with earlier entries in -the list being preferred over later entries. - -In the example above all packages prefer to be compiled with ``gcc@12.2.0``, -to target the ``x86_64_v3`` microarchitecture and to use ``mvapich2`` if they -depend on ``mpi``. - -The ``variants`` and ``version`` preferences can be set under -package specific sections of the ``packages.yaml`` file: - -.. code-block:: yaml - - packages: - opencv: - variants: +debug - gperftools: - version: [2.2, 2.4, 2.3] - -In this case, the preference for ``opencv`` is to build with debug options, while -``gperftools`` prefers version 2.2 over 2.4. - -Any preference can be overwritten on the command line if explicitly requested. - -Preferences cannot overcome explicit constraints, as they only set a preferred -ordering among homogeneous attribute values. Going back to the example, if -``gperftools@2.3:`` was requested, then Spack will install version 2.4 -since the most preferred version 2.2 is prohibited by the version constraint. - -.. _package_permissions: - -------------------- -Package Permissions -------------------- - -Spack can be configured to assign permissions to the files installed -by a package. - -In the ``packages.yaml`` file under ``permissions``, the attributes -``read``, ``write``, and ``group`` control the package -permissions. These attributes can be set per-package, or for all -packages under ``all``. If permissions are set under ``all`` and for a -specific package, the package-specific settings take precedence. - -The ``read`` and ``write`` attributes take one of ``user``, ``group``, -and ``world``. - -.. code-block:: yaml - - packages: - all: - permissions: - write: group - group: spack - my_app: - permissions: - read: group - group: my_team - -The permissions settings describe the broadest level of access to -installations of the specified packages. The execute permissions of -the file are set to the same level as read permissions for those files -that are executable. The default setting for ``read`` is ``world``, -and for ``write`` is ``user``. In the example above, installations of -``my_app`` will be installed with user and group permissions but no -world permissions, and owned by the group ``my_team``. All other -packages will be installed with user and group write privileges, and -world read privileges. Those packages will be owned by the group -``spack``. - -The ``group`` attribute assigns a Unix-style group to a package. All -files installed by the package will be owned by the assigned group, -and the sticky group bit will be set on the install prefix and all -directories inside the install prefix. This will ensure that even -manually placed files within the install prefix are owned by the -assigned group. If no group is assigned, Spack will allow the OS -default behavior to go as expected. - ----------------------------- -Assigning Package Attributes ----------------------------- - -You can assign class-level attributes in the configuration: - -.. code-block:: yaml - - packages: - mpileaks: - # Override existing attributes - url: http://www.somewhereelse.com/mpileaks-1.0.tar.gz - # ... or add new ones - x: 1 - -Attributes set this way will be accessible to any method executed -in the package.py file (e.g. the ``install()`` method). Values for these -attributes may be any value parseable by yaml. - -These can only be applied to specific packages, not "all" or -virtual packages. diff --git a/lib/spack/docs/build_systems/intelpackage.rst b/lib/spack/docs/build_systems/intelpackage.rst index d64fd469712299..9afe1a8b919543 100644 --- a/lib/spack/docs/build_systems/intelpackage.rst +++ b/lib/spack/docs/build_systems/intelpackage.rst @@ -392,7 +392,7 @@ See section :ref:`Configuration Scopes ` for an explanation about the different files and section -:ref:`Build customization ` +:ref:`Build customization ` for specifics and examples for ``packages.yaml`` files. .. If your system administrator did not provide modules for pre-installed Intel diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst index f60c430d2239ee..f79f300f4c7f3f 100644 --- a/lib/spack/docs/configuration.rst +++ b/lib/spack/docs/configuration.rst @@ -17,7 +17,7 @@ case you want to skip directly to specific docs: * :ref:`config.yaml ` * :ref:`mirrors.yaml ` * :ref:`modules.yaml ` -* :ref:`packages.yaml ` +* :ref:`packages.yaml ` * :ref:`repos.yaml ` You can also add any of these as inline configuration in the YAML diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst index 0dd27a2444516a..9b032ed31355c2 100644 --- a/lib/spack/docs/index.rst +++ b/lib/spack/docs/index.rst @@ -70,7 +70,7 @@ or refer to the full manual below. configuration config_yaml - bootstrapping + packages_yaml build_settings environments containers @@ -78,6 +78,7 @@ or refer to the full manual below. module_file_support repositories binary_caches + bootstrapping command_index chain extensions diff --git a/lib/spack/docs/packages_yaml.rst b/lib/spack/docs/packages_yaml.rst new file mode 100644 index 00000000000000..e91d22a8f3470c --- /dev/null +++ b/lib/spack/docs/packages_yaml.rst @@ -0,0 +1,549 @@ +.. Copyright 2013-2023 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) + + +.. _packages-config: + +================================ +Package Settings (packages.yaml) +================================ + +Spack allows you to customize how your software is built through the +``packages.yaml`` file. Using it, you can make Spack prefer particular +implementations of virtual dependencies (e.g., MPI or BLAS/LAPACK), +or you can make it prefer to build with particular compilers. You can +also tell Spack to use *external* software installations already +present on your system. + +At a high level, the ``packages.yaml`` file is structured like this: + +.. code-block:: yaml + + packages: + package1: + # settings for package1 + package2: + # settings for package2 + # ... + all: + # settings that apply to all packages. + +So you can either set build preferences specifically for *one* package, +or you can specify that certain settings should apply to *all* packages. +The types of settings you can customize are described in detail below. + +Spack's build defaults are in the default +``etc/spack/defaults/packages.yaml`` file. You can override them in +``~/.spack/packages.yaml`` or ``etc/spack/packages.yaml``. For more +details on how this works, see :ref:`configuration-scopes`. + +.. _sec-external-packages: + +----------------- +External Packages +----------------- + +Spack can be configured to use externally-installed +packages rather than building its own packages. This may be desirable +if machines ship with system packages, such as a customized MPI +that should be used instead of Spack building its own MPI. + +External packages are configured through the ``packages.yaml`` file. +Here's an example of an external configuration: + +.. code-block:: yaml + + packages: + openmpi: + externals: + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.4.3 + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" + prefix: /opt/openmpi-1.4.3-debug + - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.6.5-intel + +This example lists three installations of OpenMPI, one built with GCC, +one built with GCC and debug information, and another built with Intel. +If Spack is asked to build a package that uses one of these MPIs as a +dependency, it will use the pre-installed OpenMPI in +the given directory. Note that the specified path is the top-level +install prefix, not the ``bin`` subdirectory. + +``packages.yaml`` can also be used to specify modules to load instead +of the installation prefixes. The following example says that module +``CMake/3.7.2`` provides cmake version 3.7.2. + +.. code-block:: yaml + + cmake: + externals: + - spec: cmake@3.7.2 + modules: + - CMake/3.7.2 + +Each ``packages.yaml`` begins with a ``packages:`` attribute, followed +by a list of package names. To specify externals, add an ``externals:`` +attribute under the package name, which lists externals. +Each external should specify a ``spec:`` string that should be as +well-defined as reasonably possible. If a +package lacks a spec component, such as missing a compiler or +package version, then Spack will guess the missing component based +on its most-favored packages, and it may guess incorrectly. + +Each package version and compiler listed in an external should +have entries in Spack's packages and compiler configuration, even +though the package and compiler may not ever be built. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Prevent packages from being built from sources +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Adding an external spec in ``packages.yaml`` allows Spack to use an external location, +but it does not prevent Spack from building packages from sources. In the above example, +Spack might choose for many valid reasons to start building and linking with the +latest version of OpenMPI rather than continue using the pre-installed OpenMPI versions. + +To prevent this, the ``packages.yaml`` configuration also allows packages +to be flagged as non-buildable. The previous example could be modified to +be: + +.. code-block:: yaml + + packages: + openmpi: + externals: + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.4.3 + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" + prefix: /opt/openmpi-1.4.3-debug + - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.6.5-intel + buildable: False + +The addition of the ``buildable`` flag tells Spack that it should never build +its own version of OpenMPI from sources, and it will instead always rely on a pre-built +OpenMPI. + +.. note:: + + If ``concretizer:reuse`` is on (see :ref:`concretizer-options` for more information on that flag) + pre-built specs include specs already available from a local store, an upstream store, a registered + buildcache or specs marked as externals in ``packages.yaml``. If ``concretizer:reuse`` is off, only + external specs in ``packages.yaml`` are included in the list of pre-built specs. + +If an external module is specified as not buildable, then Spack will load the +external module into the build environment which can be used for linking. + +The ``buildable`` does not need to be paired with external packages. +It could also be used alone to forbid packages that may be +buggy or otherwise undesirable. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Non-buildable virtual packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Virtual packages in Spack can also be specified as not buildable, and +external implementations can be provided. In the example above, +OpenMPI is configured as not buildable, but Spack will often prefer +other MPI implementations over the externally available OpenMPI. Spack +can be configured with every MPI provider not buildable individually, +but more conveniently: + +.. code-block:: yaml + + packages: + mpi: + buildable: False + openmpi: + externals: + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.4.3 + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" + prefix: /opt/openmpi-1.4.3-debug + - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.6.5-intel + +Spack can then use any of the listed external implementations of MPI +to satisfy a dependency, and will choose depending on the compiler and +architecture. + +In cases where the concretizer is configured to reuse specs, and other ``mpi`` providers +(available via stores or buildcaches) are not wanted, Spack can be configured to require +specs matching only the available externals: + +.. code-block:: yaml + + packages: + mpi: + buildable: False + require: + - one_of: [ + "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64", + "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug", + "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" + ] + openmpi: + externals: + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.4.3 + - spec: "openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug" + prefix: /opt/openmpi-1.4.3-debug + - spec: "openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64" + prefix: /opt/openmpi-1.6.5-intel + +This configuration prevents any spec using MPI and originating from stores or buildcaches to be reused, +unless it matches the requirements under ``packages:mpi:require``. For more information on requirements see +:ref:`package-requirements`. + +.. _cmd-spack-external-find: + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Automatically Find External Packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can run the :ref:`spack external find ` command +to search for system-provided packages and add them to ``packages.yaml``. +After running this command your ``packages.yaml`` may include new entries: + +.. code-block:: yaml + + packages: + cmake: + externals: + - spec: cmake@3.17.2 + prefix: /usr + +Generally this is useful for detecting a small set of commonly-used packages; +for now this is generally limited to finding build-only dependencies. +Specific limitations include: + +* Packages are not discoverable by default: For a package to be + discoverable with ``spack external find``, it needs to add special + logic. See :ref:`here ` for more details. +* The logic does not search through module files, it can only detect + packages with executables defined in ``PATH``; you can help Spack locate + externals which use module files by loading any associated modules for + packages that you want Spack to know about before running + ``spack external find``. +* Spack does not overwrite existing entries in the package configuration: + If there is an external defined for a spec at any configuration scope, + then Spack will not add a new external entry (``spack config blame packages`` + can help locate all external entries). + +.. _package-requirements: + +-------------------- +Package Requirements +-------------------- + +Spack can be configured to always use certain compilers, package +versions, and variants during concretization through package +requirements. + +Package requirements are useful when you find yourself repeatedly +specifying the same constraints on the command line, and wish that +Spack respects these constraints whether you mention them explicitly +or not. Another use case is specifying constraints that should apply +to all root specs in an environment, without having to repeat the +constraint everywhere. + +Apart from that, requirements config is more flexible than constraints +on the command line, because it can specify constraints on packages +*when they occur* as a dependency. In contrast, on the command line it +is not possible to specify constraints on dependencies while also keeping +those dependencies optional. + +^^^^^^^^^^^^^^^^^^^ +Requirements syntax +^^^^^^^^^^^^^^^^^^^ + +The package requirements configuration is specified in ``packages.yaml``, +keyed by package name and expressed using the Spec syntax. In the simplest +case you can specify attributes that you always want the package to have +by providing a single spec string to ``require``: + +.. code-block:: yaml + + packages: + libfabric: + require: "@1.13.2" + +In the above example, ``libfabric`` will always build with version 1.13.2. If you +need to compose multiple configuration scopes ``require`` accepts a list of +strings: + +.. code-block:: yaml + + packages: + libfabric: + require: + - "@1.13.2" + - "%gcc" + +In this case ``libfabric`` will always build with version 1.13.2 **and** using GCC +as a compiler. + +For more complex use cases, require accepts also a list of objects. These objects +must have either a ``any_of`` or a ``one_of`` field, containing a list of spec strings, +and they can optionally have a ``when`` and a ``message`` attribute: + +.. code-block:: yaml + + packages: + openmpi: + require: + - any_of: ["@4.1.5", "%gcc"] + message: "in this example only 4.1.5 can build with other compilers" + +``any_of`` is a list of specs. One of those specs must be satisfied +and it is also allowed for the concretized spec to match more than one. +In the above example, that means you could build ``openmpi@4.1.5%gcc``, +``openmpi@4.1.5%clang`` or ``openmpi@3.9%gcc``, but +not ``openmpi@3.9%clang``. + +If a custom message is provided, and the requirement is not satisfiable, +Spack will print the custom error message: + +.. code-block:: console + + $ spack spec openmpi@3.9%clang + ==> Error: in this example only 4.1.5 can build with other compilers + +We could express a similar requirement using the ``when`` attribute: + +.. code-block:: yaml + + packages: + openmpi: + require: + - any_of: ["%gcc"] + when: "@:4.1.4" + message: "in this example only 4.1.5 can build with other compilers" + +In the example above, if the version turns out to be 4.1.4 or less, we require the compiler to be GCC. +For readability, Spack also allows a ``spec`` key accepting a string when there is only a single +constraint: + +.. code-block:: yaml + + packages: + openmpi: + require: + - spec: "%gcc" + when: "@:4.1.4" + message: "in this example only 4.1.5 can build with other compilers" + +This code snippet and the one before it are semantically equivalent. + +Finally, instead of ``any_of`` you can use ``one_of`` which also takes a list of specs. The final +concretized spec must match one and only one of them: + +.. code-block:: yaml + + packages: + mpich: + require: + - one_of: ["+cuda", "+rocm"] + +In the example above, that means you could build ``mpich+cuda`` or ``mpich+rocm`` but not ``mpich+cuda+rocm``. + +.. note:: + + For ``any_of`` and ``one_of``, the order of specs indicates a + preference: items that appear earlier in the list are preferred + (note that these preferences can be ignored in favor of others). + +.. note:: + + When using a conditional requirement, Spack is allowed to actively avoid the triggering + condition (the ``when=...`` spec) if that leads to a concrete spec with better scores in + the optimization criteria. To check the current optimization criteria and their + priorities you can run ``spack solve zlib``. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Setting default requirements +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can also set default requirements for all packages under ``all`` +like this: + +.. code-block:: yaml + + packages: + all: + require: '%clang' + +which means every spec will be required to use ``clang`` as a compiler. + +Note that in this case ``all`` represents a *default set of requirements* - +if there are specific package requirements, then the default requirements +under ``all`` are disregarded. For example, with a configuration like this: + +.. code-block:: yaml + + packages: + all: + require: '%clang' + cmake: + require: '%gcc' + +Spack requires ``cmake`` to use ``gcc`` and all other nodes (including ``cmake`` +dependencies) to use ``clang``. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Setting requirements on virtual specs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A requirement on a virtual spec applies whenever that virtual is present in the DAG. +This can be useful for fixing which virtual provider you want to use: + +.. code-block:: yaml + + packages: + mpi: + require: 'mvapich2 %gcc' + +With the configuration above the only allowed ``mpi`` provider is ``mvapich2 %gcc``. + +Requirements on the virtual spec and on the specific provider are both applied, if +present. For instance with a configuration like: + +.. code-block:: yaml + + packages: + mpi: + require: 'mvapich2 %gcc' + mvapich2: + require: '~cuda' + +you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider. + +.. _package-preferences: + +------------------- +Package Preferences +------------------- + +In some cases package requirements can be too strong, and package +preferences are the better option. Package preferences do not impose +constraints on packages for particular versions or variants values, +they rather only set defaults. The concretizer is free to change +them if it must, due to other constraints, and also prefers reusing +installed packages over building new ones that are a better match for +preferences. + +Most package preferences (``compilers``, ``target`` and ``providers``) +can only be set globally under the ``all`` section of ``packages.yaml``: + +.. code-block:: yaml + + packages: + all: + compiler: [gcc@12.2.0, clang@12:, oneapi@2023:] + target: [x86_64_v3] + providers: + mpi: [mvapich2, mpich, openmpi] + +These preferences override Spack's default and effectively reorder priorities +when looking for the best compiler, target or virtual package provider. Each +preference takes an ordered list of spec constraints, with earlier entries in +the list being preferred over later entries. + +In the example above all packages prefer to be compiled with ``gcc@12.2.0``, +to target the ``x86_64_v3`` microarchitecture and to use ``mvapich2`` if they +depend on ``mpi``. + +The ``variants`` and ``version`` preferences can be set under +package specific sections of the ``packages.yaml`` file: + +.. code-block:: yaml + + packages: + opencv: + variants: +debug + gperftools: + version: [2.2, 2.4, 2.3] + +In this case, the preference for ``opencv`` is to build with debug options, while +``gperftools`` prefers version 2.2 over 2.4. + +Any preference can be overwritten on the command line if explicitly requested. + +Preferences cannot overcome explicit constraints, as they only set a preferred +ordering among homogeneous attribute values. Going back to the example, if +``gperftools@2.3:`` was requested, then Spack will install version 2.4 +since the most preferred version 2.2 is prohibited by the version constraint. + +.. _package_permissions: + +------------------- +Package Permissions +------------------- + +Spack can be configured to assign permissions to the files installed +by a package. + +In the ``packages.yaml`` file under ``permissions``, the attributes +``read``, ``write``, and ``group`` control the package +permissions. These attributes can be set per-package, or for all +packages under ``all``. If permissions are set under ``all`` and for a +specific package, the package-specific settings take precedence. + +The ``read`` and ``write`` attributes take one of ``user``, ``group``, +and ``world``. + +.. code-block:: yaml + + packages: + all: + permissions: + write: group + group: spack + my_app: + permissions: + read: group + group: my_team + +The permissions settings describe the broadest level of access to +installations of the specified packages. The execute permissions of +the file are set to the same level as read permissions for those files +that are executable. The default setting for ``read`` is ``world``, +and for ``write`` is ``user``. In the example above, installations of +``my_app`` will be installed with user and group permissions but no +world permissions, and owned by the group ``my_team``. All other +packages will be installed with user and group write privileges, and +world read privileges. Those packages will be owned by the group +``spack``. + +The ``group`` attribute assigns a Unix-style group to a package. All +files installed by the package will be owned by the assigned group, +and the sticky group bit will be set on the install prefix and all +directories inside the install prefix. This will ensure that even +manually placed files within the install prefix are owned by the +assigned group. If no group is assigned, Spack will allow the OS +default behavior to go as expected. + +---------------------------- +Assigning Package Attributes +---------------------------- + +You can assign class-level attributes in the configuration: + +.. code-block:: yaml + + packages: + mpileaks: + # Override existing attributes + url: http://www.somewhereelse.com/mpileaks-1.0.tar.gz + # ... or add new ones + x: 1 + +Attributes set this way will be accessible to any method executed +in the package.py file (e.g. the ``install()`` method). Values for these +attributes may be any value parseable by yaml. + +These can only be applied to specific packages, not "all" or +virtual packages. From 6eae4b9714358bc9ef61f103a0332b5c6fe83674 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 15 Nov 2023 17:20:38 -0600 Subject: [PATCH 636/806] taskflow: add v3.6.0 (#41098) --- var/spack/repos/builtin/packages/taskflow/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/taskflow/package.py b/var/spack/repos/builtin/packages/taskflow/package.py index df921639b28781..1694dc7c95f8c6 100644 --- a/var/spack/repos/builtin/packages/taskflow/package.py +++ b/var/spack/repos/builtin/packages/taskflow/package.py @@ -16,6 +16,7 @@ class Taskflow(CMakePackage): git = "https://github.com/taskflow/taskflow.git" version("master", branch="master") + version("3.6.0", sha256="5a1cd9cf89f93a97fcace58fd73ed2fc8ee2053bcb43e047acb6bc121c3edf4c") version("2.7.0", sha256="bc2227dcabec86abeba1fee56bb357d9d3c0ef0184f7c2275d7008e8758dfc3e") # Compiler must offer C++14 support From 95321f4f3a0425871f78614279aa019148853db8 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Thu, 16 Nov 2023 00:57:06 +0100 Subject: [PATCH 637/806] justbuild: add version v1.2.3 (#41084) --- var/spack/repos/builtin/packages/justbuild/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/justbuild/package.py b/var/spack/repos/builtin/packages/justbuild/package.py index 06a350821fbcba..2b9a7ad4d5b6e1 100644 --- a/var/spack/repos/builtin/packages/justbuild/package.py +++ b/var/spack/repos/builtin/packages/justbuild/package.py @@ -22,6 +22,7 @@ class Justbuild(Package): maintainers("asartori86") version("master", branch="master") + version("1.2.3", tag="v1.2.3", commit="45e9c1c85399f00372ad8b72894979a0002d8f95") version("1.2.2", tag="v1.2.2", commit="e1ee04684c34ae30ac3c91b6753e99a81a9dc51c") version("1.2.1", tag="v1.2.1", commit="959cd90083d0c783389cd09e187c98322c16469f") version("1.1.4", tag="v1.1.4", commit="32e96afd159f2158ca129fd00bf02c273d8e1e48") From 2f4046308f7e4383ccb53575730a6b6963872303 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 15 Nov 2023 17:16:53 -0700 Subject: [PATCH 638/806] deal.II: Require at least taskflow 3.4 (#41095) --- var/spack/repos/builtin/packages/dealii/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 1e9b3acb19fbb7..f6df5eb5672881 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -207,7 +207,7 @@ class Dealii(CMakePackage, CudaPackage): depends_on("sundials@:3~pthread", when="@9.0:9.2+sundials") depends_on("sundials@5:5.8", when="@9.3:9.3.3+sundials") depends_on("sundials@5:", when="@9.3.4:+sundials") - depends_on("taskflow", when="@9.6:+taskflow") + depends_on("taskflow@3.4:", when="@9.6:+taskflow") depends_on("trilinos gotype=int", when="+trilinos@12.18.1:") # TODO: next line fixes concretization with trilinos and adol-c depends_on("trilinos~exodus", when="@9.0:+adol-c+trilinos") From 66dea1d396a92f47e127d24fc4e67a8d9ff0c018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= <15837247+mofeing@users.noreply.github.com> Date: Thu, 16 Nov 2023 01:38:28 +0100 Subject: [PATCH 639/806] Update package.py (#41092) --- var/spack/repos/builtin/packages/openblas/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 409dfa004d9bea..bb9a5ef9ff4c8b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -24,6 +24,7 @@ class Openblas(CMakePackage, MakefilePackage): libraries = ["libopenblas", "openblas"] version("develop", branch="develop") + version("0.3.25", sha256="4c25cb30c4bb23eddca05d7d0a85997b8db6144f5464ba7f8c09ce91e2f35543") version("0.3.24", sha256="ceadc5065da97bd92404cac7254da66cc6eb192679cf1002098688978d4d5132") version("0.3.23", sha256="5d9491d07168a5d00116cdc068a40022c3455bf9293c7cb86a65b1054d7e5114") version("0.3.22", sha256="7fa9685926ba4f27cfe513adbf9af64d6b6b63f9dcabb37baefad6a65ff347a7") From 495252f7f6f1e51842ccf37a44b8bf2c8ddb8950 Mon Sep 17 00:00:00 2001 From: Auriane R <48684432+aurianer@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:04:46 +0100 Subject: [PATCH 640/806] Add patch for libffi@3.4.4 since failing to install using clang@15 (#41083) --- var/spack/repos/builtin/packages/libffi/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index c67bd82ddd2f52..d32400c3cfac5f 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -32,6 +32,11 @@ class Libffi(AutotoolsPackage): patch("clang-powerpc-3.2.1.patch", when="@3.2.1%clang platform=linux") # ref.: https://github.com/libffi/libffi/pull/561 patch("powerpc-3.3.patch", when="@3.3") + patch( + "https://github.com/libffi/libffi/commit/ce077e5565366171aa1b4438749b0922fce887a4.patch?full_index=1", + sha256="070b1f3aa87f2b56f83aff38afc42157e1692bfaa580276ecdbad2048b818ed7", + when="@3.4.3:3.4.4", + ) @property def headers(self): From 1e1cb68b849af2fc26b2a52b74a26fd42e6137d8 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 16 Nov 2023 14:19:05 +0100 Subject: [PATCH 641/806] Add audit check to spot `when=` arguments using wrong named specs (#41107) * Add audit check to spot when= arguments using named specs * Fix package issues caught by the new audit --- lib/spack/spack/audit.py | 49 ++++++++++++++++++- .../repos/builtin/packages/cpr/package.py | 2 +- .../builtin/packages/interproscan/package.py | 6 +-- .../repos/builtin/packages/lbann/package.py | 2 +- .../builtin/packages/py-abipy/package.py | 2 +- .../builtin/packages/py-kombu/package.py | 4 +- .../packages/py-nvidia-dali/package.py | 24 ++++----- .../builtin/packages/py-pdbfixer/package.py | 2 +- .../py-tensorflow-datasets/package.py | 4 +- 9 files changed, 71 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index 8b13ffc7cf72db..66c7008580a593 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -776,7 +776,7 @@ def _version_constraints_are_satisfiable_by_some_version_in_repo(pkgs, error_cls ) except Exception: summary = ( - "{0}: dependency on {1} cannot be satisfied " "by known versions of {1.name}" + "{0}: dependency on {1} cannot be satisfied by known versions of {1.name}" ).format(pkg_name, s) details = ["happening in " + filename] if dependency_pkg_cls is not None: @@ -818,6 +818,53 @@ def _analyze_variants_in_directive(pkg, constraint, directive, error_cls): return errors +@package_directives +def _named_specs_in_when_arguments(pkgs, error_cls): + """Reports named specs in the 'when=' attribute of a directive. + + Note that 'conflicts' is the only directive allowing that. + """ + errors = [] + for pkg_name in pkgs: + pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name) + + def _extracts_errors(triggers, summary): + _errors = [] + for trigger in list(triggers): + when_spec = spack.spec.Spec(trigger) + if when_spec.name is not None and when_spec.name != pkg_name: + details = [f"using '{trigger}', should be '^{trigger}'"] + _errors.append(error_cls(summary=summary, details=details)) + return _errors + + for dname, triggers in pkg_cls.dependencies.items(): + summary = f"{pkg_name}: wrong 'when=' condition for the '{dname}' dependency" + errors.extend(_extracts_errors(triggers, summary)) + + for vname, (variant, triggers) in pkg_cls.variants.items(): + summary = f"{pkg_name}: wrong 'when=' condition for the '{vname}' variant" + errors.extend(_extracts_errors(triggers, summary)) + + for provided, triggers in pkg_cls.provided.items(): + summary = f"{pkg_name}: wrong 'when=' condition for the '{provided}' virtual" + errors.extend(_extracts_errors(triggers, summary)) + + for _, triggers in pkg_cls.requirements.items(): + triggers = [when_spec for when_spec, _, _ in triggers] + summary = f"{pkg_name}: wrong 'when=' condition in 'requires' directive" + errors.extend(_extracts_errors(triggers, summary)) + + triggers = list(pkg_cls.patches) + summary = f"{pkg_name}: wrong 'when=' condition in 'patch' directives" + errors.extend(_extracts_errors(triggers, summary)) + + triggers = list(pkg_cls.resources) + summary = f"{pkg_name}: wrong 'when=' condition in 'resource' directives" + errors.extend(_extracts_errors(triggers, summary)) + + return llnl.util.lang.dedupe(errors) + + #: Sanity checks on package directives external_detection = AuditClass( group="externals", diff --git a/var/spack/repos/builtin/packages/cpr/package.py b/var/spack/repos/builtin/packages/cpr/package.py index 71e32d9960d536..0d18a6a9199645 100644 --- a/var/spack/repos/builtin/packages/cpr/package.py +++ b/var/spack/repos/builtin/packages/cpr/package.py @@ -18,7 +18,7 @@ class Cpr(CMakePackage): version("1.9.2", sha256="3bfbffb22c51f322780d10d3ca8f79424190d7ac4b5ad6ad896de08dbd06bf31") depends_on("curl") - depends_on("git", when="build") + depends_on("git", type="build") def cmake_args(self): _force = "_FORCE" if self.spec.satisfies("@:1.9") else "" diff --git a/var/spack/repos/builtin/packages/interproscan/package.py b/var/spack/repos/builtin/packages/interproscan/package.py index 82380135a76feb..4143dc6ff2899b 100644 --- a/var/spack/repos/builtin/packages/interproscan/package.py +++ b/var/spack/repos/builtin/packages/interproscan/package.py @@ -45,21 +45,21 @@ class Interproscan(Package): ) resource( - when="5.56-89.0 +databases", + when="@5.56-89.0 +databases", name="databases", url="https://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/5.56-89.0/alt/interproscan-data-5.56-89.0.tar.gz", sha256="49cd0c69711f9469f3b68857f4581b23ff12765ca2b12893d18e5a9a5cd8032d", ) resource( - when="5.38-76.0 +databases", + when="@5.38-76.0 +databases", name="databases", url="https://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/5.38-76.0/alt/interproscan-data-5.38-76.0.tar.gz", sha256="e05e15d701037504f92ecf849c20317e70df28e78ff1945826b3c1e16d9b9cce", ) resource( - when="5.36-75.0 +databases", + when="@5.36-75.0 +databases", name="databases", url="https://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/5.36-75.0/alt/interproscan-data-5.36-75.0.tar.gz", sha256="e9b1e6f2d1c20d06661a31a08c973bc8ddf039a4cf1e45ec4443200375e5d6a4", diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index ebe68f39db2675..14f257a3415ffa 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -209,7 +209,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("py-protobuf+cpp@3.10.0:4.21.12", type=("build", "run"), when="+pfe") depends_on("protobuf+shared@3.10.0:3.21.12") - depends_on("zlib-api", when="protobuf@3.11.0:") + depends_on("zlib-api", when="^protobuf@3.11.0:") # using cereal@1.3.1 and above requires changing the # find_package call to lowercase, so stick with :1.3.0 diff --git a/var/spack/repos/builtin/packages/py-abipy/package.py b/var/spack/repos/builtin/packages/py-abipy/package.py index 3e868f56075119..dfaed29c7d4f61 100644 --- a/var/spack/repos/builtin/packages/py-abipy/package.py +++ b/var/spack/repos/builtin/packages/py-abipy/package.py @@ -17,7 +17,7 @@ class PyAbipy(PythonPackage): version("0.2.0", sha256="c72b796ba0f9ea4299eac3085bede092d2652e9e5e8074d3badd19ef7b600792") variant("gui", default=False, description="Build the GUI") - variant("ipython", default=False, when="0.2.0", description="Build IPython support") + variant("ipython", default=False, when="@0.2.0", description="Build IPython support") depends_on("py-setuptools", type="build") # in newer pip versions --install-option does not exist diff --git a/var/spack/repos/builtin/packages/py-kombu/package.py b/var/spack/repos/builtin/packages/py-kombu/package.py index 6f13c380ffb840..257b0acd7f0953 100644 --- a/var/spack/repos/builtin/packages/py-kombu/package.py +++ b/var/spack/repos/builtin/packages/py-kombu/package.py @@ -32,7 +32,7 @@ class PyKombu(PythonPackage): depends_on("py-amqp@5.0.0:5", when="@5.0.0:5.0.2", type=("build", "run")) depends_on("py-amqp@5.0.9:5.0", when="@5.2.3", type=("build", "run")) depends_on("py-vine", when="@5.1.0:", type=("build", "run")) - depends_on("py-importlib-metadata@0.18:", type=("build", "run"), when="python@:3.7") - depends_on("py-cached-property", type=("build", "run"), when="python@:3.7") + depends_on("py-importlib-metadata@0.18:", type=("build", "run"), when="^python@:3.7") + depends_on("py-cached-property", type=("build", "run"), when="^python@:3.7") depends_on("py-redis@3.4.1:3,4.0.2:", when="+redis", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-nvidia-dali/package.py b/var/spack/repos/builtin/packages/py-nvidia-dali/package.py index 2b1af9e19a3691..93804505fb5e5c 100644 --- a/var/spack/repos/builtin/packages/py-nvidia-dali/package.py +++ b/var/spack/repos/builtin/packages/py-nvidia-dali/package.py @@ -170,20 +170,20 @@ class PyNvidiaDali(PythonPackage): ) cuda120_versions = ( - "1.27.0-cuda120", - "1.26.0-cuda120", - "1.25.0-cuda120", - "1.24.0-cuda120", - "1.23.0-cuda120", - "1.22.0-cuda120", + "@1.27.0-cuda120", + "@1.26.0-cuda120", + "@1.25.0-cuda120", + "@1.24.0-cuda120", + "@1.23.0-cuda120", + "@1.22.0-cuda120", ) cuda110_versions = ( - "1.27.0-cuda110", - "1.26.0-cuda110", - "1.25.0-cuda110", - "1.24.0-cuda110", - "1.23.0-cuda110", - "1.22.0-cuda110", + "@1.27.0-cuda110", + "@1.26.0-cuda110", + "@1.25.0-cuda110", + "@1.24.0-cuda110", + "@1.23.0-cuda110", + "@1.22.0-cuda110", ) for v in cuda120_versions: diff --git a/var/spack/repos/builtin/packages/py-pdbfixer/package.py b/var/spack/repos/builtin/packages/py-pdbfixer/package.py index 2da9f24d1ac086..2dbd4aa3eec7bf 100644 --- a/var/spack/repos/builtin/packages/py-pdbfixer/package.py +++ b/var/spack/repos/builtin/packages/py-pdbfixer/package.py @@ -18,6 +18,6 @@ class PyPdbfixer(PythonPackage): version("1.7", sha256="a0bef3c52a7bbe69a6aea5333f51f3e7d158339be5829aed19b0344bd66d4eea") depends_on("py-setuptools", type="build") - depends_on("openmm@7.1:7.5", type=("build", "run"), when="1.7") + depends_on("openmm@7.1:7.5", type=("build", "run"), when="@1.7") depends_on("openmm@7.6:", type=("build", "run"), when="@1.8:") depends_on("py-numpy", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-tensorflow-datasets/package.py b/var/spack/repos/builtin/packages/py-tensorflow-datasets/package.py index 1ad767902d9175..8189fa0c49cff8 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow-datasets/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow-datasets/package.py @@ -29,5 +29,5 @@ class PyTensorflowDatasets(PythonPackage): depends_on("py-tensorflow-metadata", type=("build", "run")) depends_on("py-termcolor", type=("build", "run")) depends_on("py-tqdm", type=("build", "run")) - depends_on("py-typing-extensions", type=("build", "run"), when="python@:3.7") - depends_on("py-importlib-resources", type=("build", "run"), when="python@:3.8") + depends_on("py-typing-extensions", type=("build", "run"), when="^python@:3.7") + depends_on("py-importlib-resources", type=("build", "run"), when="^python@:3.8") From 0798bd0915a49e4ea267ca1c01f03ee661627588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Aum=C3=BCller?= Date: Thu, 16 Nov 2023 19:04:02 +0100 Subject: [PATCH 642/806] Updates for Ospray@3.0.0 (#41054) * rkcommon: add v1.12.0 * openimagedenoise: add v2.1.0 * openvkl: 1.3.2 only compatible with rkcommon@:1.11 * openvkl: add v2.0.0 * ospray: add v3.0.0 * paraview: not yet compatible with ospray@3 --- .../repos/builtin/packages/openimagedenoise/package.py | 1 + var/spack/repos/builtin/packages/openvkl/package.py | 2 ++ var/spack/repos/builtin/packages/ospray/package.py | 10 ++++++++-- var/spack/repos/builtin/packages/paraview/package.py | 2 +- var/spack/repos/builtin/packages/rkcommon/package.py | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/openimagedenoise/package.py b/var/spack/repos/builtin/packages/openimagedenoise/package.py index 9ccce30a86c266..e98d6d2baaa32c 100644 --- a/var/spack/repos/builtin/packages/openimagedenoise/package.py +++ b/var/spack/repos/builtin/packages/openimagedenoise/package.py @@ -17,6 +17,7 @@ class Openimagedenoise(CMakePackage): # maintainers("github_user1", "github_user2") + version("2.1.0", sha256="ce144ba582ff36563d9442ee07fa2a4d249bc85aa93e5b25fc527ff4ee755ed6") version("2.0.1", sha256="328eeb9809d18e835dca7203224af3748578794784c026940c02eea09c695b90") version("1.4.3", sha256="3276e252297ebad67a999298d8f0c30cfb221e166b166ae5c955d88b94ad062a") version("1.4.2", sha256="e70d27ce24b41364782376c1b3b4f074f77310ccfe5f8ffec4a13a347e48a0ea") diff --git a/var/spack/repos/builtin/packages/openvkl/package.py b/var/spack/repos/builtin/packages/openvkl/package.py index 32bbdcafe26c3b..bc9a32f5ce29fd 100644 --- a/var/spack/repos/builtin/packages/openvkl/package.py +++ b/var/spack/repos/builtin/packages/openvkl/package.py @@ -16,6 +16,7 @@ class Openvkl(CMakePackage): # maintainers("github_user1", "github_user2") + version("2.0.0", sha256="469c3fba254c4fcdd84f8a9763d2e1aaa496dc123b5a9d467cc0a561e284c4e6") version("1.3.2", sha256="7704736566bf17497a3e51c067bd575316895fda96eccc682dae4aac7fb07b28") version("1.3.1", sha256="c9cefb6c313f2b4c0331e9629931759a6bc204ec00deed6ec0becad1670a1933") version("1.3.0", sha256="c6d4d40e6d232839c278b53dee1e7bd3bd239c3ccac33f49b465fc65a0692be9") @@ -36,6 +37,7 @@ class Openvkl(CMakePackage): depends_on("rkcommon@1.8.0:", when="@1.1:") depends_on("rkcommon@:1.10.0", when="@:1.3.1") depends_on("rkcommon@1.11.0:", when="@1.3.2:") + depends_on("rkcommon@:1.11.0", when="@:1.3.2") depends_on("tbb") def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/ospray/package.py b/var/spack/repos/builtin/packages/ospray/package.py index 85a79894bbf246..fe81c528aa142e 100644 --- a/var/spack/repos/builtin/packages/ospray/package.py +++ b/var/spack/repos/builtin/packages/ospray/package.py @@ -16,6 +16,7 @@ class Ospray(CMakePackage): # maintainers("aumuell") + version("3.0.0", sha256="d8d8e632d77171c810c0f38f8d5c8387470ca19b75f5b80ad4d3d12007280288") version("2.12.0", sha256="268b16952b2dd44da2a1e40d2065c960bc2442dd09b63ace8b65d3408f596301") version("2.11.0", sha256="55974e650d9b78989ee55adb81cffd8c6e39ce5d3cf0a3b3198c522bf36f6e81") version("2.10.0", sha256="bd478284f48d2cb775fc41a2855a9d9f5ea16c861abda0f8dc94e02ea7189cb8") @@ -38,26 +39,31 @@ class Ospray(CMakePackage): depends_on("rkcommon@1.9", when="@2.9.0") depends_on("rkcommon@1.10:", when="@2.10.0:") depends_on("rkcommon@1.11:", when="@2.11:") + depends_on("rkcommon@1.12:", when="@3:") depends_on("embree@3.12: +ispc") depends_on("embree@3.13.1:", when="@2.7.0:") depends_on("embree@:3", when="@:2.10") depends_on("embree@4:", when="@2.11:") + depends_on("embree@4.3:", when="@3:") with when("+volumes"): - depends_on("openvkl@0.13.0:") + depends_on("openvkl@0.13.0:1", when="@2") depends_on("openvkl@1.0.1:", when="@2.7.0:") depends_on("openvkl@1.2.0:", when="@2.9.0:") depends_on("openvkl@1.3.0:", when="@2.10.0:") - depends_on("openvkl@1.3.2:", when="@2.11:") + depends_on("openvkl@1.3.2:", when="@2.11:2") + depends_on("openvkl@2:", when="@3:") with when("+denoiser"): depends_on("openimagedenoise@1.2.3:") depends_on("openimagedenoise@1.3:", when="@2.5:") depends_on("openimagedenoise@:1", when="@:2.11") depends_on("openimagedenoise@2:", when="@2.12:") + depends_on("openimagedenoise@2.1:", when="@3:") depends_on("ispc@1.14.1:", type=("build")) depends_on("ispc@1.16.0:", when="@2.7.0:", type=("build")) depends_on("ispc@1.18.0:", when="@2.10.0:", type=("build")) depends_on("ispc@1.19.0:", when="@2.11.0:", type=("build")) depends_on("ispc@1.20.0:", when="@2.12.0:", type=("build")) + depends_on("ispc@1.21.1:", when="@3:", type=("build")) depends_on("tbb") depends_on("mpi", when="+mpi") diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index aae15f3c11d4fa..1f3cd9a76fb19a 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -193,7 +193,7 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): depends_on("libxt", when="~osmesa platform={}".format(p)) conflicts("+qt", when="+osmesa") - depends_on("ospray@2.1:", when="+raytracing") + depends_on("ospray@2.1:2", when="+raytracing") depends_on("openimagedenoise", when="+raytracing") depends_on("ospray +mpi", when="+raytracing +mpi") diff --git a/var/spack/repos/builtin/packages/rkcommon/package.py b/var/spack/repos/builtin/packages/rkcommon/package.py index 4f0a07559ef9c6..8223c6836000a9 100644 --- a/var/spack/repos/builtin/packages/rkcommon/package.py +++ b/var/spack/repos/builtin/packages/rkcommon/package.py @@ -16,6 +16,7 @@ class Rkcommon(CMakePackage): # maintainers("github_user1",o"github_user2") + version("1.12.0", sha256="6abb901073811cdbcbe336772e1fcb458d78cab5ad8d5d61de2b57ab83581e80") version("1.11.0", sha256="9cfeedaccdefbdcf23c465cb1e6c02057100c4a1a573672dc6cfea5348cedfdd") version("1.10.0", sha256="57a33ce499a7fc5a5aaffa39ec7597115cf69ed4ff773546b5b71ff475ee4730") version("1.9.0", sha256="b68aa02ef44c9e35c168f826a14802bb5cc6a9d769ba4b64b2c54f347a14aa53") From 8d2e76e8b5c14a9c0604abff8fa0e653402dbc57 Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Thu, 16 Nov 2023 13:29:00 -0500 Subject: [PATCH 643/806] enable rocAL and add MIVisionX tests (#39630) * initial commit to enable rocAL and add MIVisionX tests * fix styling * updated checksum for libjpeg patches * update for 5.6 * use satisfies for checking spec version --- .../builtin/packages/libjpeg-turbo/package.py | 16 +++ .../builtin/packages/migraphx/package.py | 1 + .../0001-add-half-include-path-5.6.patch | 13 ++ .../0001-add-half-include-path.patch | 21 +++ ...0002-add-half-include-path-for-tests.patch | 62 +++++++++ .../builtin/packages/mivisionx/package.py | 127 +++++++++++++++++- 6 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path-5.6.patch create mode 100644 var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path.patch create mode 100644 var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests.patch diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index a30e29b138d574..25425557854651 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -59,6 +59,22 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage): variant("shared", default=True, description="Build shared libs") variant("static", default=True, description="Build static libs") variant("jpeg8", default=False, description="Emulate libjpeg v8 API/ABI") + variant( + "partial_decoder", + default=False, + description="add partial_decode_scale functionality required for rocAL", + ) + + patch( + "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/09c71da06a6346dca132db66f26f959f7e4dd5ad.patch?full_index=1", + sha256="4d5bdfb5de5b04399144254ea383f5357ab7beb830b398aeb35b65f21dd6b4b0", + when="@2.0.6 +partial_decoder", + ) + patch( + "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/640d7ee1917fcd3b6a5271aa6cf4576bccc7c5fb.patch?full_index=1", + sha256="dc1ec567c2356b652100ecdc28713bbf25f544e46f7d2947f31a2395c362cc48", + when="@2.0.6 +partial_decoder", + ) # Can use either of these. But in the current version of the package # only nasm is used. In order to use yasm an environmental variable diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index 81bf1bff2b3818..09d340d01c8d16 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -131,6 +131,7 @@ def url_for_version(self, version): depends_on("py-pybind11", type="build", when="@:4.0.0") depends_on("py-pybind11@2.6:", type="build", when="@4.1.0:") depends_on("pkgconfig", type="build", when="@5.3.0:") + depends_on("abseil-cpp") for ver in [ "3.5.0", diff --git a/var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path-5.6.patch b/var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path-5.6.patch new file mode 100644 index 00000000000000..364a4a403651c4 --- /dev/null +++ b/var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path-5.6.patch @@ -0,0 +1,13 @@ +diff --git a/rocAL/rocAL/CMakeLists.txt b/rocAL/rocAL/CMakeLists.txt +index 7ae8cb8..195f387 100644 +--- a/rocAL/rocAL/CMakeLists.txt ++++ b/rocAL/rocAL/CMakeLists.txt +@@ -122,6 +122,8 @@ if(NOT Threads_FOUND) + endif() + + if(${BUILD_ROCAL}) ++ find_path(HALF_INCLUDE_DIR half.hpp) ++ include_directories(${HALF_INCLUDE_DIR}) + # AMD OpenVX & VX_RPP + set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} openvx vx_rpp) + # AMD RPP diff --git a/var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path.patch b/var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path.patch new file mode 100644 index 00000000000000..2e935e9cee2417 --- /dev/null +++ b/var/spack/repos/builtin/packages/mivisionx/0001-add-half-include-path.patch @@ -0,0 +1,21 @@ +diff --git a/rocAL/rocAL/CMakeLists.txt b/rocAL/rocAL/CMakeLists.txt +index bb28810..3c97eab 100644 +--- a/rocAL/rocAL/CMakeLists.txt ++++ b/rocAL/rocAL/CMakeLists.txt +@@ -39,6 +39,8 @@ find_package(Boost COMPONENTS ${BOOST_COMPONENTS} QUIET) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads QUIET) + ++find_path(HALF_INCLUDE_DIR half.hpp) ++ + if( GPU_SUPPORT AND "${BACKEND}" STREQUAL "HIP") + if(NOT DEFINED HIP_PATH) + if(NOT DEFINED ENV{HIP_PATH}) +@@ -120,6 +122,7 @@ if(NOT Threads_FOUND) + endif() + + if(${BUILD_ROCAL}) ++ include_directories(${HALF_INCLUDE_DIR}) + # AMD OpenVX & RPP + include_directories(${AMDRPP_INCLUDE_DIRS}) + set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} openvx vx_rpp) diff --git a/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests.patch b/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests.patch new file mode 100644 index 00000000000000..c3aec5597982bc --- /dev/null +++ b/var/spack/repos/builtin/packages/mivisionx/0002-add-half-include-path-for-tests.patch @@ -0,0 +1,62 @@ +diff --git a/model_compiler/python/nnir_to_clib.py b/model_compiler/python/nnir_to_clib.py +index b688094..26fcfe3 100644 +--- a/model_compiler/python/nnir_to_clib.py ++++ b/model_compiler/python/nnir_to_clib.py +@@ -151,6 +151,10 @@ if (OPENVX_BACKEND_OPENCL_FOUND) + include_directories (${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers ) + endif() + ++find_path(HALF_INCLUDE_DIR half.hpp) ++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}") ++include_directories(${HALF_INCLUDE_DIR}) ++ + find_package(OpenCV QUIET) + include_directories (/opt/rocm/include/mivisionx) + include_directories (${PROJECT_SOURCE_DIR}/lib) +diff --git a/samples/inference/mv_objdetect/CMakeLists.txt b/samples/inference/mv_objdetect/CMakeLists.txt +index 9b92b84..d82b71e 100644 +--- a/samples/inference/mv_objdetect/CMakeLists.txt ++++ b/samples/inference/mv_objdetect/CMakeLists.txt +@@ -50,7 +50,10 @@ if (OPENVX_BACKEND_OPENCL_FOUND) + include_directories (${OpenCL_INCLUDE_DIRS} ${OpenCL_INCLUDE_DIRS}/Headers ) + endif() + +-include_directories (${ROCM_PATH}/include/mivisionx ${PROJECT_SOURCE_DIR} ) ++find_path(HALF_INCLUDE_DIR half.hpp) ++message(STATUS "HALF_INCLUDE_DIR: ${HALF_INCLUDE_DIR}") ++ ++include_directories (${ROCM_PATH}/include/mivisionx ${PROJECT_SOURCE_DIR} ${HALF_INCLUDE_DIR} ) + link_directories (${ROCM_PATH}/lib ${PROJECT_SOURCE_DIR}/lib) + option (USE_POSTPROC "Use postprocessing module implementation" ON) + set(SOURCES mvobjdetect.cpp mvdeploy_api.cpp visualize.cpp) +diff --git a/utilities/rocAL/rocAL_unittests/CMakeLists.txt b/utilities/rocAL/rocAL_unittests/CMakeLists.txt +index 6500003..20de035 100644 +--- a/utilities/rocAL/rocAL_unittests/CMakeLists.txt ++++ b/utilities/rocAL/rocAL_unittests/CMakeLists.txt +@@ -43,9 +43,10 @@ include(GNUInstallDirs) + + list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../amd_openvx/cmake) + ++find_path(HALF_INCLUDE_DIR half.hpp) + find_package(OpenCV QUIET) + find_package(AMDRPP QUIET) +-include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal) ++include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal ${HALF_INCLUDE_DIR}) + link_directories(${ROCM_PATH}/lib/) + file(GLOB My_Source_Files ./*.cpp) + add_executable(${PROJECT_NAME} ${My_Source_Files}) +diff --git a/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt b/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt +index bd64a5b..3aa6172 100644 +--- a/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt ++++ b/utilities/rocAL/rocAL_video_unittests/CMakeLists.txt +@@ -46,8 +46,8 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../amd_openvx/cmake) + + find_package(OpenCV QUIET) + find_package(AMDRPP QUIET) +- +-include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal) ++find_path(HALF_INCLUDE_DIR half.hpp) ++include_directories(${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal ${HALF_INCLUDE_DIR}) + link_directories(${ROCM_PATH}/lib/) + file(GLOB My_Source_Files ./*.cpp) + add_executable(${PROJECT_NAME} ${My_Source_Files}) diff --git a/var/spack/repos/builtin/packages/mivisionx/package.py b/var/spack/repos/builtin/packages/mivisionx/package.py index b298160520f53f..f30ae2a9c25599 100644 --- a/var/spack/repos/builtin/packages/mivisionx/package.py +++ b/var/spack/repos/builtin/packages/mivisionx/package.py @@ -116,8 +116,19 @@ def url_for_version(self, version): variant("opencl", default=False, description="Use OPENCL as the backend") variant("hip", default=True, description="Use HIP as backend") + variant("add_tests", default=False, description="add tests and samples folder") + patch("0001-add-half-include-path.patch", when="@5.5") + patch("0001-add-half-include-path-5.6.patch", when="@5.6:") + patch("0002-add-half-include-path-for-tests.patch", when="@5.5: +add_tests") + + patch( + "https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/commit/da24882438b91a0ae1feee23206b75c1a1256887.patch?full_index=1", + sha256="41caff199224f904ef5dc2cd9c5602d6cfa41eba6af0fcc782942a09dd202ab4", + when="@5.6", + ) conflicts("+opencl", when="@5.6.0:") + conflicts("+add_tests", when="@:5.4") def patch(self): if self.spec.satisfies("@4.2.0"): @@ -179,6 +190,86 @@ def patch(self): "amd_openvx_extensions/amd_nn/nn_hip/CMakeLists.txt", string=True, ) + if self.spec.satisfies("@5.5.0: + hip"): + filter_file( + "${ROCM_PATH}/llvm/bin/clang++", + "{0}/bin/clang++".format(self.spec["llvm-amdgpu"].prefix), + "rocAL/rocAL/rocAL_hip/CMakeLists.txt", + string=True, + ) + if self.spec.satisfies("+add_tests"): + filter_file( + "${ROCM_PATH}/include/mivisionx", + "{0}/include/mivisionx".format(self.spec.prefix), + "tests/amd_migraphx_tests/mnist/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/lib", + "{0}/lib".format(self.spec.prefix), + "tests/amd_migraphx_tests/mnist/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/include/mivisionx", + "{0}/include/mivisionx".format(self.spec.prefix), + "tests/amd_migraphx_tests/resnet50/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/lib", + "{0}/lib".format(self.spec.prefix), + "tests/amd_migraphx_tests/resnet50/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/include/mivisionx", + "{0}/include/mivisionx".format(self.spec.prefix), + "samples/inference/mv_objdetect/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/lib", + "{0}/lib".format(self.spec.prefix), + "samples/inference/mv_objdetect/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/include/mivisionx", + "{0}/include/mivisionx".format(self.spec.prefix), + "model_compiler/python/nnir_to_clib.py", + string=True, + ) + filter_file( + "/opt/rocm", + "{0}".format(self.spec.prefix), + "model_compiler/python/nnir_to_clib.py", + string=True, + ) + filter_file( + "${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal", + "{0}/include/mivisionx/rocal".format(self.spec.prefix), + "utilities/rocAL/rocAL_unittests/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/lib", + "{0}/lib".format(self.spec.prefix), + "utilities/rocAL/rocAL_unittests/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/${CMAKE_INSTALL_INCLUDEDIR}/mivisionx/rocal", + "{0}/include/mivisionx/rocal".format(self.spec.prefix), + "utilities/rocAL/rocAL_video_unittests/CMakeLists.txt", + string=True, + ) + filter_file( + "${ROCM_PATH}/lib", + "{0}/lib".format(self.spec.prefix), + "utilities/rocAL/rocAL_video_unittests/CMakeLists.txt", + string=True, + ) depends_on("cmake@3.5:", type="build") depends_on("ffmpeg@:4", type="build", when="@:5.3") @@ -203,7 +294,17 @@ def patch(self): depends_on("miopen-opencl@3.5.0", when="@1.7+opencl") depends_on("miopengemm@1.1.6", when="@1.7+opencl") depends_on("openssl", when="@4.0.0:") - depends_on("libjpeg-turbo", type="build") + depends_on("libjpeg-turbo@2.0.6+partial_decoder", type="build") + depends_on("rpp", when="@5.5:") + depends_on("lmdb", when="@5.5:") + depends_on("py-setuptools", when="@5.6:") + depends_on("py-wheel", when="@5.6:") + depends_on("py-pybind11", when="@5.6:") + depends_on("py-google-api-python-client", when="+add_tests") + depends_on("py-protobuf@3.20.3", type=("build", "run"), when="+add_tests") + depends_on("py-future", when="+add_tests") + depends_on("py-numpy", when="+add_tests") + depends_on("py-pytz", when="+add_tests") conflicts("^cmake@3.22:", when="@:5.0.0") # need to choose atleast one backend and both cannot be set @@ -265,11 +366,15 @@ def patch(self): depends_on("miopen-hip@" + ver, when="@" + ver) for ver in ["5.3.3", "5.4.0", "5.4.3", "5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("migraphx@" + ver, when="@" + ver) + depends_on("hip@" + ver, when="@" + ver) for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1"]: depends_on("rocm-core@" + ver, when="@" + ver) depends_on("python@3.5:", type="build") + def setup_run_environment(self, env): + env.set("MIVISIONX_MODEL_COMPILER_PATH", self.spec.prefix.libexec.mivisionx.model_compiler) + def flag_handler(self, name, flags): spec = self.spec protobuf = spec["protobuf"].prefix.include @@ -290,4 +395,24 @@ def cmake_args(self): args.append(self.define("HIP_PATH", spec["hip"].prefix)) if self.spec.satisfies("~hip~opencl"): args.append(self.define("BACKEND", "CPU")) + if self.spec.satisfies("@5.5:"): + args.append( + self.define("AMDRPP_LIBRARIES", "{0}/lib/librpp.so".format(spec["rpp"].prefix)) + ) + args.append( + self.define("AMDRPP_INCLUDE_DIRS", "{0}/include/rpp".format(spec["rpp"].prefix)) + ) + args.append( + self.define( + "TurboJpeg_LIBRARIES_DIRS", "{0}/lib64".format(spec["libjpeg-turbo"].prefix) + ) + ) + args.append(self.define("CMAKE_INSTALL_PREFIX_PYTHON", spec.prefix)) return args + + @run_after("install") + def add_tests(self): + if self.spec.satisfies("+add_tests"): + install_tree("tests", self.spec.prefix.tests) + install_tree("samples", self.spec.prefix.samples) + install_tree("utilities", self.spec.prefix.utilities) From ba091e00b3cd0d3e7de93e314d74d011e4bb477f Mon Sep 17 00:00:00 2001 From: Sinan Date: Thu, 16 Nov 2023 10:36:29 -0800 Subject: [PATCH 644/806] package/lemon: improve (#40971) * package/lemon: improve * fix bug * final improvements * use f strings for boolean options, add soplex as TODO * leave +coin as TODO * depends on bzip2 when +coin * tidy --------- Co-authored-by: sbulut Co-authored-by: Sinan81 --- .../repos/builtin/packages/lemon/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/var/spack/repos/builtin/packages/lemon/package.py b/var/spack/repos/builtin/packages/lemon/package.py index bcf759ea198ec7..61a7fc46e3dce9 100644 --- a/var/spack/repos/builtin/packages/lemon/package.py +++ b/var/spack/repos/builtin/packages/lemon/package.py @@ -16,3 +16,30 @@ class Lemon(CMakePackage): url = "https://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz" version("1.3.1", sha256="71b7c725f4c0b4a8ccb92eb87b208701586cf7a96156ebd821ca3ed855bad3c8") + + # variant("coin", default=False, description="Enable Coin solver backend") #TODO build fails + variant("ilog", default=False, description="Enable ILOG (CPLEX) solver backend") + variant("glpk", default=True, description="Enable GLPK solver backend") + # soplex not mentioned in docs but shown in cmakecache + # variant("soplex", default=False, description="Enable SOPLEX solver backend") #TODO + + depends_on("glpk", when="+glpk") + depends_on("cplex", when="+ilog") + # depends_on("coinutils", when="+coin") # just a guess + # depends_on("cbc", when="+coin") + # depends_on("clp", when="+coin") + # depends_on("bzip2", when="+coin") + # depends_on("soplex", when="+soplex") # no such package in Spack yet. TODO + + def cmake_args(self): + spec = self.spec + args = [] + args.extend( + [ + # f"-DLEMON_ENABLE_COIN={spec.variants['coin'].value}", #TODO + f"-DLEMON_ENABLE_ILOG={spec.variants['ilog'].value}", + f"-DLEMON_ENABLE_GLPK={spec.variants['glpk'].value}", + # f"-DLEMON_ENABLE_SOPLEX={spec.variants['soplex'].value}", #TODO + ] + ) + return args From 765df31381b545f644f16fe91ac5c36ce40d4fb9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 16 Nov 2023 12:52:21 -0600 Subject: [PATCH 645/806] py-lightning: add v2.1.2 (#41106) --- var/spack/repos/builtin/packages/py-lightning/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-lightning/package.py b/var/spack/repos/builtin/packages/py-lightning/package.py index 03861f20a56c17..032aa9c817aca7 100644 --- a/var/spack/repos/builtin/packages/py-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-lightning/package.py @@ -15,6 +15,7 @@ class PyLightning(PythonPackage): maintainers("adamjstewart") + version("2.1.2", sha256="3b2599a8a719916cb03526e6570356809729680c6cda09391232e2aba0a4ed4b") version("2.1.1", sha256="865491940d20a9754eac7494aa18cab893e0c2b31e83743349eeeaf31dfb52db") version("2.1.0", sha256="1f78f5995ae7dcffa1edf34320db136902b73a0d1b304404c48ec8be165b3a93") version("2.0.9", sha256="2395ece6e29e12064718ff16b8edec5685df7f7095d4fee78edb0a654f5cd7eb") From 1927ca1f3504468f072573e90db0f12c58306098 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 16 Nov 2023 12:59:13 -0600 Subject: [PATCH 646/806] Update PyTorch ecosystem (#41105) --- var/spack/repos/builtin/packages/py-torch/package.py | 1 + var/spack/repos/builtin/packages/py-torchaudio/package.py | 2 ++ var/spack/repos/builtin/packages/py-torchdata/package.py | 2 ++ var/spack/repos/builtin/packages/py-torchtext/package.py | 2 ++ var/spack/repos/builtin/packages/py-torchvision/package.py | 2 ++ 5 files changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index e4ff3b29b8f5e4..e93522cd5c7e11 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -25,6 +25,7 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): version("main", branch="main") version("master", branch="main", deprecated=True) + version("2.1.1", tag="v2.1.1", commit="4c55dc50355d5e923642c59ad2a23d6ad54711e7") version("2.1.0", tag="v2.1.0", commit="7bcf7da3a268b435777fe87c7794c382f444e86d") version("2.0.1", tag="v2.0.1", commit="e9ebda29d87ce0916ab08c06ab26fd3766a870e5") version("2.0.0", tag="v2.0.0", commit="c263bd43e8e8502d4726643bc6fd046f0130ac0e") diff --git a/var/spack/repos/builtin/packages/py-torchaudio/package.py b/var/spack/repos/builtin/packages/py-torchaudio/package.py index d07ce1de2182c7..94bfd97e3e487c 100644 --- a/var/spack/repos/builtin/packages/py-torchaudio/package.py +++ b/var/spack/repos/builtin/packages/py-torchaudio/package.py @@ -15,6 +15,7 @@ class PyTorchaudio(PythonPackage): submodules = True version("main", branch="main") + version("2.1.1", tag="v2.1.1", commit="db624844f5c95bb7618fe5a5f532bf9b68efeb45") version("2.1.0", tag="v2.1.0", commit="6ea1133706801ec6e81bb29142da2e21a8583a0a") version("2.0.2", tag="v2.0.2", commit="31de77dad5c89274451b3f5c4bcb630be12787c4") version("2.0.1", tag="v2.0.1", commit="3b40834aca41957002dfe074175e900cf8906237") @@ -56,6 +57,7 @@ class PyTorchaudio(PythonPackage): depends_on("sox") depends_on("py-torch@main", when="@main", type=("build", "link", "run")) + depends_on("py-torch@2.1.1", when="@2.1.1", type=("build", "link", "run")) depends_on("py-torch@2.1.0", when="@2.1.0", type=("build", "link", "run")) depends_on("py-torch@2.0.1", when="@2.0.2", type=("build", "link", "run")) depends_on("py-torch@2.0.0", when="@2.0.1", type=("build", "link", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchdata/package.py b/var/spack/repos/builtin/packages/py-torchdata/package.py index fd9367f31d0179..5c1eedcfb64c78 100644 --- a/var/spack/repos/builtin/packages/py-torchdata/package.py +++ b/var/spack/repos/builtin/packages/py-torchdata/package.py @@ -16,6 +16,7 @@ class PyTorchdata(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("0.7.1", sha256="1b6589336776ccba19fd3bf435588416105d372f6b85d58a9f2b008286f483bf") version("0.7.0", sha256="0b444719c3abc67201ed0fea92ea9c4100e7f36551ba0d19a09446cc11154eb3") version("0.6.1", sha256="c596db251c5e6550db3f00e4308ee7112585cca4d6a1c82a433478fd86693257") version("0.6.0", sha256="048dea12ee96c0ea1525097959fee811d7b38c2ed05f44a90f35f8961895fb5b") @@ -38,6 +39,7 @@ class PyTorchdata(PythonPackage): # https://github.com/pytorch/data#version-compatibility depends_on("py-torch@main", when="@main", type=("build", "run")) + depends_on("py-torch@2.1.1", when="@0.7.1", type=("build", "run")) depends_on("py-torch@2.1.0", when="@0.7.0", type=("build", "run")) depends_on("py-torch@2.0.1", when="@0.6.1", type=("build", "run")) depends_on("py-torch@2.0.0", when="@0.6.0", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchtext/package.py b/var/spack/repos/builtin/packages/py-torchtext/package.py index 180b555069bc5e..6457a832a7866a 100644 --- a/var/spack/repos/builtin/packages/py-torchtext/package.py +++ b/var/spack/repos/builtin/packages/py-torchtext/package.py @@ -17,6 +17,7 @@ class PyTorchtext(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("0.16.1", tag="v0.16.1", commit="66671007c84e07386da3c04e5ca403b8a417c8e5") version("0.16.0", tag="v0.16.0", commit="4e255c95c76b1ccde4f6650391c0bc30650d6dbe") version("0.15.2", tag="v0.15.2", commit="4571036cf66c539e50625218aeb99a288d79f3e1") version("0.15.1", tag="v0.15.1", commit="c696895e524c61fd2b8b26916dd006411c5f3ba5") @@ -58,6 +59,7 @@ class PyTorchtext(PythonPackage): # https://github.com/pytorch/text#installation depends_on("py-torch@main", when="@main", type=("build", "link", "run")) + depends_on("py-torch@2.1.1", when="@0.16.1", type=("build", "link", "run")) depends_on("py-torch@2.1.0", when="@0.16.0", type=("build", "link", "run")) depends_on("py-torch@2.0.1", when="@0.15.2", type=("build", "link", "run")) depends_on("py-torch@2.0.0", when="@0.15.1", type=("build", "link", "run")) diff --git a/var/spack/repos/builtin/packages/py-torchvision/package.py b/var/spack/repos/builtin/packages/py-torchvision/package.py index 5aef4c6aef8a29..2ed70ca4ee9984 100644 --- a/var/spack/repos/builtin/packages/py-torchvision/package.py +++ b/var/spack/repos/builtin/packages/py-torchvision/package.py @@ -17,6 +17,7 @@ class PyTorchvision(PythonPackage): maintainers("adamjstewart") version("main", branch="main") + version("0.16.1", sha256="d31fe52e4540750c8d372b0f38f1bfa81d8261193f2c2c06577332831d203c50") version("0.16.0", sha256="79b30b082237e3ead21e74587cedf4a4d832f977cf7dfeccfb65f67988b12ceb") version("0.15.2", sha256="1efcb80e0a6e42c54f07ee16167839b4d302aeeecc12839cc47c74b06a2c20d4") version("0.15.1", sha256="689d23d4ebb0c7e54e8651c89b17155b64341c14ae4444a04ca7dc6f2b6a0a43") @@ -62,6 +63,7 @@ class PyTorchvision(PythonPackage): # https://github.com/pytorch/vision#installation depends_on("py-torch@main", when="@main", type=("build", "link", "run")) + depends_on("py-torch@2.1.1", when="@0.16.1", type=("build", "link", "run")) depends_on("py-torch@2.1.0", when="@0.16.0", type=("build", "link", "run")) depends_on("py-torch@2.0.1", when="@0.15.2", type=("build", "link", "run")) depends_on("py-torch@2.0.0", when="@0.15.1", type=("build", "link", "run")) From 0cde944ccc7f22a241f3b902439b9c314bd7c5a6 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 16 Nov 2023 23:30:29 +0100 Subject: [PATCH 647/806] Improve the error message for deprecated preferences (#41075) Improves the warning for deprecated preferences, and adds a configuration audit to get files:lines details of the issues. Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> --- lib/spack/spack/audit.py | 36 ++++++++++++++++++++++++++++++ lib/spack/spack/cmd/audit.py | 8 +++++-- lib/spack/spack/schema/packages.py | 16 ++++++++----- 3 files changed, 53 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index 66c7008580a593..d0a68cf2121316 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -40,6 +40,7 @@ def _search_duplicate_compilers(error_cls): import collections.abc import glob import inspect +import io import itertools import pathlib import pickle @@ -54,6 +55,7 @@ def _search_duplicate_compilers(error_cls): import spack.repo import spack.spec import spack.util.crypto +import spack.util.spack_yaml as syaml import spack.variant #: Map an audit tag to a list of callables implementing checks @@ -250,6 +252,40 @@ def _search_duplicate_specs_in_externals(error_cls): return errors +@config_packages +def _deprecated_preferences(error_cls): + """Search package preferences deprecated in v0.21 (and slated for removal in v0.22)""" + # TODO (v0.22): remove this audit as the attributes will not be allowed in config + errors = [] + packages_yaml = spack.config.CONFIG.get_config("packages") + + def make_error(attribute_name, config_data, summary): + s = io.StringIO() + s.write("Occurring in the following file:\n") + dict_view = syaml.syaml_dict((k, v) for k, v in config_data.items() if k == attribute_name) + syaml.dump_config(dict_view, stream=s, blame=True) + return error_cls(summary=summary, details=[s.getvalue()]) + + if "all" in packages_yaml and "version" in packages_yaml["all"]: + summary = "Using the deprecated 'version' attribute under 'packages:all'" + errors.append(make_error("version", packages_yaml["all"], summary)) + + for package_name in packages_yaml: + if package_name == "all": + continue + + package_conf = packages_yaml[package_name] + for attribute in ("compiler", "providers", "target"): + if attribute not in package_conf: + continue + summary = ( + f"Using the deprecated '{attribute}' attribute " f"under 'packages:{package_name}'" + ) + errors.append(make_error(attribute, package_conf, summary)) + + return errors + + #: Sanity checks on package directives package_directives = AuditClass( group="packages", diff --git a/lib/spack/spack/cmd/audit.py b/lib/spack/spack/cmd/audit.py index 86eea9f7bc8b9a..58d7a5362cf56d 100644 --- a/lib/spack/spack/cmd/audit.py +++ b/lib/spack/spack/cmd/audit.py @@ -2,6 +2,8 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import warnings + import llnl.util.tty as tty import llnl.util.tty.colify import llnl.util.tty.color as cl @@ -52,8 +54,10 @@ def setup_parser(subparser): def configs(parser, args): - reports = spack.audit.run_group(args.subcommand) - _process_reports(reports) + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + reports = spack.audit.run_group(args.subcommand) + _process_reports(reports) def packages(parser, args): diff --git a/lib/spack/spack/schema/packages.py b/lib/spack/spack/schema/packages.py index 2e651ec798355d..2802f8952947aa 100644 --- a/lib/spack/spack/schema/packages.py +++ b/lib/spack/spack/schema/packages.py @@ -69,6 +69,8 @@ "patternProperties": {r"\w+": {}}, } +REQUIREMENT_URL = "https://spack.readthedocs.io/en/latest/packages_yaml.html#package-requirements" + #: Properties for inclusion in other schemas properties = { "packages": { @@ -117,7 +119,7 @@ "properties": ["version"], "message": "setting version preferences in the 'all' section of packages.yaml " "is deprecated and will be removed in v0.22\n\n\tThese preferences " - "will be ignored by Spack. You can set them only in package specific sections " + "will be ignored by Spack. You can set them only in package-specific sections " "of the same file.\n", "error": False, }, @@ -162,10 +164,14 @@ }, "deprecatedProperties": { "properties": ["target", "compiler", "providers"], - "message": "setting compiler, target or provider preferences in a package " - "specific section of packages.yaml is deprecated, and will be removed in " - "v0.22.\n\n\tThese preferences will be ignored by Spack. You " - "can set them only in the 'all' section of the same file.\n", + "message": "setting 'compiler:', 'target:' or 'provider:' preferences in " + "a package-specific section of packages.yaml is deprecated, and will be " + "removed in v0.22.\n\n\tThese preferences will be ignored by Spack, and " + "can be set only in the 'all' section of the same file. " + "You can run:\n\n\t\t$ spack audit configs\n\n\tto get better diagnostics, " + "including files:lines where the deprecated attributes are used.\n\n" + "\tUse requirements to enforce conditions on specific packages: " + f"{REQUIREMENT_URL}\n", "error": False, }, } From 67c2c80cf4f17c31962d71623108176af55e04fb Mon Sep 17 00:00:00 2001 From: Tim Wickberg Date: Thu, 16 Nov 2023 15:40:54 -0700 Subject: [PATCH 648/806] Use preferred capitalization of "Slurm" (#41109) https://slurm.schedmd.com/faq.html#acronym --- lib/spack/docs/packaging_guide.rst | 2 +- lib/spack/spack/test/llnl/util/lock.py | 2 +- var/spack/repos/builtin/packages/mpich/package.py | 2 +- var/spack/repos/builtin/packages/openmpi/package.py | 2 +- var/spack/repos/builtin/packages/slurm-drmaa/package.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 3dd1c7952d12e7..84046a654e93a4 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2337,7 +2337,7 @@ window while a batch job is running ``spack install`` on the same or overlapping dependencies without any process trying to re-do the work of another. -For example, if you are using SLURM, you could launch an installation +For example, if you are using Slurm, you could launch an installation of ``mpich`` using the following command: .. code-block:: console diff --git a/lib/spack/spack/test/llnl/util/lock.py b/lib/spack/spack/test/llnl/util/lock.py index 9e7f3a3bde31b5..a17e5c94d9a5b8 100644 --- a/lib/spack/spack/test/llnl/util/lock.py +++ b/lib/spack/spack/test/llnl/util/lock.py @@ -18,7 +18,7 @@ mpirun -n 7 spack test lock And it will test locking correctness among MPI processes. Ideally, you -want the MPI processes to span across multiple nodes, so, e.g., for SLURM +want the MPI processes to span across multiple nodes, so, e.g., for Slurm you might do this:: srun -N 7 -n 7 -m cyclic spack test lock diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b66c0b8fd4c52a..984f2a89a7bb7f 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -55,7 +55,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): variant("hydra", default=True, description="Build the hydra process manager") variant("romio", default=True, description="Enable ROMIO MPI I/O implementation") variant("verbs", default=False, description="Build support for OpenFabrics verbs.") - variant("slurm", default=False, description="Enable SLURM support") + variant("slurm", default=False, description="Enable Slurm support") variant("wrapperrpath", default=True, description="Enable wrapper rpath") variant( "pmi", diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 5325235612442d..f2347d01ecb0b2 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -595,7 +595,7 @@ class Openmpi(AutotoolsPackage, CudaPackage): conflicts( "schedulers=slurm ~pmi", when="@1.5.4", - msg="+pmi is required for openmpi to work with SLURM.", + msg="+pmi is required for openmpi to work with Slurm.", ) conflicts( "schedulers=loadleveler", diff --git a/var/spack/repos/builtin/packages/slurm-drmaa/package.py b/var/spack/repos/builtin/packages/slurm-drmaa/package.py index 100b328b9a4dfc..012fc6dcd1b531 100644 --- a/var/spack/repos/builtin/packages/slurm-drmaa/package.py +++ b/var/spack/repos/builtin/packages/slurm-drmaa/package.py @@ -10,7 +10,7 @@ class SlurmDrmaa(AutotoolsPackage): """ DRMAA for Slurm is an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource Management Application API) specification for submission and control of - jobs to SLURM. Using DRMAA, grid applications builders, portal developers and + jobs to Slurm. Using DRMAA, grid applications builders, portal developers and ISVs can use the same high-level API to link their software with different cluster/resource management systems. """ From 4991a60eacb5df289383f755e40702b720ed0513 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Thu, 16 Nov 2023 23:41:24 +0100 Subject: [PATCH 649/806] podio: Add latest tag 0.17.3 (#41103) --- var/spack/repos/builtin/packages/podio/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/podio/package.py b/var/spack/repos/builtin/packages/podio/package.py index 4d773126defad4..b7eaa980a3ed50 100644 --- a/var/spack/repos/builtin/packages/podio/package.py +++ b/var/spack/repos/builtin/packages/podio/package.py @@ -20,6 +20,7 @@ class Podio(CMakePackage): tags = ["hep", "key4hep"] version("master", branch="master") + version("0.17.3", sha256="079517eba9c43d01255ef8acd88468c3ead7bb9d8fed11792e121bb481d54dee") version("0.17.2", sha256="5b519335c4e1708f71ed85b3cac8ca81e544cc4572a5c37019ce9fc414c5e74d") version("0.17.1", sha256="97d6c5f81d50ee42bf7c01f041af2fd333c806f1bbf0a4828ca961a24cea6bb2") version("0.17", sha256="0c19f69970a891459cab227ab009514f1c1ce102b70e8c4b7d204eb6a0c643c1") From ef689ea586570b3cc3b01fb5d852ca3c73b9388b Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 16 Nov 2023 23:46:44 +0100 Subject: [PATCH 650/806] libgcrypt: add v1.10.3 (#41111) --- var/spack/repos/builtin/packages/libgcrypt/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py index cd207db083c0c2..aae41faa590111 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -14,6 +14,7 @@ class Libgcrypt(AutotoolsPackage): maintainers("alalazo") + version("1.10.3", sha256="8b0870897ac5ac67ded568dcfadf45969cfa8a6beb0fd60af2a9eadc2a3272aa") version("1.10.2", sha256="3b9c02a004b68c256add99701de00b383accccf37177e0d6c58289664cce0c03") version("1.10.1", sha256="ef14ae546b0084cd84259f61a55e07a38c3b53afc0f546bffcef2f01baffe9de") version("1.10.0", sha256="6a00f5c05caa4c4acc120c46b63857da0d4ff61dc4b4b03933fa8d46013fae81") From 00df2368a37516ecdb40c0c700ae1524f3b0b952 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Thu, 16 Nov 2023 16:57:29 -0600 Subject: [PATCH 651/806] clhep: new version 2.4.7.1 (#41113) --- var/spack/repos/builtin/packages/clhep/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/clhep/package.py b/var/spack/repos/builtin/packages/clhep/package.py index 43165ef8b7292d..3241df9fb6d3a5 100644 --- a/var/spack/repos/builtin/packages/clhep/package.py +++ b/var/spack/repos/builtin/packages/clhep/package.py @@ -19,6 +19,8 @@ class Clhep(CMakePackage): maintainers("drbenmorgan") + version("2.4.7.1", sha256="1c8304a7772ac6b99195f1300378c6e3ddf4ad07c85d64a04505652abb8a55f9") + version("2.4.7.0", sha256="7fa460030bc1a804ea7da8cce7611b93261493bbb66c3cfd3ceec935d7e1b8d3") version("2.4.6.4", sha256="49c89330f1903ef707d3c5d79c16a7c5a6f2c90fc290e2034ee3834809489e57") version("2.4.6.3", sha256="fcd007f11b10ba4af28d027222b63148d0eb44ff7a082eee353bdf921f9c684a") version("2.4.6.2", sha256="aded73e49bac85a5b4e86f64a0ee3d6f3cfe5551b0f7731c78b6d8f9dac6e8dc") From 3e060cce60f19e2449a4ff89df53a46e781a667c Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Thu, 16 Nov 2023 15:06:54 -0800 Subject: [PATCH 652/806] Update amrex maintainers (#41122) --- var/spack/repos/builtin/packages/amrex/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index 8f14d508ad0085..da5c2ee353f584 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -21,7 +21,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage): tags = ["ecp", "e4s"] - maintainers("WeiqunZhang", "asalmgren", "etpalmer63") + maintainers("WeiqunZhang", "asalmgren", "atmyers") version("develop", branch="development") version("23.11", sha256="49b9fea10cd2a2b6cb0fedf7eac8f7889eacc68a05ae5ac7c5702bc0eb1b3848") From da2e53b2ee4d184deb8e760680c89a8ece6b002d Mon Sep 17 00:00:00 2001 From: bk <8865247+bicquet@users.noreply.github.com> Date: Thu, 16 Nov 2023 20:24:20 -0600 Subject: [PATCH 653/806] r-rlang: add v1.1.1, v1.1.2 (#41114) --- var/spack/repos/builtin/packages/r-rlang/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/r-rlang/package.py b/var/spack/repos/builtin/packages/r-rlang/package.py index 40120150b06b2c..2805d53bba2b10 100644 --- a/var/spack/repos/builtin/packages/r-rlang/package.py +++ b/var/spack/repos/builtin/packages/r-rlang/package.py @@ -14,6 +14,8 @@ class RRlang(RPackage): cran = "rlang" + version("1.1.2", sha256="2a0ee1dc6e5c59b283c32db5e74e869922a336197cb406fe92622b6ec66f8092") + version("1.1.1", sha256="5e5ec9a7796977216c39d94b1e342e08f0681746657067ba30de11b8fa8ada99") version("1.1.0", sha256="f89859d91c9edc05fd7ccf21163fe53ad58da907ee273a93d5ab004a8649335b") version("1.0.6", sha256="e6973d98a0ea301c0da1eeaa435e9e65d1c3f0b95ed68bdc2d6cb0c610166760") version("1.0.2", sha256="8de87c3e6fb0b3cce2dabc6908186f8e1528cc0c16b54de965fe02d405fdd7cc") From a3d6714c8bbcc17bf1bce2d54fdc5de8535feea4 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Thu, 16 Nov 2023 19:44:17 -0700 Subject: [PATCH 654/806] [doxygen] Add versions 1.9.7 and 1.9.8. (#41123) * [doxygen] Add versions 1.9.7 and 1.9.8. * Fix has for 1.9.8. --- var/spack/repos/builtin/packages/doxygen/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index f0f10b5ecfff7a..cf40fb4e457eb3 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -18,6 +18,8 @@ class Doxygen(CMakePackage): homepage = "https://www.doxygen.org" url = "https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_9_5.tar.gz" + version("1.9.8", sha256="77371e8a58d22d5e03c52729844d1043e9cbf8d0005ec5112ffa4c8f509ddde8") + version("1.9.7", sha256="691777992a7240ed1f822a5c2ff2c4273b57c1cf9fc143553d87f91a0c5970ee") version("1.9.6", sha256="2a3ee47f7276b759f74bac7614c05a1296a5b028d3f6a79a88e4c213db78e7dc") version("1.9.5", sha256="1c5c9cd4445f694e43f089c17529caae6fe889b732fb0b145211025a1fcda1bb") version("1.9.4", sha256="1b083d15b29817463129ae1ae73b930d883030eeec090ea7a99b3a04fdb51c76") From 1b66cbacf0ae01a0623a9cb18212835b425db457 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 17 Nov 2023 10:17:25 +0100 Subject: [PATCH 655/806] llvm: patch missing cstdint include (#41108) * llvm: patch missing cstdint include --- var/spack/repos/builtin/packages/llvm/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 383871353fe9fa..f1f2cc5f901a7d 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -428,6 +428,12 @@ class Llvm(CMakePackage, CudaPackage): when="@14:15", ) + # missing include + patch( + "https://github.com/llvm/llvm-project/commit/ff1681ddb303223973653f7f5f3f3435b48a1983.patch?full_index=1", + sha256="c6ca6b925f150e8644ce756023797b7f94c9619c62507231f979edab1c09af78", + when="@6:13", + ) # fix building of older versions of llvm with newer versions of glibc for compiler_rt_as in ["project", "runtime"]: with when("compiler-rt={0}".format(compiler_rt_as)): From 54ab0872f24819c1c2f220f99a05990d02a5d8da Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 17 Nov 2023 11:22:32 +0100 Subject: [PATCH 656/806] py-archspec: add v0.2.2 (#41110) --- var/spack/repos/builtin/packages/py-archspec/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-archspec/package.py b/var/spack/repos/builtin/packages/py-archspec/package.py index 047beda9afabb6..564f798ea953d5 100644 --- a/var/spack/repos/builtin/packages/py-archspec/package.py +++ b/var/spack/repos/builtin/packages/py-archspec/package.py @@ -15,8 +15,9 @@ class PyArchspec(PythonPackage): maintainers("alalazo") + version("0.2.2", sha256="d922c9fd80a5234d8cef883fbe0e146b381c449062c0405f91714ebad1edc035") version("0.2.1", sha256="0974a8a95831d2d43cce906c5b79a35d5fd2bf9be478b0e3b7d83ccc51ac815e") version("0.2.0", sha256="6aaba5ebdb5c3633c400d8c221a6a18716da0c64b367a8509f4217b22e91a5f5") depends_on("py-poetry-core@1.0.0:", type="build") - depends_on("py-click@8", type=("build", "run")) + depends_on("py-click@8", type=("build", "run"), when="@:0.2.0") From 53c7edb0adea3e7f91b80a68e09ef130b5dc85db Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Fri, 17 Nov 2023 15:24:43 +0100 Subject: [PATCH 657/806] lcio: Add latest tag 2.20.1 (#41102) --- var/spack/repos/builtin/packages/lcio/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/lcio/package.py b/var/spack/repos/builtin/packages/lcio/package.py index 8f02063af4c760..6b42bb41751fbe 100644 --- a/var/spack/repos/builtin/packages/lcio/package.py +++ b/var/spack/repos/builtin/packages/lcio/package.py @@ -19,6 +19,7 @@ class Lcio(CMakePackage): maintainers("gaede", "vvolkl", "jmcarcell") version("master", branch="master") + version("2.20.1", sha256="125f657297de12b40694cb0dddec1d1ce3379058492f2a6a2a6f992ee51604d6") version("2.20", sha256="5ef92c9ef04ce468ffb48be0ec6010377a400b064e352cb50f9f4c9599e7e990") version("2.19", sha256="2d6b37094d8d556ab0ba0efa632f10d8b851f533ca5c767e436397df18cb57c7") version("2.18", sha256="e722df7f4a6adcc2459ea1c6488a2a6e40bb04f7ee99536fdc60b51e6c80f565") From 81e73b4dd4ea0bf6c6947359d3cee9d4270df13d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 17 Nov 2023 08:49:01 -0600 Subject: [PATCH 658/806] root: new version 6.30.00 (#41118) * root: new version 6.30.00 There is a new release of ROOT, v6.30.00, with release notes at https://root.cern/doc/v630/release-notes.html. In addition to some deprecations of build options, this updates the C++ standard to 17 or higher (well, 20), and increases the vc minimum version. * vc: new version 1.4.4 * [@spackbot] updating style on behalf of wdconinc --------- Co-authored-by: wdconinc --- var/spack/repos/builtin/packages/root/package.py | 9 +++++++-- var/spack/repos/builtin/packages/vc/package.py | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index 6a6484b4b2e25c..6d03b1155dffeb 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -34,6 +34,7 @@ class Root(CMakePackage): # Development version (when more recent than production). # Production version + version("6.30.00", sha256="0592c066954cfed42312957c9cb251654456064fe2d8dabdcb8826f1c0099d71") version("6.28.06", sha256="af3b673b9aca393a5c9ae1bf86eab2672aaf1841b658c5c6e7a30ab93c586533") version("6.28.04", sha256="70f7f86a0cd5e3f2a0befdc59942dd50140d990ab264e8e56c7f17f6bfe9c965") version("6.28.02", sha256="6643c07710e68972b00227c68b20b1016fec16f3fba5f44a571fa1ce5bb42faa") @@ -160,9 +161,11 @@ class Root(CMakePackage): ) variant("mysql", default=False, description="Enable support for MySQL databases") variant("opengl", default=True, description="Enable OpenGL support") - variant("oracle", default=False, description="Enable support for Oracle databases") + variant( + "oracle", when="@:6.30", default=False, description="Enable support for Oracle databases" + ) variant("postgres", default=False, description="Enable postgres support") - variant("pythia6", default=False, description="Enable pythia6 support") + variant("pythia6", when="@:6.30", default=False, description="Enable pythia6 support") variant("pythia8", default=False, description="Enable pythia8 support") variant("python", default=True, description="Enable Python ROOT bindings") variant("qt4", when="@:6.17", default=False, description="Enable Qt graphics backend") @@ -290,6 +293,7 @@ class Root(CMakePackage): depends_on("unuran", when="+unuran") depends_on("vc@1.0:", when="@6.07.04: +vc") depends_on("vc@1.3.0:", when="@6.09.02: +vc") + depends_on("vc@1.4.4:", when="@6.29.02: +vc") depends_on("vdt", when="+vdt") depends_on("veccore", when="+veccore") depends_on("libxml2", when="+xml") @@ -320,6 +324,7 @@ class Root(CMakePackage): conflicts("+tmva", when="~mlp", msg="root+tmva requires MLP") conflicts("cxxstd=11", when="+root7", msg="root7 requires at least C++14") conflicts("cxxstd=11", when="@6.25.02:", msg="This version of root requires at least C++14") + conflicts("cxxstd=14", when="@6.30.00:", msg="This version of root requires at least C++17") conflicts( "cxxstd=20", when="@:6.28.02", msg="C++20 support requires root version at least 6.28.04" ) diff --git a/var/spack/repos/builtin/packages/vc/package.py b/var/spack/repos/builtin/packages/vc/package.py index f00154e851ed61..73b48537a06526 100644 --- a/var/spack/repos/builtin/packages/vc/package.py +++ b/var/spack/repos/builtin/packages/vc/package.py @@ -13,6 +13,7 @@ class Vc(CMakePackage): git = "https://github.com/VcDevel/Vc.git" url = "https://github.com/VcDevel/Vc/archive/refs/tags/1.3.3.tar.gz" + version("1.4.4", sha256="5933108196be44c41613884cd56305df320263981fe6a49e648aebb3354d57f3") version("1.4.3", sha256="988ea0053f3fbf17544ca776a2749c097b3139089408b0286fa4e9e8513e037f") version("1.4.2", sha256="50d3f151e40b0718666935aa71d299d6370fafa67411f0a9e249fbce3e6e3952") version("1.4.1", sha256="7e8b57ed5ff9eb0835636203898c21302733973ff8eaede5134dd7cb87f915f6") From ec8bd38c4e79646af4683659266e1ba2e886e9a9 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Fri, 17 Nov 2023 15:59:04 +0100 Subject: [PATCH 659/806] Permit packages that depend on Intel oneAPI packages to access sdk (#41117) * Permit packages that depend on Intel oneAPI packages to access sdk * Implement and use IntelOneapiLibraryPackageWithSdk * Restore libs property to IntelOneapiLibraryPackage * Conform to style * Provide new class to infrastructure * Treat sdk/include as the main include --- lib/spack/spack/build_systems/oneapi.py | 29 +++++++++++++++++++ lib/spack/spack/package.py | 1 + .../packages/intel-oneapi-advisor/package.py | 2 +- .../intel-oneapi-inspector/package.py | 2 +- .../packages/intel-oneapi-vtune/package.py | 2 +- 5 files changed, 33 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py index 4c432c0cace6d6..f90312f5796e15 100644 --- a/lib/spack/spack/build_systems/oneapi.py +++ b/lib/spack/spack/build_systems/oneapi.py @@ -179,6 +179,35 @@ def libs(self): return find_libraries("*", root=lib_path, shared=True, recursive=True) +class IntelOneApiLibraryPackageWithSdk(IntelOneApiPackage): + """Base class for Intel oneAPI library packages with SDK components. + + Contains some convenient default implementations for libraries + that expose functionality in sdk subdirectories. + Implement the method directly in the package if something + different is needed. + + """ + + @property + def include(self): + return join_path(self.component_prefix, "sdk", "include") + + @property + def headers(self): + return find_headers("*", self.include, recursive=True) + + @property + def lib(self): + lib_path = join_path(self.component_prefix, "sdk", "lib64") + lib_path = lib_path if isdir(lib_path) else dirname(lib_path) + return lib_path + + @property + def libs(self): + return find_libraries("*", root=self.lib, shared=True, recursive=True) + + class IntelOneApiStaticLibraryList: """Provides ld_flags when static linking is needed diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 79df48cd175602..f38ebec2992fcf 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -52,6 +52,7 @@ from spack.build_systems.oneapi import ( INTEL_MATH_LIBRARIES, IntelOneApiLibraryPackage, + IntelOneApiLibraryPackageWithSdk, IntelOneApiPackage, IntelOneApiStaticLibraryList, ) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py index fe2b7f34387c26..01410cd18d6fb8 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py @@ -7,7 +7,7 @@ @IntelOneApiPackage.update_description -class IntelOneapiAdvisor(IntelOneApiPackage): +class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk): """Intel Advisor is a design and analysis tool for developing performant code. The tool supports C, C++, Fortran, SYCL, OpenMP, OpenCL code, and Python. It helps with the following: Performant diff --git a/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py b/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py index 0c1e0f79abaf31..9f376cffc7809b 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py @@ -7,7 +7,7 @@ @IntelOneApiPackage.update_description -class IntelOneapiInspector(IntelOneApiPackage): +class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk): """Intel Inspector is a dynamic memory and threading error debugger for C, C++, and Fortran applications that run on Windows and Linux operating systems. Save money: locate the root cause of memory, diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py index c2ed3f164e42af..f9ab11eef76c91 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py @@ -7,7 +7,7 @@ @IntelOneApiPackage.update_description -class IntelOneapiVtune(IntelOneApiPackage): +class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk): """Intel VTune Profiler is a profiler to optimize application performance, system performance, and system configuration for HPC, cloud, IoT, media, storage, and more. CPU, GPU, and FPGA: Tune From 9ad134c594021fb1f7376bcc9660c9d66951d5d7 Mon Sep 17 00:00:00 2001 From: Stephen Herbener <32968781+srherbener@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:34:17 -0700 Subject: [PATCH 660/806] Add cxxstd variant to ecflow, update with latest ecflow version (#41120) * Added recent versions to ecflow/package.py, as well as added a cxxstd variant that is needed to set BOOST_NO_CXX98_FUNCTION_BASE appropriately when building with C++17 standard. * Fixed pep8 style error in the ecflow package.py script. * Remov * Removed cxxstd variant since the ecflow cmake configuration was already specifying to use the c++17 standard for newer versions. The use of the BOOST_NO_CXX98_FUNCTION_BASE define is now triggered by the ecflow version. --- var/spack/repos/builtin/packages/ecflow/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ecflow/package.py b/var/spack/repos/builtin/packages/ecflow/package.py index 05519fc04d4963..7fa77e386a0e2d 100644 --- a/var/spack/repos/builtin/packages/ecflow/package.py +++ b/var/spack/repos/builtin/packages/ecflow/package.py @@ -23,7 +23,8 @@ class Ecflow(CMakePackage): maintainers("climbfuji", "AlexanderRichert-NOAA") - # https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-5.8.3-Source.tar.gz?api=v2 + version("5.11.4", sha256="4836a876277c9a65a47a3dc87cae116c3009699f8a25bab4e3afabf160bcf212") + version("5.8.4", sha256="bc628556f8458c269a309e4c3b8d5a807fae7dfd415e27416fe9a3f544f88951") version("5.8.3", sha256="1d890008414017da578dbd5a95cb1b4d599f01d5a3bb3e0297fe94a87fbd81a6") version("4.13.0", sha256="c743896e0ec1d705edd2abf2ee5a47f4b6f7b1818d8c159b521bdff50a403e39") version("4.12.0", sha256="566b797e8d78e3eb93946b923ef540ac61f50d4a17c9203d263c4fd5c39ab1d1") @@ -99,6 +100,9 @@ def cmake_args(self): ssllibs = ";".join(spec["openssl"].libs + spec["zlib"].libs) args.append(self.define("OPENSSL_CRYPTO_LIBRARY", ssllibs)) + if self.spec.satisfies("@5.8.3:"): + args.append("-DCMAKE_CXX_FLAGS=-DBOOST_NO_CXX98_FUNCTION_BASE") + return args # A recursive link in the ecflow source code causes the binary cache From 9383953f76a9466319c284524496b65cc9626bee Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Fri, 17 Nov 2023 15:20:33 -0700 Subject: [PATCH 661/806] Hydrogen package: avoid newer openblas on power (#41143) --- var/spack/repos/builtin/packages/hydrogen/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index bf6e7bd17bece6..6bf6114d4175ee 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -39,7 +39,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage): values=("Debug", "Release"), ) variant("int64", default=False, description="Use 64-bit integers") - variant("al", default=False, description="Use Aluminum communication library") + variant("al", default=True, sticky=True, description="Use Aluminum communication library") variant( "cub", default=True, when="+cuda", description="Use CUB/hipCUB for GPU memory management" ) @@ -90,6 +90,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage): # Note that this forces us to use OpenBLAS until #1712 is fixed depends_on("openblas", when="blas=openblas") depends_on("openblas +ilp64", when="blas=openblas +int64_blas") + depends_on("openblas@0.3.21:0.3.23", when="blas=openblas arch=ppc64le:") depends_on("intel-mkl", when="blas=mkl") depends_on("intel-mkl +ilp64", when="blas=mkl +int64_blas") From cb764ce41ce6929f7acad2f32c2710011c899588 Mon Sep 17 00:00:00 2001 From: Moritz Kern <92092328+Moritz-Alexander-Kern@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:12:58 +0100 Subject: [PATCH 662/806] Update py-quantities (#39201) * add version 0.14.1 * formatting * style checks * fix style errors * remove old versions * fix typo * style * update maintainers directive * sort dependencies from newest to oldest * Update var/spack/repos/builtin/packages/py-quantities/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-quantities/package.py Co-authored-by: Adam J. Stewart * sort dependencies from newest to oldest * removed upper bounds for python version * Update var/spack/repos/builtin/packages/py-quantities/package.py Co-authored-by: Adam J. Stewart * remove dependency on Python 3.7 +, since 3.7 is the lowest supported version anyway --------- Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-quantities/package.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-quantities/package.py b/var/spack/repos/builtin/packages/py-quantities/package.py index 024901ab674b08..0d9b38f69e418e 100644 --- a/var/spack/repos/builtin/packages/py-quantities/package.py +++ b/var/spack/repos/builtin/packages/py-quantities/package.py @@ -13,18 +13,19 @@ class PyQuantities(PythonPackage): pypi = "quantities/quantities-0.12.1.tar.gz" maintainers("apdavison") + version("0.14.1", sha256="efeafffc0c0364f891a9327239cd12496bccb55cd037a6d1bf44de706f722877") version("0.13.0", sha256="0fde20115410de21cefa786f3aeae69c1b51bb19ee492190324c1da705e61a81") version("0.12.5", sha256="67546963cb2a519b1a4aa43d132ef754360268e5d551b43dd1716903d99812f0") version("0.12.4", sha256="a33d636d1870c9e1127631185d89b0105a49f827d6aacd44ad9d8f151f331d8b") version("0.12.3", sha256="582f3c7aeba897846761e966615e01202a5e5d06add304492931b05085d19883") - depends_on("python@2.7.0:2.7,3.4:3.7", type=("build", "run"), when="@0.12.3") - depends_on("python@2.7.0:2.7,3.4:3.8", type=("build", "run"), when="@0.12.4:0.12.5") - depends_on("python@3.7:3.10", type=("build", "run"), when="@0.13:") + depends_on("python@3.8:", type=("build", "run"), when="@0.14:") - # pip silently replaces distutils with setuptools + depends_on("py-setuptools@61:", type="build", when="@0.14:") depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm+toml", type="build", when="@0.14:") - depends_on("py-numpy@1.8.2:1.16", type=("build", "run"), when="@0.12.3") + depends_on("py-numpy@1.19:", type=("build", "run"), when="@0.14:") + depends_on("py-numpy@1.16:", type=("build", "run"), when="@0.13") depends_on("py-numpy@1.8.2:1.17", type=("build", "run"), when="@0.12.4:0.12") - depends_on("py-numpy@1.16:", type=("build", "run"), when="@0.13.0:") + depends_on("py-numpy@1.8.2:1.16", type=("build", "run"), when="@0.12.3") From 223e5b8ca21b98f87444ae3f708963617b9ce4a8 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 18 Nov 2023 14:43:35 +0100 Subject: [PATCH 663/806] Fix invalid escape sequences (#41130) Using Python 3.12 in a freshly cloned Spack repository results in warnings such as this: ``` ==> Warning: invalid escape sequence '\$' ==> Warning: invalid escape sequence '\(' ==> Warning: invalid escape sequence '\.' ==> Warning: invalid escape sequence '\.' ``` These will turn into errors in 3.13, so fix them. All of them actually do not need to be regexes, so convert them into normal strings. --- var/spack/repos/builtin/packages/ecmwf-atlas/package.py | 4 ++-- var/spack/repos/builtin/packages/ncview/package.py | 3 ++- var/spack/repos/builtin/packages/py-imagecodecs/package.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py index 00fce1ec788247..d764f8e1bda484 100644 --- a/var/spack/repos/builtin/packages/ecmwf-atlas/package.py +++ b/var/spack/repos/builtin/packages/ecmwf-atlas/package.py @@ -76,8 +76,8 @@ def cmake_args(self): @when("+fismahigh") def patch(self): - filter_file("http://www\.ecmwf\.int", "", "cmake/atlas-import.cmake.in") # noqa: W605 - filter_file("int\.ecmwf", "", "cmake/atlas-import.cmake.in") # noqa: W605 + filter_file("http://www.ecmwf.int", "", "cmake/atlas-import.cmake.in", string=True) + filter_file("int.ecmwf", "", "cmake/atlas-import.cmake.in", string=True) filter_file('http[^"]+', "", "cmake/atlas_export.cmake") patterns = [".travis.yml", "tools/install*.sh", "tools/github-sha.sh"] for pattern in patterns: diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index 8526b7807020a8..c706245e94d491 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -26,9 +26,10 @@ def patch(self): patched_file = "configure" with keep_modification_time(patched_file): filter_file( - "if test x\$CC_TEST_SAME != x\$NETCDF_CC_TEST_SAME; then", # noqa: W605 + "if test x$CC_TEST_SAME != x$NETCDF_CC_TEST_SAME; then", "if false; then", patched_file, + string=True, ) def url_for_version(self, version): diff --git a/var/spack/repos/builtin/packages/py-imagecodecs/package.py b/var/spack/repos/builtin/packages/py-imagecodecs/package.py index 03195578b6087f..e156b28e77b055 100644 --- a/var/spack/repos/builtin/packages/py-imagecodecs/package.py +++ b/var/spack/repos/builtin/packages/py-imagecodecs/package.py @@ -66,11 +66,12 @@ def patch(self): ) # 239 filter_file( - "append\('/usr/include/jxrlib'\)", # noqa: W605 + "append('/usr/include/jxrlib')", "extend(('{0}/libjxr/image', '{0}/libjxr/common', '{0}/libjxr/glue'))".format( # noqa: E501 spec["jxrlib-debian"].prefix.include ), "setup.py", + string=True, ) # 367 From edf872c94bc73f262443c7ac2e3b9187f8dde636 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:48:34 +0100 Subject: [PATCH 664/806] py-pyh5py: reorder dependencies from newest version to oldest (#41137) Co-authored-by: jmcarcell --- .../repos/builtin/packages/py-h5py/package.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 262ce6445ac74a..60de24072a8291 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -38,39 +38,39 @@ class PyH5py(PythonPackage): variant("mpi", default=True, description="Build with MPI support") # Python versions - depends_on("python@:3.9", type=("build", "run"), when="@:2.8") - depends_on("python@3.6:", type=("build", "run"), when="@3:3.1") depends_on("python@3.7:", type=("build", "run"), when="@3.2:") + depends_on("python@3.6:", type=("build", "run"), when="@3:3.1") + depends_on("python@:3.9", type=("build", "run"), when="@:2.8") # Build dependencies - depends_on("py-cython@0.23:0", type="build", when="@:2") - depends_on("py-cython@0.29:0", type=("build"), when="@3:") - depends_on("py-cython@0.29.14:0", type=("build"), when="@3:3.7 ^python@3.8.0:3.8") depends_on("py-cython@0.29.15:0", type=("build"), when="@3:3.7 ^python@3.9.0:") + depends_on("py-cython@0.29.14:0", type=("build"), when="@3:3.7 ^python@3.8.0:3.8") + depends_on("py-cython@0.29:0", type=("build"), when="@3:") + depends_on("py-cython@0.23:0", type="build", when="@:2") depends_on("py-pkgconfig", type="build") - depends_on("py-setuptools", type="build") depends_on("py-setuptools@61:", type="build", when="@3.8.0:") + depends_on("py-setuptools", type="build") depends_on("py-wheel", type="build", when="@3:") # Build and runtime dependencies depends_on("py-cached-property@1.5:", type=("build", "run"), when="@:3.6 ^python@:3.7") - depends_on("py-numpy@1.7:", type=("build", "run"), when="@:2") - depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@3:") - depends_on("py-numpy@1.17.5:", type=("build", "run"), when="@3:3.5 ^python@3.8.0:3.8") depends_on("py-numpy@1.19.3:", type=("build", "run"), when="@3:3.5 ^python@3.9.0:") + depends_on("py-numpy@1.17.5:", type=("build", "run"), when="@3:3.5 ^python@3.8.0:3.8") + depends_on("py-numpy@1.14.5:", type=("build", "run"), when="@3:") + depends_on("py-numpy@1.7:", type=("build", "run"), when="@:2") depends_on("py-six", type=("build", "run"), when="@:2") # Link dependencies (py-h5py v2 cannot build against HDF5 1.12 regardless # of API setting) - depends_on("hdf5@1.8.4:1.11 +hl", when="@:2") - depends_on("hdf5@1.8.4:1.12 +hl", when="@3:3.7") depends_on("hdf5@1.8.4:1.14 +hl", when="@3.8:") + depends_on("hdf5@1.8.4:1.12 +hl", when="@3:3.7") + depends_on("hdf5@1.8.4:1.11 +hl", when="@:2") # MPI dependencies depends_on("hdf5+mpi", when="+mpi") depends_on("mpi", when="+mpi") - depends_on("py-mpi4py", when="@:2 +mpi", type=("build", "run")) depends_on("py-mpi4py@3.0.2:", when="@3: +mpi", type=("build", "run")) + depends_on("py-mpi4py", when="@:2 +mpi", type=("build", "run")) def flag_handler(self, name, flags): if name == "cflags": From f474c8781483b8b6fbe0dc1f16f0e9b1d086cb28 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Sat, 18 Nov 2023 14:53:55 +0100 Subject: [PATCH 665/806] py-gitpython: version bump (#41079) --- var/spack/repos/builtin/packages/py-gitpython/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-gitpython/package.py b/var/spack/repos/builtin/packages/py-gitpython/package.py index 69a0f5ec393acc..5cc534437a4937 100644 --- a/var/spack/repos/builtin/packages/py-gitpython/package.py +++ b/var/spack/repos/builtin/packages/py-gitpython/package.py @@ -12,6 +12,8 @@ class PyGitpython(PythonPackage): homepage = "https://gitpython.readthedocs.org" pypi = "GitPython/GitPython-3.1.12.tar.gz" + version("3.1.40", sha256="22b126e9ffb671fdd0c129796343a02bf67bf2994b35449ffc9321aa755e18a4") + version("3.1.34", sha256="85f7d365d1f6bf677ae51039c1ef67ca59091c7ebd5a3509aa399d4eda02d6dd") version("3.1.27", sha256="1c885ce809e8ba2d88a29befeb385fcea06338d3640712b59ca623c220bb5704") version("3.1.24", sha256="df83fdf5e684fef7c6ee2c02fc68a5ceb7e7e759d08b694088d0cacb4eba59e5") version("3.1.23", sha256="aaae7a3bfdf0a6db30dc1f3aeae47b71cd326d86b936fe2e158aa925fdf1471c") From 7137c43407d65bc20e86ae362b0149f776abf229 Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Sat, 18 Nov 2023 14:54:50 +0100 Subject: [PATCH 666/806] py-jsonpath-ng: version bump (#41078) * py-jsonpath-ng: version bump * py-jsonpath-ng: fix typo in version number --- var/spack/repos/builtin/packages/py-jsonpath-ng/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-jsonpath-ng/package.py b/var/spack/repos/builtin/packages/py-jsonpath-ng/package.py index 0d2274f997fb33..261e43dbd65543 100644 --- a/var/spack/repos/builtin/packages/py-jsonpath-ng/package.py +++ b/var/spack/repos/builtin/packages/py-jsonpath-ng/package.py @@ -15,9 +15,11 @@ class PyJsonpathNg(PythonPackage): homepage = "https://github.com/h2non/jsonpath-ng" pypi = "jsonpath-ng/jsonpath-ng-1.5.2.tar.gz" + version("1.6.0", sha256="5483f8e9d74c39c9abfab554c070ae783c1c8cbadf5df60d561bc705ac68a07e") + version("1.5.3", sha256="a273b182a82c1256daab86a313b937059261b5c5f8c4fa3fc38b882b344dd567") version("1.5.2", sha256="144d91379be14d9019f51973bd647719c877bfc07dc6f3f5068895765950c69d") depends_on("py-setuptools", type="build") depends_on("py-ply", type=("build", "run")) - depends_on("py-decorator", type=("build", "run")) - depends_on("py-six", type=("build", "run")) + depends_on("py-decorator", type=("build", "run"), when="@:1.5") + depends_on("py-six", type=("build", "run"), when="@:1.5") From 31ec1be85f9b9d0fbf157cda463fae9686463b5a Mon Sep 17 00:00:00 2001 From: Hariharan Devarajan Date: Sat, 18 Nov 2023 06:58:56 -0700 Subject: [PATCH 667/806] Release DLIO Profiler Py 0.0.2 (#41127) --- .../builtin/packages/py-dlio-profiler-py/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py b/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py index ee18886ed1b15f..aa99a09d8c1267 100644 --- a/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py +++ b/var/spack/repos/builtin/packages/py-dlio-profiler-py/package.py @@ -15,10 +15,17 @@ class PyDlioProfilerPy(PythonPackage): version("develop", branch="dev") version("master", branch="master") + version("0.0.2", tag="v0.0.2", commit="b72144abf1499e03d1db87ef51e780633e9e9533") version("0.0.1", tag="v0.0.1", commit="28affe716211315dd6936ddc8e25ce6c43cdf491") - depends_on("cpp-logger@0.0.1") - depends_on("brahma@0.0.1") - depends_on("gotcha@develop") + + depends_on("cpp-logger@0.0.1", when="@:0.0.1") + depends_on("cpp-logger@0.0.2", when="@0.0.2:") + depends_on("brahma@0.0.1", when="@:0.0.1") + depends_on("brahma@0.0.2", when="@0.0.2:") + depends_on("gotcha@1.0.4", when="@:0.0.1") + depends_on("gotcha@1.0.5", when="@0.0.2:") + depends_on("gotcha@1.0.5", when="@0.0.2:") + depends_on("yaml-cpp@0.6.3", when="@0.0.2:") depends_on("py-setuptools@42:", type="build") depends_on("py-pybind11", type=("build", "run")) depends_on("py-ninja", type="build") From 063c28e559e87f235e0118f759bee4ed7724f362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyd=C3=A9ric=20Debussch=C3=A8re?= Date: Sat, 18 Nov 2023 15:28:56 +0100 Subject: [PATCH 668/806] py-cleo: add versions 2.0.0 2.0.1; add maintainers (#40611) * py-cleo: add versions 2.0.0 2.0.1; add maintainers * py-cleo: add forgotten dependence * py-cleo: update from review: remove preferred version, remove a dependence, fix py-rapidfuzz version * py-cleo: deprecated version 1.0.0a5; add version 1.0.0; update dependences * py-cleo: add version 2.1.0; update version range of dependences * py-crashtest: add version 0.4.1, dependence of py-cleo * py-cleo: update dependence Co-authored-by: Adam J. Stewart * py-cleo: update dependence py-clikit Co-authored-by: Adam J. Stewart * py-cleo: update dependence py-rapidfuzz Co-authored-by: Adam J. Stewart * py-rapidfuzz: add version 2.2.0 dependence of py-cleo@2 * py-cleo: fix version range of py-crashtest * py-rapidfuzz: fix dependences; add py-rapidfuzz-capi and py-jarowinkler --------- Co-authored-by: LydDeb Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-cleo/package.py | 25 +++++++++++++------ .../builtin/packages/py-crashtest/package.py | 2 ++ .../packages/py-jarowinkler/package.py | 21 ++++++++++++++++ .../packages/py-rapidfuzz-capi/package.py | 21 ++++++++++++++++ .../builtin/packages/py-rapidfuzz/package.py | 6 ++++- 5 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-jarowinkler/package.py create mode 100644 var/spack/repos/builtin/packages/py-rapidfuzz-capi/package.py diff --git a/var/spack/repos/builtin/packages/py-cleo/package.py b/var/spack/repos/builtin/packages/py-cleo/package.py index 1852bd7b3eb76e..b5d60f1adc25e3 100644 --- a/var/spack/repos/builtin/packages/py-cleo/package.py +++ b/var/spack/repos/builtin/packages/py-cleo/package.py @@ -12,17 +12,26 @@ class PyCleo(PythonPackage): homepage = "https://github.com/sdispater/cleo" pypi = "cleo/cleo-0.8.1.tar.gz" - version("1.0.0a5", sha256="097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3") + maintainers("LydDeb") + + version("2.1.0", sha256="0b2c880b5d13660a7ea651001fb4acb527696c01f15c9ee650f377aa543fd523") + version("2.0.1", sha256="eb4b2e1f3063c11085cebe489a6e9124163c226575a3c3be69b2e51af4a15ec5") + version("2.0.0", sha256="fbc5cb141cbc31ea8ffd3d5cd67d3b183fa38aa5098fd37e39e9a953a232fda9") + version("1.0.0", sha256="bb5e4f70db83a597575ec86a1ed8fc56bd80934cfea3db97a23ea50c03b78382") version( - "0.8.1", - sha256="3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f", - preferred=True, + "1.0.0a5", + sha256="097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3", + deprecated=True, ) + version("0.8.1", sha256="3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f") depends_on("python@2.7,3.4:3", type=("build", "run")) depends_on("python@3.7:3", when="@1:", type=("build", "run")) depends_on("py-poetry-core@1:", type="build") - depends_on("py-poetry-core@1", when="@1:", type="build") - depends_on("py-clikit@0.6.0:0.6", when="@0.8.1", type=("build", "run")) - depends_on("py-pylev@1.3:1", when="@1:", type=("build", "run")) - depends_on("py-crashtest@0.3.1:0.3", when="@1:", type=("build", "run")) + depends_on("py-poetry-core@1.1:1", when="@1:2.0.0", type="build") + depends_on("py-poetry-core@1.1.0:", when="@2.0.1:", type="build") + depends_on("py-clikit@0.6", when="@0.8.1", type=("build", "run")) + depends_on("py-pylev@1.3:1", when="@1.0.0a5", type=("build", "run")) + depends_on("py-crashtest@0.4.1:0.4", when="@1:", type=("build", "run")) + depends_on("py-rapidfuzz@2.2:2", when="@1:2.0", type=("build", "run")) + depends_on("py-rapidfuzz@3", when="@2.1:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-crashtest/package.py b/var/spack/repos/builtin/packages/py-crashtest/package.py index f16c993168ec74..d2dade000db470 100644 --- a/var/spack/repos/builtin/packages/py-crashtest/package.py +++ b/var/spack/repos/builtin/packages/py-crashtest/package.py @@ -13,9 +13,11 @@ class PyCrashtest(PythonPackage): homepage = "https://github.com/sdispater/crashtest" pypi = "crashtest/crashtest-0.3.1.tar.gz" + version("0.4.1", sha256="80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce") version("0.4.0", sha256="d629b00f1d4e79c316909f4eb763bbcb29b510d65fbde1365a1ceb93ab7fa4c8") version("0.3.1", sha256="42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd") depends_on("python@3.6:3", type=("build", "run")) depends_on("python@3.7:3", when="@0.4.0:", type=("build", "run")) depends_on("py-poetry-core@1:", type="build") + depends_on("py-poetry-core@1.1.0:", when="@0.4.1:", type="build") diff --git a/var/spack/repos/builtin/packages/py-jarowinkler/package.py b/var/spack/repos/builtin/packages/py-jarowinkler/package.py new file mode 100644 index 00000000000000..9256776613a20c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jarowinkler/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 PyJarowinkler(PythonPackage): + """library for fast approximate string matching using Jaro and Jaro-Winkler similarity.""" + + homepage = "https://github.com/maxbachmann/JaroWinkler" + pypi = "jarowinkler/jarowinkler-1.2.3.tar.gz" + + maintainers("LydDeb") + + version("1.2.3", sha256="af28ea284cfbd1b21b29ff94b759f20e94e4f7c06f424b0b4702e701c2a21668") + + depends_on("py-setuptools@42:", type="build") + depends_on("py-scikit-build@0.15.0", type="build") + depends_on("py-rapidfuzz-capi@1.0.5", type="build") diff --git a/var/spack/repos/builtin/packages/py-rapidfuzz-capi/package.py b/var/spack/repos/builtin/packages/py-rapidfuzz-capi/package.py new file mode 100644 index 00000000000000..af0ebea5b21c49 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-rapidfuzz-capi/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 PyRapidfuzzCapi(PythonPackage): + """ + C-API of RapidFuzz, which can be used to extend RapidFuzz from separate packages. + """ + + homepage = "https://github.com/maxbachmann/rapidfuzz_capi" + pypi = "rapidfuzz_capi/rapidfuzz_capi-1.0.5.tar.gz" + + maintainers("LydDeb") + + version("1.0.5", sha256="b3af179874b28364ba1b7850e37d0d353de9cf5b844e3569c023b74da3a9c68e") + + depends_on("py-setuptools", type="build") diff --git a/var/spack/repos/builtin/packages/py-rapidfuzz/package.py b/var/spack/repos/builtin/packages/py-rapidfuzz/package.py index 5bfd1563b5bb78..a1213a1b379306 100644 --- a/var/spack/repos/builtin/packages/py-rapidfuzz/package.py +++ b/var/spack/repos/builtin/packages/py-rapidfuzz/package.py @@ -13,12 +13,16 @@ class PyRapidfuzz(PythonPackage): pypi = "rapidfuzz/rapidfuzz-1.8.2.tar.gz" version("3.3.1", sha256="6783b3852f15ed7567688e2e358757a7b4f38683a915ba5edc6c64f1a3f0b450") + version("2.2.0", sha256="acb8839aac452ec61a419fdc8799e8a6e6cd21bed53d04678cdda6fba1247e2f") version("1.8.2", sha256="d6efbb2b6b18b3a67d7bdfbcd9bb72732f55736852bbef823bdf210f9e0c6c90") depends_on("python", type=("build", "link", "run")) - depends_on("py-setuptools@42:", when="@3:", type="build") + depends_on("py-setuptools@42:", when="@2:", type="build") depends_on("py-setuptools", type="build") depends_on("py-scikit-build@0.17", when="@3:", type="build") + depends_on("py-scikit-build@0.13:", when="@2.2:", type="build") + depends_on("py-rapidfuzz-capi@1.0.5", when="@2", type="build") + depends_on("py-jarowinkler@1.2.0:1", when="@2", type=("build", "run")) # CMakeLists.txt depends_on("cmake@3.12:", type="build") From e8f09713be9e61832a67b73b333732d24ceecb3c Mon Sep 17 00:00:00 2001 From: Moritz Kern <92092328+Moritz-Alexander-Kern@users.noreply.github.com> Date: Sat, 18 Nov 2023 15:42:57 +0100 Subject: [PATCH 669/806] Update py-elephant (#39200) * add elephant version v0.12.0 and 0.13.0 * update copyright * reformat according to black format errors * restore maintainers directive * Update var/spack/repos/builtin/packages/py-elephant/package.py Co-authored-by: Adam J. Stewart * add dependency python 3.8+ * sorted dependencies * sort dependencies from newest to oldest * add deps for @master * removed dependency for master, since it is included in 0.12.0: * removed dependency for python 3.7+ , since 3.7+ is the lowest supported version anyway * removed specific deps for master, since master is always newer than all stable releases * updated numpy dependency for Elephant 0.12.0: * Update var/spack/repos/builtin/packages/py-elephant/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-elephant/package.py Co-authored-by: Adam J. Stewart * removed upper bounds for py-quantities, omitting v0.14.0 * add elephant v0.14.0 * update required quantities version --------- Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-elephant/package.py | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-elephant/package.py b/var/spack/repos/builtin/packages/py-elephant/package.py index 41f94db3a5eeac..63c2fea875ed6a 100644 --- a/var/spack/repos/builtin/packages/py-elephant/package.py +++ b/var/spack/repos/builtin/packages/py-elephant/package.py @@ -16,6 +16,10 @@ class PyElephant(PythonPackage): # list of GitHub accounts to notify when the package is updated. maintainers("Moritz-Alexander-Kern") + version("master", branch="master") + version("0.14.0", sha256="02ce3b2a8d08dc19828f95384551339ea0946bc405c1db9aace54135417c2b0f") + version("0.13.0", sha256="2c6463cf9ace41631f2af196c5b80b468bf1c4b264d3a6b1ea0fb587d9e7dd67") + version("0.12.0", sha256="81f8d668f92d8688344bb7a9c5abaa8438d824560c935a411e6e36ddf7dc7c72") version("0.11.2", sha256="f8759fff0bbb136ae4ffc8d1eacadeea8ba56610d705c3bf207de87ada3ba240") version("0.11.1", sha256="d604a202583440fdf9d95d42cef50a410bd74fcaaa1a925b139435f27ab012ef") version("0.11.0", sha256="7b547964dbd196361edc922db2c5a7c0c886ef1effcca6c6dc7adb06f966a3be") @@ -28,40 +32,44 @@ class PyElephant(PythonPackage): version("0.3.0", sha256="747251ccfb5820bdead6391411b5faf205b4ddf3ababaefe865f50b16540cfef") variant("docs", default=False, description="Install documentation dependencies") - variant("pandas", default=False, description="Build with pandas", when="@0.3.0:0.4.1") variant( "extras", default=False, description="Build with extras for GPFA, ASSET", when="@0.6.4:" ) depends_on("py-setuptools", type="build") - depends_on("python@3.7:", type=("build", "run"), when="@0.11.0:") + + depends_on("python@3.8:", type=("build", "run"), when="@0.12.0:") + + depends_on("py-neo@0.10.0:", type=("build", "run"), when="@0.11.0:") + depends_on("py-neo@0.9.0", type=("build", "run"), when="@0.9.0:0.10.0") + depends_on("py-neo@0.8.0", type=("build", "run"), when="@0.6.4:0.8.0") depends_on("py-neo@0.3.4:", type=("build", "run"), when="@0.3.0:0.4.1") + depends_on("py-numpy@1.19.5:", type=("build", "run"), when="@0.12.0:") + depends_on("py-numpy@1.18.1:1.23.5", type=("build", "run"), when="@0.6.4:0.11.2") depends_on("py-numpy@1.8.2:", type=("build", "run"), when="@0.3.0:0.4.1") - depends_on("py-quantities@0.10.1:", type=("build", "run"), when="@0.3.0:0.4.1") + depends_on("py-quantities@0.14.1:", type=("build", "run"), when="@0.14.0:") + depends_on("py-quantities@0.12.1:0.13.0,0.14.1:", type=("build", "run"), when="@0.6.4:0.13.0") + depends_on("py-quantities@0.10.1:0.13.0,0.14.1:", type=("build", "run"), when="@0.3.0:0.4.1") + depends_on("py-scipy@1.5.4:", type=("build", "run"), when="@0.6.4:") depends_on("py-scipy@0.14.0:", type=("build", "run"), when="@0.3.0:0.4.1") - depends_on("py-pandas@0.14.1:", type=("build", "run"), when="+pandas") - depends_on("py-numpydoc@0.5:", type=("build", "run"), when="@0.3.0:0.8.0+docs") + depends_on("py-six@1.10.0:", type=("build", "run"), when="@0.6.4:") + depends_on("py-tqdm", type=("build", "run"), when="@0.6.4:") + + depends_on("py-pandas@0.18.0:", type=("build", "run"), when="+extras") + depends_on("py-scikit-learn@0.23.2:", type=("build", "run"), when="+extras") + depends_on("py-statsmodels@0.12.1:", type=("build", "run"), when="+extras") + depends_on("py-jinja2@2.11.2:", type=("build", "run"), when="+extras") + depends_on("py-numpydoc@1.1.0:", type=("build", "run"), when="@0.9.0:+docs") - depends_on("py-sphinx@1.2.2:", type=("build", "run"), when="@0.3.0:0.6.0+docs") - depends_on("py-sphinx@2.4.3:", type=("build", "run"), when="@0.7.0:0.8.0+docs") - depends_on("py-sphinx@3.3.0:", type=("build", "run"), when="@0.9.0:+docs") + depends_on("py-numpydoc@0.5:", type=("build", "run"), when="@0.3.0:0.8.0+docs") depends_on("py-jupyter@1.0.0:", type=("build", "run"), when="@0.7.0:+docs") - depends_on("py-nbsphinx@0.5.0:", type=("build", "run"), when="@0.7.0:0.8.0+docs") + depends_on("py-sphinx@3.3.0:", type=("build", "run"), when="@0.9.0:+docs") + depends_on("py-sphinx@2.4.3:", type=("build", "run"), when="@0.7.0:0.8.0+docs") + depends_on("py-sphinx@1.2.2:", type=("build", "run"), when="@0.3.0:0.6.0+docs") depends_on("py-nbsphinx@0.8.0:", type=("build", "run"), when="@0.9.0:+docs") - depends_on("py-sphinxcontrib-bibtex@1.0.0", type=("build", "run"), when="@0.7.0:+docs") - depends_on("py-sphinx-tabs@1.1.13:", type=("build", "run"), when="@0.7.0:0.8.0+docs") + depends_on("py-nbsphinx@0.5.0:", type=("build", "run"), when="@0.7.0:0.8.0+docs") + depends_on("py-sphinxcontrib-bibtex@1.0.1:", type=("build", "run"), when="@0.7.0:+docs") depends_on("py-sphinx-tabs@1.3.0:", type=("build", "run"), when="@0.9.0:+docs") - depends_on("py-matplotlib@3.1.0:", type=("build", "run"), when="@0.8.0+docs") + depends_on("py-sphinx-tabs@1.1.13:", type=("build", "run"), when="@0.7.0:0.8.0+docs") depends_on("py-matplotlib@3.3.2:", type=("build", "run"), when="@0.9.0:+docs") - depends_on("py-pandas@0.18.0:", type=("build", "run"), when="+extras") - depends_on("py-scikit-learn@0.23.2:", type=("build", "run"), when="+extras") - depends_on("py-statsmodels@0.12.1:", type=("build", "run"), when="+extras") - depends_on("py-jinja2@2.11.2:", type=("build", "run"), when="+extras") - depends_on("py-neo@0.10.0:", type=("build", "run"), when="@0.11.0:") - depends_on("py-neo@0.9.0", type=("build", "run"), when="@0.9.0:0.10.0") - depends_on("py-neo@0.8.0", type=("build", "run"), when="@0.6.4:0.8.0") - depends_on("py-numpy@1.18.1:", type=("build", "run"), when="@0.6.4:") - depends_on("py-quantities@0.12.1:", type=("build", "run"), when="@0.6.4:") - depends_on("py-scipy@1.5.4:", type=("build", "run"), when="@0.6.4:") - depends_on("py-six@1.10.0:", type=("build", "run"), when="@0.6.4:") - depends_on("py-tqdm", type=("build", "run"), when="@0.6.4:") + depends_on("py-matplotlib@3.1.0:", type=("build", "run"), when="@0.8.0+docs") From 16f4c53cd4cfb4bc6c9390f6e65217fc9ccc58c9 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 18 Nov 2023 09:47:45 -0600 Subject: [PATCH 670/806] py-bokeh: new version 3.3.1, and supporting packages (#41089) * py-bokeh: new version 3.3.1 * py-xyzservices: new package * py-bokeh, py-xyzservices: update homepages Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * py-bokeh: depends on newer py-numpy Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Adam J. Stewart --------- Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-bokeh/package.py | 19 ++++++++++++--- .../packages/py-xyzservices/package.py | 23 +++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-xyzservices/package.py diff --git a/var/spack/repos/builtin/packages/py-bokeh/package.py b/var/spack/repos/builtin/packages/py-bokeh/package.py index 9c6601dffe311e..dcc13130ad8a87 100644 --- a/var/spack/repos/builtin/packages/py-bokeh/package.py +++ b/var/spack/repos/builtin/packages/py-bokeh/package.py @@ -9,9 +9,10 @@ class PyBokeh(PythonPackage): """Statistical and novel interactive HTML plots for Python""" - homepage = "https://github.com/bokeh/bokeh" + homepage = "https://bokeh.org/" pypi = "bokeh/bokeh-0.12.2.tar.gz" + version("3.3.1", sha256="2a7b3702d7e9f03ef4cd801b02b7380196c70cff2773859bcb84fa565218955c") version("2.4.3", sha256="ef33801161af379665ab7a34684f2209861e3aefd5c803a21fbbb99d94874b03") version("2.4.1", sha256="d0410717d743a0ac251e62480e2ea860a7341bdcd1dbe01499a904f233c90512") version("2.4.0", sha256="6fa00ed8baab5cca33f4175792c309fa2536eaae7e90abee884501ba8c90fddb") @@ -20,11 +21,16 @@ class PyBokeh(PythonPackage): version("0.12.2", sha256="0a840f6267b6d342e1bd720deee30b693989538c49644142521d247c0f2e6939") depends_on("py-setuptools", type="build", when="@1.3.4:") + depends_on("py-setuptools@64:", type="build", when="@3:") + depends_on("py-setuptools-git-versioning", type="build", when="@3:") + depends_on("py-colorama", type="build", when="@3:") depends_on("python@2.6:", type=("build", "run"), when="@0.12.2") depends_on("python@2.7:", type=("build", "run"), when="@1.3.4:") depends_on("python@3.6:", type=("build", "run"), when="@2.3.3:") depends_on("python@3.7:", type=("build", "run"), when="@2.4.0:") + depends_on("python@3.8:", type=("build", "run"), when="@3.0.0:") + depends_on("python@3.9:", type=("build", "run"), when="@3.2.0:") depends_on("py-requests@1.2.3:", type=("build", "run"), when="@0.12.2") depends_on("py-six@1.5.2:", type=("build", "run"), when="@:1.3.4") @@ -33,11 +39,16 @@ class PyBokeh(PythonPackage): depends_on("py-jinja2@2.7:", type=("build", "run")) depends_on("py-jinja2@2.9:", type=("build", "run"), when="@2.3.3:") + depends_on("py-contourpy@1:", type=("build", "run"), when="@3:") + depends_on("py-numpy@1.7.1:", type=("build", "run")) depends_on("py-numpy@1.11.3:", type=("build", "run"), when="@2.3.3:") + depends_on("py-numpy@1.16:", type=("build", "run"), when="@3.1:") depends_on("py-packaging@16.8:", type=("build", "run"), when="@1.3.4:") + depends_on("py-pandas@1.2:", type=("build", "run"), when="@3:") + depends_on("pil@4.0:", type=("build", "run"), when="@1.3.4:") depends_on("pil@7.1.0:", type=("build", "run"), when="@2.3.3:") @@ -46,5 +57,7 @@ class PyBokeh(PythonPackage): depends_on("py-tornado@4.3:", type=("build", "run")) depends_on("py-tornado@5.1:", type=("build", "run"), when="@2.3.3:") - depends_on("py-typing-extensions@3.7.4:", type=("build", "run"), when="@2.3.3:") - depends_on("py-typing-extensions@3.10.0:", type=("build", "run"), when="@2.4.0:") + depends_on("py-typing-extensions@3.7.4:", type=("build", "run"), when="@2.3.3:3.0.0") + depends_on("py-typing-extensions@3.10.0:", type=("build", "run"), when="@2.4.0:3.0.0") + + depends_on("py-xyzservices@2021.09.1:", type=("build", "run"), when="@3:") diff --git a/var/spack/repos/builtin/packages/py-xyzservices/package.py b/var/spack/repos/builtin/packages/py-xyzservices/package.py new file mode 100644 index 00000000000000..c9760370bb9fc0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-xyzservices/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 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 PyXyzservices(PythonPackage): + """xyzservices is a lightweight library providing a repository of + available XYZ services offering raster basemap tiles.""" + + homepage = "https://github.com/geopandas/xyzservices" + pypi = "xyzservices/xyzservices-2023.10.1.tar.gz" + + license("BSD-3-Clause") + + version("2023.10.1", sha256="091229269043bc8258042edbedad4fcb44684b0473ede027b5672ad40dc9fa02") + + depends_on("python@3.8:", type=("build", "run")) + + depends_on("py-setuptools", type="build") + depends_on("py-setuptools-scm", type="build") From d171f314c77ba61b3cd780f159afe6abced5707d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 18 Nov 2023 09:57:46 -0600 Subject: [PATCH 671/806] py-pygithub: new versions, dependencies (#41072) * py-pygithub: new versions, dependencies * py-pygithub: reordered dependencies per requirements.txt * py-pygithub: depends on py-setuptools-scm --- .../repos/builtin/packages/py-pygithub/package.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pygithub/package.py b/var/spack/repos/builtin/packages/py-pygithub/package.py index 24885aa333d76b..867403bc855724 100644 --- a/var/spack/repos/builtin/packages/py-pygithub/package.py +++ b/var/spack/repos/builtin/packages/py-pygithub/package.py @@ -7,16 +7,25 @@ class PyPygithub(PythonPackage): - """Use the full Github API v3""" + """Typed interactions with the GitHub API v3""" homepage = "https://pygithub.readthedocs.io/" pypi = "PyGithub/PyGithub-1.54.1.tar.gz" + version("2.1.1", sha256="ecf12c2809c44147bce63b047b3d2e9dac8a41b63e90fcb263c703f64936b97c") + version("1.59.1", sha256="c44e3a121c15bf9d3a5cc98d94c9a047a5132a9b01d22264627f58ade9ddc217") version("1.55", sha256="1bbfff9372047ff3f21d5cd8e07720f3dbfdaf6462fcaed9d815f528f1ba7283") depends_on("python@3.6:", type=("build", "run")) + depends_on("python@3.7:", type=("build", "run"), when="@1.57:") + depends_on("py-setuptools", type="build") - depends_on("py-deprecated", type=("build", "run")) - depends_on("py-pyjwt@2:", type=("build", "run")) + depends_on("py-setuptools-scm", type="build", when="@1.58.1:") depends_on("py-pynacl@1.4.0:", type=("build", "run")) + depends_on("py-python-dateutil", type=("build", "run"), when="@2.1.0:") depends_on("py-requests@2.14.0:", type=("build", "run")) + depends_on("py-pyjwt@2.4.0:", type=("build", "run")) + depends_on("py-pyjwt@2.4.0: +crypto", type=("build", "run"), when="@1.58.1:") + depends_on("py-typing-extensions@4:", type=("build", "run"), when="@2.1.0:") + depends_on("py-urllib3@1.26.0:", type=("build", "run"), when="@2.1.0:") + depends_on("py-deprecated", type=("build", "run")) From 2428c1070300b0d922cbf8a273b6a4774d53865b Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Sat, 18 Nov 2023 09:11:36 -0700 Subject: [PATCH 672/806] Automated deployment to update package flux-security 2023-11-18 (#41152) Co-authored-by: github-actions --- var/spack/repos/builtin/packages/flux-security/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flux-security/package.py b/var/spack/repos/builtin/packages/flux-security/package.py index 71f0081f7125be..dd87223e663132 100644 --- a/var/spack/repos/builtin/packages/flux-security/package.py +++ b/var/spack/repos/builtin/packages/flux-security/package.py @@ -20,6 +20,7 @@ class FluxSecurity(AutotoolsPackage): maintainers("grondo") version("master", branch="master") + version("0.11.0", sha256="d1ef78a871155a252f07e4f0a636eb272d6c2048d5e0e943860dd687c6cf808a") version("0.10.0", sha256="b0f39c5e32322f901454469ffd6154019b6dffafc064b55b3e593f70db6a6f68") version("0.9.0", sha256="2258120c6f32ca0b5b13b166bae56d9bd82a44c6eeaa6bc6187e4a4419bdbcc0") version("0.8.0", sha256="9963628063b4abdff6bece03208444c8f23fbfda33c20544c48b21e9f4819ce2") From 81130274f48ab18d15a2903e35faa5ebbd210093 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Sat, 18 Nov 2023 09:13:06 -0700 Subject: [PATCH 673/806] Automated deployment to update package flux-core 2023-11-18 (#41154) Co-authored-by: github-actions --- var/spack/repos/builtin/packages/flux-core/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index bb150b154dc9b8..7e698119a4c07a 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -20,6 +20,7 @@ class FluxCore(AutotoolsPackage): maintainers("grondo") version("master", branch="master") + version("0.56.0", sha256="dfce5aa21bcb1f990397343cdff8a60542b2d18cbd929e46bdb444d21a961efb") version("0.55.0", sha256="2925b8a084e9d1069a96de7689b515ad6f2051ecfb9fbbe4d2643507de7ccd30") version("0.54.0", sha256="721fc3fff64b3b167ae55d0e29379ff3211729248ef97e3b9855816219063b42") version("0.53.0", sha256="2f14d032a2d54f34e066c8a15c79917089e9f7f8558baa03dbfe63dbf56918b7") From df7747eb9a02a1672edb3a23e38744b539bc53b2 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Sat, 18 Nov 2023 09:13:49 -0700 Subject: [PATCH 674/806] Automated deployment to update package flux-sched 2023-11-18 (#41153) Co-authored-by: github-actions --- var/spack/repos/builtin/packages/flux-sched/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py index df38f938296043..c0a2e0e6085135 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -22,6 +22,7 @@ class FluxSched(CMakePackage, AutotoolsPackage): maintainers("grondo") version("master", branch="master") + version("0.30.0", sha256="1ccb2e53f4caede0233f19b2707e868f0cee9d2c957a06f97c22936ba9a43552") version("0.29.0", sha256="b93b18788e677535aa8ef945cdbeeced6d1408a4d16cb4a816ead53f31dd78d2") version("0.28.0", sha256="9431c671bed5d76fd95b4a4a7f36224d4bf76f416a2a1a5c4908f3ca790d434d") version("0.27.0", sha256="1e131924440c904fa0c925b7aa14c47b97f4e67b43af7efd2ebc0ef7ce90eb7c") From c60a806f0ebfd4ea6ed95cc4da10fcf1c3168a1b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 18 Nov 2023 10:16:51 -0600 Subject: [PATCH 675/806] py-matplotlib: add v3.7.4, v3.8.2 (#41156) --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 18d8d98f0ac880..3ca76ae4d3fe89 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -24,8 +24,10 @@ class PyMatplotlib(PythonPackage): "mpl_toolkits.mplot3d.tests", ] + version("3.8.2", sha256="01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1") version("3.8.1", sha256="044df81c1f6f3a8e52d70c4cfcb44e77ea9632a10929932870dfaa90de94365d") version("3.8.0", sha256="df8505e1c19d5c2c26aff3497a7cbd3ccfc2e97043d1e4db3e76afa399164b69") + version("3.7.4", sha256="7cd4fef8187d1dd0d9dcfdbaa06ac326d396fb8c71c647129f0bf56835d77026") version("3.7.3", sha256="f09b3dd6bdeb588de91f853bbb2d6f0ff8ab693485b0c49035eaa510cb4f142e") version("3.7.2", sha256="a8cdb91dddb04436bd2f098b8fdf4b81352e68cf4d2c6756fcc414791076569b") version("3.7.1", sha256="7b73305f25eab4541bd7ee0b96d87e53ae9c9f1823be5659b806cd85786fe882") From a701b24ad365c16799231554cbe9536ee410e62a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 18 Nov 2023 17:18:19 +0100 Subject: [PATCH 676/806] libksba: add v1.6.5 (#41129) --- var/spack/repos/builtin/packages/libksba/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libksba/package.py b/var/spack/repos/builtin/packages/libksba/package.py index 5230bcb6a5bf42..cd2183f841f014 100644 --- a/var/spack/repos/builtin/packages/libksba/package.py +++ b/var/spack/repos/builtin/packages/libksba/package.py @@ -17,6 +17,7 @@ class Libksba(AutotoolsPackage): maintainers("alalazo") + version("1.6.5", sha256="a564628c574c99287998753f98d750babd91a4e9db451f46ad140466ef2a6d16") version("1.6.4", sha256="bbb43f032b9164d86c781ffe42213a83bf4f2fee91455edfa4654521b8b03b6b") version("1.6.3", sha256="3f72c68db30971ebbf14367527719423f0a4d5f8103fc9f4a1c01a9fa440de5c") From f12b877e513517f90d4b17f5081bae98d6941c07 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Sat, 18 Nov 2023 17:21:50 +0100 Subject: [PATCH 677/806] heffte: add sycl variant (#41132) * heffte: add sycl variant This targets the oneAPI SYCL compiler with oneMKL as FFT implementation library. * Require oneAPI compiler for sycl variant --- var/spack/repos/builtin/packages/heffte/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index 01f1235771a744..df6eb2f948aae2 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -38,6 +38,12 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): variant("shared", default=True, description="Builds with shared libraries") variant("fftw", default=False, description="Builds with support for FFTW backend") + variant( + "sycl", + default=False, + when="%oneapi", + description="Builds with support for oneAPI SYCL+oneMKL backend", + ) variant("mkl", default=False, description="Builds with support for MKL backend") variant("magma", default=False, description="Use helper methods from the UTK MAGMA library") variant("python", default=False, description="Install the Python bindings") @@ -68,6 +74,8 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage): depends_on("rocsparse@3.8:", when="+magma+rocm", type=("build", "run")) depends_on("hipblas@3.8:", when="+magma+rocm", type=("build", "run")) depends_on("hipsparse@3.8:", when="+magma+rocm", type=("build", "run")) + depends_on("intel-oneapi-mkl@2023.2.0:", when="+sycl", type=("build", "run")) + depends_on("intel-oneapi-mpi@2021.10.0:", when="+sycl", type=("build", "run")) examples_src_dir = "examples" @@ -78,6 +86,7 @@ def cmake_args(self): self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("Heffte_ENABLE_CUDA", "cuda"), self.define_from_variant("Heffte_ENABLE_ROCM", "rocm"), + self.define_from_variant("Heffte_ENABLE_ONEAPI", "sycl"), self.define_from_variant("Heffte_ENABLE_FFTW", "fftw"), self.define_from_variant("Heffte_ENABLE_MKL", "mkl"), self.define_from_variant("Heffte_ENABLE_MAGMA", "magma"), From 3907838e1df069ee4fab475d3d87b2c40c87267c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Nov 2023 15:30:12 -0700 Subject: [PATCH 678/806] build(deps): bump docker/build-push-action from 5.0.0 to 5.1.0 (#41149) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.0.0 to 5.1.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/0565240e2d4ab88bba5387d719585280857ece09...4a13e500e55cf31b7a5d59a38ab2040ab0f42f56) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 880cf9c64495f5..8bda55c2e76c25 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -113,7 +113,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & Deploy ${{ matrix.dockerfile[0] }} - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} From 50051b56199992eb4395b8ff22913c1995311a8c Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 18 Nov 2023 16:39:28 -0600 Subject: [PATCH 679/806] geant4: new version 11.1.3 (#41112) * geant4: new version 11.1.3 Release notes: https://geant4.web.cern.ch/download/release-notes/notes-v11.1.3.txt * geant4: cmake patch with expat fix only until 11.1.2. --- var/spack/repos/builtin/packages/geant4/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index afc4464b098bd8..6f7605fccaf9d0 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -22,6 +22,7 @@ class Geant4(CMakePackage): maintainers("drbenmorgan") + version("11.1.3", sha256="5d9a05d4ccf8b975649eab1d615fc1b8dce5937e01ab9e795bffd04149240db6") version("11.1.2", sha256="e9df8ad18c445d9213f028fd9537e174d6badb59d94bab4eeae32f665beb89af") version("11.1.1", sha256="c5878634da9ba6765ce35a469b2893044f4a6598aa948733da8436cdbfeef7d2") version("11.1.0", sha256="c4a23f2f502efeab56de43a4412b21f65c7ca1b0877b9bc1d7e845ee12edf70a") @@ -152,7 +153,7 @@ def std_when(values): patch("geant4-10.4.3-cxx17-removed-features.patch", level=1, when="@10.4.3 cxxstd=17") # See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556 - patch("package-cache.patch", level=1, when="@10.7.0:11.2.0^cmake@3.17:") + patch("package-cache.patch", level=1, when="@10.7.0:11.1.2^cmake@3.17:") # NVHPC: "thread-local declaration follows non-thread-local declaration" conflicts("%nvhpc", when="+threads") From 6ca49549d923a47b1580a254cd64a141b53935f9 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Sun, 19 Nov 2023 00:48:00 +0100 Subject: [PATCH 680/806] gromacs: Add new variants and clarify existing ones (#41115) * gromacs: Add new variants and clarify existing ones Add new variants that reflect existing capabilities and defaults in the upstream build system. Add other existing constraints that were not yet specified. * conform to style * Fix missing hyphens * Correct cmake variable names --- .../repos/builtin/packages/gromacs/package.py | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 66c594c71ef328..d373bb4d5d425e 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -90,9 +90,26 @@ class Gromacs(CMakePackage, CudaPackage): default=False, description="Produces a double precision version of the executables", ) - variant("cufftmp", default=False, when="+cuda+mpi", description="Enable Multi GPU FFT support") + variant( + "cufftmp", + default=False, + when="@2022: +cuda+mpi", + description="Enable multi-GPU FFT support with cuFFTMp", + ) + variant( + "heffte", + default=False, + when="@2021: +sycl+mpi", + description="Enable multi-GPU FFT support with HeFFTe", + ) variant("opencl", default=False, description="Enable OpenCL support") - variant("sycl", default=False, description="Enable SYCL support") + variant("sycl", default=False, when="@2021:", description="Enable SYCL support") + variant( + "intel-data-center-gpu-max", + default=False, + when="@2022:", + description="Enable support for Intel Data Center GPU Max", + ) variant("nosuffix", default=False, description="Disable default suffixes") variant( "build_type", @@ -108,6 +125,18 @@ class Gromacs(CMakePackage, CudaPackage): "Profile", ), ) + variant( + "nblib", + default=True, + when="@2021:", + description="Build and install the NB-LIB C++ API for GROMACS", + ) + variant( + "gmxapi", + default=True, + when="@2019:", + description="Build and install the gmxlib python API for GROMACS", + ) variant( "mdrun_only", default=False, @@ -254,6 +283,7 @@ class Gromacs(CMakePackage, CudaPackage): depends_on("cp2k@8.1:", when="+cp2k") depends_on("nvhpc", when="+cufftmp") + depends_on("heffte", when="+heffte") requires( "%intel", @@ -516,6 +546,19 @@ def cmake_args(self): + f'/{self.spec["nvhpc"].version}/math_libs' ) + if "+heffte" in self.spec: + options.append("-DGMX_USE_HEFFTE=on") + options.append(f'-DHeffte_ROOT={self.spec["heffte"].prefix}') + + if "+intel-data-center-gpu-max" in self.spec: + options.append("-DGMX_GPU_NB_CLUSTER_SIZE=8") + options.append("-DGMX_GPU_NB_NUM_CLUSTER_PER_CELL_X=1") + + if "~nblib" in self.spec: + options.append("-DGMX_INSTALL_NBLIB_API=OFF") + if "~gmxapi" in self.spec: + options.append("-DGMXAPI=OFF") + # Activate SIMD based on properties of the target target = self.spec.target if target >= "zen4": From 73a715ad7549421b2aefb09a246fb0ac4d9e4b92 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sat, 18 Nov 2023 16:51:46 -0700 Subject: [PATCH 681/806] votca: add v2023 (#41100) --- var/spack/repos/builtin/packages/votca/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/votca/package.py b/var/spack/repos/builtin/packages/votca/package.py index db9d260f86530d..9dbd3a65ca506c 100644 --- a/var/spack/repos/builtin/packages/votca/package.py +++ b/var/spack/repos/builtin/packages/votca/package.py @@ -20,6 +20,7 @@ class Votca(CMakePackage): maintainers("junghans") version("master", branch="master") + version("2023", sha256="6150a38c77379d05592a56ae4392a00c4636d02198bb06108a3dc739a45115f8") version("2022.1", sha256="358119b2645fe60f88ca621aed508c49fb61f88d29d3e3fa24b5b831ed4a66ec") version("2022", sha256="7991137098ff4511f4ca2c6f1b6c45f53d92d9f84e5c0d0e32fbc31768f73a83") From 2870b6002c3a7bc2c89154c90bc3f72aaa4575ec Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:21:20 -0700 Subject: [PATCH 682/806] e4s oneapi stack: turn on +sycl: ginkgo, heffte, petsc, upcxx, warpx (#41157) * e4s oneapi stack: turn on +sycl: ginkgo, heffte, petsc, upcxx, warpx * comment out warpx; build fails; add note --- .../gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 8c872240f9e608..88df9e5e8f37ef 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -197,14 +197,18 @@ spack: - amrex +sycl - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples + - ginkgo +sycl + - heffte +sycl - kokkos +sycl +openmp cxxstd=17 +tests +examples - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples + - petsc +sycl - slate +sycl - sundials +sycl cxxstd=17 +examples-install - tau +mpi +opencl +level_zero ~pdt +syscall # tau: requires libdrm.so to be installed + - upcxx +level_zero # -- - # - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler. # - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc + # - warpx compute=sycl # warpx: spack-build-wzp6vvo/_deps/fetchedamrex-src/Src/Base/AMReX_RandomEngine.H:18:10: fatal error: 'oneapi/mkl/rng/device.hpp' file not found - py-scipy From 6159168079331d692608f6695491c3244bb4fcf3 Mon Sep 17 00:00:00 2001 From: Ethan Williams <37885088+ethanjjjjjjj@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:24:06 +0000 Subject: [PATCH 683/806] elbencho: add new version and git master branch (#41136) * elbencho add new version and git master branch * Update var/spack/repos/builtin/packages/elbencho/package.py Co-authored-by: Alec Scott * formatting fix requested by @alecbcs * remove whitespace added in blank line by github auto resolve --------- Co-authored-by: Ethan W Co-authored-by: Alec Scott --- var/spack/repos/builtin/packages/elbencho/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/elbencho/package.py b/var/spack/repos/builtin/packages/elbencho/package.py index a9417a4dfc135a..12562f97f30dbb 100644 --- a/var/spack/repos/builtin/packages/elbencho/package.py +++ b/var/spack/repos/builtin/packages/elbencho/package.py @@ -16,9 +16,13 @@ class Elbencho(MakefilePackage): homepage = "https://github.com/breuner/elbencho" url = "https://github.com/breuner/elbencho/archive/refs/tags/v3.0-1.tar.gz" + git = "https://github.com/breuner/elbencho.git" maintainers("ethanjjjjjjj") + version("master", branch="master") + + version("3.0-3", sha256="5769abcdaebefe2984ac3053fb6e91a54e1863d5ea8f72daea830e10b27c0eaf") version("3.0-1", sha256="19dad85e1fc74419dcdf740f11a47d3f6d566770a06e40976755a3404566c11d") version("2.2-5", sha256="4b598639452665a8b79c4c9d8a22ae63fb9b04057635a45e686aa3939ee255b4") version("2.2-3", sha256="0ae2d495d2863b84f21f55b7c526674fab1be723d0697087017946647f79d0e6") From edda2ef4199857dc109390e064d8bd856f31fa0d Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 19 Nov 2023 10:13:51 -0700 Subject: [PATCH 684/806] npm: only depend on libvips when @6, remove deprecated versions (#41159) Co-authored-by: Tom Scogland --- .../repos/builtin/packages/npm/package.py | 37 +------------------ 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/var/spack/repos/builtin/packages/npm/package.py b/var/spack/repos/builtin/packages/npm/package.py index 0d6480f210428b..c8c544c1179381 100644 --- a/var/spack/repos/builtin/packages/npm/package.py +++ b/var/spack/repos/builtin/packages/npm/package.py @@ -13,49 +13,16 @@ class Npm(Package): """npm: A package manager for javascript.""" homepage = "https://github.com/npm/cli" - # base https://www.npmjs.com/ - - git = "https://github.com/npm/cli.git" url = "https://registry.npmjs.org/npm/-/npm-9.3.1.tgz" + git = "https://github.com/npm/cli.git" version("9.3.1", sha256="41caa26a340b0562bc5429d28792049c980fe3e872b42b82cad94e8f70e37f40") version("8.19.3", sha256="634bf4e0dc87be771ebf48a058629960e979a209c20a51ebdbc4897ca6a25260") version("7.24.2", sha256="5b9eeea011f8bc3b76e55cc33339e87213800677f37e0756ad13ef0e9eaccd64") version("6.14.18", sha256="c9b15f277e2a0b1b57e05bad04504296a27024555d56c2aa967f862e957ad2ed") - version( - "6.14.9", - sha256="1e0e880ce0d5adf0120fb3f92fc8e5ea5bac73681d37282615d074ff670f7703", - deprecated=True, - ) - version( - "6.14.8", - sha256="fe8e873cb606c06f67f666b4725eb9122c8927f677c8c0baf1477f0ff81f5a2c", - deprecated=True, - ) - version( - "6.13.7", - sha256="6adf71c198d61a5790cf0e057f4ab72c6ef6c345d72bed8bb7212cb9db969494", - deprecated=True, - ) - version( - "6.13.4", - sha256="a063290bd5fa06a8753de14169b7b243750432f42d01213fbd699e6b85916de7", - deprecated=True, - ) - version( - "3.10.9", - sha256="fb0871b1aebf4b74717a72289fade356aedca83ee54e7386e38cb51874501dd6", - deprecated=True, - ) - version( - "3.10.5", - sha256="ff019769e186152098841c1fa6325e5a79f7903a45f13bd0046a4dc8e63f845f", - deprecated=True, - ) - depends_on("node-js", type=("build", "run")) - depends_on("libvips") + depends_on("libvips", when="@:7") # npm 6.13.4 ships with node-gyp 5.0.5, which contains several Python 3 # compatibility issues on macOS. Manually update to node-gyp 6.0.1 for From 55d2ee9160a74bcf9f271313322e8aa83db153d1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 20 Nov 2023 09:00:53 +0100 Subject: [PATCH 685/806] docs: document how spack picks a version / variant (#41070) --- lib/spack/docs/build_settings.rst | 6 +- lib/spack/docs/frequently_asked_questions.rst | 77 +++++++++++++++++++ lib/spack/docs/index.rst | 1 + lib/spack/docs/packages_yaml.rst | 10 +++ 4 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 lib/spack/docs/frequently_asked_questions.rst diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst index 9fa7eafcbec7e5..0f53355a81dd80 100644 --- a/lib/spack/docs/build_settings.rst +++ b/lib/spack/docs/build_settings.rst @@ -37,7 +37,11 @@ to enable reuse for a single installation, and you can use: spack install --fresh to do a fresh install if ``reuse`` is enabled by default. -``reuse: true`` is the default. +``reuse: dependencies`` is the default. + +.. seealso:: + + FAQ: :ref:`Why does Spack pick particular versions and variants? ` ------------------------------------------ Selection of the target microarchitectures diff --git a/lib/spack/docs/frequently_asked_questions.rst b/lib/spack/docs/frequently_asked_questions.rst new file mode 100644 index 00000000000000..345fa1a81a816a --- /dev/null +++ b/lib/spack/docs/frequently_asked_questions.rst @@ -0,0 +1,77 @@ +.. Copyright 2013-2023 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) + +========================== +Frequently Asked Questions +========================== + +This page contains answers to frequently asked questions about Spack. +If you have questions that are not answered here, feel free to ask on +`Slack `_ or `GitHub Discussions +`_. If you've learned the +answer to a question that you think should be here, please consider +contributing to this page. + +.. _faq-concretizer-precedence: + +----------------------------------------------------- +Why does Spack pick particular versions and variants? +----------------------------------------------------- + +This question comes up in a variety of forms: + + 1. Why does Spack seem to ignore my package preferences from ``packages.yaml`` config? + 2. Why does Spack toggle a variant instead of using the default from the ``package.py`` file? + +The short answer is that Spack always picks an optimal configuration +based on a complex set of criteria\ [#f1]_. These criteria are more nuanced +than always choosing the latest versions or default variants. + +.. note:: + + As a rule of thumb: requirements + constraints > reuse > preferences > defaults. + +The following set of criteria (from lowest to highest precedence) explain +common cases where concretization output may seem surprising at first. + +1. :ref:`Package preferences ` configured in ``packages.yaml`` + override variant defaults from ``package.py`` files, and influence the optimal + ordering of versions. Preferences are specified as follows: + + .. code-block:: yaml + + packages: + foo: + version: [1.0, 1.1] + variants: ~mpi + +2. :ref:`Reuse concretization ` configured in ``concretizer.yaml`` + overrides preferences, since it's typically faster to reuse an existing spec than to + build a preferred one from sources. When build caches are enabled, specs may be reused + from a remote location too. Reuse concretization is configured as follows: + + .. code-block:: yaml + + concretizer: + reuse: dependencies # other options are 'true' and 'false' + +3. :ref:`Package requirements ` configured in ``packages.yaml``, + and constraints from the command line as well as ``package.py`` files override all + of the above. Requirements are specified as follows: + + .. code-block:: yaml + + packages: + foo: + require: + - "@1.2: +mpi" + +Requirements and constraints restrict the set of possible solutions, while reuse +behavior and preferences influence what an optimal solution looks like. + + +.. rubric:: Footnotes + +.. [#f1] The exact list of criteria can be retrieved with the ``spack solve`` command diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst index 9b032ed31355c2..7607181ada5947 100644 --- a/lib/spack/docs/index.rst +++ b/lib/spack/docs/index.rst @@ -55,6 +55,7 @@ or refer to the full manual below. getting_started basic_usage replace_conda_homebrew + frequently_asked_questions .. toctree:: :maxdepth: 2 diff --git a/lib/spack/docs/packages_yaml.rst b/lib/spack/docs/packages_yaml.rst index e91d22a8f3470c..e08f51e612a318 100644 --- a/lib/spack/docs/packages_yaml.rst +++ b/lib/spack/docs/packages_yaml.rst @@ -256,6 +256,11 @@ on the command line, because it can specify constraints on packages is not possible to specify constraints on dependencies while also keeping those dependencies optional. +.. seealso:: + + FAQ: :ref:`Why does Spack pick particular versions and variants? ` + + ^^^^^^^^^^^^^^^^^^^ Requirements syntax ^^^^^^^^^^^^^^^^^^^ @@ -435,6 +440,11 @@ them if it must, due to other constraints, and also prefers reusing installed packages over building new ones that are a better match for preferences. +.. seealso:: + + FAQ: :ref:`Why does Spack pick particular versions and variants? ` + + Most package preferences (``compilers``, ``target`` and ``providers``) can only be set globally under the ``all`` section of ``packages.yaml``: From df1111c24a9cb6e20b989605e944faa202127625 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 20 Nov 2023 02:20:21 -0600 Subject: [PATCH 686/806] sherpa: only enable_or_disable in v3: (#41162) --- var/spack/repos/builtin/packages/sherpa/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/sherpa/package.py b/var/spack/repos/builtin/packages/sherpa/package.py index 7ae8efc2e45997..38fa6277f59a09 100644 --- a/var/spack/repos/builtin/packages/sherpa/package.py +++ b/var/spack/repos/builtin/packages/sherpa/package.py @@ -217,7 +217,7 @@ def configure_args(self): args.extend(self.enable_or_disable("pythia")) hepmc_root = lambda x: self.spec["hepmc"].prefix args.extend(self.enable_or_disable("hepmc2", activation_value=hepmc_root)) - if self.spec.satisfies("@2.2.13:"): + if self.spec.satisfies("@3:"): args.extend(self.enable_or_disable("hepmc3", activation_value="prefix")) args.extend(self.enable_or_disable("rivet", activation_value="prefix")) args.extend(self.enable_or_disable("lhapdf", activation_value="prefix")) From 2c74ac5b2b4cd97abf58d35bbfb24294014b80e2 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 20 Nov 2023 09:27:38 +0100 Subject: [PATCH 687/806] Remove a maintainer from CMS packages (#41170) --- var/spack/repos/builtin/packages/alpgen/package.py | 1 - var/spack/repos/builtin/packages/cool/package.py | 1 - var/spack/repos/builtin/packages/dwz/package.py | 2 -- var/spack/repos/builtin/packages/form/package.py | 2 +- var/spack/repos/builtin/packages/gbl/package.py | 1 - var/spack/repos/builtin/packages/jemalloc/package.py | 2 -- var/spack/repos/builtin/packages/millepede/package.py | 2 -- var/spack/repos/builtin/packages/pacparser/package.py | 2 -- var/spack/repos/builtin/packages/photos-f/package.py | 2 -- var/spack/repos/builtin/packages/py-async-lru/package.py | 2 -- .../packages/py-backports-entry-points-selectable/package.py | 2 -- var/spack/repos/builtin/packages/py-cppy/package.py | 2 -- var/spack/repos/builtin/packages/xrdcl-record/package.py | 2 -- 13 files changed, 1 insertion(+), 22 deletions(-) diff --git a/var/spack/repos/builtin/packages/alpgen/package.py b/var/spack/repos/builtin/packages/alpgen/package.py index 52b47adebf6ff0..9d0a96922edb6e 100644 --- a/var/spack/repos/builtin/packages/alpgen/package.py +++ b/var/spack/repos/builtin/packages/alpgen/package.py @@ -16,7 +16,6 @@ class Alpgen(CMakePackage, MakefilePackage): homepage = "http://mlm.home.cern.ch/mlm/alpgen/" url = "http://mlm.home.cern.ch/mlm/alpgen/V2.1/v214.tgz" - maintainers("iarspider") tags = ["hep"] version("2.1.4", sha256="2f43f7f526793fe5f81a3a3e1adeffe21b653a7f5851efc599ed69ea13985c5e") diff --git a/var/spack/repos/builtin/packages/cool/package.py b/var/spack/repos/builtin/packages/cool/package.py index 9418a16cbeb5d4..f12f474c167950 100644 --- a/var/spack/repos/builtin/packages/cool/package.py +++ b/var/spack/repos/builtin/packages/cool/package.py @@ -14,7 +14,6 @@ class Cool(CMakePackage): git = "https://gitlab.cern.ch/lcgcool/cool.git" tags = ["hep"] - maintainers("iarspider") version("3.3.10", tag="COOL_3_3_10", commit="110b51c2b50af07cbe1f64a1c67ce9f737c4421d") version("3.3.7", tag="COOL_3_3_7", commit="6f9a29d903e51ecbb26bdc8a694a67db9f28e234") diff --git a/var/spack/repos/builtin/packages/dwz/package.py b/var/spack/repos/builtin/packages/dwz/package.py index cb1b1f5e2accc3..feb805ee6917ee 100644 --- a/var/spack/repos/builtin/packages/dwz/package.py +++ b/var/spack/repos/builtin/packages/dwz/package.py @@ -13,8 +13,6 @@ class Dwz(MakefilePackage, SourcewarePackage): sourceware_mirror_path = "dwz/releases/dwz-0.14.tar.gz" git = "git://sourceware.org/git/dwz.git" - maintainers("iarspider") - depends_on("elf") version("0.14-patches", branch="dwz-0.14-branch") diff --git a/var/spack/repos/builtin/packages/form/package.py b/var/spack/repos/builtin/packages/form/package.py index 13c303ca508802..2d1bed59c035e8 100644 --- a/var/spack/repos/builtin/packages/form/package.py +++ b/var/spack/repos/builtin/packages/form/package.py @@ -11,7 +11,7 @@ class Form(AutotoolsPackage): homepage = "https://www.nikhef.nl/~form/" url = "https://github.com/vermaseren/form/releases/download/v4.2.1/form-4.2.1.tar.gz" - maintainers("iarspider", "tueda") + maintainers("tueda") version("4.3.1", sha256="f1f512dc34fe9bbd6b19f2dfef05fcb9912dfb43c8368a75b796ec472ee8bbce") version("4.3.0", sha256="b234e0d095f73ecb0904cdc3b0d8d8323a9fa7f46770a52fb22267c624aafbf6") diff --git a/var/spack/repos/builtin/packages/gbl/package.py b/var/spack/repos/builtin/packages/gbl/package.py index 98aeb67fab3bc3..62f4bed7be196e 100644 --- a/var/spack/repos/builtin/packages/gbl/package.py +++ b/var/spack/repos/builtin/packages/gbl/package.py @@ -12,7 +12,6 @@ class Gbl(CMakePackage): homepage = "https://www.desy.de/~kleinwrt/GBL/doc/cpp/html/" git = "https://gitlab.desy.de/claus.kleinwort/general-broken-lines.git" - maintainers("iarspider") tags = ["hep"] version("V02-04-01", commit="1061b643c6656fbf7ceba579997eb43f0a9e9d3c") diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py index 646120ebb02913..516cdc1e4d23b2 100644 --- a/var/spack/repos/builtin/packages/jemalloc/package.py +++ b/var/spack/repos/builtin/packages/jemalloc/package.py @@ -13,8 +13,6 @@ class Jemalloc(AutotoolsPackage): homepage = "http://jemalloc.net/" url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2" - maintainers("iarspider") - version("5.3.0", sha256="2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa") version("5.2.1", sha256="34330e5ce276099e2e8950d9335db5a875689a4c6a56751ef3b1d8c537f887f6") version("5.2.0", sha256="74be9f44a60d2a99398e706baa921e4efde82bf8fd16e5c0643c375c5851e3b4") diff --git a/var/spack/repos/builtin/packages/millepede/package.py b/var/spack/repos/builtin/packages/millepede/package.py index 6cc9b5a9ada53d..d086f8a75993f6 100644 --- a/var/spack/repos/builtin/packages/millepede/package.py +++ b/var/spack/repos/builtin/packages/millepede/package.py @@ -14,8 +14,6 @@ class Millepede(MakefilePackage): homepage = "https://gitlab.desy.de/claus.kleinwort/millepede-ii" url = "https://gitlab.desy.de/claus.kleinwort/millepede-ii/-/archive/V04-11-01/millepede-ii-V04-11-01.tar.gz" - maintainers("iarspider") - parallel = False version("04-13-03", sha256="669a6e46a6f02ba3c78b2760e2ffb2c90d25b582ccd1a5c0770eef81c7bcbbe9") diff --git a/var/spack/repos/builtin/packages/pacparser/package.py b/var/spack/repos/builtin/packages/pacparser/package.py index d42d927e370356..905cc9f874fc17 100644 --- a/var/spack/repos/builtin/packages/pacparser/package.py +++ b/var/spack/repos/builtin/packages/pacparser/package.py @@ -9,8 +9,6 @@ class Pacparser(MakefilePackage): """pacparser is a library to parse proxy auto-config (PAC) files.""" - maintainers("iarspider") - homepage = "https://pacparser.github.io/" url = "https://github.com/manugarg/pacparser/releases/download/v1.4.0/pacparser-v1.4.0.tar.gz" git = "https://github.com/manugarg/pacparser.git" diff --git a/var/spack/repos/builtin/packages/photos-f/package.py b/var/spack/repos/builtin/packages/photos-f/package.py index 5c6cac9bf568d8..536407ff8ac49a 100644 --- a/var/spack/repos/builtin/packages/photos-f/package.py +++ b/var/spack/repos/builtin/packages/photos-f/package.py @@ -18,8 +18,6 @@ class PhotosF(MakefilePackage): "http://cern.ch/service-spi/external/MCGenerators/distribution/photos/photos-215.5-src.tgz" ) - maintainers("iarspider") - version("215.5", sha256="3e2b3f60ffe2d3a6a95cf2f156aa24b93e1fa3c439a85fa0ae780ca2f6e0dbb5") patch("photos-215.5-update-configure.patch", level=2) diff --git a/var/spack/repos/builtin/packages/py-async-lru/package.py b/var/spack/repos/builtin/packages/py-async-lru/package.py index 021112b4f9f4b6..ec2033768f1b4e 100644 --- a/var/spack/repos/builtin/packages/py-async-lru/package.py +++ b/var/spack/repos/builtin/packages/py-async-lru/package.py @@ -12,8 +12,6 @@ class PyAsyncLru(PythonPackage): homepage = "https://github.com/wikibusiness/async_lru" pypi = "async-lru/async-lru-1.0.2.tar.gz" - maintainers("iarspider") - version("1.0.3", sha256="c2cb9b2915eb14e6cf3e717154b40f715bf90e596d73623677affd0d1fbcd32a") version("1.0.2", sha256="baa898027619f5cc31b7966f96f00e4fc0df43ba206a8940a5d1af5336a477cb") diff --git a/var/spack/repos/builtin/packages/py-backports-entry-points-selectable/package.py b/var/spack/repos/builtin/packages/py-backports-entry-points-selectable/package.py index a46d057753a4df..5b2b830c4645ea 100644 --- a/var/spack/repos/builtin/packages/py-backports-entry-points-selectable/package.py +++ b/var/spack/repos/builtin/packages/py-backports-entry-points-selectable/package.py @@ -12,8 +12,6 @@ class PyBackportsEntryPointsSelectable(PythonPackage): homepage = "https://github.com/jaraco/backports.entry_points_selectable" pypi = "backports.entry_points_selectable/backports.entry_points_selectable-1.1.0.tar.gz" - maintainers("iarspider") - version("1.1.1", sha256="914b21a479fde881635f7af5adc7f6e38d6b274be32269070c53b698c60d5386") version("1.1.0", sha256="988468260ec1c196dab6ae1149260e2f5472c9110334e5d51adcb77867361f6a") diff --git a/var/spack/repos/builtin/packages/py-cppy/package.py b/var/spack/repos/builtin/packages/py-cppy/package.py index b759799e1b65fc..c697695cce8859 100644 --- a/var/spack/repos/builtin/packages/py-cppy/package.py +++ b/var/spack/repos/builtin/packages/py-cppy/package.py @@ -12,8 +12,6 @@ class PyCppy(PythonPackage): homepage = "https://github.com/nucleic/cppy" pypi = "cppy/cppy-1.1.0.tar.gz" - maintainers("iarspider") - version("1.2.1", sha256="83b43bf17b1085ac15c5debdb42154f138b928234b21447358981f69d0d6fe1b") version("1.1.0", sha256="4eda6f1952054a270f32dc11df7c5e24b259a09fddf7bfaa5f33df9fb4a29642") diff --git a/var/spack/repos/builtin/packages/xrdcl-record/package.py b/var/spack/repos/builtin/packages/xrdcl-record/package.py index c43f668a612149..d045fcd06c8f8e 100644 --- a/var/spack/repos/builtin/packages/xrdcl-record/package.py +++ b/var/spack/repos/builtin/packages/xrdcl-record/package.py @@ -13,8 +13,6 @@ class XrdclRecord(CMakePackage): homepage = "https://github.com/xrootd/xrdcl-record" url = "https://github.com/xrootd/xrdcl-record/archive/refs/tags/v5.4.2.tar.gz" - maintainers("iarspider") - version("5.4.2", sha256="fb76284491ff4e723bce4c9e9d87347e98e278e70c597167bc39a162bc876734") depends_on("xrootd") From cfae42a514cca00f5a99f9c04d00b7a4ca8c0058 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 20 Nov 2023 01:59:55 -0700 Subject: [PATCH 688/806] glab: add v1.35.0 (#41167) --- var/spack/repos/builtin/packages/glab/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/glab/package.py b/var/spack/repos/builtin/packages/glab/package.py index 1f5d5fc20d6bad..a363d6acf5a2b9 100644 --- a/var/spack/repos/builtin/packages/glab/package.py +++ b/var/spack/repos/builtin/packages/glab/package.py @@ -14,6 +14,7 @@ class Glab(Package): maintainers("alecbcs") + version("1.35.0", sha256="7ed31c7a9b425fc15922f83c5dd8634a2758262a4f25f92583378655fcad6303") version("1.33.0", sha256="447a9b76acb5377642a4975908f610a3082026c176329c7c8cfed1461d2e1570") version("1.31.0", sha256="5648e88e7d6cc993227f5a4e80238af189bed09c7aed1eb12be7408e9a042747") version("1.30.0", sha256="d3c1a9ba723d94a0be10fc343717cf7b61732644f5c42922f1c8d81047164b99") From ec2a0c884717f59f19e081aafaca4873ed60429e Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 20 Nov 2023 02:00:15 -0700 Subject: [PATCH 689/806] rclone: add v1.64.2 (#41166) --- var/spack/repos/builtin/packages/rclone/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/rclone/package.py b/var/spack/repos/builtin/packages/rclone/package.py index a1dacabc7708e7..06dd69d9175dc7 100644 --- a/var/spack/repos/builtin/packages/rclone/package.py +++ b/var/spack/repos/builtin/packages/rclone/package.py @@ -15,6 +15,7 @@ class Rclone(Package): maintainers("alecbcs") + version("1.64.2", sha256="0c74d8fb887691e04e865e3b6bc32e8af47c3e54a9922ffdbed38c8323e281c9") version("1.63.1", sha256="0d8bf8b7460681f7906096a9d37eedecc5a1d1d3ad17652e68f0c6de104c2412") version("1.62.2", sha256="340371f94604e6771cc4a2c91e37d1bf00a524deab520340440fb0968e783f63") version("1.61.1", sha256="34b5f52047741c7bbf54572c02cc9998489c4736a753af3c99255296b1af125d") From a015078c360a618270968feab7232148ae9da64b Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 20 Nov 2023 02:00:31 -0700 Subject: [PATCH 690/806] bfs: add v3.0.4 (#41165) --- var/spack/repos/builtin/packages/bfs/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/bfs/package.py b/var/spack/repos/builtin/packages/bfs/package.py index f90c882648c1a7..3e932f142ac060 100644 --- a/var/spack/repos/builtin/packages/bfs/package.py +++ b/var/spack/repos/builtin/packages/bfs/package.py @@ -14,6 +14,7 @@ class Bfs(MakefilePackage): maintainers("alecbcs") + version("3.0.4", sha256="7196f5a624871c91ad051752ea21043c198a875189e08c70ab3167567a72889d") version("3.0.2", sha256="d3456a9aeecc031064db0dbe012e55a11eb97be88d0ab33a90e570fe66457f92") version("3.0.1", sha256="a38bb704201ed29f4e0b989fb2ab3791ca51c3eff90acfc31fff424579bbf962") From 4636d6ec627ec025f95a0559656ffb3335cdd67a Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 20 Nov 2023 02:46:59 -0700 Subject: [PATCH 691/806] restic: add v0.16.2 (#41168) --- var/spack/repos/builtin/packages/restic/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/restic/package.py b/var/spack/repos/builtin/packages/restic/package.py index 493e0c098331f2..569d51dc704c21 100644 --- a/var/spack/repos/builtin/packages/restic/package.py +++ b/var/spack/repos/builtin/packages/restic/package.py @@ -14,6 +14,7 @@ class Restic(Package): maintainers("alecbcs") + version("0.16.2", sha256="88165b5b89b6064df37a9964d660f40ac62db51d6536e459db9aaea6f2b2fc11") version("0.16.0", sha256="b91f5ef6203a5c50a72943c21aaef336e1344f19a3afd35406c00f065db8a8b9") version("0.15.2", sha256="52aca841486eaf4fe6422b059aa05bbf20db94b957de1d3fca019ed2af8192b7") version("0.15.1", sha256="fce382fdcdac0158a35daa640766d5e8a6e7b342ae2b0b84f2aacdff13990c52") From 714a362f940bb49a11639815ada1dc3962e31900 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Mon, 20 Nov 2023 03:00:39 -0700 Subject: [PATCH 692/806] mpich: support ch3:sock for a non busy-polling option (#40964) --- var/spack/repos/builtin/packages/mpich/package.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 984f2a89a7bb7f..aa2d89e5b5e9aa 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -70,16 +70,14 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): description="""Abstract Device Interface (ADI) implementation. The ch4 device is in experimental state for versions before 3.4.""", - values=("ch3", "ch4"), + values=("ch3", "ch4", "ch3:sock"), multi=False, ) variant( "netmod", default="ofi", description="""Network module. Only single netmod builds are -supported. For ch3 device configurations, this presumes the -ch3:nemesis communication channel. ch3:sock is not supported by this -spack package at this time.""", +supported, and netmod is ignored if device is ch3:sock.""", values=("tcp", "mxm", "ofi", "ucx"), multi=False, ) @@ -121,6 +119,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): depends_on("yaksa+cuda", when="+cuda ^yaksa") depends_on("yaksa+rocm", when="+rocm ^yaksa") conflicts("datatype-engine=yaksa", when="device=ch3") + conflicts("datatype-engine=yaksa", when="device=ch3:sock") variant( "hcoll", @@ -135,8 +134,10 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): # overriding the variant from CudaPackage. conflicts("+cuda", when="@:3.3") conflicts("+cuda", when="device=ch3") + conflicts("+cuda", when="device=ch3:sock") conflicts("+rocm", when="@:4.0") conflicts("+rocm", when="device=ch3") + conflicts("+rocm", when="device=ch3:sock") conflicts("+cuda", when="+rocm", msg="CUDA must be disabled to support ROCm") provides("mpi@:4.0") @@ -271,6 +272,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage): conflicts("netmod=tcp", when="device=ch4") conflicts("pmi=pmi2", when="device=ch3 netmod=ofi") conflicts("pmi=pmix", when="device=ch3") + conflicts("pmi=pmix", when="device=ch3:sock") conflicts("pmi=pmix", when="+hydra") conflicts("pmi=cray", when="+hydra") @@ -556,7 +558,10 @@ def configure_args(self): elif "device=ch3" in spec: device_config = "--with-device=ch3:nemesis:" - if "netmod=ucx" in spec: + # Do not apply any netmod if device is ch3:sock + if "device=ch3:sock" in spec: + device_config = "--with-device=ch3:sock" + elif "netmod=ucx" in spec: device_config += "ucx" elif "netmod=ofi" in spec: device_config += "ofi" From 87a9b428e5a412a527c11fe641fa9d359dbc1877 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 20 Nov 2023 04:10:28 -0600 Subject: [PATCH 693/806] py-scipy: add v1.11.4 (#41158) --- var/spack/repos/builtin/packages/py-scipy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 51f89f7d4cdf92..5d053cbb91d1c6 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -17,6 +17,7 @@ class PyScipy(PythonPackage): version("main", branch="main") version("master", branch="master", deprecated=True) + version("1.11.4", sha256="90a2b78e7f5733b9de748f589f09225013685f9b218275257f8a8168ededaeaa") version("1.11.3", sha256="bba4d955f54edd61899776bad459bf7326e14b9fa1c552181f0479cc60a568cd") version("1.11.2", sha256="b29318a5e39bd200ca4381d80b065cdf3076c7d7281c5e36569e99273867f61d") version("1.11.1", sha256="fb5b492fa035334fd249f0973cc79ecad8b09c604b42a127a677b45a9a3d4289") From 8003f187098d3c44121f94b8ce716a8eaa1a47c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= <15837247+mofeing@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:20:11 +0100 Subject: [PATCH 694/806] openblas: optimize flags for A64FX (#41093) --- .../repos/builtin/packages/openblas/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index bb9a5ef9ff4c8b..e88a3f418e5c67 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -192,6 +192,13 @@ class Openblas(CMakePackage, MakefilePackage): when="@0.3.21 %gcc@:9", ) + # Fix build on A64FX for OpenBLAS v0.3.24 + patch( + "https://github.com/OpenMathLib/OpenBLAS/commit/90231bfc4e4afc51f67c248328fbef0cecdbd2c2.patch?full_index=1", + sha256="139e314f3408dc5c080d28887471f382e829d1bd06c8655eb72593e4e7b921cc", + when="@0.3.24 target=a64fx", + ) + # See https://github.com/spack/spack/issues/19932#issuecomment-733452619 # Notice: fixed on Amazon Linux GCC 7.3.1 (which is an unofficial version # as GCC only has major.minor releases. But the bound :7.3.0 doesn't hurt) @@ -370,6 +377,14 @@ def _microarch_target_args(self): # case can go away. args.append("TARGET=" + "RISCV64_GENERIC") + elif self.spec.satisfies("@0.3.19: target=a64fx"): + # Special case for Fujitsu's A64FX + if any(self.spec.satisfies(i) for i in ["%gcc@11:", "%clang", "%fj"]): + args.append("TARGET=A64FX") + else: + # fallback to armv8-a+sve without -mtune=a64fx flag + args.append("TARGET=ARMV8SVE") + else: args.append("TARGET=" + microarch.name.upper()) From 73858df14dc3f0e701814c84bb8bd6b72f80a806 Mon Sep 17 00:00:00 2001 From: Marc Perache Date: Mon, 20 Nov 2023 11:31:17 +0100 Subject: [PATCH 695/806] Catch2: add variant to choose cxx standard (#40996) --- var/spack/repos/builtin/packages/catch2/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/catch2/package.py b/var/spack/repos/builtin/packages/catch2/package.py index 82eb629bb82661..001d5151a175aa 100644 --- a/var/spack/repos/builtin/packages/catch2/package.py +++ b/var/spack/repos/builtin/packages/catch2/package.py @@ -110,9 +110,13 @@ class Catch2(CMakePackage): ) variant("shared", when="@3:", default=False, description="Build shared library") + variant( + "cxxstd", default="14", values=("14", "17"), multi=False, description="Define C++ standard" + ) + def cmake_args(self): spec = self.spec - args = [] + args = [self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd")] # 1.7.0-1.9.3: no control over test builds if spec.satisfies("@1.9.4:2.1.0"): args.append("-DNO_SELFTEST={0}".format("OFF" if self.run_tests else "ON")) From 868a3c43e4206f864121cdb81f9613ff260a3a3b Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 20 Nov 2023 06:10:13 -0700 Subject: [PATCH 696/806] llvm: Remove python bindings when >= v17 (#41160) Co-authored-by: Tom Scogland --- var/spack/repos/builtin/packages/llvm/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index f1f2cc5f901a7d..abf3dee6b49a36 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -983,7 +983,10 @@ def post_install(self): ninja() ninja("install") if "+python" in self.spec: - install_tree("llvm/bindings/python", python_platlib) + if spec.version < Version("17.0.0"): + # llvm bindings were removed in v17: + # https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html#changes-to-the-python-bindings + install_tree("llvm/bindings/python", python_platlib) if "+clang" in self.spec: install_tree("clang/bindings/python", python_platlib) From d272c49fb6b9fca7880ace746b476d8feb7caa3a Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 20 Nov 2023 13:35:26 -0700 Subject: [PATCH 697/806] rust: add v1.73.0 and add support for external openssl certs (#41161) Co-authored-by: Tom Scogland --- .../packages/rust-bootstrap/package.py | 11 +++ .../repos/builtin/packages/rust/package.py | 73 +++++++++++++------ 2 files changed, 61 insertions(+), 23 deletions(-) diff --git a/var/spack/repos/builtin/packages/rust-bootstrap/package.py b/var/spack/repos/builtin/packages/rust-bootstrap/package.py index 337618e20e38f2..a8e9f7baae34a8 100644 --- a/var/spack/repos/builtin/packages/rust-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/rust-bootstrap/package.py @@ -21,6 +21,17 @@ class RustBootstrap(Package): # should update these binary releases as bootstrapping requirements are # modified by new releases of Rust. rust_releases = { + "1.73.0": { + "darwin": { + "x86_64": "ece9646bb153d4bc0f7f1443989de0cbcd8989a7d0bf3b7fb9956e1223954f0c", + "aarch64": "9c96e4c57328fb438ee2d87aa75970ce89b4426b49780ccb3c16af0d7c617cc6", + }, + "linux": { + "x86_64": "aa4cf0b7e66a9f5b7c623d4b340bb1ac2864a5f2c2b981f39f796245dc84f2cb", + "aarch64": "e54d7d886ba413ae573151f668e76ea537f9a44406d3d29598269a4a536d12f6", + "powerpc64le": "8fa215ee3e274fb64364e7084613bc570369488fa22cf5bc8e0fe6dc810fe2b9", + }, + }, "1.70.0": { "darwin": { "x86_64": "e5819fdbfc7f1a4d5d82cb4c3b7662250748450b45a585433bfb75648bc45547", diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index b660697df3653e..8d0784d95a203b 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import re from spack.package import * @@ -17,6 +18,27 @@ class Rust(Package): maintainers("alecbcs") + # When adding a version of Rust you may need to add an additional version + # to rust-bootstrap as the minimum bootstrapping requirements increase. + # As a general rule of thumb Rust can be built with either the previous major + # version or the current version of the compiler as shown above. + + # Pre-release versions. + # Note: If you plan to use these versions remember to install with + # `-n` to prevent Spack from failing due to failed checksums. + # + # $ spack install -n rust@pre-release-version + # + version("beta") + version("master", branch="master", submodules=True) + version("nightly") + + # Stable versions. + version("1.73.0", sha256="96d62e6d1f2d21df7ac8acb3b9882411f9e7c7036173f7f2ede9e1f1f6b1bb3a") + version("1.70.0", sha256="b2bfae000b7a5040e4ec4bbc50a09f21548190cb7570b0ed77358368413bd27c") + version("1.65.0", sha256="5828bb67f677eabf8c384020582b0ce7af884e1c84389484f7f8d00dd82c0038") + version("1.60.0", sha256="20ca826d1cf674daf8e22c4f8c4b9743af07973211c839b85839742314c838b7") + # Core dependencies depends_on("cmake@3.13.4:", type="build") depends_on("curl+nghttp2") @@ -40,26 +62,7 @@ class Rust(Package): depends_on("rust-bootstrap@1.59:1.60", type="build", when="@1.60") depends_on("rust-bootstrap@1.64:1.65", type="build", when="@1.65") depends_on("rust-bootstrap@1.69:1.70", type="build", when="@1.70") - - # When adding a version of Rust you may need to add an additional version - # to rust-bootstrap as the minimum bootstrapping requirements increase. - # As a general rule of thumb Rust can be built with either the previous major - # version or the current version of the compiler as shown above. - - # Pre-release versions. - # Note: If you plan to use these versions remember to install with - # `-n` to prevent Spack from failing due to failed checksums. - # - # $ spack install -n rust@pre-release-version - # - version("beta") - version("master", branch="master", submodules=True) - version("nightly") - - # Stable versions. - version("1.70.0", sha256="b2bfae000b7a5040e4ec4bbc50a09f21548190cb7570b0ed77358368413bd27c") - version("1.65.0", sha256="5828bb67f677eabf8c384020582b0ce7af884e1c84389484f7f8d00dd82c0038") - version("1.60.0", sha256="20ca826d1cf674daf8e22c4f8c4b9743af07973211c839b85839742314c838b7") + depends_on("rust-bootstrap@1.72:1.73", type="build", when="@1.73") variant( "analysis", @@ -91,9 +94,33 @@ def setup_build_environment(self, env): ar = which("ar", required=True) env.set("AR", ar.path) - # Manually inject the path of openssl's certs for build. - certs = join_path(self.spec["openssl"].prefix, "etc/openssl/cert.pem") - env.set("CARGO_HTTP_CAINFO", certs) + # Manually inject the path of openssl's certs for build + # if certs are present on system via Spack or via external + # openssl. + def get_test_path(p): + certs = join_path(p, "cert.pem") + if os.path.exists(certs): + return certs + return None + + # find certs, don't set if no file is found in case + # ca-certificates isn't installed + certs = None + openssl = self.spec["openssl"] + if openssl.external: + try: + output = which("openssl", required=True)("version", "-d", output=str, error=str) + openssl_dir = re.match('OPENSSLDIR: "([^"]+)"', output) + if openssl_dir: + certs = get_test_path(openssl_dir.group(1)) + except ProcessError: + pass + + if certs is None: + certs = get_test_path(join_path(openssl.prefix, "etc/openssl")) + + if certs is not None: + env.set("CARGO_HTTP_CAINFO", certs) def configure(self, spec, prefix): opts = [] From 5154d696297a6b00a148f09967688dd27113275d Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:55:07 -0500 Subject: [PATCH 698/806] MSVC preview version breaks clingo build (#41185) Co-authored-by: Harmen Stoppels --- lib/spack/spack/bootstrap/_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/bootstrap/_common.py b/lib/spack/spack/bootstrap/_common.py index 69f32d62639d81..0b8192f77f807d 100644 --- a/lib/spack/spack/bootstrap/_common.py +++ b/lib/spack/spack/bootstrap/_common.py @@ -213,7 +213,8 @@ def _root_spec(spec_str: str) -> str: if str(spack.platforms.host()) == "darwin": spec_str += " %apple-clang" elif str(spack.platforms.host()) == "windows": - spec_str += " %msvc" + # TODO (johnwparent): Remove version constraint when clingo patch is up + spec_str += " %msvc@:19.37" else: spec_str += " %gcc" From 7ec62d117eefb0fe1cafe38e440786333996e4cf Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 20 Nov 2023 22:34:29 +0100 Subject: [PATCH 699/806] py-grpcio* do not assume lib / header dir (#41182) --- var/spack/repos/builtin/packages/py-grpcio-tools/package.py | 6 ++++-- var/spack/repos/builtin/packages/py-grpcio/package.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-grpcio-tools/package.py b/var/spack/repos/builtin/packages/py-grpcio-tools/package.py index e2cc8d79db6289..e1fd541b47b356 100644 --- a/var/spack/repos/builtin/packages/py-grpcio-tools/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio-tools/package.py @@ -41,8 +41,10 @@ def setup_build_environment(self, env): for dep in self.spec.dependencies(deptype="link"): query = self.spec[dep.name] - env.prepend_path("LIBRARY_PATH", query.libs.directories[0]) - env.prepend_path("CPATH", query.headers.directories[0]) + for p in query.libs.directories: + env.prepend_path("LIBRARY_PATH", p) + for p in query.headers.directories: + env.prepend_path("CPATH", p) def patch(self): if self.spec.satisfies("%fj"): diff --git a/var/spack/repos/builtin/packages/py-grpcio/package.py b/var/spack/repos/builtin/packages/py-grpcio/package.py index 8a185d480265f0..8f319edd7258c5 100644 --- a/var/spack/repos/builtin/packages/py-grpcio/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio/package.py @@ -55,8 +55,10 @@ def setup_build_environment(self, env): for dep in self.spec.dependencies(deptype="link"): query = self.spec[dep.name] - env.prepend_path("LIBRARY_PATH", query.libs.directories[0]) - env.prepend_path("CPATH", query.headers.directories[0]) + for p in query.libs.directories: + env.prepend_path("LIBRARY_PATH", p) + for p in query.headers.directories: + env.prepend_path("CPATH", p) def patch(self): filter_file("-std=gnu99", "", "setup.py") From cf163eecc5924dfcb3ff32d5899a50e7ca1b718d Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Tue, 21 Nov 2023 03:49:34 +0100 Subject: [PATCH 700/806] gromacs: fix newly added variant (#41178) In practice, one can only compiler for the Intel Data Center Max GPU via a SYCL build and the oneAPI compiler. This is unlikely to change, so we can be explicit about that. --- var/spack/repos/builtin/packages/gromacs/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index d373bb4d5d425e..4481a551b5fb89 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -107,7 +107,7 @@ class Gromacs(CMakePackage, CudaPackage): variant( "intel-data-center-gpu-max", default=False, - when="@2022:", + when="@2022: +sycl", description="Enable support for Intel Data Center GPU Max", ) variant("nosuffix", default=False, description="Disable default suffixes") From aeb1bec8f33688d803369def2607f8593c139e40 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 20 Nov 2023 21:05:11 -0600 Subject: [PATCH 701/806] qt-base: have QtBase provide qmake, ont QtPackage (#41186) --- var/spack/repos/builtin/packages/qt-base/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index 4345e6b34d7508..3fe6f4c654be01 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -33,8 +33,6 @@ def get_list_url(qualname): maintainers("wdconinc", "sethrj") - provides("qmake") - # Default dependencies for all qt-* components generator("ninja") depends_on("cmake@3.16:", type="build") @@ -91,6 +89,8 @@ class QtBase(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + provides("qmake") + version("6.6.0", sha256="882f39ea3a40a0894cd64e515ce51711a4fab79b8c47bc0fe0279e99493a62cf") version("6.5.3", sha256="174021c4a630df2e7e912c2e523844ad3cb5f90967614628fd8aa15ddbab8bc5") version("6.5.2", sha256="221cafd400c0a992a42746b43ea879d23869232e56d9afe72cb191363267c674") From 964440a08bf527fa6919d583189f5f4627c71036 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Mon, 20 Nov 2023 22:10:21 -0600 Subject: [PATCH 702/806] elfutils: add version 0.190 (#41187) --- var/spack/repos/builtin/packages/elfutils/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index 15f0b11130e7bf..d20cc09fdb826f 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -25,6 +25,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): maintainers("mwkrentel") + version("0.190", sha256="8e00a3a9b5f04bc1dc273ae86281d2d26ed412020b391ffcc23198f10231d692") version("0.189", sha256="39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8") version("0.188", sha256="fb8b0e8d0802005b9a309c60c1d8de32dd2951b56f0c3a3cb56d21ce01595dff") version("0.187", sha256="e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8") From b361ffbe22a6dfc1500cce98326d4d71354c752d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 21 Nov 2023 06:24:37 +0100 Subject: [PATCH 703/806] spack style: fix isort on sl:7 (#41133) Bump the minimum version required for isort. This should fix an issue reported on Scientific Linux 7, and due to: https://github.com/PyCQA/isort/issues/1363 --- lib/spack/spack/bootstrap/environment.py | 2 +- .../builtin/packages/py-isort/package.py | 25 ++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/bootstrap/environment.py b/lib/spack/spack/bootstrap/environment.py index 2a2fc37b454afa..71d54a8ad145b0 100644 --- a/lib/spack/spack/bootstrap/environment.py +++ b/lib/spack/spack/bootstrap/environment.py @@ -161,7 +161,7 @@ def _write_spack_yaml_file(self) -> None: def isort_root_spec() -> str: """Return the root spec used to bootstrap isort""" - return _root_spec("py-isort@4.3.5:") + return _root_spec("py-isort@5") def mypy_root_spec() -> str: diff --git a/var/spack/repos/builtin/packages/py-isort/package.py b/var/spack/repos/builtin/packages/py-isort/package.py index aca4dd29047753..5a4ea271f6a834 100644 --- a/var/spack/repos/builtin/packages/py-isort/package.py +++ b/var/spack/repos/builtin/packages/py-isort/package.py @@ -13,16 +13,33 @@ class PyIsort(PythonPackage): pypi = "isort/isort-4.2.15.tar.gz" version("5.12.0", sha256="8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504") + version("5.11.5", sha256="6be1f76a507cb2ecf16c7cf14a37e41609ca082330be4e3436a18ef74add55db") version("5.10.1", sha256="e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951") version("5.9.3", sha256="9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899") version("5.9.1", sha256="83510593e07e433b77bd5bff0f6f607dbafa06d1a89022616f02d8b699cfcd56") - version("4.3.20", sha256="c40744b6bc5162bbb39c1257fe298b7a393861d50978b565f3ccd9cb9de0182a") - version("4.2.15", sha256="79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983") + version( + "4.3.20", + sha256="c40744b6bc5162bbb39c1257fe298b7a393861d50978b565f3ccd9cb9de0182a", + deprecated=True, + ) + version( + "4.2.15", + sha256="79f46172d3a4e2e53e7016e663cc7a8b538bec525c36675fcfd2767df30b3983", + deprecated=True, + ) variant("colors", default=False, description="Install colorama for --color support") - depends_on("python@3.8:", when="@5.12:", type=("build", "run")) - depends_on("python@3.6.1:3", when="@5:5.10", type=("build", "run")) + with default_args(type=("build", "run")): + depends_on("python@3.8:", when="@5.12:") + depends_on("python@3.7:", when="@5.11") + # This needs to be @3.6 since for bootstrapping the current Spack interpreter is + # identified by major.minor (and the new versioning identifies it as @=3.6) + depends_on("python@3.6:3", when="@5.10") + depends_on("python@3.6:3", when="@5.9") + + conflicts("python@3.6.0", when="@5:") + depends_on("py-setuptools", when="@:4", type=("build", "run")) depends_on("py-poetry-core@1:", when="@5:", type="build") depends_on("py-colorama@0.4.3:", when="+colors @5.12:", type=("build", "run")) From ae38987cb429a608f58f702593fb3c20afa5a692 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 01:12:50 -0700 Subject: [PATCH 704/806] build(deps): bump pygments from 2.16.1 to 2.17.1 in /lib/spack/docs (#41191) Bumps [pygments](https://github.com/pygments/pygments) from 2.16.1 to 2.17.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.16.1...2.17.1) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/spack/docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index f4333b9aaef672..485a5d69bb28a2 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -4,7 +4,7 @@ sphinx_design==0.5.0 sphinx-rtd-theme==1.3.0 python-levenshtein==0.23.0 docutils==0.18.1 -pygments==2.16.1 +pygments==2.17.1 urllib3==2.1.0 pytest==7.4.3 isort==5.12.0 From 70bed662fcfdd2fd7612960ee4026eadc6dc6804 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Tue, 21 Nov 2023 05:19:16 -0700 Subject: [PATCH 705/806] gettext: add v0.22.4 (#41189) --- var/spack/repos/builtin/packages/gettext/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index ee502c07853974..cf9a273789dae3 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -19,6 +19,7 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage): executables = [r"^gettext$"] + version("0.22.4", sha256="29217f1816ee2e777fa9a01f9956a14139c0c23cc1b20368f06b2888e8a34116") version("0.22.3", sha256="b838228b3f8823a6c1eddf07297197c4db13f7e1b173b9ef93f3f945a63080b6") version("0.21.1", sha256="50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6") version("0.21", sha256="d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192") From f2192a48cebbbe926e68bb956e4613626c9d5f32 Mon Sep 17 00:00:00 2001 From: Chris Richardson Date: Tue, 21 Nov 2023 19:17:07 +0000 Subject: [PATCH 706/806] Update py-scikit-build-core to version 0.6.1 (#40779) * Update to latest version * Fix linebreak * Make suggested changes * bumped to 0.6.1 * Update var/spack/repos/builtin/packages/py-scikit-build-core/package.py Co-authored-by: Adam J. Stewart --------- Co-authored-by: Chris Richardson Co-authored-by: Matt Archer Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-scikit-build-core/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-scikit-build-core/package.py b/var/spack/repos/builtin/packages/py-scikit-build-core/package.py index 1733dc770631e5..ed75519d482b81 100644 --- a/var/spack/repos/builtin/packages/py-scikit-build-core/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-build-core/package.py @@ -17,6 +17,8 @@ class PyScikitBuildCore(PythonPackage): maintainers("wdconinc") + version("0.6.1", sha256="392254a4ca7235c27a4be98cc24cd708f563171961ce37cff66120ebfda20b7a") + version("0.6.0", sha256="1bea5ed83610b367f3446badd996f2356690548188d6d38e5b93152df311a7ae") version("0.2.0", sha256="d2a76d9447a412038dc5e25dd259b03c25278661a0c7c3da766bb971c1a9acd2") variant("pyproject", default=False, description="Enable pyproject.toml support") @@ -29,6 +31,7 @@ class PyScikitBuildCore(PythonPackage): # Dependencies depends_on("py-exceptiongroup", when="^python@:3.10", type=("build", "run")) + depends_on("py-importlib-metadata", when="@0.3.0: ^python@:3.7") depends_on("py-importlib-resources@1.3:", when="^python@:3.8", type=("build", "run")) depends_on("py-packaging@20.9:", type=("build", "run")) depends_on("py-tomli@1.1:", when="^python@:3.10", type=("build", "run")) @@ -49,6 +52,7 @@ class PyScikitBuildCore(PythonPackage): depends_on("py-pytest@7:", type="test") depends_on("py-pytest-subprocess@1.5:", type="test") depends_on("py-setuptools", type="test") + depends_on("py-virtualenv", when="@0.6:", type="test") depends_on("py-wheel", type="test") @run_after("install") From 432f5d64e369f8b63cab9ce65ea2e9b9ee5c386d Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:08:02 -0800 Subject: [PATCH 707/806] Add cxx17_flag to intel.py (#41207) * Add cxx17_flag to intel.py --- lib/spack/spack/compilers/intel.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 4ec29605259739..d4ff7c5ebc9067 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -85,6 +85,14 @@ def cxx14_flag(self): else: return "-std=c++14" + @property + def cxx17_flag(self): + # https://www.intel.com/content/www/us/en/developer/articles/news/c17-features-supported-by-c-compiler.html + if self.real_version < Version("19"): + raise UnsupportedCompilerFlag(self, "the C++17 standard", "cxx17_flag", "< 19") + else: + return "-std=c++17" + @property def c99_flag(self): if self.real_version < Version("12"): From 6ac23545eccef4f4fc99831353f041d2768611a3 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 22 Nov 2023 11:17:27 +0100 Subject: [PATCH 708/806] python: add missing gmake dependency (#41211) --- var/spack/repos/builtin/packages/python/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 8253ef0f9a6d92..0f776fa780d91b 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -237,6 +237,7 @@ class Python(Package): variant("crypt", default=True, description="Build crypt module", when="@:3.12 platform=cray") if sys.platform != "win32": + depends_on("gmake", type="build") depends_on("pkgconfig@0.9.0:", type="build") depends_on("gettext +libxml2", when="+libxml2") depends_on("gettext ~libxml2", when="~libxml2") From efa316aafaecbd5e3a3a1f43703521c3fefaf5f7 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 22 Nov 2023 11:17:47 +0100 Subject: [PATCH 709/806] perl: add missing gmake dependency (#41210) --- var/spack/repos/builtin/packages/perl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 299ae19436eae9..b44951a4be8ead 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -119,6 +119,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package extendable = True if sys.platform != "win32": + depends_on("gmake", type="build") depends_on("gdbm@:1.23") # Bind us below gdbm-1.20 due to API change: https://github.com/Perl/perl5/issues/18915 depends_on("gdbm@:1.19", when="@:5.35") From 721f15bbeb56cb4122fec943c6b703e4327a3aba Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 22 Nov 2023 05:22:22 -0800 Subject: [PATCH 710/806] hub: add v2.14.2, update to go module (#41183) * packages/hub: add new version, update to module Hub now uses a go module to build, needs different env vars, and we're on a very, very old version before that. Deprecate the old ones so we can clean out that old build once we pass a spack version. * cleanup suggested by @adamjstewart --- .../repos/builtin/packages/hub/package.py | 36 +++++++++++++++---- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/hub/package.py b/var/spack/repos/builtin/packages/hub/package.py index 861872b40956a7..0213c142fd942b 100644 --- a/var/spack/repos/builtin/packages/hub/package.py +++ b/var/spack/repos/builtin/packages/hub/package.py @@ -16,15 +16,37 @@ class Hub(Package): git = "https://github.com/github/hub.git" version("master", branch="master") - version("2.2.2", sha256="610572ee903aea1fa8622c16ab7ddef2bd1bfec9f4854447ab8e0fbdbe6a0cae") - version("2.2.1", sha256="9350aba6a8e3da9d26b7258a4020bf84491af69595f7484f922d75fc8b86dc10") - version("2.2.0", sha256="2da1351197eb5696c207f22c69a5422af052d74277b73d0b8661efb9ec1d0eb1") - version("1.12.4", sha256="b7fe404d7dc5f60554f088bec12de5e80229331430ea0ced46d5bf89ecae5117") + version("2.14.2", sha256="e19e0fdfd1c69c401e1c24dd2d4ecf3fd9044aa4bd3f8d6fd942ed1b2b2ad21a") + version( + "2.2.2", + sha256="610572ee903aea1fa8622c16ab7ddef2bd1bfec9f4854447ab8e0fbdbe6a0cae", + deprecated=True, + ) + version( + "2.2.1", + sha256="9350aba6a8e3da9d26b7258a4020bf84491af69595f7484f922d75fc8b86dc10", + deprecated=True, + ) + version( + "2.2.0", + sha256="2da1351197eb5696c207f22c69a5422af052d74277b73d0b8661efb9ec1d0eb1", + deprecated=True, + ) + version( + "1.12.4", + sha256="b7fe404d7dc5f60554f088bec12de5e80229331430ea0ced46d5bf89ecae5117", + deprecated=True, + ) extends("go") def install(self, spec, prefix): env = os.environ - env["GOPATH"] = self.stage.source_path + ":" + env["GOPATH"] - bash = which("bash") - bash(os.path.join("script", "build"), "-o", os.path.join(prefix, "bin", "hub")) + if spec.version < Version("2.14"): + env["GOPATH"] = self.stage.source_path + ":" + env["GOPATH"] + env["GO111MODULE"] = "off" + bash = which("bash") + bash(os.path.join("script", "build"), "-o", prefix.bin.hub) + return + env["GO111MODULE"] = "on" + go("build", "-o", prefix.bin.hub) From d7e756a26b9450d7f4e94dac1747a729011e2140 Mon Sep 17 00:00:00 2001 From: LucaMarradi Date: Wed, 22 Nov 2023 14:23:52 +0100 Subject: [PATCH 711/806] onnxruntime: fix the call to as_string() operator (#41087) * onnxruntime: fix the call to as_string() operator * Update var/spack/repos/builtin/packages/py-onnxruntime/package.py Co-authored-by: Wouter Deconinck * Update var/spack/repos/builtin/packages/py-onnxruntime/package.py Co-authored-by: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-onnxruntime/package.py Co-authored-by: Adam J. Stewart * py-onnxruntime: rm now-unused stringpiece_1_10.patch --------- Co-authored-by: Wouter Deconinck Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/py-onnxruntime/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-onnxruntime/package.py b/var/spack/repos/builtin/packages/py-onnxruntime/package.py index 205785a4db66f9..30a466dcc180ab 100644 --- a/var/spack/repos/builtin/packages/py-onnxruntime/package.py +++ b/var/spack/repos/builtin/packages/py-onnxruntime/package.py @@ -63,6 +63,12 @@ class PyOnnxruntime(CMakePackage, PythonExtension): patch("libiconv-1.10.patch", level=0, when="@1.10.0 ^libiconv") # https://github.com/microsoft/onnxruntime/commit/de4089f8cbe0baffe56a363cc3a41595cc8f0809.patch patch("gcc11.patch", level=1, when="@1.7.2") + # https://github.com/microsoft/onnxruntime/pull/16257 + patch( + "https://github.com/microsoft/onnxruntime/commit/a3a443c80431c390cbf8855e9c7b2a95d413cd54.patch?full_index=1", + sha256="537c43b061d31bf97d2778d723a41fbd390160f9ebc304f06726e3bfd8dc4583", + when="@1.10:1.15", + ) dynamic_cpu_arch_values = ("NOAVX", "AVX", "AVX2", "AVX512") From 3cf7f7b8000d788d596865de2c2cb8bc52e651b9 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 22 Nov 2023 16:06:46 +0100 Subject: [PATCH 712/806] ASP-based solver: don't emit spurious debug output (#41218) When improving the error message, we started #showing in the answer set a lot more symbols - but we forgot to suppress the debug messages warning about UNKNOWN SYMBOLs --- lib/spack/spack/solver/asp.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 806bbac28f936c..e3068e7db46b5a 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1013,14 +1013,6 @@ def on_model(model): # record the possible dependencies in the solve result.possible_dependencies = setup.pkgs - # print any unknown functions in the model - for sym in best_model: - if sym.name not in ("attr", "error", "opt_criterion"): - tty.debug( - "UNKNOWN SYMBOL: %s(%s)" - % (sym.name, ", ".join([str(s) for s in intermediate_repr(sym.arguments)])) - ) - elif cores: result.control = self.control result.cores.extend(cores) @@ -2799,9 +2791,11 @@ class SpecBuilder: r"^.*_propagate$", r"^.*_satisfies$", r"^.*_set$", + r"^dependency_holds$", r"^node_compiler$", r"^package_hash$", r"^root$", + r"^track_dependencies$", r"^variant_default_value_from_cli$", r"^virtual_node$", r"^virtual_root$", From 24a38e67824c1c13e4b67cd4f5d7c065551d9aa1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 22 Nov 2023 17:32:13 +0100 Subject: [PATCH 713/806] setup_platform_environment before package env mods (#41205) This roughly restores the order of operation from Spack 0.20, where where `AutotoolsPackage.setup_build_environment` would override the env variable set in `setup_platform_environment` on macOS. --- lib/spack/spack/build_environment.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 4c4eca6567f111..36574259d0394d 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -743,15 +743,16 @@ def setup_package(pkg, dirty, context: Context = Context.BUILD): set_compiler_environment_variables(pkg, env_mods) set_wrapper_variables(pkg, env_mods) - tty.debug("setup_package: grabbing modifications from dependencies") - env_mods.extend(setup_context.get_env_modifications()) - tty.debug("setup_package: collected all modifications from dependencies") - - # architecture specific setup + # Platform specific setup goes before package specific setup. This is for setting + # defaults like MACOSX_DEPLOYMENT_TARGET on macOS. platform = spack.platforms.by_name(pkg.spec.architecture.platform) target = platform.target(pkg.spec.architecture.target) platform.setup_platform_environment(pkg, env_mods) + tty.debug("setup_package: grabbing modifications from dependencies") + env_mods.extend(setup_context.get_env_modifications()) + tty.debug("setup_package: collected all modifications from dependencies") + if context == Context.TEST: env_mods.prepend_path("PATH", ".") elif context == Context.BUILD and not dirty and not env_mods.is_unset("CPATH"): From 3c54177c5d9032cb36cf154b553d739cbeb2d024 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 22 Nov 2023 18:16:39 +0100 Subject: [PATCH 714/806] edm4hep: add latest tag for 0.10.2 (#41201) --- var/spack/repos/builtin/packages/edm4hep/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/edm4hep/package.py b/var/spack/repos/builtin/packages/edm4hep/package.py index b8d4238ce70522..04176d572a9967 100644 --- a/var/spack/repos/builtin/packages/edm4hep/package.py +++ b/var/spack/repos/builtin/packages/edm4hep/package.py @@ -19,6 +19,7 @@ class Edm4hep(CMakePackage): tags = ["hep", "key4hep"] version("master", branch="master") + version("0.10.2", sha256="c22c5c2f0fd1d09da9b734c1fa7ee546675fd2b047406db6ab8266e7657486d2") version("0.10.1", sha256="28a3bd4df899309b14ec0d441f8b6ed0065206a08a0018113bb490e9d008caed") version("0.10", sha256="a95c917c19793cfad6b0959854a653c5ce698c965598cabd649d544da07712c0") version( From e49f55ba53131cfbf1f02b7fdc8e3993b1fc42b8 Mon Sep 17 00:00:00 2001 From: Stephen Sachs Date: Wed, 22 Nov 2023 18:59:20 +0100 Subject: [PATCH 715/806] aocc: help compiler find include paths and libstdc++.so (#40450) Add --gcc-toolchain option by default. Only add these paths if c++ libs and include files are available and the compiler was built with gcc --- var/spack/repos/builtin/packages/aocc/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/aocc/package.py b/var/spack/repos/builtin/packages/aocc/package.py index 229a37bb5375c5..f246af46357988 100644 --- a/var/spack/repos/builtin/packages/aocc/package.py +++ b/var/spack/repos/builtin/packages/aocc/package.py @@ -91,3 +91,13 @@ def license_reminder(self): def install(self, spec, prefix): print("Installing AOCC Compiler ... ") install_tree(".", prefix) + + @run_after("install") + def cfg_files(self): + # Add path to gcc/g++ such that clang/clang++ can always find a full gcc installation + # including libstdc++.so and header files. + if self.spec.satisfies("%gcc") and self.compiler.cxx is not None: + compiler_options = "--gcc-toolchain={}".format(self.compiler.prefix) + for compiler in ["clang", "clang++"]: + with open(join_path(self.prefix.bin, "{}.cfg".format(compiler)), "w") as f: + f.write(compiler_options) From 89a0ea01a7606ace81da23e6ee426eea6fee8605 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:20:59 +0100 Subject: [PATCH 716/806] pulseaudio: add missing m4 dependency (#41216) --- var/spack/repos/builtin/packages/pulseaudio/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pulseaudio/package.py b/var/spack/repos/builtin/packages/pulseaudio/package.py index f96d2af990e6ce..bfc93dab7d4d0b 100644 --- a/var/spack/repos/builtin/packages/pulseaudio/package.py +++ b/var/spack/repos/builtin/packages/pulseaudio/package.py @@ -51,6 +51,7 @@ class Pulseaudio(AutotoolsPackage): depends_on("openssl", when="+openssl") depends_on("perl-xml-parser", type="build") depends_on("speexdsp@1.2:") + depends_on("m4", type="build") def configure_args(self): args = [ From 285de8ad4df880e0c1f712f93e5dabddc3d5536d Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Wed, 22 Nov 2023 12:21:53 -0700 Subject: [PATCH 717/806] fzf: add v0.44.1 (#41204) --- var/spack/repos/builtin/packages/fzf/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fzf/package.py b/var/spack/repos/builtin/packages/fzf/package.py index 95362138f1ec0c..6e12b3c74c8fd2 100644 --- a/var/spack/repos/builtin/packages/fzf/package.py +++ b/var/spack/repos/builtin/packages/fzf/package.py @@ -17,6 +17,7 @@ class Fzf(MakefilePackage): executables = ["^fzf$"] + version("0.44.1", sha256="295f3aec9519f0cf2dce67a14e94d8a743d82c19520e5671f39c71c9ea04f90c") version("0.42.0", sha256="743c1bfc7851b0796ab73c6da7db09d915c2b54c0dd3e8611308985af8ed3df2") version("0.41.1", sha256="982682eaac377c8a55ae8d7491fcd0e888d6c13915d01da9ebb6b7c434d7f4b5") version("0.40.0", sha256="9597f297a6811d300f619fff5aadab8003adbcc1566199a43886d2ea09109a65") From 2d71c6bb8e9816464f14f8878d1777e209784ad3 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 22 Nov 2023 20:29:46 +0100 Subject: [PATCH 718/806] dd4hep: add v1.27.1 (#41202) * Make sure that geant4 comes with cxxstd that should be OK --- var/spack/repos/builtin/packages/dd4hep/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index a9ca9fe12dcc09..3309dcc5378060 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -24,6 +24,7 @@ class Dd4hep(CMakePackage): tags = ["hep"] version("master", branch="master") + version("1.27.1", sha256="e66ae726c0a9a55e5603024a7f8a48ffbc5613ea36e5f892e9a90d87833f92e0") version("1.27", sha256="51fbd0f91f2511261d9b01e4b3528c658bea1ea1b5d67b25b6812615e782a902") version("1.26", sha256="de2cc8d8e99217e23fdf0a55b879d3fd3a864690d6660e7808f1ff99eb47f384") version("1.25.1", sha256="6267e76c74fbb346aa881bc44de84434ebe788573f2997a189996252fc5b271b") @@ -189,6 +190,12 @@ class Dd4hep(CMakePackage): ) conflicts("~ddrec+dddetectors", msg="Need to enable +ddrec to build +dddetectors.") + # Geant4 needs to be (at least) the same version as DD4hep, but we don't + # have a very good handle on that at this stage, because we make that + # dependent on roots cxxstd. However, cxxstd=11 will never work + # See https://github.com/AIDASoft/DD4hep/pull/1191 + conflicts("^geant4 cxxstd=11", when="+ddg4") + @property def libs(self): # We need to override libs here, because we don't build a libdd4hep so From 7cad4bb8d9cb2072d81416ad2ca51a86d0daa374 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Wed, 22 Nov 2023 14:37:36 -0500 Subject: [PATCH 719/806] [nettle] depend on spack managed openssl (#40783) --- var/spack/repos/builtin/packages/nettle/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py index b00ad8938127e3..35cdb368819dfb 100644 --- a/var/spack/repos/builtin/packages/nettle/package.py +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -24,6 +24,7 @@ class Nettle(AutotoolsPackage, GNUMirrorPackage): depends_on("gmp") depends_on("m4", type="build") + depends_on("openssl") def configure_args(self): return ["CFLAGS={0}".format(self.compiler.c99_flag)] From 7e9ddca0ff72f245f21d7840f106b21d45513c87 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:39:01 +0100 Subject: [PATCH 720/806] gloo: add a patch for building with gcc 12 (#41169) --- var/spack/repos/builtin/packages/gloo/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/gloo/package.py b/var/spack/repos/builtin/packages/gloo/package.py index ec4503900e9b4c..eadcdfd7d6bf2d 100644 --- a/var/spack/repos/builtin/packages/gloo/package.py +++ b/var/spack/repos/builtin/packages/gloo/package.py @@ -35,6 +35,13 @@ class Gloo(CMakePackage, CudaPackage): sha256="8e6e9a44e0533ba4303a95a651b1934e5d73632cab08cc7d5a9435e1e64aa424", when="@:2023-01-16", ) + # Fix building with gcc 12, see https://github.com/facebookincubator/gloo/pull/333 + patch( + "https://github.com/facebookincubator/gloo/commit/4a5e339b764261d20fc409071dc7a8b8989aa195.patch?full_index=1", + sha256="dc8b3a9bea4693f32d6850ea2ce6ce75e1778538bfba464b50efca92bac425e3", + when="@2021-05-21:2022-05-18", + ) + generator("ninja") depends_on("cmake@2.8.12:", type="build") From c1a8bb2a1280b3fcb1487f3de8781c1b181130c6 Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:43:45 -0500 Subject: [PATCH 721/806] composable-kernel, migraphx: Fix build on CentOS8 (#41206) --- .../repos/builtin/packages/composable-kernel/package.py | 6 +++--- var/spack/repos/builtin/packages/migraphx/package.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/composable-kernel/package.py b/var/spack/repos/builtin/packages/composable-kernel/package.py index 85b383896a8af9..fc986f5fc6af0b 100644 --- a/var/spack/repos/builtin/packages/composable-kernel/package.py +++ b/var/spack/repos/builtin/packages/composable-kernel/package.py @@ -18,7 +18,7 @@ class ComposableKernel(CMakePackage): version("master", branch="develop") version("5.6.1", commit="f5ec04f091fa5c48c67d7bacec36a414d0be06a5") - version("5.6.0", commit="f0fd02634c2f8f8c70f5a0ab2a8c84db5e36eeca") + version("5.6.0", commit="f5ec04f091fa5c48c67d7bacec36a414d0be06a5") version("5.5.1", commit="ac9e01e2cc3721be24619807adc444e1f59a9d25") version("5.5.0", commit="8b76b832420a3d69708401de6607a033163edcce") version("5.4.3", commit="bb3d9546f186e39cefedc3e7f01d88924ba20168") @@ -64,14 +64,14 @@ def cmake_args(self): ] if "auto" not in self.spec.variants["amdgpu_target"]: args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target")) - if self.spec.satisfies("@5.6.1:"): + if self.spec.satisfies("@5.6.0:"): args.append(self.define("INSTANCES_ONLY", "ON")) return args def build(self, spec, prefix): with working_dir(self.build_directory): # only instances is necessary to build and install - if self.spec.satisfies("@5.6.1:"): + if self.spec.satisfies("@5.6.0:"): make() else: make("instances") diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index 09d340d01c8d16..5373703807223b 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -199,6 +199,7 @@ def cmake_args(self): args += self.cmake_python_hints if "@5.5.0:" in self.spec: args.append(self.define("CMAKE_CXX_FLAGS", "-I{0}".format(abspath))) + args.append(self.define("MIGRAPHX_ENABLE_PYTHON", "OFF")) return args def test(self): From 61055d9ee50679e1c4e05d734b530ae9624c858e Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 22 Nov 2023 22:30:49 +0100 Subject: [PATCH 722/806] test_which: do not mutate os.environ --- lib/spack/spack/test/util/executable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/util/executable.py b/lib/spack/spack/test/util/executable.py index 839cf04bfba6f5..9c49445aab2fcc 100644 --- a/lib/spack/spack/test/util/executable.py +++ b/lib/spack/spack/test/util/executable.py @@ -89,8 +89,8 @@ def test_which_with_slash_ignores_path(tmpdir, working_env): assert exe.path == path -def test_which(tmpdir): - os.environ["PATH"] = str(tmpdir) +def test_which(tmpdir, monkeypatch): + monkeypatch.setenv("PATH", str(tmpdir)) assert ex.which("spack-test-exe") is None with pytest.raises(ex.CommandNotFoundError): From 81e7d39bd2d263f425d8379e6420fe104af7768d Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 10 Nov 2023 18:22:13 -0800 Subject: [PATCH 723/806] Update CHANGELOG.md from v0.21.0 Co-authored-by: Harmen Stoppels --- CHANGELOG.md | 287 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8cdd13db28993..9ec04198b22912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,290 @@ +# v0.21.0 (2023-11-11) + +`v0.21.0` is a major feature release. + +## Features in this release + +1. **Better error messages with condition chaining** + + In v0.18, we added better error messages that could tell you what problem happened, + but they couldn't tell you *why* it happened. `0.21` adds *condition chaining* to the + solver, and Spack can now trace back through the conditions that led to an error and + build a tree of causes potential causes and where they came from. For example: + + ```console + $ spack solve hdf5 ^cmake@3.0.1 + ==> Error: concretization failed for the following reasons: + + 1. Cannot satisfy 'cmake@3.0.1' + 2. Cannot satisfy 'cmake@3.0.1' + required because hdf5 ^cmake@3.0.1 requested from CLI + 3. Cannot satisfy 'cmake@3.18:' and 'cmake@3.0.1 + required because hdf5 ^cmake@3.0.1 requested from CLI + required because hdf5 depends on cmake@3.18: when @1.13: + required because hdf5 ^cmake@3.0.1 requested from CLI + 4. Cannot satisfy 'cmake@3.12:' and 'cmake@3.0.1 + required because hdf5 depends on cmake@3.12: + required because hdf5 ^cmake@3.0.1 requested from CLI + required because hdf5 ^cmake@3.0.1 requested from CLI + ``` + + More details in #40173. + +2. **OCI build caches** + + You can now use an arbitrary [OCI](https://opencontainers.org) registry as a build + cache: + + ```console + $ spack mirror add my_registry oci://user/image # Dockerhub + $ spack mirror add my_registry oci://ghcr.io/haampie/spack-test # GHCR + $ spack mirror set --push --oci-username ... --oci-password ... my_registry # set login creds + $ spack buildcache push my_registry [specs...] + ``` + + And you can optionally add a base image to get *runnable* images: + + ```console + $ spack buildcache push --base-image ubuntu:23.04 my_registry python + Pushed ... as [image]:python-3.11.2-65txfcpqbmpawclvtasuog4yzmxwaoia.spack + + $ docker run --rm -it [image]:python-3.11.2-65txfcpqbmpawclvtasuog4yzmxwaoia.spack + ``` + + This creates a container image from the Spack installations on the host system, + without the need to run `spack install` from a `Dockerfile` or `sif` file. It also + addresses the inconvenience of losing binaries of dependencies when `RUN spack + install` fails inside `docker build`. + + Further, the container image layers and build cache tarballs are the same files. This + means that `spack install` and `docker pull` use the exact same underlying binaries. + If you previously used `spack install` inside of `docker build`, this feature helps + you save storage by a factor two. + + More details in #38358. + +3. **Multiple versions of build dependencies** + + Increasingly, complex package builds require multiple versions of some build + dependencies. For example, Python packages frequently require very specific versions + of `setuptools`, `cython`, and sometimes different physics packages require different + versions of Python to build. The concretizer enforced that every solve was *unified*, + i.e., that there only be one version of every package. The concretizer now supports + "duplicate" nodes for *build dependencies*, but enforces unification through + transitive link and run dependencies. This will allow it to better resolve complex + dependency graphs in ecosystems like Python, and it also gets us very close to + modeling compilers as proper dependencies. + + This change required a major overhaul of the concretizer, as well as a number of + performance optimizations. See #38447, #39621. + +4. **Cherry-picking virtual dependencies** + + You can now select only a subset of virtual dependencies from a spec that may provide + more. For example, if you want `mpich` to be your `mpi` provider, you can be explicit + by writing: + + ``` + hdf5 ^[virtuals=mpi] mpich + ``` + + Or, if you want to use, e.g., `intel-parallel-studio` for `blas` along with an external + `lapack` like `openblas`, you could write: + + ``` + strumpack ^[virtuals=mpi] intel-parallel-studio+mkl ^[virtuals=lapack] openblas + ``` + + The `virtuals=mpi` is an edge attribute, and dependency edges in Spack graphs now + track which virtuals they satisfied. More details in #17229 and #35322. + + Note for packaging: in Spack 0.21 `spec.satisfies("^virtual")` is true if and only if + the package specifies `depends_on("virtual")`. This is different from Spack 0.20, + where depending on a provider implied depending on the virtual provided. See #41002 + for an example where `^mkl` was being used to test for several `mkl` providers in a + package that did not depend on `mkl`. + +5. **License directive** + + Spack packages can now have license metadata, with the new `license()` directive: + + ```python + license("Apache-2.0") + ``` + + Licenses use [SPDX identifiers](https://spdx.org/licenses), and you can use SPDX + expressions to combine them: + + ```python + license("Apache-2.0 OR MIT") + ``` + + Like other directives in Spack, it's conditional, so you can handle complex cases like + Spack itself: + + ```python + license("LGPL-2.1", when="@:0.11") + license("Apache-2.0 OR MIT", when="@0.12:") + ``` + + More details in #39346, #40598. + +6. **`spack deconcretize` command** + + We are getting close to having a `spack update` command for environments, but we're + not quite there yet. This is the next best thing. `spack deconcretize` gives you + control over what you want to update in an already concrete environment. If you have + an environment built with, say, `meson`, and you want to update your `meson` version, + you can run: + + ```console + spack deconcretize meson + ``` + + and have everything that depends on `meson` rebuilt the next time you run `spack + concretize`. In a future Spack version, we'll handle all of this in a single command, + but for now you can use this to drop bits of your lockfile and resolve your + dependencies again. More in #38803. + +7. **UI Improvements** + + The venerable `spack info` command was looking shabby compared to the rest of Spack's + UI, so we reworked it to have a bit more flair. `spack info` now makes much better + use of terminal space and shows variants, their values, and their descriptions much + more clearly. Conditional variants are grouped separately so you can more easily + understand how packages are structured. More in #40998. + + `spack checksum` now allows you to filter versions from your editor, or by version + range. It also notifies you about potential download URL changes. See #40403. + +8. **Environments can include definitions** + + Spack did not previously support using `include:` with The + [definitions](https://spack.readthedocs.io/en/latest/environments.html#spec-list-references) + section of an environment, but now it does. You can use this to curate lists of specs + and more easily reuse them across environments. See #33960. + +9. **Aliases** + + You can now add aliases to Spack commands in `config.yaml`, e.g. this might enshrine + your favorite args to `spack find` as `spack f`: + + ```yaml + config: + aliases: + f: find -lv + ``` + + See #17229. + +10. **Improved autoloading of modules** + + Spack 0.20 was the first release to enable autoloading of direct dependencies in + module files. + + The downside of this was that `module avail` and `module load` tab completion would + show users too many modules to choose from, and many users disabled generating + modules for dependencies through `exclude_implicits: true`. Further, it was + necessary to keep hashes in module names to avoid file name clashes. + + In this release, you can start using `hide_implicits: true` instead, which exposes + only explicitly installed packages to the user, while still autoloading + dependencies. On top of that, you can safely use `hash_length: 0`, as this config + now only applies to the modules exposed to the user -- you don't have to worry about + file name clashes for hidden dependencies. + + Note: for `tcl` this feature requires Modules 4.7 or higher + +11. **Updated container labeling** + + Nightly Docker images from the `develop` branch will now be tagged as `:develop` and + `:nightly`. The `:latest` tag is no longer associated with `:develop`, but with the + latest stable release. Releases will be tagged with `:{major}`, `:{major}.{minor}` + and `:{major}.{minor}.{patch}`. `ubuntu:18.04` has also been removed from the list of + generated Docker images, as it is no longer supported. See #40593. + +## Other new commands and directives + +* `spack env activate` without arguments now loads a `default` environment that you do + not have to create (#40756). +* `spack find -H` / `--hashes`: a new shortcut for piping `spack find` output to + other commands (#38663) +* Add `spack checksum --verify`, fix `--add` (#38458) +* New `default_args` context manager factors out common args for directives (#39964) +* `spack compiler find --[no]-mixed-toolchain` lets you easily mix `clang` and + `gfortran` on Linux (#40902) + +## Performance improvements + +* `spack external find` execution is now much faster (#39843) +* `spack location -i` now much faster on success (#40898) +* Drop redundant rpaths post install (#38976) +* ASP-based solver: avoid cycles in clingo using hidden directive (#40720) +* Fix multiple quadratic complexity issues in environments (#38771) + +## Other new features of note + +* archspec: update to v0.2.2, support for Sapphire Rapids, Power10, Neoverse V2 (#40917) +* Propagate variants across nodes that don't have that variant (#38512) +* Implement fish completion (#29549) +* Can now distinguish between source/binary mirror; don't ping mirror.spack.io as much (#34523) +* Improve status reporting on install (add [n/total] display) (#37903) + +## Windows + +This release has the best Windows support of any Spack release yet, with numerous +improvements and much larger swaths of tests passing: + +* MSVC and SDK improvements (#37711, #37930, #38500, #39823, #39180) +* Windows external finding: update default paths; treat .bat as executable on Windows (#39850) +* Windows decompression: fix removal of intermediate file (#38958) +* Windows: executable/path handling (#37762) +* Windows build systems: use ninja and enable tests (#33589) +* Windows testing (#36970, #36972, #36973, #36840, #36977, #36792, #36834, #34696, #36971) +* Windows PowerShell support (#39118, #37951) +* Windows symlinking and libraries (#39933, #38599, #34701, #38578, #34701) + +## Notable refactors +* User-specified flags take precedence over others in Spack compiler wrappers (#37376) +* Improve setup of build, run, and test environments (#35737, #40916) +* `make` is no longer a required system dependency of Spack (#40380) +* Support Python 3.12 (#40404, #40155, #40153) +* docs: Replace package list with packages.spack.io (#40251) +* Drop Python 2 constructs in Spack (#38720, #38718, #38703) + +## Binary cache and stack updates +* e4s arm stack: duplicate and target neoverse v1 (#40369) +* Add macOS ML CI stacks (#36586) +* E4S Cray CI Stack (#37837) +* e4s cray: expand spec list (#38947) +* e4s cray sles ci: expand spec list (#39081) + +## Removals, deprecations, and syntax changes +* ASP: targets, compilers and providers soft-preferences are only global (#31261) +* Parser: fix ambiguity with whitespace in version ranges (#40344) +* Module file generation is disabled by default; you'll need to enable it to use it (#37258) +* Remove deprecated "extra_instructions" option for containers (#40365) +* Stand-alone test feature deprecation postponed to v0.22 (#40600) +* buildcache push: make `--allow-root` the default and deprecate the option (#38878) + +## Notable Bugfixes +* Bugfix: propagation of multivalued variants (#39833) +* Allow `/` in git versions (#39398) +* Fetch & patch: actually acquire stage lock, and many more issues (#38903) +* Environment/depfile: better escaping of targets with Git versions (#37560) +* Prevent "spack external find" to error out on wrong permissions (#38755) +* lmod: allow core compiler to be specified with a version range (#37789) + +## Spack community stats + +* 7,469 total packages, 303 new since `v0.20.0` + * 150 new Python packages + * 34 new R packages +* 353 people contributed to this release + * 336 committers to packages + * 65 committers to core + + # v0.20.3 (2023-10-31) ## Bugfixes From f556e52bf63c168ee55dc5caecdcbc447ae08eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Thu, 23 Nov 2023 09:23:20 +0100 Subject: [PATCH 724/806] Add dla-future 0.3.1 (#41219) --- var/spack/repos/builtin/packages/dla-future/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index 29e60f73398084..c360aa30784bb1 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -16,6 +16,7 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): license("BSD-3-Clause") + version("0.3.1", sha256="350a7fd216790182aa52639a3d574990a9d57843e02b92d87b854912f4812bfe") version("0.3.0", sha256="9887ac0b466ca03d704a8738bc89e68550ed33509578c576390e98e76b64911b") version("0.2.1", sha256="4c2669d58f041304bd618a9d69d9879a42e6366612c2fc932df3894d0326b7fe") version("0.2.0", sha256="da73cbd1b88287c86d84b1045a05406b742be924e65c52588bbff200abd81a10") From de64ce5541eb4055a26e6ba5d82c37e5797612c0 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Thu, 23 Nov 2023 09:52:57 +0100 Subject: [PATCH 725/806] rdma-core: add new variants for a library without Python dependencies (#41195) These variants allow packages that use rdma-core as a library to avoid dependencies on python infrastructure that is not useful to them. --- var/spack/repos/builtin/packages/rdma-core/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/rdma-core/package.py b/var/spack/repos/builtin/packages/rdma-core/package.py index 875471d02cfe4a..f792d5118f1c35 100644 --- a/var/spack/repos/builtin/packages/rdma-core/package.py +++ b/var/spack/repos/builtin/packages/rdma-core/package.py @@ -61,9 +61,11 @@ class RdmaCore(CMakePackage): default=True, description="Produce static libraries along with usual shared libraries.", ) + variant("pyverbs", default=True, description="Build with support for pyverbs") + variant("man_pages", default=True, description="Build with support for man pages") depends_on("pkgconfig", type="build") - depends_on("py-docutils", type="build") + depends_on("py-docutils", when="+man_pages", type="build") depends_on("libnl") conflicts("platform=darwin", msg="rdma-core requires FreeBSD or Linux") conflicts("%intel", msg="rdma-core cannot be built with intel (use gcc instead)") @@ -90,6 +92,11 @@ def cmake_args(self): cmake_args.append(self.define_from_variant("ENABLE_STATIC", "static")) + if self.spec.satisfies("~pyverbs"): + cmake_args.append("-DNO_PYVERBS=1") + if self.spec.satisfies("~man_pages"): + cmake_args.append("-DNO_MAN_PAGES=1") + if self.spec.satisfies("@:39.0"): cmake_args.extend( [ From ee0d3a3be2800a28e9e73b0bc800a6dc0a83b41f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 23 Nov 2023 11:30:39 +0100 Subject: [PATCH 726/806] ASP-based solver: don't error for type mismatch on preferences (#41138) This commit discards type mismatches or failures to validate a package preference during concretization. The values discarded are logged as debug level messages. It also adds a config audit to help users spot misconfigurations in packages.yaml preferences. --- lib/spack/spack/audit.py | 48 +++++++++++++++++++ lib/spack/spack/solver/asp.py | 8 +++- .../spack/test/concretize_preferences.py | 10 ++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index d0a68cf2121316..970e4a3b367ff9 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -286,6 +286,54 @@ def make_error(attribute_name, config_data, summary): return errors +@config_packages +def _avoid_mismatched_variants(error_cls): + """Warns if variant preferences have mismatched types or names.""" + errors = [] + packages_yaml = spack.config.CONFIG.get_config("packages") + + def make_error(config_data, summary): + s = io.StringIO() + s.write("Occurring in the following file:\n") + syaml.dump_config(config_data, stream=s, blame=True) + return error_cls(summary=summary, details=[s.getvalue()]) + + for pkg_name in packages_yaml: + # 'all:' must be more forgiving, since it is setting defaults for everything + if pkg_name == "all" or "variants" not in packages_yaml[pkg_name]: + continue + + preferences = packages_yaml[pkg_name]["variants"] + if not isinstance(preferences, list): + preferences = [preferences] + + for variants in preferences: + current_spec = spack.spec.Spec(variants) + pkg_cls = spack.repo.PATH.get_pkg_class(pkg_name) + for variant in current_spec.variants.values(): + # Variant does not exist at all + if variant.name not in pkg_cls.variants: + summary = ( + f"Setting a preference for the '{pkg_name}' package to the " + f"non-existing variant '{variant.name}'" + ) + errors.append(make_error(preferences, summary)) + continue + + # Variant cannot accept this value + s = spack.spec.Spec(pkg_name) + try: + s.update_variant_validate(variant.name, variant.value) + except Exception: + summary = ( + f"Setting the variant '{variant.name}' of the '{pkg_name}' package " + f"to the invalid value '{str(variant)}'" + ) + errors.append(make_error(preferences, summary)) + + return errors + + #: Sanity checks on package directives package_directives = AuditClass( group="packages", diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index e3068e7db46b5a..f723acb0e95889 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1831,7 +1831,13 @@ def preferred_variants(self, pkg_name): # perform validation of the variant and values spec = spack.spec.Spec(pkg_name) - spec.update_variant_validate(variant_name, values) + try: + spec.update_variant_validate(variant_name, values) + except (spack.variant.InvalidVariantValueError, KeyError, ValueError) as e: + tty.debug( + f"[SETUP]: rejected {str(variant)} as a preference for {pkg_name}: {str(e)}" + ) + continue for value in values: self.variant_values_from_specs.add((pkg_name, variant.name, value)) diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index d061f9a8f555c5..929ae0a9ec27a5 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -504,3 +504,13 @@ def test_sticky_variant_accounts_for_packages_yaml(self): with spack.config.override("packages:sticky-variant", {"variants": "+allow-gcc"}): s = Spec("sticky-variant %gcc").concretized() assert s.satisfies("%gcc") and s.satisfies("+allow-gcc") + + @pytest.mark.regression("41134") + @pytest.mark.only_clingo("Not backporting the fix to the old concretizer") + def test_default_preference_variant_different_type_does_not_error(self): + """Tests that a different type for an existing variant in the 'all:' section of + packages.yaml doesn't fail with an error. + """ + with spack.config.override("packages:all", {"variants": "+foo"}): + s = Spec("a").concretized() + assert s.satisfies("foo=bar") From 624df2a1bbf27da4b7e3ea6a3b1a6348baef2e25 Mon Sep 17 00:00:00 2001 From: Loris Ercole <30901257+lorisercole@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:49:00 +0100 Subject: [PATCH 727/806] nlcglib: pass cuda_arch setting to kokkos dependency (#39725) When building with `+cuda`, the specified `cuda_arch` was not passed to kokkos, leading to a wrong concretization. --- var/spack/repos/builtin/packages/nlcglib/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/nlcglib/package.py b/var/spack/repos/builtin/packages/nlcglib/package.py index 5d899b17ed10a6..4817606b8f155e 100644 --- a/var/spack/repos/builtin/packages/nlcglib/package.py +++ b/var/spack/repos/builtin/packages/nlcglib/package.py @@ -49,9 +49,12 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage): depends_on("rocblas") depends_on("rocsolver") - with when("+cuda"): - depends_on("kokkos+cuda+cuda_lambda+wrapper", when="%gcc") - depends_on("kokkos+cuda") + for arch in CudaPackage.cuda_arch_values: + depends_on( + f"kokkos+cuda+cuda_lambda+wrapper cuda_arch={arch}", + when=f"%gcc +cuda cuda_arch={arch}", + ) + depends_on(f"kokkos+cuda cuda_arch={arch}", when=f"+cuda cuda_arch={arch}") def cmake_args(self): options = [ From 918d6baed40dfbc98940e4acf111865ee11535f7 Mon Sep 17 00:00:00 2001 From: Nathalie Furmento Date: Fri, 24 Nov 2023 09:02:51 +0100 Subject: [PATCH 728/806] starpu: add release 1.4.2 (#41238) --- var/spack/repos/builtin/packages/starpu/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/starpu/package.py b/var/spack/repos/builtin/packages/starpu/package.py index 45a2ca2cd2e09f..f448e3ae78a102 100644 --- a/var/spack/repos/builtin/packages/starpu/package.py +++ b/var/spack/repos/builtin/packages/starpu/package.py @@ -30,6 +30,7 @@ class Starpu(AutotoolsPackage): maintainers("nfurmento", "sthibaul") + version("1.4.2", sha256="6c1fce80593a96d599881c1e9697a10e2072195b1c4c64a99528192b6715ddd6") version("1.4.1", sha256="f023aa53da245a0f43944c3a13f63b4bfdf1324f3e66bf5cd367ce51e2044925") version("1.4.0", sha256="5058127761a0604606a852fd6d20b07040d5fbd9f798c5383e49f336b4eeaca1") version("1.3.11", sha256="580c6d98d49bacd2c666504c88890335d2689b6547d97f6a088d4ab4812df36e") From e9d968d95fe7fa26c8ae9ca5b9613b1e5c7848cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3gvan=20Magnus=20Haugaard=20Olsen?= Date: Fri, 24 Nov 2023 09:04:37 +0100 Subject: [PATCH 729/806] pfunit: add version 4.7.4 (#41232) --- var/spack/repos/builtin/packages/pfunit/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pfunit/package.py b/var/spack/repos/builtin/packages/pfunit/package.py index 0fb3af60eb33e6..b257f0e5fc38fc 100644 --- a/var/spack/repos/builtin/packages/pfunit/package.py +++ b/var/spack/repos/builtin/packages/pfunit/package.py @@ -19,6 +19,7 @@ class Pfunit(CMakePackage): maintainers("mathomp4", "tclune") + version("4.7.4", sha256="ac850e33ea99c283f503f75293bf238b4b601885d7adba333066e6185dad5c04") version("4.7.3", sha256="247239298b55e847417b7830183d7fc62cca93dc92c8ec7c0067784b7ce34544") version("4.7.2", sha256="3142a1e56b7d127fdc9589cf6deff8505174129834a6a268d0ce7e296f51ab02") version("4.7.1", sha256="64de3eb9f364b57ef6df81ba33400dfd4dcebca6eb5d0e9b7955ed8156e29165") From f70ef51f1a26e32f0292043c938fe132a9afc983 Mon Sep 17 00:00:00 2001 From: joscot-linaro <126488600+joscot-linaro@users.noreply.github.com> Date: Fri, 24 Nov 2023 08:15:47 +0000 Subject: [PATCH 730/806] linaro-forge: update for 23.1 (#41236) --- var/spack/repos/builtin/packages/linaro-forge/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/linaro-forge/package.py b/var/spack/repos/builtin/packages/linaro-forge/package.py index e67613fef1f621..f13de03dfc15d8 100644 --- a/var/spack/repos/builtin/packages/linaro-forge/package.py +++ b/var/spack/repos/builtin/packages/linaro-forge/package.py @@ -23,6 +23,7 @@ class LinaroForge(Package): maintainers("kenche-linaro") if platform.machine() in ["aarch64", "arm64"]: + version("23.1", sha256="c9889b95729f97bcffaf0f15b930efbd27081b7cf2ebc958eede3a186cc4d93a") version( "23.0.4", sha256="a19e6b247badaa52f78815761f71fb95a565024b7f79bdfb2f602f18b47a881c" ) @@ -43,6 +44,7 @@ class LinaroForge(Package): "21.1.3", sha256="4a4ff7372aad5a31fc9e18b7b6c493691ab37d8d44a3158584e62d1ab82b0eeb" ) elif platform.machine() == "ppc64le": + version("23.1", sha256="39a522c1d9a29f0a35bba5201f3e23c56d87543410505df30c85128816dd455b") version( "23.0.4", sha256="927c1ba733cf63027243060586b196f8262e545d898712044c359a6af6fc5795" ) @@ -66,6 +68,7 @@ class LinaroForge(Package): "21.1.3", sha256="eecbc5686d60994c5468b2d7cd37bebe5d9ac0ba37bd1f98fbfc69b071db541e" ) elif platform.machine() == "x86_64": + version("23.1", sha256="31185d5f9855fd03701089907cdf7b38eb72c484ee730f8341decbbd8f9b5930") version( "23.0.4", sha256="41a81840a273ea9a232efb4f031149867c5eff7a6381d787e18195f1171caac4" ) From 92d076e6834aefdd29e3576ea36a1664e4e793f2 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 24 Nov 2023 10:08:21 +0100 Subject: [PATCH 731/806] spack graph: fix coloring with environments (#41240) If we use all specs, we won't color correctly build-only dependencies --- lib/spack/spack/cmd/graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py index eeced40720e07f..4122d8d58894e2 100644 --- a/lib/spack/spack/cmd/graph.py +++ b/lib/spack/spack/cmd/graph.py @@ -61,7 +61,7 @@ def graph(parser, args): args.dot = True env = ev.active_environment() if env: - specs = env.all_specs() + specs = env.concrete_roots() else: specs = spack.store.STORE.db.query() From 7db386a018e2709bc4e22d61e18ab475ac8dbf33 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Fri, 24 Nov 2023 15:56:42 +0100 Subject: [PATCH 732/806] Fix multi-word aliases (#41126) PR #40929 reverted the argument parsing to make `spack --verbose install` work again. It looks like `--verbose` is the only instance where this kind of argument inheritance is used since all other commands override arguments with the same name instead. For instance, `spack --bootstrap clean` does not invoke `spack clean --bootstrap`. Therefore, fix multi-line aliases again by parsing the resolved arguments and instead explicitly pass down `args.verbose` to commands. --- lib/spack/spack/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index 5f28ab480cb02a..56a4dc0e33534c 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -1016,14 +1016,16 @@ def _main(argv=None): bootstrap_context = bootstrap.ensure_bootstrap_configuration() with bootstrap_context: - return finish_parse_and_run(parser, cmd_name, args.command, env_format_error) + return finish_parse_and_run(parser, cmd_name, args, env_format_error) -def finish_parse_and_run(parser, cmd_name, cmd, env_format_error): +def finish_parse_and_run(parser, cmd_name, main_args, env_format_error): """Finish parsing after we know the command to run.""" # add the found command to the parser and re-run then re-parse command = parser.add_command(cmd_name) - args, unknown = parser.parse_known_args() + args, unknown = parser.parse_known_args(main_args.command) + # we need to inherit verbose since the install command checks for it + args.verbose = main_args.verbose # Now that we know what command this is and what its args are, determine # whether we can continue with a bad environment and raise if not. From c485709f625429a88a184a099373d76c9438f8e3 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Fri, 24 Nov 2023 09:09:24 -0600 Subject: [PATCH 733/806] iwyu: new versions up 0.21 (depends_on llvm-17) (#41235) --- var/spack/repos/builtin/packages/iwyu/package.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/iwyu/package.py b/var/spack/repos/builtin/packages/iwyu/package.py index 20a3c1c1223368..6aedb6a0acb686 100644 --- a/var/spack/repos/builtin/packages/iwyu/package.py +++ b/var/spack/repos/builtin/packages/iwyu/package.py @@ -17,6 +17,7 @@ class Iwyu(CMakePackage): homepage = "https://include-what-you-use.org" url = "https://include-what-you-use.org/downloads/include-what-you-use-0.13.src.tar.gz" + git = "https://github.com/include-what-you-use/include-what-you-use.git" maintainers("sethrj") @@ -24,6 +25,9 @@ class Iwyu(CMakePackage): executables = ["^include-what-you-use$"] + version("0.21", sha256="6a351919ff89bda7c95c895472601868db3daab96a958b38e0362890d58760b6") + version("0.20", sha256="75fce1e6485f280f8f13f4c2d090b11d2fd2102b50857507c8413a919b7af899") + version("0.19", sha256="2b10157b60ea08adc08e3896b4921c73fcadd5ec4eb652b29a34129d501e5ee0") version("0.18", sha256="9102fc8419294757df86a89ce6ec305f8d90a818d1f2598a139d15eb1894b8f3") version("0.17", sha256="eca7c04f8b416b6385ed00e33669a7fa4693cd26cb72b522cde558828eb0c665") version("0.16", sha256="8d6fc9b255343bc1e5ec459e39512df1d51c60e03562985e0076036119ff5a1c") @@ -35,6 +39,9 @@ class Iwyu(CMakePackage): patch("iwyu-013-cmake.patch", when="@0.13:0.14") + depends_on("llvm+clang@17.0:17", when="@0.21") + depends_on("llvm+clang@16.0:16", when="@0.20") + depends_on("llvm+clang@15.0:15", when="@0.19") depends_on("llvm+clang@14.0:14", when="@0.18") depends_on("llvm+clang@13.0:13", when="@0.17") depends_on("llvm+clang@12.0:12", when="@0.16") @@ -55,7 +62,11 @@ def determine_version(cls, exe): match = re.search(r"include-what-you-use\s+(\S+)", output) return match.group(1) if match else None - @when("@0.14:") + @when("@0.19:") + def cmake_args(self): + return [self.define("CMAKE_CXX_STANDARD", 17), self.define("CMAKE_CXX_EXTENSIONS", False)] + + @when("@0.14:0.18") def cmake_args(self): return [self.define("CMAKE_CXX_STANDARD", 14), self.define("CMAKE_CXX_EXTENSIONS", False)] From 1456d9b7270990b128b2b63a8994e3109e213ccc Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sat, 25 Nov 2023 08:31:56 -0600 Subject: [PATCH 734/806] py-stashcp: new package (#41091) * py-stashcp: new package * py-stashcp: depends_on py-urllib3 * py-stashcp: comment as suggested in review * Update var/spack/repos/builtin/packages/py-stashcp/package.py --- .../builtin/packages/py-stashcp/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-stashcp/package.py diff --git a/var/spack/repos/builtin/packages/py-stashcp/package.py b/var/spack/repos/builtin/packages/py-stashcp/package.py new file mode 100644 index 00000000000000..7120260cb18fac --- /dev/null +++ b/var/spack/repos/builtin/packages/py-stashcp/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 PyStashcp(PythonPackage): + """Stashcp uses geo located nearby caches in order to copy from the OSG + Connect's stash storage service to a job's workspace on a cluster.""" + + homepage = "https://github.com/opensciencegrid/StashCache" + pypi = "stashcp/stashcp-6.1.0.tar.gz" + + maintainers("wdconinc") + + version("6.1.0", sha256="40484b40aeb853eb6a5f5472daf533a176d61fa6ab839cd265ea0baa3fe63068") + + depends_on("py-setuptools", type=("build", "run")) From 089e117904a8dd321231caf7c3f3f067385c5a21 Mon Sep 17 00:00:00 2001 From: Moritz Kern <92092328+Moritz-Alexander-Kern@users.noreply.github.com> Date: Sat, 25 Nov 2023 15:40:10 +0100 Subject: [PATCH 735/806] Update py-neo (#39213) * add 0.12.0 * remove whitespace * update deps * Update var/spack/repos/builtin/packages/py-neo/package.py Co-authored-by: Adam J. Stewart * add dep for python 3.8+ * add dep for python 3.8+ with 0.12.0 --------- Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-neo/package.py | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-neo/package.py b/var/spack/repos/builtin/packages/py-neo/package.py index 8803b8eebb0ff0..801207a47978d4 100644 --- a/var/spack/repos/builtin/packages/py-neo/package.py +++ b/var/spack/repos/builtin/packages/py-neo/package.py @@ -14,6 +14,9 @@ class PyNeo(PythonPackage): homepage = "https://neuralensemble.org/neo" pypi = "neo/neo-0.4.1.tar.gz" + version("0.12.0", sha256="3b6ca4fc05dfdb4e953e253e70994bfbbc8fe2e90958fbda7fa5860caf3fa63a") + version("0.11.1", sha256="f4a206044b332ad00b10072b0dc7a70b359fa365ec786f92ab757ef4ae588474") + version("0.11.0", sha256="cdf8e1324a3fbbd1efd5618dcd37cfc497b1997923bd710b598472c1d846674a") version("0.10.2", sha256="2d4218b0826daeea880e155227060029ec38a00238ceb5f097138d9467c6399b") version("0.10.0", sha256="e591a53e18cfa4478603a0e133f3fa0e07bc016b2a279d21d72cf8196eca8353") version("0.9.0", sha256="6e31c88d7c52174fa2512df589b2b5003e9471fde27fca9f315f4770ba3bd3cb") @@ -22,12 +25,20 @@ class PyNeo(PythonPackage): version("0.4.1", sha256="a5a4f3aa31654d52789f679717c9fb622ad4f59b56d227dca490357b9de0a1ce") version("0.3.3", sha256="6b80eb5bdc9eb4eca829f7464f861c5f1a3a6289559de037930d529bb3dddefb") + depends_on("python@3.8:", type=("build", "run"), when="@0.12.0:") + + # py-setuptools@:61 doesn't support PEP 621 + depends_on("py-setuptools@62:", type="build", when="@0.12:") depends_on("py-setuptools", type="build") - depends_on("py-numpy@1.3.0:", type=("build", "run"), when="@0.3.3:0.4.1") - depends_on("py-numpy@1.7.1:", type=("build", "run"), when="@0.5.2:0.8.0") + depends_on("py-packaging", type=("build", "run")) + + depends_on("py-numpy@1.19.5:", type=("build", "run"), when="@0.12.0:") + depends_on("py-numpy@1.18.5:", type=("build", "run"), when="@0.11.0:0.11.1") + depends_on("py-numpy@1.16.1:", type=("build", "run"), when="@0.10.0:0.10.2") depends_on("py-numpy@1.13.0:", type=("build", "run"), when="@0.9.0") - depends_on("py-numpy@1.16.1:", type=("build", "run"), when="@0.10.0:") + depends_on("py-numpy@1.7.1:", type=("build", "run"), when="@0.5.2:0.8.0") - depends_on("py-quantities@0.9.0:", type=("build", "run"), when="@0.3.3:0.8.0") - depends_on("py-quantities@0.12.1:", type=("build", "run"), when="@0.9.0:") + depends_on("py-quantities@0.14.1:", type=("build", "run"), when="@0.12.0:") + depends_on("py-quantities@0.12.1:", type=("build", "run"), when="@0.9.0:0.11.1") + depends_on("py-quantities@0.9.0:", type=("build", "run"), when="@0.5.2:0.8.0") From ea8dcb73db98df370a04301d808a4adbd4ffbada Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Sat, 25 Nov 2023 15:51:13 +0100 Subject: [PATCH 736/806] py-dictdiffer: version bump (#41080) * py-dictdiffer: version bump * py-dictdiffer: removed runtime py-setuptools dependency in 0.9.0 * Update var/spack/repos/builtin/packages/py-dictdiffer/package.py Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --------- Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --- var/spack/repos/builtin/packages/py-dictdiffer/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-dictdiffer/package.py b/var/spack/repos/builtin/packages/py-dictdiffer/package.py index 06c719cc6f2e71..acacfb00115bfa 100644 --- a/var/spack/repos/builtin/packages/py-dictdiffer/package.py +++ b/var/spack/repos/builtin/packages/py-dictdiffer/package.py @@ -12,9 +12,11 @@ class PyDictdiffer(PythonPackage): homepage = "https://github.com/inveniosoftware/dictdiffer" pypi = "dictdiffer/dictdiffer-0.8.1.tar.gz" + version("0.9.0", sha256="17bacf5fbfe613ccf1b6d512bd766e6b21fb798822a133aa86098b8ac9997578") version("0.8.1", sha256="1adec0d67cdf6166bda96ae2934ddb5e54433998ceab63c984574d187cc563d2") depends_on("python@2.7:2.8,3.4:", type=("build", "run")) - depends_on("py-setuptools", type=("build", "run")) + depends_on("py-setuptools", type="build", when="@0.9:") + depends_on("py-setuptools", type=("build", "run"), when="@:0.8") depends_on("py-setuptools-scm@3.1.0:", type="build") depends_on("py-pytest-runner@2.7:", type="build") From 9b5c85e9191053eef9bbbde7cae7c1b0bd2a784a Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Sat, 25 Nov 2023 15:53:00 +0100 Subject: [PATCH 737/806] py-sqlalchemy-utils, py-sql-alchemy: version bump (#41081) * py-sqlalchemy-utils, py-sql-alchemy: version bump * Update var/spack/repos/builtin/packages/py-sqlalchemy-utils/package.py Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --------- Co-authored-by: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> --- .../repos/builtin/packages/py-sqlalchemy-utils/package.py | 7 +++++-- var/spack/repos/builtin/packages/py-sqlalchemy/package.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-sqlalchemy-utils/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy-utils/package.py index cfdd03d289b55d..08e2eb92b3dea9 100644 --- a/var/spack/repos/builtin/packages/py-sqlalchemy-utils/package.py +++ b/var/spack/repos/builtin/packages/py-sqlalchemy-utils/package.py @@ -12,8 +12,11 @@ class PySqlalchemyUtils(PythonPackage): homepage = "https://github.com/kvesteri/sqlalchemy-utils" pypi = "sqlalchemy-utils/SQLAlchemy-Utils-0.36.8.tar.gz" + version("0.41.1", sha256="a2181bff01eeb84479e38571d2c0718eb52042f9afd8c194d0d02877e84b7d74") version("0.36.8", sha256="fb66e9956e41340011b70b80f898fde6064ec1817af77199ee21ace71d7d6ab0") depends_on("py-setuptools", type="build") - depends_on("py-six", type=("build", "run")) - depends_on("py-sqlalchemy@1.0:", type=("build", "run")) + depends_on("py-six", type=("build", "run"), when="@0.36.8") + depends_on("py-sqlalchemy@1.0:", type=("build", "run"), when="@0.36.8") + depends_on("py-sqlalchemy@1.3:", type=("build", "run"), when="@0.41.1") + depends_on("py-importlib-metadata", type=("build", "run"), when="@0.41.1 ^python@:3.7") diff --git a/var/spack/repos/builtin/packages/py-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy/package.py index de5d823e6d3755..14bd1d37eee090 100644 --- a/var/spack/repos/builtin/packages/py-sqlalchemy/package.py +++ b/var/spack/repos/builtin/packages/py-sqlalchemy/package.py @@ -14,6 +14,7 @@ class PySqlalchemy(PythonPackage): git = "https://github.com/sqlalchemy/sqlalchemy.git" version("2.0.19", sha256="77a14fa20264af73ddcdb1e2b9c5a829b8cc6b8304d0f093271980e36c200a3f") + version("1.4.49", sha256="06ff25cbae30c396c4b7737464f2a7fc37a67b7da409993b182b024cec80aed9") version("1.4.45", sha256="fd69850860093a3f69fefe0ab56d041edfdfe18510b53d9a2eaecba2f15fa795") version("1.4.44", sha256="2dda5f96719ae89b3ec0f1b79698d86eb9aecb1d54e990abb3fdd92c04b46a90") version("1.4.25", sha256="1adf3d25e2e33afbcd48cfad8076f9378793be43e7fec3e4334306cac6bec138") From ecdc296ef8906ec54665b5cdd9f3e0a16033645d Mon Sep 17 00:00:00 2001 From: svengoldberg <102215246+svengoldberg@users.noreply.github.com> Date: Sat, 25 Nov 2023 15:56:27 +0100 Subject: [PATCH 738/806] py-heat: add new package (#39394) * heat: Create new spack package * t8code: Add maintainer * t8code: Add variant descriptions * t8code: Add second maintainer * t8code: Add another maintainer * heat: Changes after review * heat: Fix style test error * heat: Delete obsolete install_options and re-add package homepage * heat: Add dependency on py-setuptools --------- Co-authored-by: Sven Goldberg --- .../repos/builtin/packages/py-heat/package.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-heat/package.py diff --git a/var/spack/repos/builtin/packages/py-heat/package.py b/var/spack/repos/builtin/packages/py-heat/package.py new file mode 100644 index 00000000000000..5d122fe5167ba2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-heat/package.py @@ -0,0 +1,47 @@ +# Copyright 2013-2023 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 PyHeat(PythonPackage): + """Heat is a flexible and seamless open-source software for high performance data analytics + and machine learning. It provides highly optimized algorithms and data structures for tensor + computations using CPUs, GPUs and distributed cluster systems on top of MPI.""" + + homepage = "https://github.com/helmholtz-analytics/heat/" + pypi = "heat/heat-1.3.0.tar.gz" + + maintainers("mrfh92", "ClaudiaComito", "JuanPedroGHM") + + version("1.3.0", sha256="fa247539a559881ffe574a70227d3c72551e7c4a9fb29b0945578d6a840d1c87") + + variant("docutils", default=False, description="Use the py-docutils package") + variant("hdf5", default=False, description="Use the py-h5py package needed for HDF5 support") + variant( + "netcdf", default=False, description="Use the py-netcdf4 package needed for NetCDF support" + ) + variant("dev", default=False, description="Use the py-pre-commit package") + variant( + "examples", + default=False, + description="Use py-scikit-learn and py-matplotlib for the example tests", + ) + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-numpy@1.20:", type=("build", "run")) + depends_on("py-torch@1.8:2.0.1", type=("build", "run")) + depends_on("py-scipy@0.14:", type=("build", "run")) + depends_on("pil@6:", type=("build", "run")) + depends_on("py-torchvision@0.8:", type=("build", "run")) + depends_on("py-mpi4py@3:", type=("build", "run")) + depends_on("py-setuptools", type="build") + + depends_on("py-docutils@0.16:", when="+docutils", type=("build", "link", "run")) + depends_on("py-h5py@2.8.0:", when="+hdf5", type=("build", "link", "run")) + depends_on("py-netcdf4@1.5.6:", when="+netcdf", type=("build", "link", "run")) + depends_on("py-pre-commit@1.18.3:", when="+dev", type=("build", "link", "run")) + depends_on("py-scikit-learn@0.24.0:", when="+examples", type=("build", "link", "run")) + depends_on("py-matplotlib@3.1.0:", when="+examples", type=("build", "link", "run")) From f28ccae3dfe238dbf0f1730f14960ae3b451fd6f Mon Sep 17 00:00:00 2001 From: Morten Kristensen Date: Sat, 25 Nov 2023 22:42:58 +0100 Subject: [PATCH 739/806] py-vermin: add latest version 1.6.0 (#41261) --- var/spack/repos/builtin/packages/py-vermin/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-vermin/package.py b/var/spack/repos/builtin/packages/py-vermin/package.py index 5fabf334b6b7da..643fa2895fcb7c 100644 --- a/var/spack/repos/builtin/packages/py-vermin/package.py +++ b/var/spack/repos/builtin/packages/py-vermin/package.py @@ -11,10 +11,11 @@ class PyVermin(PythonPackage): """Concurrently detect the minimum Python versions needed to run code.""" homepage = "https://github.com/netromdk/vermin" - url = "https://github.com/netromdk/vermin/archive/v1.5.2.tar.gz" + url = "https://github.com/netromdk/vermin/archive/v1.6.0.tar.gz" maintainers("netromdk") + version("1.6.0", sha256="31200b1e674e064c7473484372db2743f5abbf1409d994880486bca5bcf05bec") version("1.5.2", sha256="e4b6ca6f3e71b0d83a179dc4a4ba50682f60474cf8c948ba9f82e330f219ff4a") version("1.5.1", sha256="2d1c7601d054da9fa5c5eb6c817c714235f9d484b74011f7f86c98f0a25e93ea") version("1.5.0", sha256="77207385c9cea1f02053a8f2e7f2e8c945394cf37c44c70ce217cada077a2d17") From df777dbbaaa4887129d0cb2e66bcf6c3ab37ef09 Mon Sep 17 00:00:00 2001 From: Chris Richardson Date: Sat, 25 Nov 2023 22:42:54 +0000 Subject: [PATCH 740/806] py-fenics-basix: update for main and future 0.8.0 (#40838) * Update to latest version * Add dependency * revert * address PR comments * Correct dependencies for 0.7 to 0.8 transition * Fix cmake line. * Update nanobind dep --------- Co-authored-by: Matt Archer Co-authored-by: Jack S. Hale Co-authored-by: Garth N. Wells --- .../repos/builtin/packages/py-fenics-basix/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-fenics-basix/package.py b/var/spack/repos/builtin/packages/py-fenics-basix/package.py index 6d3ffa6cae3754..d3ef7e9db6d305 100644 --- a/var/spack/repos/builtin/packages/py-fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-basix/package.py @@ -27,14 +27,16 @@ class PyFenicsBasix(PythonPackage): depends_on("fenics-basix@0.4.2", type=("build", "run"), when="@0.4.2") # See python/CMakeLists.txt - depends_on("cmake@3.16:", type="build") + depends_on("cmake@3.16:", when="@:0.7", type="build") + depends_on("cmake@3.19:", when="@0.8:", type="build") # See python/pyproject.toml - depends_on("python@3.8:", when="@0.7.0:", type=("build", "run")) - depends_on("py-setuptools@42:", type="build") + depends_on("python@3.8:", when="@0.7:", type=("build", "run")) depends_on("py-numpy@1.21:", type=("build", "run")) depends_on("py-pybind11@2.9.1:", when="@:0.7", type="build") - depends_on("py-nanobind@1.5.1:", when="@0.8:", type="build") + depends_on("py-setuptools@42:", when="@:0.7", type="build") + depends_on("py-nanobind@1.6.0:", when="@0.8:", type="build") + depends_on("py-scikit-build-core+pyproject@0.5.0:", when="@0.8:", type="build") depends_on("xtensor@0.23.10:", type="build", when="@:0.4") From 7cb70e3258dbdc1ba073bf27b22dc86ecd5abfad Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Mon, 27 Nov 2023 09:08:50 +0100 Subject: [PATCH 741/806] force cp2k cuda/rocm variant on elpa (#41241) --- var/spack/repos/builtin/packages/cp2k/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 0d90d0d123c4ac..5234f46f7a67c4 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -229,6 +229,10 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): conflicts("~mpi", msg="elpa requires MPI") depends_on("elpa+openmp", when="+openmp") depends_on("elpa~openmp", when="~openmp") + depends_on("elpa+cuda", when="+cuda") + depends_on("elpa~cuda", when="~cuda") + depends_on("elpa+rocm", when="+rocm") + depends_on("elpa~rocm", when="~rocm") depends_on("elpa@2021.05:", when="@8.3:") depends_on("elpa@2021.11.001:", when="@9.1:") depends_on("elpa@2023.05.001:", when="@2023.2:") @@ -238,7 +242,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): "~mpi", msg="DLA-Future requires MPI. Only the distributed eigensolver is available." ) depends_on("dla-future@0.2.1: +scalapack") - depends_on("dla-future ~cuda~rocm", when="~cuda~rocm") + depends_on("dla-future ~cuda", when="~cuda") + depends_on("dla-future ~rocm", when="~rocm") depends_on("dla-future +cuda", when="+cuda") depends_on("dla-future +rocm", when="+rocm") From 34bce3f4907fc69dcf0ceb9a69a0be6fcab96a84 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> Date: Mon, 27 Nov 2023 09:29:19 +0100 Subject: [PATCH 742/806] Remove old conflict with gcc@10.3.0 (#41254) The conflict is captured in CudaPackage and redundant in umpire --- var/spack/repos/builtin/packages/umpire/package.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py index c64bfdf256db78..e97db334dcfaf7 100644 --- a/var/spack/repos/builtin/packages/umpire/package.py +++ b/var/spack/repos/builtin/packages/umpire/package.py @@ -208,11 +208,6 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage): # currently only available for cuda. conflicts("+shared", when="+cuda") - # https://github.com/LLNL/Umpire/issues/653 - # This range looks weird, but it ensures the concretizer looks at it as a - # range, not as a concrete version, so that it also matches 10.3.* versions. - conflicts("%gcc@10.3.0:10.3", when="+cuda") - def _get_sys_type(self, spec): sys_type = spec.architecture if "SYS_TYPE" in env: From 6fff0d4aededec355f9bc3966f2fa6af8f61e4b4 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 27 Nov 2023 11:55:33 +0100 Subject: [PATCH 743/806] libxsmm: relax arch requirement (#41193) * libxsmm: relax arch requirement * libxsmm: add a fixed commit from main --- var/spack/repos/builtin/packages/libxsmm/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py index 4de81dace46dd2..d7aa1a535ba56a 100644 --- a/var/spack/repos/builtin/packages/libxsmm/package.py +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -20,7 +20,12 @@ class Libxsmm(MakefilePackage): maintainers("hfp") + # 2.0 release is planned for Jan / Feb 2024. This commit from main is added + # as a stable version that supports other targets than x86. Remove this + # after 2.0 release. + version("main-2023-11", commit="0d9be905527ba575c14ca5d3b4c9673916c868b2") version("main", branch="main") + version("1.17", sha256="8b642127880e92e8a75400125307724635ecdf4020ca4481e5efe7640451bb92") version("1.16.3", sha256="e491ccadebc5cdcd1fc08b5b4509a0aba4e2c096f53d7880062a66b82a0baf84") version("1.16.2", sha256="bdc7554b56b9e0a380fc9c7b4f4394b41be863344858bc633bc9c25835c4c64e") @@ -82,8 +87,9 @@ class Libxsmm(MakefilePackage): # (). depends_on("binutils+ld+gas@2.33:", type="build", when="@:1.17") - # Intel Architecture or compatible CPU required - requires("target=x86_64:") + # Version 2.0 supports both x86_64 and aarch64 + requires("target=x86_64:", "target=aarch64:") + requires("target=x86_64:", when="@:1") @property def libs(self): From 343517e7947f92ebed8969237bef4c3b0718c793 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Mon, 27 Nov 2023 12:41:16 +0100 Subject: [PATCH 744/806] Improve semantic for packages:all:require (#41239) An `all` requirement is emitted for a package if all variants referenced are defined by it. Otherwise, the constraint is rejected. --- lib/spack/docs/packages_yaml.rst | 40 +++++- lib/spack/spack/solver/asp.py | 98 +++++++------ lib/spack/spack/test/cmd/spec.py | 3 +- .../spack/test/concretize_requirements.py | 131 ++++++++++++++++++ lib/spack/spack/variant.py | 2 +- 5 files changed, 227 insertions(+), 47 deletions(-) diff --git a/lib/spack/docs/packages_yaml.rst b/lib/spack/docs/packages_yaml.rst index e08f51e612a318..af0acf0f9a4e63 100644 --- a/lib/spack/docs/packages_yaml.rst +++ b/lib/spack/docs/packages_yaml.rst @@ -383,7 +383,33 @@ like this: which means every spec will be required to use ``clang`` as a compiler. -Note that in this case ``all`` represents a *default set of requirements* - +Requirements on variants for all packages are possible too, but note that they +are only enforced for those packages that define these variants, otherwise they +are disregarded. For example: + +.. code-block:: yaml + + packages: + all: + require: + - "+shared" + - "+cuda" + +will just enforce ``+shared`` on ``zlib``, which has a boolean ``shared`` variant but +no ``cuda`` variant. + +Constraints in a single spec literal are always considered as a whole, so in a case like: + +.. code-block:: yaml + + packages: + all: + require: "+shared +cuda" + +the default requirement will be enforced only if a package has both a ``cuda`` and +a ``shared`` variant, and will never be partially enforced. + +Finally, ``all`` represents a *default set of requirements* - if there are specific package requirements, then the default requirements under ``all`` are disregarded. For example, with a configuration like this: @@ -391,12 +417,18 @@ under ``all`` are disregarded. For example, with a configuration like this: packages: all: - require: '%clang' + require: + - 'build_type=Debug' + - '%clang' cmake: - require: '%gcc' + require: + - 'build_type=Debug' + - '%gcc' Spack requires ``cmake`` to use ``gcc`` and all other nodes (including ``cmake`` -dependencies) to use ``clang``. +dependencies) to use ``clang``. If enforcing ``build_type=Debug`` is needed also +on ``cmake``, it must be repeated in the specific ``cmake`` requirements. + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Setting requirements on virtual specs diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index f723acb0e95889..b41bcba228ee2c 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1291,52 +1291,70 @@ def requirement_rules_from_packages_yaml(self, pkg): kind = RequirementKind.DEFAULT return self._rules_from_requirements(pkg_name, requirements, kind=kind) - def _rules_from_requirements(self, pkg_name: str, requirements, *, kind: RequirementKind): + def _rules_from_requirements( + self, pkg_name: str, requirements, *, kind: RequirementKind + ) -> List[RequirementRule]: """Manipulate requirements from packages.yaml, and return a list of tuples with a uniform structure (name, policy, requirements). """ if isinstance(requirements, str): - rules = [self._rule_from_str(pkg_name, requirements, kind)] - else: - rules = [] - for requirement in requirements: - if isinstance(requirement, str): - # A string represents a spec that must be satisfied. It is - # equivalent to a one_of group with a single element - rules.append(self._rule_from_str(pkg_name, requirement, kind)) - else: - for policy in ("spec", "one_of", "any_of"): - if policy in requirement: - constraints = requirement[policy] - - # "spec" is for specifying a single spec - if policy == "spec": - constraints = [constraints] - policy = "one_of" - - rules.append( - RequirementRule( - pkg_name=pkg_name, - policy=policy, - requirements=constraints, - kind=kind, - message=requirement.get("message"), - condition=requirement.get("when"), - ) - ) + requirements = [requirements] + + rules = [] + for requirement in requirements: + # A string is equivalent to a one_of group with a single element + if isinstance(requirement, str): + requirement = {"one_of": [requirement]} + + for policy in ("spec", "one_of", "any_of"): + if policy not in requirement: + continue + + constraints = requirement[policy] + # "spec" is for specifying a single spec + if policy == "spec": + constraints = [constraints] + policy = "one_of" + + constraints = [ + x + for x in constraints + if not self.reject_requirement_constraint(pkg_name, constraint=x, kind=kind) + ] + if not constraints: + continue + + rules.append( + RequirementRule( + pkg_name=pkg_name, + policy=policy, + requirements=constraints, + kind=kind, + message=requirement.get("message"), + condition=requirement.get("when"), + ) + ) return rules - def _rule_from_str( - self, pkg_name: str, requirements: str, kind: RequirementKind - ) -> RequirementRule: - return RequirementRule( - pkg_name=pkg_name, - policy="one_of", - requirements=[requirements], - kind=kind, - condition=None, - message=None, - ) + def reject_requirement_constraint( + self, pkg_name: str, *, constraint: str, kind: RequirementKind + ) -> bool: + """Returns True if a requirement constraint should be rejected""" + if kind == RequirementKind.DEFAULT: + # Requirements under all: are applied only if they are satisfiable considering only + # package rules, so e.g. variants must exist etc. Otherwise, they are rejected. + try: + s = spack.spec.Spec(pkg_name) + s.constrain(constraint) + s.validate_or_raise() + except spack.error.SpackError as e: + tty.debug( + f"[SETUP] Rejecting the default '{constraint}' requirement " + f"on '{pkg_name}': {str(e)}", + level=2, + ) + return True + return False def pkg_rules(self, pkg, tests): pkg = packagize(pkg) diff --git a/lib/spack/spack/test/cmd/spec.py b/lib/spack/spack/test/cmd/spec.py index 66dfce93089718..763d83bf0ad17a 100644 --- a/lib/spack/spack/test/cmd/spec.py +++ b/lib/spack/spack/test/cmd/spec.py @@ -104,8 +104,7 @@ def test_spec_parse_unquoted_flags_report(): spec("gcc cflags=-Os -pipe") cm = str(cm.value) assert cm.startswith( - 'trying to set variant "pipe" in package "gcc", but the package has no such ' - 'variant [happened during concretization of gcc cflags="-Os" ~pipe]' + 'trying to set variant "pipe" in package "gcc", but the package has no such variant' ) assert cm.endswith('(1) cflags=-Os -pipe => cflags="-Os -pipe"') diff --git a/lib/spack/spack/test/concretize_requirements.py b/lib/spack/spack/test/concretize_requirements.py index d5295691ce0a8b..529d481b2f9211 100644 --- a/lib/spack/spack/test/concretize_requirements.py +++ b/lib/spack/spack/test/concretize_requirements.py @@ -896,3 +896,134 @@ def test_requires_directive(concretize_scope, mock_packages): # This package can only be compiled with clang with pytest.raises(spack.error.SpackError, match="can only be compiled with Clang"): Spec("requires_clang").concretized() + + +@pytest.mark.parametrize( + "packages_yaml", + [ + # Simple string + """ + packages: + all: + require: "+shared" + """, + # List of strings + """ + packages: + all: + require: + - "+shared" + """, + # Objects with attributes + """ + packages: + all: + require: + - spec: "+shared" + """, + """ + packages: + all: + require: + - one_of: ["+shared"] + """, + ], +) +def test_default_requirements_semantic(packages_yaml, concretize_scope, mock_packages): + """Tests that requirements under 'all:' are by default applied only if the variant/property + required exists, but are strict otherwise. + + For example: + + packages: + all: + require: "+shared" + + should enforce the value of "+shared" when a Boolean variant named "shared" exists. This is + not overridable from the command line, so with the configuration above: + + > spack spec zlib~shared + + is unsatisfiable. + """ + update_packages_config(packages_yaml) + + # Regular zlib concretize to +shared + s = Spec("zlib").concretized() + assert s.satisfies("+shared") + + # If we specify the variant we can concretize only the one matching the constraint + s = Spec("zlib +shared").concretized() + assert s.satisfies("+shared") + with pytest.raises(UnsatisfiableSpecError): + Spec("zlib ~shared").concretized() + + # A spec without the shared variant still concretize + s = Spec("a").concretized() + assert not s.satisfies("a +shared") + assert not s.satisfies("a ~shared") + + +@pytest.mark.parametrize( + "packages_yaml,spec_str,expected,not_expected", + [ + # The package has a 'libs' mv variant defaulting to 'libs=shared' + ( + """ + packages: + all: + require: "+libs" + """, + "multivalue-variant", + ["libs=shared"], + ["libs=static", "+libs"], + ), + ( + """ + packages: + all: + require: "libs=foo" + """, + "multivalue-variant", + ["libs=shared"], + ["libs=static", "libs=foo"], + ), + ( + # (TODO): revisit this case when we'll have exact value semantic for mv variants + """ + packages: + all: + require: "libs=static" + """, + "multivalue-variant", + ["libs=static", "libs=shared"], + [], + ), + ( + # Constraint apply as a whole, so having a non-existing variant + # invalidate the entire constraint + """ + packages: + all: + require: "libs=static +feefoo" + """, + "multivalue-variant", + ["libs=shared"], + ["libs=static"], + ), + ], +) +def test_default_requirements_semantic_with_mv_variants( + packages_yaml, spec_str, expected, not_expected, concretize_scope, mock_packages +): + """Tests that requirements under 'all:' are behaving correctly under cases that could stem + from MV variants. + """ + update_packages_config(packages_yaml) + s = Spec(spec_str).concretized() + + for constraint in expected: + assert s.satisfies(constraint), constraint + + for constraint in not_expected: + assert not s.satisfies(constraint), constraint diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py index 7b045d62628022..9bea903aac7289 100644 --- a/lib/spack/spack/variant.py +++ b/lib/spack/spack/variant.py @@ -916,7 +916,7 @@ def __init__(self, spec, variants): variant_str = "variant" if len(variants) == 1 else "variants" msg = ( 'trying to set {0} "{1}" in package "{2}", but the package' - " has no such {0} [happened during concretization of {3}]" + " has no such {0} [happened when validating '{3}']" ) msg = msg.format(variant_str, comma_or(variants), spec.name, spec.root) super().__init__(msg) From c564b2d9690935f1fa0ef13a4b84248f9c2d5348 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Mon, 27 Nov 2023 13:12:49 +0100 Subject: [PATCH 745/806] googletest: Add 1.13.0 and 1.14.0 tags (#41253) * Add latest tags for googletest * Implement proper url_for_version * Fix hashes for older versions --- .../builtin/packages/googletest/package.py | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index bf995e9a4ad731..a3758539027ae1 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -16,14 +16,16 @@ class Googletest(CMakePackage): maintainers("sethrj") version("main", branch="main") + version("1.14.0", sha256="8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7") + version("1.13.0", sha256="ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363") version("1.12.1", sha256="81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2") version("1.12.0", sha256="2a4f11dce6188b256f3650061525d0fe352069e5c162452818efbbf8d0b5fe1c") - version("1.11.0", sha256="07b0896360f8e14414a8419e35515da0be085c5b4547c914ab8f4684ef0a3a8e") - version("1.10.0", sha256="e4a7cd97c903818abe7ddb129db9c41cc9fd9e2ded654be57ced26d45c72e4c9") - version("1.8.1", sha256="8e40a005e098b1ba917d64104549e3da274e31261dedc57d6250fe91391b2e84") - version("1.8.0", sha256="d8c33605d23d303b08a912eaee7f84c4e091d6e3d90e9a8ec8aaf7450dfe2568") - version("1.7.0", sha256="9639cf8b7f37a4d0c6575f52c01ef167c5f11faee65252296b3ffc2d9acd421b") - version("1.6.0", sha256="a61e20c65819eb39a2da85c88622bac703b865ca7fe2bfdcd3da734d87d5521a") + version("1.11.0", sha256="b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5") + version("1.10.0", sha256="9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb") + version("1.8.1", sha256="9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c") + version("1.8.0", sha256="58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8") + version("1.7.0", sha256="f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc") + version("1.6.0", sha256="5fbc058e5b662b9c86d93ac76fefb58eec89cbf26144b49669a38ecb62758447") variant("gmock", default=True, when="@1.8:", description="Build with gmock") variant("pthreads", default=True, description="Build multithreaded version with pthreads") @@ -74,3 +76,20 @@ def darwin_fix(self): # The shared library is not installed correctly on Darwin; fix this if self.spec.satisfies("platform=darwin"): fix_darwin_install_name(self.prefix.lib) + + def url_for_version(self, version): + """googletest has changed how they publish releases on github. Up until, + including version 1.12.1 they were tagged as `release-`. + Afterwards things switched to the format `v`. Additionally, + newer versions are available from `archive/refs/tags/.tar.gz`, + while versions up to, and including, 1.8.0 are available only from + `archive/release-.tar.gz` + """ + if version.satisfies("@:1.8.0"): + return f"{self.git}/archive/release-{version}.tar.gz" + + tagname = f"release-{version}" + if version.satisfies("@1.13:"): + tagname = f"v{version}" + + return f"{self.git}/archive/refs/tags/{tagname}.tar.gz" From b1b4ef6d1b7152e4a05f7d6eb6f5e577e266d229 Mon Sep 17 00:00:00 2001 From: Dave Keeshan <96727608+davekeeshan@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:33:30 +0000 Subject: [PATCH 746/806] Add patch so that ccache can compile with the standard gcc@12 version (#41249) --- .../builtin/packages/ccache/fix-gcc-12.patch | 23 +++++++++++++++++++ .../repos/builtin/packages/ccache/package.py | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch diff --git a/var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch b/var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch new file mode 100644 index 00000000000000..638d76a2c3440a --- /dev/null +++ b/var/spack/repos/builtin/packages/ccache/fix-gcc-12.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/906310 +https://bugs.gentoo.org/906942 +https://github.com/ccache/ccache/issues/1289 +https://github.com/ccache/ccache/commit/689168c292f1ed26c5f4a3070aeb649dad7facb5 + +From 689168c292f1ed26c5f4a3070aeb649dad7facb5 Mon Sep 17 00:00:00 2001 +From: Joel Rosdahl +Date: Tue, 1 Aug 2023 12:30:12 +0200 +Subject: [PATCH] fix: Work around GCC 12.3 bug 109241 + +See also #1289. +--- a/src/storage/local/LocalStorage.cpp ++++ b/src/storage/local/LocalStorage.cpp +@@ -854,7 +854,9 @@ LocalStorage::recompress(const std::optional level, + auto l2_content_lock = get_level_2_content_lock(l1_index, l2_index); + l2_content_lock.make_long_lived(lock_manager); + if (!l2_content_lock.acquire()) { +- LOG("Failed to acquire content lock for {}/{}", l1_index, l2_index); ++ // LOG_RAW+fmt::format instead of LOG due to GCC 12.3 bug #109241 ++ LOG_RAW(fmt::format( ++ "Failed to acquire content lock for {}/{}", l1_index, l2_index)); + return; + } diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py index 06b1eb09685026..0b3045a43ac789 100644 --- a/var/spack/repos/builtin/packages/ccache/package.py +++ b/var/spack/repos/builtin/packages/ccache/package.py @@ -72,6 +72,8 @@ class Ccache(CMakePackage): conflicts("%clang@:7", when="@4.7:") conflicts("%clang@:4", when="@4.4:") + patch("fix-gcc-12.patch", when="%gcc@12") + def cmake_args(self): return [ self.define("ENABLE_TESTING", False), From ea347b6468729f844b7e79891c3a8c84a3df13d5 Mon Sep 17 00:00:00 2001 From: fpruvost Date: Mon, 27 Nov 2023 15:03:04 +0100 Subject: [PATCH 747/806] pastix: add v6.3.1 (#41265) --- var/spack/repos/builtin/packages/pastix/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pastix/package.py b/var/spack/repos/builtin/packages/pastix/package.py index ecd303784fdc0f..f405217508235e 100644 --- a/var/spack/repos/builtin/packages/pastix/package.py +++ b/var/spack/repos/builtin/packages/pastix/package.py @@ -17,6 +17,7 @@ class Pastix(CMakePackage, CudaPackage): maintainers("fpruvost", "mfaverge", "ramet") version("master", branch="master", submodules=True) + version("6.3.1", sha256="290464d73b7d43356e4735a29932bf6f23a88e94ec7139ba7744c21e42c52681") version("6.3.0", sha256="a6bfec32a3279d7b24c5fc05885c6632d177e467f1584707c6fd7c42a8703c3e") version("6.2.2", sha256="cce9a1fe4678b5733c9f1a5a52f77b040eadc3e254418c6fb03d8ab37dede508") version("6.2.1", sha256="b680cbfc265df8cba18d3a7093fcc02e260198c4a2d6a86d1e684bb291e309dd") From 848d2705486117c39f6971af9b232628ce7b7b3a Mon Sep 17 00:00:00 2001 From: stepanvanecek Date: Mon, 27 Nov 2023 15:21:57 +0100 Subject: [PATCH 748/806] sys-sage: update repo url, rework recipe (#41005) Co-authored-by: Stepan Vanecek Co-authored-by: Massimiliano Culpo --- .../builtin/packages/sys-sage/package.py | 69 ++++++++++++++++--- 1 file changed, 61 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/sys-sage/package.py b/var/spack/repos/builtin/packages/sys-sage/package.py index 9670e01aa98b5c..0fb153bf0e5d6f 100644 --- a/var/spack/repos/builtin/packages/sys-sage/package.py +++ b/var/spack/repos/builtin/packages/sys-sage/package.py @@ -3,23 +3,76 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack.package import * class SysSage(CMakePackage): - """A library for capturing hadrware topology and attributes of compute systems.""" + """A library for capturing hardware topology and attributes of compute systems.""" - homepage = "https://github.com/stepanvanecek/sys-sage" - url = "https://github.com/stepanvanecek/sys-sage/archive/refs/tags/v0.1.1-alpha.2.tar.gz" - git = "https://github.com/stepanvanecek/sys-sage.git" + homepage = "https://github.com/caps-tum/sys-sage" + url = "https://github.com/caps-tum/sys-sage/archive/refs/tags/v0.4.3.tar.gz" + git = "https://github.com/caps-tum/sys-sage.git" maintainers("stepanvanecek") + version("0.4.3", sha256="e24313c4274576c1511a62e1b27c86a78cea7e4c123b8a53303cfc70de978faa") version("master", branch="master") - version( - "0.1.1-alpha.2", sha256="991a77cf37b061a911c8566fd4486f914de4f4c8cdf39112ec8a32903450c178" + version("develop", branch="develop") + + conflicts("%gcc@:7", msg="gcc can be used from version 8 and above") + + variant( + "nvidia_mig", + default=False, + description="Build and install functionality regarding NVidia MIG(multi-instance GPU, " + "ampere or newer).", + ) + variant( + "cpuinfo", + default=True, + description="Build and install functionality regarding Linux cpuinfo (only x86) -- " + "default ON.", + ) + variant( + "build_data_sources", + default=False, + when="platform=linux", + description="Build all data sources (programs to collect data about the machine sys-sage " + "runs on).", + ) + variant( + "ds_hwloc", + default=False, + description="Builds the hwloc data source for retrieving the CPU topology", + ) + variant( + "ds_numa", + default=False, + when="platform=linux", + description="builds the caps-numa-benchmark. If turned on, includes Linux-specific " + "libraries.", ) - depends_on("cmake@3.21:", type="build") + depends_on("cmake@3.22:", type="build") depends_on("libxml2@2.9.13:") + + depends_on("numactl", when="+build_data_sources platform=linux") + depends_on("numactl", when="+ds_numa platform=linux") + depends_on("hwloc@2.9:", when="+build_data_sources") + depends_on("hwloc@2.9:", when="+ds_hwloc") + depends_on("cuda", when="+nvidia_mig platform=linux") + depends_on("cuda", when="+build_data_sources platform=linux") + + def cmake_args(self): + spec = self.spec + args = [] + args.append(self.define_from_variant("NVIDIA_MIG", "nvidia_mig")) + if "+cpuinfo" in spec and spec.target == "x86_64" and spec.platform == "linux": + args.append(self.define("CPUINFO", True)) + else: + args.append(self.define("CPUINFO", False)) + if "+ds_hwloc" in spec or "+build_data_sources" in spec: + args.append(self.define("DS_HWLOC", True)) + if "+ds_numa" in spec or "+build_data_sources" in spec: + args.append(self.define("DS_NUMA", True)) + return args From 89173b6d24795bddb2742d33bdcbd569c07bae70 Mon Sep 17 00:00:00 2001 From: Derek Ryan Strong Date: Mon, 27 Nov 2023 06:25:07 -0800 Subject: [PATCH 749/806] fpart: add license and variants (#41257) --- .../repos/builtin/packages/fpart/package.py | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/fpart/package.py b/var/spack/repos/builtin/packages/fpart/package.py index 1a6d36331c935d..26e3fee0b72956 100644 --- a/var/spack/repos/builtin/packages/fpart/package.py +++ b/var/spack/repos/builtin/packages/fpart/package.py @@ -17,13 +17,33 @@ class Fpart(AutotoolsPackage): maintainers("drkrynstrng") + license("BSD-2-Clause") + version("master", branch="master") version("1.5.1", sha256="c353a28f48e4c08f597304cb4ebb88b382f66b7fabfc8d0328ccbb0ceae9220c") + variant("embfts", default=False, description="Build with embedded fts functions") + variant("static", default=False, description="Build static binary") + variant("debug", default=False, description="Build with debugging support") + # fpsync has the following run dependencies, at least one is required + variant( + "fpsynctools", + default="rsync", + values=("rsync", "tar", "cpio"), + multi=True, + description="Tools used by fpsync to copy files", + ) + depends_on("autoconf", type="build") depends_on("automake", type="build") depends_on("libtool", type="build") - # fpsync has the following run dependencies - depends_on("rsync", type="run") - depends_on("tar", type="run") - depends_on("cpio", type="run") + depends_on("rsync", when="fpsynctools=rsync", type="run") + depends_on("tar", when="fpsynctools=tar", type="run") + depends_on("cpio", when="fpsynctools=cpio", type="run") + + def configure_args(self): + config_args = [] + config_args.extend(self.enable_or_disable("embfts")) + config_args.extend(self.enable_or_disable("static")) + config_args.extend(self.enable_or_disable("debug")) + return config_args From dc715d984026945026a696e89cb8b7a22ef47e41 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 27 Nov 2023 15:43:49 +0100 Subject: [PATCH 750/806] py-llvmlite: add new versions (#41247) --- var/spack/repos/builtin/packages/py-llvmlite/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-llvmlite/package.py b/var/spack/repos/builtin/packages/py-llvmlite/package.py index a6f7cd8a4db2bd..61c7d7304bf6a5 100644 --- a/var/spack/repos/builtin/packages/py-llvmlite/package.py +++ b/var/spack/repos/builtin/packages/py-llvmlite/package.py @@ -13,6 +13,9 @@ class PyLlvmlite(PythonPackage): pypi = "llvmlite/llvmlite-0.23.0.tar.gz" git = "https://github.com/numba/llvmlite.git" + version("0.41.1", sha256="f19f767a018e6ec89608e1f6b13348fa2fcde657151137cb64e56d48598a92db") + version("0.41.0", sha256="7d41db345d76d2dfa31871178ce0d8e9fd8aa015aa1b7d4dab84b5cb393901e0") + version("0.40.1", sha256="5cdb0d45df602099d833d50bd9e81353a5e036242d3c003c5b294fc61d1986b4") version("0.40.0", sha256="c910b8fbfd67b8e9d0b10ebc012b23cd67cbecef1b96f00d391ddd298d71671c") version("0.39.1", sha256="b43abd7c82e805261c425d50335be9a6c4f84264e34d6d6e475207300005d572") version("0.39.0", sha256="01098be54f1aa25e391cebba8ea71cd1533f8cd1f50e34c7dd7540c2560a93af") From ee8e40003b850c509ee84b9e8c7722ba0261abc5 Mon Sep 17 00:00:00 2001 From: Brian Vanderwende Date: Mon, 27 Nov 2023 07:48:04 -0700 Subject: [PATCH 751/806] vapor: add new recipe (#40707) --- .../repos/builtin/packages/vapor/package.py | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 var/spack/repos/builtin/packages/vapor/package.py diff --git a/var/spack/repos/builtin/packages/vapor/package.py b/var/spack/repos/builtin/packages/vapor/package.py new file mode 100644 index 00000000000000..1dca76673990ca --- /dev/null +++ b/var/spack/repos/builtin/packages/vapor/package.py @@ -0,0 +1,132 @@ +# Copyright 2013-2023 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) + + +import re + +from spack.package import * + + +class Vapor(CMakePackage): + """VAPOR is the Visualization and Analysis Platform for Ocean, + Atmosphere, and Solar Researchers. VAPOR provides an interactive 3D + visualization environment that can also produce animations and + still frame images. + """ + + homepage = "https://www.vapor.ucar.edu" + url = "https://github.com/NCAR/VAPOR/archive/refs/tags/v3.9.0.tar.gz" + git = "https://github.com/NCAR/VAPOR.git" + + maintainers("vanderwb") + + version("main", branch="main") + version( + "3.9.0", + sha256="343ababe40b5824ef826f16c935a6dc1fb18e1a4c88ef967c8d64386f28a99a3", + preferred=True, + ) + + variant("doc", default=True, description="Build docs using Doxygen") + variant("ospray", default=False, description="Enable OSPRay raytracing") + + depends_on("cmake@3.17:", type="build") + depends_on("python+ssl", type="build") + depends_on("py-numpy@1.21", type="build") + depends_on("py-scipy", type="build") + depends_on("py-matplotlib", type="build") + + depends_on("zlib-api") + depends_on("gl") + + depends_on("xz") + depends_on("openssl") + depends_on("expat") + depends_on("curl") + depends_on("mesa-glu") + depends_on("libxtst") + depends_on("libxcb") + depends_on("xcb-util") + depends_on("libxkbcommon") + depends_on("libpng") + depends_on("assimp") + depends_on("netcdf-c~dap~byterange") + depends_on("udunits") + depends_on("freetype") + depends_on("proj@:7") + depends_on("libgeotiff") + depends_on("glm") + depends_on("qt+opengl+dbus@5") + + depends_on("ospray~mpi", when="+ospray") + depends_on("doxygen", when="+doc") + + # These images are required but not provided by the source + resource( + name="map-images", + url="https://stratus.ucar.edu/vapor-images/2023-Jun-images.tar.xz", + sha256="3f0c6d40446abdb16d5aaaa314349a140e497b3be6f4971394b3e78f22d47c7d", + placement="share/extras/images", + ) + + def cmake_args(self): + spec = self.spec + pyvers = spec["python"].version.up_to(2) + pypath = "{}/python{}".format(spec.prefix.lib, pyvers) + + args = [ + self.define_from_variant("BUILD_OSP", "ospray"), + self.define_from_variant("BUILD_DOC", "doc"), + self.define("BUILD_PYTHON", False), + self.define("THIRD_PARTY_DIR", spec.prefix), + self.define("THIRD_PARTY_LIB_DIR", spec.prefix.lib), + self.define("THIRD_PARTY_INC_DIR", spec["python"].prefix.include), + self.define("PYTHONVERSION", pyvers), + self.define("PYTHONDIR", spec.prefix), + self.define("PYTHONPATH", pypath), + self.define("NUMPY_INCLUDE_DIR", pypath + "/site-packages/numpy/core/include"), + self.define("MAP_IMAGES_PATH", "extras/images"), + ] + + return args + + # VAPOR depends on custom version of GeometryEngine that is + # packaged with the source code - need to extract and move + @run_before("cmake") + def extract_gte(self): + unzip = which("unzip") + + with working_dir("buildutils"): + unzip("GTE.zip") + move("GTE", "../include") + + # Build will use these optional site defaults which aren't + # generally applicable to other sites + @run_before("cmake") + def clean_local_refs(self): + force_remove("site_files/site.NCAR") + + # Vapor wants all of the Python packages in its build path. This + # somewhat objectionable code copies packages to the tree. It also + # copies the Python library so that the site-library is found. + @run_before("cmake") + def copy_python_library(self): + spec = self.spec + mkdirp(spec.prefix.lib) + pp = re.compile("py-[a-z0-9-]*") + + for pydep in ["python"] + pp.findall(str(spec)): + install_tree(spec[pydep].prefix.lib, spec.prefix.lib) + + # The documentation will not be built without this target (though + # it will try to install!) + @property + def build_targets(self): + targets = [] + + if "+doc" in self.spec: + targets.append("doc") + + return targets + ["all"] From d76a77495760d2d22e0d85132c86c64aee6d7523 Mon Sep 17 00:00:00 2001 From: Nisarg Patel <33021055+hpcnpatel@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:52:19 +0100 Subject: [PATCH 752/806] libpsm3: add v11.5.1.1 (#41231) --- var/spack/repos/builtin/packages/libpsm3/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/libpsm3/package.py b/var/spack/repos/builtin/packages/libpsm3/package.py index 620777fc17af5a..4a1f9e039f3bab 100644 --- a/var/spack/repos/builtin/packages/libpsm3/package.py +++ b/var/spack/repos/builtin/packages/libpsm3/package.py @@ -16,10 +16,11 @@ class Libpsm3(AutotoolsPackage): git = "https://github.com/intel/eth-psm3-fi.git" version( - "11.4.1.0", - sha256="272adb9ec10edf709bfcfccc6b6e9296d25d892c36b845ad577caeb82b70c9ac", + "11.5.1.1", + sha256="59fe731f4dd2cfcd90c8274df1c6ca9014a45cdebfdf1f1a830fcb8fcb65bb79", preferred=True, ) + version("11.4.1.0", sha256="272adb9ec10edf709bfcfccc6b6e9296d25d892c36b845ad577caeb82b70c9ac") variant("atomics", default=True, description="Enable atomics") variant("debug", default=False, description="Enable debugging") From 13b711f620bdd18bdd67f68a50b89984b3418d2f Mon Sep 17 00:00:00 2001 From: Anton Kozhevnikov Date: Mon, 27 Nov 2023 16:28:19 +0100 Subject: [PATCH 753/806] [sirius] update spack recipe; add v7.5.0 (#41233) * update spack recipe * [@spackbot] updating style on behalf of toxa81 * change from @develop to @7.5.0 * return dependency on boost_filesystem * return dependency on boost_filesystem * remove boost filesystem as agreed by @RMeli and @simonpintarelli --------- Co-authored-by: toxa81 --- .../repos/builtin/packages/sirius/package.py | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py index 20f5a4246d420c..fd73c669ec9a3c 100644 --- a/var/spack/repos/builtin/packages/sirius/package.py +++ b/var/spack/repos/builtin/packages/sirius/package.py @@ -21,6 +21,7 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="develop") version("master", branch="master") + version("7.5.0", sha256="c583f88ffc02e9acac24e786bc35c7c32066882d2f70a1e0c14b5780b510365d") version("7.4.3", sha256="015679a60a39fa750c5d1bd8fb1ce73945524bef561270d8a171ea2fd4687fec") version("7.4.0", sha256="f9360a695a1e786d8cb9d6702c82dd95144a530c4fa7e8115791c7d1e92b020b") version("7.3.2", sha256="a256508de6b344345c295ad8642dbb260c4753cd87cc3dd192605c33542955d7") @@ -79,17 +80,11 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage): variant("shared", default=True, description="Build shared libraries") variant("openmp", default=True, description="Build with OpenMP support") - variant( - "boost_filesystem", - default=False, - description="Use Boost filesystem for self-consistent field method " - "mini-app. Only required when the compiler does not " - "support std::experimental::filesystem nor std::filesystem", - ) variant("fortran", default=False, description="Build Fortran bindings") variant("python", default=False, description="Build Python bindings") variant("memory_pool", default=True, description="Build with memory pool") variant("elpa", default=False, description="Use ELPA") + variant("dlaf", default=False, when="@7.5.0:", description="Use DLA-Future") variant("vdwxc", default=False, description="Enable libvdwxc support") variant("scalapack", default=False, description="Enable scalapack support") variant("magma", default=False, description="Enable MAGMA support") @@ -107,6 +102,7 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage): variant( "profiler", default=True, description="Use internal profiler to measure execution time" ) + variant("nvtx", default=False, description="Use NVTX profiler") depends_on("cmake@3.23:", type="build") depends_on("mpi") @@ -133,7 +129,6 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage): extends("python", when="+python") depends_on("magma", when="+magma") - depends_on("boost cxxstd=14 +filesystem", when="+boost_filesystem") depends_on("spfft@0.9.13:", when="@7.0.1:") depends_on("spfft+single_precision", when="+single_precision ^spfft") @@ -154,13 +149,18 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage): depends_on("scalapack", when="+scalapack") + with when("+dlaf"): + depends_on("dla-future@0.3.0:") + depends_on("dla-future +scalapack", when="+scalapack") + depends_on("dla-future +cuda", when="+cuda") + depends_on("dla-future +rocm", when="+rocm") + depends_on("rocblas", when="+rocm") depends_on("rocsolver", when="@7.5.0: +rocm") # FindHIP cmake script only works for < 4.1 depends_on("hip@:4.0", when="@:7.2.0 +rocm") - conflicts("+boost_filesystem", when="~apps") conflicts("^libxc@5.0.0") # known to produce incorrect results conflicts("+single_precision", when="@:7.2.4") conflicts("+scalapack", when="^cray-libsci") @@ -203,15 +203,17 @@ def cmake_args(self): self.define_from_variant(cm_label + "USE_VDWXC", "vdwxc"), self.define_from_variant(cm_label + "USE_MEMORY_POOL", "memory_pool"), self.define_from_variant(cm_label + "USE_SCALAPACK", "scalapack"), + self.define_from_variant(cm_label + "USE_DLAF", "dlaf"), self.define_from_variant(cm_label + "CREATE_FORTRAN_BINDINGS", "fortran"), self.define_from_variant(cm_label + "CREATE_PYTHON_MODULE", "python"), self.define_from_variant(cm_label + "USE_CUDA", "cuda"), self.define_from_variant(cm_label + "USE_ROCM", "rocm"), self.define_from_variant(cm_label + "BUILD_APPS", "apps"), - self.define_from_variant(cm_label + "BUILD_SHARED_LIBS", "shared"), self.define_from_variant(cm_label + "USE_FP32", "single_precision"), self.define_from_variant(cm_label + "USE_PROFILER", "profiler"), + self.define_from_variant(cm_label + "USE_NVTX", "nvtx"), self.define_from_variant(cm_label + "USE_WANNIER90", "wannier90"), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("BUILD_TESTING", "tests"), ] @@ -254,7 +256,7 @@ def cmake_args(self): cuda_arch = spec.variants["cuda_arch"].value if cuda_arch[0] != "none": # Make SIRIUS handle it - if "@6:7.4.3" in spec: + if "@:7.4.3" in spec: args.append(self.define("CMAKE_CUDA_ARCH", ";".join(cuda_arch))) else: args.append(self.define("CMAKE_CUDA_ARCHITECTURES", ";".join(cuda_arch))) From 8d0e0d5c77b74b964021f3d7f7930c7ae5a786f2 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 27 Nov 2023 16:37:31 +0100 Subject: [PATCH 754/806] tests: fix more cases of env variables (#41226) --- lib/spack/spack/test/cmd/gpg.py | 4 +- lib/spack/spack/test/cmd/install.py | 11 +- lib/spack/spack/test/make_executable.py | 205 +++++++++++------------- 3 files changed, 105 insertions(+), 115 deletions(-) diff --git a/lib/spack/spack/test/cmd/gpg.py b/lib/spack/spack/test/cmd/gpg.py index 78a2a9ece9f952..08749022cab360 100644 --- a/lib/spack/spack/test/cmd/gpg.py +++ b/lib/spack/spack/test/cmd/gpg.py @@ -43,7 +43,7 @@ def test_find_gpg(cmd_name, version, tmpdir, mock_gnupghome, monkeypatch): f.write(TEMPLATE.format(version=version)) fs.set_executable(fname) - monkeypatch.setitem(os.environ, "PATH", str(tmpdir)) + monkeypatch.setenv("PATH", str(tmpdir)) if version == "undetectable" or version.endswith("1.3.4"): with pytest.raises(spack.util.gpg.SpackGPGError): spack.util.gpg.init(force=True) @@ -54,7 +54,7 @@ def test_find_gpg(cmd_name, version, tmpdir, mock_gnupghome, monkeypatch): def test_no_gpg_in_path(tmpdir, mock_gnupghome, monkeypatch, mutable_config): - monkeypatch.setitem(os.environ, "PATH", str(tmpdir)) + monkeypatch.setenv("PATH", str(tmpdir)) bootstrap("disable") with pytest.raises(RuntimeError): spack.util.gpg.init(force=True) diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py index ef9d19d77884a8..8eb3bfedb815c0 100644 --- a/lib/spack/spack/test/cmd/install.py +++ b/lib/spack/spack/test/cmd/install.py @@ -904,13 +904,12 @@ def test_install_help_cdash(): @pytest.mark.disable_clean_stage_check -def test_cdash_auth_token(tmpdir, mock_fetch, install_mockery, capfd): +def test_cdash_auth_token(tmpdir, mock_fetch, install_mockery, monkeypatch, capfd): # capfd interferes with Spack's capturing - with tmpdir.as_cwd(): - with capfd.disabled(): - os.environ["SPACK_CDASH_AUTH_TOKEN"] = "asdf" - out = install("-v", "--log-file=cdash_reports", "--log-format=cdash", "a") - assert "Using CDash auth token from environment" in out + with tmpdir.as_cwd(), capfd.disabled(): + monkeypatch.setenv("SPACK_CDASH_AUTH_TOKEN", "asdf") + out = install("-v", "--log-file=cdash_reports", "--log-format=cdash", "a") + assert "Using CDash auth token from environment" in out @pytest.mark.not_on_windows("Windows log_output logs phase header out of order") diff --git a/lib/spack/spack/test/make_executable.py b/lib/spack/spack/test/make_executable.py index b333ae58fea006..5716ca5a48dea8 100644 --- a/lib/spack/spack/test/make_executable.py +++ b/lib/spack/spack/test/make_executable.py @@ -9,10 +9,7 @@ This just tests whether the right args are getting passed to make. """ import os -import shutil import sys -import tempfile -import unittest import pytest @@ -20,110 +17,104 @@ from spack.util.environment import path_put_first pytestmark = pytest.mark.skipif( - sys.platform == "win32", - reason="MakeExecutable \ - not supported on Windows", + sys.platform == "win32", reason="MakeExecutable not supported on Windows" ) -class MakeExecutableTest(unittest.TestCase): - def setUp(self): - self.tmpdir = tempfile.mkdtemp() - - make_exe = os.path.join(self.tmpdir, "make") - with open(make_exe, "w") as f: - f.write("#!/bin/sh\n") - f.write('echo "$@"') - os.chmod(make_exe, 0o700) - - path_put_first("PATH", [self.tmpdir]) - - def tearDown(self): - shutil.rmtree(self.tmpdir) - - def test_make_normal(self): - make = MakeExecutable("make", 8) - self.assertEqual(make(output=str).strip(), "-j8") - self.assertEqual(make("install", output=str).strip(), "-j8 install") - - def test_make_explicit(self): - make = MakeExecutable("make", 8) - self.assertEqual(make(parallel=True, output=str).strip(), "-j8") - self.assertEqual(make("install", parallel=True, output=str).strip(), "-j8 install") - - def test_make_one_job(self): - make = MakeExecutable("make", 1) - self.assertEqual(make(output=str).strip(), "-j1") - self.assertEqual(make("install", output=str).strip(), "-j1 install") - - def test_make_parallel_false(self): - make = MakeExecutable("make", 8) - self.assertEqual(make(parallel=False, output=str).strip(), "-j1") - self.assertEqual(make("install", parallel=False, output=str).strip(), "-j1 install") - - def test_make_parallel_disabled(self): - make = MakeExecutable("make", 8) - - os.environ["SPACK_NO_PARALLEL_MAKE"] = "true" - self.assertEqual(make(output=str).strip(), "-j1") - self.assertEqual(make("install", output=str).strip(), "-j1 install") - - os.environ["SPACK_NO_PARALLEL_MAKE"] = "1" - self.assertEqual(make(output=str).strip(), "-j1") - self.assertEqual(make("install", output=str).strip(), "-j1 install") - - # These don't disable (false and random string) - os.environ["SPACK_NO_PARALLEL_MAKE"] = "false" - self.assertEqual(make(output=str).strip(), "-j8") - self.assertEqual(make("install", output=str).strip(), "-j8 install") - - os.environ["SPACK_NO_PARALLEL_MAKE"] = "foobar" - self.assertEqual(make(output=str).strip(), "-j8") - self.assertEqual(make("install", output=str).strip(), "-j8 install") - - del os.environ["SPACK_NO_PARALLEL_MAKE"] - - def test_make_parallel_precedence(self): - make = MakeExecutable("make", 8) - - # These should work - os.environ["SPACK_NO_PARALLEL_MAKE"] = "true" - self.assertEqual(make(parallel=True, output=str).strip(), "-j1") - self.assertEqual(make("install", parallel=True, output=str).strip(), "-j1 install") - - os.environ["SPACK_NO_PARALLEL_MAKE"] = "1" - self.assertEqual(make(parallel=True, output=str).strip(), "-j1") - self.assertEqual(make("install", parallel=True, output=str).strip(), "-j1 install") - - # These don't disable (false and random string) - os.environ["SPACK_NO_PARALLEL_MAKE"] = "false" - self.assertEqual(make(parallel=True, output=str).strip(), "-j8") - self.assertEqual(make("install", parallel=True, output=str).strip(), "-j8 install") - - os.environ["SPACK_NO_PARALLEL_MAKE"] = "foobar" - self.assertEqual(make(parallel=True, output=str).strip(), "-j8") - self.assertEqual(make("install", parallel=True, output=str).strip(), "-j8 install") - - del os.environ["SPACK_NO_PARALLEL_MAKE"] - - def test_make_jobs_env(self): - make = MakeExecutable("make", 8) - dump_env = {} - self.assertEqual( - make(output=str, jobs_env="MAKE_PARALLELISM", _dump_env=dump_env).strip(), "-j8" - ) - self.assertEqual(dump_env["MAKE_PARALLELISM"], "8") - - def test_make_jobserver(self): - make = MakeExecutable("make", 8) - os.environ["MAKEFLAGS"] = "--jobserver-auth=X,Y" - self.assertEqual(make(output=str).strip(), "") - self.assertEqual(make(parallel=False, output=str).strip(), "-j1") - del os.environ["MAKEFLAGS"] - - def test_make_jobserver_not_supported(self): - make = MakeExecutable("make", 8, supports_jobserver=False) - os.environ["MAKEFLAGS"] = "--jobserver-auth=X,Y" - # Currently fallback on default job count, Maybe it should force -j1 ? - self.assertEqual(make(output=str).strip(), "-j8") - del os.environ["MAKEFLAGS"] +@pytest.fixture(autouse=True) +def make_executable(tmp_path, working_env): + make_exe = tmp_path / "make" + with open(make_exe, "w") as f: + f.write("#!/bin/sh\n") + f.write('echo "$@"') + os.chmod(make_exe, 0o700) + + path_put_first("PATH", [tmp_path]) + + +def test_make_normal(): + make = MakeExecutable("make", 8) + assert make(output=str).strip() == "-j8" + assert make("install", output=str).strip() == "-j8 install" + + +def test_make_explicit(): + make = MakeExecutable("make", 8) + assert make(parallel=True, output=str).strip() == "-j8" + assert make("install", parallel=True, output=str).strip() == "-j8 install" + + +def test_make_one_job(): + make = MakeExecutable("make", 1) + assert make(output=str).strip() == "-j1" + assert make("install", output=str).strip() == "-j1 install" + + +def test_make_parallel_false(): + make = MakeExecutable("make", 8) + assert make(parallel=False, output=str).strip() == "-j1" + assert make("install", parallel=False, output=str).strip() == "-j1 install" + + +def test_make_parallel_disabled(monkeypatch): + make = MakeExecutable("make", 8) + + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "true") + assert make(output=str).strip() == "-j1" + assert make("install", output=str).strip() == "-j1 install" + + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "1") + assert make(output=str).strip() == "-j1" + assert make("install", output=str).strip() == "-j1 install" + + # These don't disable (false and random string) + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "false") + assert make(output=str).strip() == "-j8" + assert make("install", output=str).strip() == "-j8 install" + + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "foobar") + assert make(output=str).strip() == "-j8" + assert make("install", output=str).strip() == "-j8 install" + + +def test_make_parallel_precedence(monkeypatch): + make = MakeExecutable("make", 8) + + # These should work + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "true") + assert make(parallel=True, output=str).strip() == "-j1" + assert make("install", parallel=True, output=str).strip() == "-j1 install" + + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "1") + assert make(parallel=True, output=str).strip() == "-j1" + assert make("install", parallel=True, output=str).strip() == "-j1 install" + + # These don't disable (false and random string) + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "false") + assert make(parallel=True, output=str).strip() == "-j8" + assert make("install", parallel=True, output=str).strip() == "-j8 install" + + monkeypatch.setenv("SPACK_NO_PARALLEL_MAKE", "foobar") + assert make(parallel=True, output=str).strip() == "-j8" + assert make("install", parallel=True, output=str).strip() == "-j8 install" + + +def test_make_jobs_env(): + make = MakeExecutable("make", 8) + dump_env = {} + assert make(output=str, jobs_env="MAKE_PARALLELISM", _dump_env=dump_env).strip() == "-j8" + assert dump_env["MAKE_PARALLELISM"] == "8" + + +def test_make_jobserver(monkeypatch): + make = MakeExecutable("make", 8) + monkeypatch.setenv("MAKEFLAGS", "--jobserver-auth=X,Y") + assert make(output=str).strip() == "" + assert make(parallel=False, output=str).strip() == "-j1" + + +def test_make_jobserver_not_supported(monkeypatch): + make = MakeExecutable("make", 8, supports_jobserver=False) + monkeypatch.setenv("MAKEFLAGS", "--jobserver-auth=X,Y") + # Currently fallback on default job count, Maybe it should force -j1 ? + assert make(output=str).strip() == "-j8" From d768e6ea5cc9b96ffa6457990705667a6328d0e0 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Mon, 27 Nov 2023 09:57:41 -0600 Subject: [PATCH 755/806] Balay/xsdk 1.0.0 updates (#41180) * superlu-dist: add v8.2.1 for xsdk * heffte, phist build fixes on tioga * exago: build fixes on polaris --------- Co-authored-by: Veselin Dobrev --- .../builtin/packages/exago/exago-1.6.0.patch | 18 ++++++++++++++++++ .../repos/builtin/packages/exago/package.py | 2 ++ .../repos/builtin/packages/heffte/package.py | 2 +- .../repos/builtin/packages/phist/package.py | 7 +++++++ .../builtin/packages/superlu-dist/package.py | 1 + .../repos/builtin/packages/xsdk/package.py | 2 +- 6 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/exago/exago-1.6.0.patch diff --git a/var/spack/repos/builtin/packages/exago/exago-1.6.0.patch b/var/spack/repos/builtin/packages/exago/exago-1.6.0.patch new file mode 100644 index 00000000000000..f6b03cec8eb6a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/exago/exago-1.6.0.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 90bddf2e..47ab5998 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -217,11 +217,13 @@ endif(EXAGO_ENABLE_GPU) + if(EXAGO_ENABLE_PETSC) + include(FindPkgConfig) + # Include petsc package path in pkg_config_path ++ set(PKG_CONFIG_PATH_save $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} + ${PETSC_DIR}/lib/pkgconfig:${PETSC_DIR}/${PETSC_ARCH}/lib/pkgconfig + ) + pkg_check_modules(PETSC REQUIRED IMPORTED_TARGET PETSc) + set(EXAGO_HAVE_PETSC 1) ++ set(ENV{PKG_CONFIG_PATH} ${PKG_CONFIG_PATH_save}) + endif() + + # Set install rpath to the locations where EXAGO and PETSc libraries reside. diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index fe7b67cc11d949..abe7f2605a1c29 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -178,6 +178,8 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): depends_on("umpire {0}".format(rocm_dep), when="+raja {0}".format(rocm_dep)) depends_on("camp {0}".format(rocm_dep), when="+raja {0}".format(rocm_dep)) + patch("exago-1.6.0.patch", when="@1.6.0") + flag_handler = build_system_flags def cmake_args(self): diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index df6eb2f948aae2..dd957bb26820c0 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -105,7 +105,7 @@ def cmake_args(self): archs = ";".join(cuda_arch) args.append("-DCMAKE_CUDA_ARCHITECTURES=%s" % archs) - if "+rocm" in self.spec and self.spec.satisfies("@:2.3.0"): + if "+rocm" in self.spec: args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc)) rocm_arch = self.spec.variants["amdgpu_target"].value diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py index a67deddebd3557..338680e772cb69 100644 --- a/var/spack/repos/builtin/packages/phist/package.py +++ b/var/spack/repos/builtin/packages/phist/package.py @@ -235,6 +235,13 @@ def patch(self): test.filter("1 2 3 12", "1 2 3") test.filter("12/", "6/") test.filter("TEST_DRIVERS_NUM_THREADS 6", "TEST_DRIVERS_NUM_THREADS 3") + # Avoid finding external modules like: + # /opt/rocm/llvm/include/iso_fortran_env.mod + filter_file( + "use iso_fortran_env", + "use, intrinsic :: iso_fortran_env", + "drivers/matfuncs/matpde3d.F90", + ) def setup_build_environment(self, env): env.set("SPACK_SBANG", sbang.sbang_install_path()) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 7336f4ed8850ff..6e46ba14307e4d 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -20,6 +20,7 @@ class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): version("develop", branch="master") version("amd", branch="amd") + version("8.2.1", sha256="b77d065cafa6bc1a1dcc15bf23fd854f54b05762b165badcffc195835ad2bddf") version("8.2.0", sha256="d53573e5a399b2b4ab1fcc36e8421c1b6fab36345c0af14f8fa20326e3365f1f") version("8.1.2", sha256="7b16c442bb01ea8b298c0aab9a2584aa4615d09786aac968cb2f3118c058206b") version("8.1.1", sha256="766d70b84ece79d88249fe10ff51d2a397a29f274d9fd1e4a4ac39179a9ef23f") diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py index 2087df88a14c5e..6b3ec2c126d6a6 100644 --- a/var/spack/repos/builtin/packages/xsdk/package.py +++ b/var/spack/repos/builtin/packages/xsdk/package.py @@ -146,7 +146,7 @@ class Xsdk(BundlePackage, CudaPackage, ROCmPackage): ) xsdk_depends_on("superlu-dist@develop", when="@develop", cuda_var="cuda", rocm_var="rocm") - xsdk_depends_on("superlu-dist@8.2.0", when="@1.0.0", cuda_var="cuda", rocm_var="rocm") + xsdk_depends_on("superlu-dist@8.2.1", when="@1.0.0", cuda_var="cuda", rocm_var="rocm") xsdk_depends_on("superlu-dist@8.1.2", when="@0.8.0") xsdk_depends_on("superlu-dist@7.1.1", when="@0.7.0") From e0ef78b26ee2633b5ecacddf8a207a52b39b66cc Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 27 Nov 2023 17:36:00 +0100 Subject: [PATCH 756/806] docs: refer to oci build cache from containers.rst (#41269) --- lib/spack/docs/binary_caches.rst | 1 + lib/spack/docs/containers.rst | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib/spack/docs/binary_caches.rst b/lib/spack/docs/binary_caches.rst index eeb6c4b783c8d1..dcc09910c74080 100644 --- a/lib/spack/docs/binary_caches.rst +++ b/lib/spack/docs/binary_caches.rst @@ -182,6 +182,7 @@ section of the configuration: padded_length: 128 +.. _binary_caches_oci: ----------------------------------------- OCI / Docker V2 registries as build cache diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst index 64ca1df926bbec..acf48e3eae2c20 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -24,6 +24,16 @@ image, or to set up a proper entrypoint to run the image. These tasks are usually both necessary and repetitive, so Spack comes with a command to generate recipes for container images starting from a ``spack.yaml``. +.. seealso:: + + This page is a reference for generating recipes to build container images. + It means that your environment is built from scratch inside the container + runtime. + + Since v0.21, Spack can also create container images from existing package installations + on your host system. See :ref:`binary_caches_oci` for more information on + that topic. + -------------------- A Quick Introduction -------------------- From bd3a1d28bf711d01cba03880267e83a04d7c0276 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:43:39 +0100 Subject: [PATCH 757/806] Simplify a few CMakePackages by removing redundant directives (#41163) Co-authored-by: jmcarcell --- var/spack/repos/builtin/packages/crtm/package.py | 7 ------- var/spack/repos/builtin/packages/draco/package.py | 6 ------ var/spack/repos/builtin/packages/libtree/package.py | 6 ------ 3 files changed, 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/crtm/package.py b/var/spack/repos/builtin/packages/crtm/package.py index 208e6e235982f7..60ff3bfd4897bc 100644 --- a/var/spack/repos/builtin/packages/crtm/package.py +++ b/var/spack/repos/builtin/packages/crtm/package.py @@ -28,13 +28,6 @@ class Crtm(CMakePackage): variant( "fix", default=False, description='Download CRTM coeffecient or "fix" files (several GBs).' ) - variant( - "build_type", - default="RelWithDebInfo", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - depends_on("cmake@3.15:") depends_on("git-lfs") depends_on("netcdf-fortran", when="@2.4.0:") diff --git a/var/spack/repos/builtin/packages/draco/package.py b/var/spack/repos/builtin/packages/draco/package.py index c81c124257acb6..dbe118e550f871 100644 --- a/var/spack/repos/builtin/packages/draco/package.py +++ b/var/spack/repos/builtin/packages/draco/package.py @@ -41,12 +41,6 @@ class Draco(CMakePackage): version("6.20.1", sha256="b1c51000c9557e0818014713fce70d681869c50ed9c4548dcfb2e9219c354ebe") version("6.20.0", sha256="a6e3142c1c90b09c4ff8057bfee974369b815122b01d1f7b57888dcb9b1128f6") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("caliper", default=False, description="Enable caliper timers support") variant("cuda", default=False, description="Enable Cuda/GPU support") variant("eospac", default=True, description="Enable EOSPAC support") diff --git a/var/spack/repos/builtin/packages/libtree/package.py b/var/spack/repos/builtin/packages/libtree/package.py index 8cc847ae1f81e5..d79243c45899bb 100644 --- a/var/spack/repos/builtin/packages/libtree/package.py +++ b/var/spack/repos/builtin/packages/libtree/package.py @@ -54,12 +54,6 @@ def url_for_version(self, version): with when("build_system=cmake"): variant("chrpath", default=False, description="Use chrpath for deployment") variant("strip", default=False, description="Use binutils strip for deployment") - variant( - "build_type", - default="RelWithDebInfo", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) depends_on("googletest", type="test") depends_on("cmake@3:", type="build") depends_on("chrpath", when="+chrpath", type="run") From b4bafbbf7e41bd7b24791e3069565348ac86036b Mon Sep 17 00:00:00 2001 From: Dave Keeshan <96727608+davekeeshan@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:24:49 +0000 Subject: [PATCH 758/806] verilator: add v5.018 (#41256) Add all version since 4.108, deprecate previous version, issues with flex, switch from veripool to github for releases --- .../builtin/packages/verilator/package.py | 50 ++++++++++++++++--- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/verilator/package.py b/var/spack/repos/builtin/packages/verilator/package.py index 90b1f04a2fb524..0890517560f436 100644 --- a/var/spack/repos/builtin/packages/verilator/package.py +++ b/var/spack/repos/builtin/packages/verilator/package.py @@ -33,20 +33,54 @@ class Verilator(AutotoolsPackage): designs with thousands of modules.""" homepage = "https://www.veripool.org/projects/verilator" - url = "https://www.veripool.org/ftp/verilator-3.920.tgz" + url = "https://github.com/verilator/verilator/archive/refs/tags/v5.018.tar.gz" + git = "https://github.com/verilator/verilator.git" - version("4.108", sha256="8e8ec1de0bf200b6206035214f9071a5acc64bd2e7134361d564271e48552702") - version("4.020", sha256="abd79fc2a54cab9da33dfccd669bda3baa71e79060abec17517f0b7374dbc31a") - version("3.920", sha256="2b5c38aa432d0766a38475219f9548d64d18104ce8bdcb5d29e42f5da06943ff") - version("3.904", sha256="ea95e08b2d70682ad42e6c2f5ba99f59b2e7b220791214076099cdf6b7a8c1cb") + maintainers("davekeeshan") + version("master", branch="master") + + version("5.018", sha256="8b544273eedee379e3c1a3bb849e14c754c9b5035d61ad03acdf3963092ba6c0") + version("5.016", sha256="66fc36f65033e5ec904481dd3d0df56500e90c0bfca23b2ae21b4a8d39e05ef1") + version("5.014", sha256="36e16c8a7c4b376f88d87411cea6ee68710e6d1382a13faf21f35d65b54df4a7") + version("5.012", sha256="db19a7d7615b37d9108654e757427e4c3f44e6e973ed40dd5e0e80cc6beb8467") + version("5.010", sha256="ca82b57ce2d2b34eed3f04d5daf7eae6ad41276cda88efbb59ebd6467e65d635") + version("5.008", sha256="1d19f4cd186eec3dfb363571e3fe2e6d3377386ead6febc6ad45402f0634d2a6") + version("5.006", sha256="eb4ca4157ba854bc78c86173c58e8bd13311984e964006803dd45dc289450cfe") + version("5.004", sha256="7d193a09eebefdbec8defaabfc125663f10cf6ab0963ccbefdfe704a8a4784d2") + version("5.002", sha256="72d68469fc1262e6288d099062b960a2f65e9425bdb546cba141a2507decd951") + version("4.228", sha256="be6af6572757013802be5b0ff9c64cbf509e98066737866abaae692fe04edf09") + version("4.226", sha256="70bc941d86e4810253d51aa94898b0802d916ab76296a398f8ceb8798122c9be") + version("4.224", sha256="010ff2b5c76d4dbc2ed4a3278a5599ba35c8ed4c05690e57296d6b281591367b") + version("4.222", sha256="15c60175807c0f3536c3c5b435f131c2b1e8725aefd30645efd946bf401b4c84") + version("4.220", sha256="e00e0c31a0c00887bebbaf7a8c771efa09420a4d1fbae54d45843baf50df4426") + version("4.218", sha256="ef7b1e6ddb715ddb3cc998fcbefc7150cfa2efc5118cf43ddb594bf41ea41cc7") + version("4.216", sha256="64e5093b629a7e96178e3b2494f208955f218dfac6f310a91e4fc07d050c980b") + version("4.214", sha256="e14c7f6ffb00a6746ae2a8ea0424e90a1a30067e8ae4c96b8c42689ca1ca0b1f") + version("4.212", sha256="7b655859e4e75c9673141aede8f5a20f47e4c380055d1a588d5be60cbbc73619") + version("4.210", sha256="3a2e6f27a5d80116a268ba054a3be61aca924bc54c5556ea25e75ee974201abb") + version("4.204", sha256="dbad9bd3cac34e63bbd945fff9a59eaabe31dae1e1c93c847d0f894db9919498") + version("4.202", sha256="a60c02f299ddb5bb8e963dc7d81983c55c293d97718685c1cd4b66638a33d98e") + version("4.200", sha256="2cd0fd48152f152d0487eaac23803d35ff75e924734435b366a523deb1185407") + version("4.110", sha256="603c23944577a5d53a2e09191d04d5c61740a77b58f3a590a70e56f4526a5a0b") + version("4.108", sha256="ce521dc57754e5a325ff7000c434ce23674c8e1de30e1f2a6506dc3a33bd7c55") + + depends_on("autoconf", type="build") + depends_on("automake", type="build") + depends_on("libtool", type="build") + depends_on("help2man", type="build") depends_on("bison", type="build") - depends_on("flex") + depends_on("flex", type="build") + depends_on("ccache", type=("build", "run"), when="@5.018:") depends_on("perl", type=("build", "run")) + depends_on("bash", type="build") def setup_run_environment(self, env): env.prepend_path("VERILATOR_ROOT", self.prefix) + def autoreconf(self, spec, prefix): + which("bash")("autoconf") + # verilator requires access to its shipped scripts (bin) and include # but the standard make doesn't put it in the correct places @run_before("install") @@ -60,11 +94,11 @@ def install_include(self): def patch_cxx(self): filter_file( r"^CXX\s*=.*", - "CXX = {0}".format(self.compiler.cxx), + f"CXX={self.compiler.cxx}", join_path(self.prefix.include, "verilated.mk"), ) filter_file( r"^LINK\s*=.*", - "LINK = {0}".format(self.compiler.cxx), + f"LINK={self.compiler.cxx}", join_path(self.prefix.include, "verilated.mk"), ) From 3d744e7c951eab4fa70b95c15c5cabc969dd47b3 Mon Sep 17 00:00:00 2001 From: Andrey Perestoronin Date: Mon, 27 Nov 2023 18:13:04 +0000 Subject: [PATCH 759/806] intel-oneapi 2024.0.0: added new version to packages (#41135) * oneapi 2024.0.0 release * oneapi v2 directory support and some cleanups * sycl abi change requires 2024 compilers for packages that use sycl --------- Co-authored-by: Robert Cohn --- .../docs/build_systems/inteloneapipackage.rst | 25 ++++-- lib/spack/spack/build_systems/oneapi.py | 53 +++++++----- lib/spack/spack/compilers/oneapi.py | 12 +++ .../stacks/e4s-oneapi/spack.yaml | 3 + .../packages/intel-oneapi-advisor/package.py | 10 +++ .../packages/intel-oneapi-ccl/package.py | 10 +++ .../intel-oneapi-compilers-classic/package.py | 4 +- .../intel-oneapi-compilers/package.py | 85 ++++++++++++++----- .../packages/intel-oneapi-dal/package.py | 10 +++ .../packages/intel-oneapi-dnn/package.py | 23 ++++- .../packages/intel-oneapi-dpct/package.py | 10 +++ .../packages/intel-oneapi-dpl/package.py | 20 +++-- .../intel-oneapi-inspector/package.py | 10 +++ .../packages/intel-oneapi-ipp/package.py | 10 +++ .../packages/intel-oneapi-ippcp/package.py | 10 +++ .../packages/intel-oneapi-itac/package.py | 10 +++ .../packages/intel-oneapi-mkl/package.py | 24 ++++-- .../packages/intel-oneapi-mpi/package.py | 24 +++++- .../packages/intel-oneapi-tbb/package.py | 16 ++++ .../packages/intel-oneapi-vpl/package.py | 6 ++ .../packages/intel-oneapi-vtune/package.py | 10 +++ 21 files changed, 313 insertions(+), 72 deletions(-) diff --git a/lib/spack/docs/build_systems/inteloneapipackage.rst b/lib/spack/docs/build_systems/inteloneapipackage.rst index e9fd26690f9ddb..ccf7d5e393fa2f 100644 --- a/lib/spack/docs/build_systems/inteloneapipackage.rst +++ b/lib/spack/docs/build_systems/inteloneapipackage.rst @@ -53,18 +53,24 @@ Install the oneAPI compilers:: Add the compilers to your ``compilers.yaml`` so spack can use them:: - spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64 - spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/bin Verify that the compilers are available:: spack compiler list +Note that 2024 and later releases do not include ``icc``. Before 2024, +the package layout was different:: + + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64 + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin + The ``intel-oneapi-compilers`` package includes 2 families of compilers: * ``intel``: ``icc``, ``icpc``, ``ifort``. Intel's *classic* - compilers. + compilers. 2024 and later releases contain ``ifort``, but not + ``icc`` and ``icpc``. * ``oneapi``: ``icx``, ``icpx``, ``ifx``. Intel's new generation of compilers based on LLVM. @@ -89,8 +95,8 @@ Install the oneAPI compilers:: Add the compilers to your ``compilers.yaml`` so Spack can use them:: - spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64 - spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/bin + spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/bin Verify that the compilers are available:: @@ -146,8 +152,7 @@ Compilers To use the compilers, add some information about the installation to ``compilers.yaml``. For most users, it is sufficient to do:: - spack compiler add /opt/intel/oneapi/compiler/latest/linux/bin/intel64 - spack compiler add /opt/intel/oneapi/compiler/latest/linux/bin + spack compiler add /opt/intel/oneapi/compiler/latest/bin Adapt the paths above if you did not install the tools in the default location. After adding the compilers, using them is the same @@ -156,6 +161,12 @@ Another option is to manually add the configuration to ``compilers.yaml`` as described in :ref:`Compiler configuration `. +Before 2024, the directory structure was different:: + + spack compiler add /opt/intel/oneapi/compiler/latest/linux/bin/intel64 + spack compiler add /opt/intel/oneapi/compiler/latest/linux/bin + + Libraries --------- diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py index f90312f5796e15..234a4c9ae0be26 100644 --- a/lib/spack/spack/build_systems/oneapi.py +++ b/lib/spack/spack/build_systems/oneapi.py @@ -7,9 +7,9 @@ import os import platform import shutil -from os.path import basename, dirname, isdir +from os.path import basename, isdir -from llnl.util.filesystem import find_headers, find_libraries, join_path, mkdirp +from llnl.util.filesystem import HeaderList, find_libraries, join_path, mkdirp from llnl.util.link_tree import LinkTree from spack.directives import conflicts, variant @@ -55,10 +55,21 @@ def component_dir(self): """Subdirectory for this component in the install prefix.""" raise NotImplementedError + @property + def v2_layout_versions(self): + """Version that implements the v2 directory layout.""" + raise NotImplementedError + + @property + def v2_layout(self): + """Returns true if this version implements the v2 directory layout.""" + return self.spec.satisfies(self.v2_layout_versions) + @property def component_prefix(self): """Path to component //.""" - return self.prefix.join(join_path(self.component_dir, self.spec.version)) + v = self.spec.version.up_to(2) if self.v2_layout else self.spec.version + return self.prefix.join(self.component_dir).join(str(v)) @property def env_script_args(self): @@ -112,8 +123,9 @@ def install_component(self, installer_path): shutil.rmtree("/var/intel/installercache", ignore_errors=True) # Some installers have a bug and do not return an error code when failing - if not isdir(join_path(self.prefix, self.component_dir)): - raise RuntimeError("install failed") + install_dir = self.component_prefix + if not isdir(install_dir): + raise RuntimeError("install failed to directory: {0}".format(install_dir)) def setup_run_environment(self, env): """Adds environment variables to the generated module file. @@ -128,7 +140,7 @@ def setup_run_environment(self, env): if "~envmods" not in self.spec: env.extend( EnvironmentModifications.from_sourcing_file( - join_path(self.component_prefix, "env", "vars.sh"), *self.env_script_args + self.component_prefix.env.join("vars.sh"), *self.env_script_args ) ) @@ -167,16 +179,21 @@ class IntelOneApiLibraryPackage(IntelOneApiPackage): """ + def header_directories(self, dirs): + h = HeaderList([]) + h.directories = dirs + return h + @property def headers(self): - include_path = join_path(self.component_prefix, "include") - return find_headers("*", include_path, recursive=True) + return self.header_directories( + [self.component_prefix.include, self.component_prefix.include.join(self.component_dir)] + ) @property def libs(self): - lib_path = join_path(self.component_prefix, "lib", "intel64") - lib_path = lib_path if isdir(lib_path) else dirname(lib_path) - return find_libraries("*", root=lib_path, shared=True, recursive=True) + # for v2_layout all libraries are in the top level, v1 sometimes put them in intel64 + return find_libraries("*", root=self.component_prefix.lib, recursive=not self.v2_layout) class IntelOneApiLibraryPackageWithSdk(IntelOneApiPackage): @@ -189,23 +206,13 @@ class IntelOneApiLibraryPackageWithSdk(IntelOneApiPackage): """ - @property - def include(self): - return join_path(self.component_prefix, "sdk", "include") - @property def headers(self): - return find_headers("*", self.include, recursive=True) - - @property - def lib(self): - lib_path = join_path(self.component_prefix, "sdk", "lib64") - lib_path = lib_path if isdir(lib_path) else dirname(lib_path) - return lib_path + return self.header_directories([self.component_prefix.sdk.include]) @property def libs(self): - return find_libraries("*", root=self.lib, shared=True, recursive=True) + return find_libraries("*", self.component_prefix.sdk.lib64) class IntelOneApiStaticLibraryList: diff --git a/lib/spack/spack/compilers/oneapi.py b/lib/spack/spack/compilers/oneapi.py index fde6fa677ae7ad..63eb3859831eb3 100644 --- a/lib/spack/spack/compilers/oneapi.py +++ b/lib/spack/spack/compilers/oneapi.py @@ -6,6 +6,8 @@ import os from os.path import dirname +from llnl.util import tty + from spack.compiler import Compiler @@ -135,3 +137,13 @@ def setup_custom_environment(self, pkg, env): # Executable "sycl-post-link" doesn't exist! if self.cxx: env.prepend_path("PATH", dirname(self.cxx)) + + # 2024 release bumped the libsycl version because of an ABI + # change, 2024 compilers are required. You will see this + # error: + # + # /usr/bin/ld: warning: libsycl.so.7, needed by ...., not found + if pkg.spec.satisfies("%oneapi@:2023"): + for c in ["dnn"]: + if pkg.spec.satisfies(f"^intel-oneapi-{c}@2024:"): + tty.warn(f"intel-oneapi-{c}@2024 SYCL APIs requires %oneapi@2024:") diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index 88df9e5e8f37ef..eae204527ce5a6 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -64,6 +64,9 @@ spack: require: "%gcc" bison: require: '%gcc' + # sycl abi change means you need 2024 compiler to use 2024 mkl + intel-oneapi-mkl: + require: "@2023" specs: # CPU diff --git a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py index 01410cd18d6fb8..7cc61247935885 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py @@ -24,6 +24,12 @@ class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/advisor.html" ) + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/88c5bdaa-7a2d-491f-9871-7170fadc3d52/l_oneapi_advisor_p_2024.0.0.49522_offline.sh", + sha256="0ef3cf39c2fbb39371ac2470dad7d0d8cc0a2709c4f78dcab58d115b446c81c4", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/0b0e8bf2-30e4-4a26-b1ef-e369b0181b35/l_oneapi_advisor_p_2023.2.0.49489_offline.sh", @@ -73,6 +79,10 @@ class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk): expand=False, ) + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "advisor" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py index 2d300a55ff63ef..35f31c095ff480 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py @@ -27,6 +27,12 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage): depends_on("intel-oneapi-mpi") + version( + "2021.11.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/9e63eba5-2b3d-4032-ad22-21f02e35b518/l_oneapi_ccl_p_2021.11.0.49161_offline.sh", + sha256="35fde9862d620c211064addfd3c15c4fc33bcaac6fe050163eb59a006fb9d476", + expand=False, + ) version( "2021.10.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/3230823d-f799-4d1f-8ef3-a17f086a7719/l_oneapi_ccl_p_2021.10.0.49084_offline.sh", @@ -100,6 +106,10 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage): expand=False, ) + @property + def v2_layout_versions(self): + return "@2021.11:" + @property def component_dir(self): return "ccl" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py index 4fca5381e6f7ef..656417e38b9a86 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers-classic/package.py @@ -36,8 +36,10 @@ class IntelOneapiCompilersClassic(Package): "2021.8.0": "2023.0.0", "2021.9.0": "2023.1.0", "2021.10.0": "2023.2.0", + "2021.11.0": "2024.0.0", }.items(): - version(ver) + # prefer 2021.10.0 because it is the last one that has a C compiler + version(ver, preferred=(ver == "2021.10.0")) depends_on("intel-oneapi-compilers@" + oneapi_ver, when="@" + ver, type="run") # icc@2021.6.0 does not support gcc@12 headers diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 84b65a576181e0..2c3c460a2ae525 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -7,6 +7,17 @@ from spack.package import * versions = [ + { + "version": "2024.0.0", + "cpp": { + "url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/5c8e686a-16a7-4866-b585-9cf09e97ef36/l_dpcpp-cpp-compiler_p_2024.0.0.49524_offline.sh", + "sha256": "d10bad2009c98c631fbb834aae62012548daeefc806265ea567316cd9180a684", + }, + "ftn": { + "url": "https://registrationcenter-download.intel.com/akdlm//IRC_NAS/89b0fcf9-5c00-448a-93a1-5ee4078e008e/l_fortran-compiler_p_2024.0.0.49493_offline.sh", + "sha256": "57faf854b8388547ee4ef2db387a9f6f3b4d0cebd67b765cf5e844a0a970d1f9", + }, + }, { "version": "2023.2.1", "cpp": { @@ -182,13 +193,29 @@ class IntelOneapiCompilers(IntelOneApiPackage): **v["ftn"], ) + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "compiler" + @property + def _llvm_bin(self): + return self.component_prefix.bin if self.v2_layout else self.component_prefix.linux.bin + + @property + def _classic_bin(self): + return ( + self.component_prefix.bin + if self.v2_layout + else self.component_prefix.linux.bin.intel64 + ) + @property def compiler_search_prefix(self): - return self.prefix.compiler.join(str(self.version)).linux.bin + return self._llvm_bin def setup_run_environment(self, env): """Adds environment variables to the generated module file. @@ -203,14 +230,15 @@ def setup_run_environment(self, env): """ super().setup_run_environment(env) - env.set("CC", self.component_prefix.linux.bin.icx) - env.set("CXX", self.component_prefix.linux.bin.icpx) - env.set("F77", self.component_prefix.linux.bin.ifx) - env.set("FC", self.component_prefix.linux.bin.ifx) + env.set("CC", self._llvm_bin.icx) + env.set("CXX", self._llvm_bin.icpx) + env.set("F77", self._llvm_bin.ifx) + env.set("FC", self._llvm_bin.ifx) def install(self, spec, prefix): # Copy instead of install to speed up debugging # install_tree("/opt/intel/oneapi/compiler", self.prefix) + # return # install cpp super().install(spec, prefix) @@ -219,13 +247,28 @@ def install(self, spec, prefix): self.install_component(find("fortran-installer", "*")[0]) # Some installers have a bug and do not return an error code when failing - if not is_exe(self.component_prefix.linux.bin.intel64.ifort): - raise RuntimeError("install failed") + if not is_exe(self._llvm_bin.ifx): + raise RuntimeError("Fortran install failed") @run_after("install") def inject_rpaths(self): - # Sets rpath so the compilers can work without setting LD_LIBRARY_PATH. + # The oneapi compilers cannot find their own internal shared + # libraries. If you are using an externally installed oneapi, + # then you need to source setvars.sh, which will set + # LD_LIBRARY_PATH. If you are using spack to install the + # compilers, then we patch the binaries that have this + # problem. Over time, intel has corrected most of the + # issues. I am using the 2024 release as a milestone to stop + # patching everything and just patching the binaries that have + # a problem. patchelf = which("patchelf") + if self.spec.satisfies("@2024:"): + patchelf.add_default_arg("--set-rpath", self.component_prefix.lib) + patchelf(self.component_prefix.bin.join("sycl-post-link")) + patchelf(self.component_prefix.bin.compiler.join("llvm-spirv")) + return + + # Sets rpath so the compilers can work without setting LD_LIBRARY_PATH. patchelf.add_default_arg("--set-rpath", ":".join(self._ld_library_path())) for pd in ["bin", "lib", join_path("compiler", "lib", "intel64_lin")]: for file in find(self.component_prefix.linux.join(pd), "*", recursive=False): @@ -254,7 +297,10 @@ def extend_config_flags(self): # TODO: it is unclear whether we should really use all elements of # _ld_library_path because it looks like the only rpath that needs to be # injected is self.component_prefix.linux.compiler.lib.intel64_lin. - common_flags = ["-Wl,-rpath,{}".format(d) for d in self._ld_library_path()] + if self.v2_layout: + common_flags = ["-Wl,-rpath,{}".format(self.component_prefix.lib)] + else: + common_flags = ["-Wl,-rpath,{}".format(d) for d in self._ld_library_path()] # Make sure that underlying clang gets the right GCC toolchain by default llvm_flags = ["--gcc-toolchain={}".format(self.compiler.prefix)] @@ -266,20 +312,17 @@ def extend_config_flags(self): # The cfg flags are treated as command line flags apparently. Newer versions # do not trigger these warnings. In some build systems these warnings can # cause feature detection to fail, so we silence them with -Wno-unused-... - if self.spec.version < Version("2022.1.0"): + if self.spec.satisfies("@:2022.0"): llvm_flags.append("-Wno-unused-command-line-argument") - self.write_config_file( - common_flags + llvm_flags, self.component_prefix.linux.bin, ["icx", "icpx"] - ) - self.write_config_file( - common_flags + classic_flags, self.component_prefix.linux.bin, ["ifx"] - ) - self.write_config_file( - common_flags + classic_flags, - self.component_prefix.linux.bin.intel64, - ["icc", "icpc", "ifort"], - ) + 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._classic_bin, ["ifort"]) + # 2023 is the last release that includes icc + if self.spec.satisfies("@:2023"): + self.write_config_file( + common_flags + classic_flags, self._classic_bin, ["icc", "icpc"] + ) def _ld_library_path(self): # Returns an iterable of directories that might contain shared runtime libraries diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py index 29984f04381c80..e6ed1d37931ba4 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py @@ -26,6 +26,12 @@ class IntelOneapiDal(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onedal.html" ) + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/37364086-b3cd-4a54-8736-7893732c1a86/l_daal_oneapi_p_2024.0.0.49569_offline.sh", + sha256="45e71c7cbf38b04a34c47e36e2d86a48847f2f0485bafbc3445077a9ba3fa73c", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fa218373-4b06-451f-8f4c-66b7d14b8e8b/l_daal_oneapi_p_2023.2.0.49574_offline.sh", @@ -104,6 +110,10 @@ class IntelOneapiDal(IntelOneApiLibraryPackage): provides("daal") provides("onedal") + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "dal" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py index 0c8a0aeb76f513..f5df8d90cfb2d1 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py @@ -26,6 +26,12 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onednn.html" ) + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/dc309221-d210-4f3a-9406-d897df8deab8/l_onednn_p_2024.0.0.49548_offline.sh", + sha256="17fbd5cc5d08de33625cf2879c0cceec53c91bbcd0b863e8f29d27885bac88c9", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2d218b97-0175-4f8c-8dba-b528cec24d55/l_onednn_p_2023.2.0.49517_offline.sh", @@ -101,16 +107,25 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage): depends_on("tbb") + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "dnnl" + def __target(self): + if self.v2_layout: + return self.component_prefix + else: + return self.component_prefix.cpu_dpcpp_gpu_dpcpp + @property def headers(self): - include_path = join_path(self.component_prefix, "cpu_dpcpp_gpu_dpcpp", "include") - return find_headers("dnnl", include_path) + return find_headers("dnnl", self.__target().include) @property def libs(self): - lib_path = join_path(self.component_prefix, "cpu_dpcpp_gpu_dpcpp", "lib") - return find_libraries(["libdnnl", "libmkldnn"], root=lib_path, shared=True) + # libmkldnn was removed before 2024, but not sure when + return find_libraries(["libdnnl", "libmkldnn"], self.__target().lib) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py index 3c4fa410f598bb..d784358ac19570 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpct/package.py @@ -19,6 +19,12 @@ class IntelOneapiDpct(IntelOneApiPackage): homepage = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compatibility-tool.html#gs.2p8km6" + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/6633bc4b-5356-471a-9aae-d5e63e7acd95/l_dpcpp-ct_p_2024.0.0.49394_offline.sh", + sha256="5fdba92edf24084187d98f083f9a6e17ee6b33ad8a736d6c9cdd3dbd4e0eab8a", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/764119eb-2959-4b51-bb3c-3cf581c16186/l_dpcpp-ct_p_2023.2.0.49333_offline.sh", @@ -56,6 +62,10 @@ class IntelOneapiDpct(IntelOneApiPackage): expand=False, ) + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "dpcpp-ct" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py index 05282f92f4c4b4..d71688eda1d5a9 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py @@ -22,6 +22,12 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage): homepage = "https://github.com/oneapi-src/oneDPL" + version( + "2022.3.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/be027095-148a-4433-aff4-c6e8582da3ca/l_oneDPL_p_2022.3.0.49386_offline.sh", + sha256="1e40c6562bc41fa5a46c80c09222bf12d36d8e82f749476d0a7e97503d4659df", + expand=False, + ) version( "2022.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/44f88a97-7526-48f0-8515-9bf1356eb7bb/l_oneDPL_p_2022.2.0.49287_offline.sh", @@ -77,16 +83,16 @@ class IntelOneapiDpl(IntelOneApiLibraryPackage): expand=False, ) + @property + def v2_layout_versions(self): + return "@2022.3:" + @property def component_dir(self): return "dpl" @property def headers(self): - include_path = join_path(self.component_prefix, "linux", "include") - headers = find_headers("*", include_path, recursive=True) - # Force this directory to be added to include path, even - # though no files are here because all includes are relative - # to this path - headers.directories = [include_path] - return headers + return self.header_directories( + [self.component_prefix.include, self.component_prefix.linux.include] + ) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py b/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py index 9f376cffc7809b..4c1870af6b7682 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-inspector/package.py @@ -24,6 +24,12 @@ class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/inspector.html" + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/44ae6846-719c-49bd-b196-b16ce5835a1e/l_inspector_oneapi_p_2024.0.0.49433_offline.sh", + sha256="2b281c3a704a242aa3372284960ea8ed5ed1ba293cc2f70c2f873db3300c80a3", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/2a99eafd-5109-41a1-9762-aee0c7ecbeb7/l_inspector_oneapi_p_2023.2.0.49304_offline.sh", @@ -79,6 +85,10 @@ class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk): expand=False, ) + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "inspector" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py index c29fb423b21a2f..2e8e561c60e053 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py @@ -27,6 +27,12 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" ) + version( + "2021.10.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/2d48c7d9-e716-4c73-8fe5-77a9599a405f/l_ipp_oneapi_p_2021.10.0.670_offline.sh", + sha256="c4ad98f96760b0a821dbcd59963c5148fd9dc4eb790af0e6e765a5f36525d202", + expand=False, + ) version( "2021.9.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/616a3fba-4ab6-4317-a17b-2be4b737fc37/l_ipp_oneapi_p_2021.9.0.49454_offline.sh", @@ -104,6 +110,10 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage): provides("ipp") + @property + def v2_layout_versions(self): + return "@2021.10:" + @property def component_dir(self): return "ipp" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py index 4d0d6fe3c20733..7a38dd262e793a 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py @@ -28,6 +28,12 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html" ) + version( + "2021.9.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/6792a758-2d69-4ff3-ad24-233fb3bf56e4/l_ippcp_oneapi_p_2021.9.0.533_offline.sh", + sha256="5eca6fd18d9117f8cb7c599cee418b9cc3d7d5d5404f1350d47289095b6a1254", + expand=False, + ) version( "2021.8.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/f488397a-bd8f-449f-9127-04de8426aa35/l_ippcp_oneapi_p_2021.8.0.49493_offline.sh", @@ -101,6 +107,10 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage): expand=False, ) + @property + def v2_layout_versions(self): + return "@2021.9:" + @property def component_dir(self): return "ippcp" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py b/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py index 3b53af927348de..742afb4ffe4c79 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-itac/package.py @@ -27,6 +27,12 @@ class IntelOneapiItac(IntelOneApiPackage): maintainers("rscohn2") + version( + "2022.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/e83526f5-7e0f-4708-9e0d-47f1e65f29aa/l_itac_oneapi_p_2022.0.0.49690_offline.sh", + sha256="6ab2888afcfc981273aed3df316463fbaf511faf83ee091ca79016459b03b79e", + expand=False, + ) version( "2021.10.0", url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/226adf12-b7f6-407e-95a9-8e9ab76d7631/l_itac_oneapi_p_2021.10.0.14_offline.sh", @@ -58,6 +64,10 @@ class IntelOneapiItac(IntelOneApiPackage): expand=False, ) + @property + def v2_layout_versions(self): + return "@2022:" + @property def component_dir(self): return "itac" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index db3fdd6d7ea8c0..0be9195efa2bdf 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -25,6 +25,12 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html" ) + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/86d6a4c1-c998-4c6b-9fff-ca004e9f7455/l_onemkl_p_2024.0.0.49673_offline.sh", + sha256="2a3be7d01d75ba8cc3059f9a32ae72e5bfc93e68e72e94e79d7fa6ea2f7814de", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/adb8a02c-4ee7-4882-97d6-a524150da358/l_onemkl_p_2023.2.0.49497_offline.sh", @@ -129,12 +135,12 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): provides("lapack", "blas") @property - def component_dir(self): - return "mkl" + def v2_layout_versions(self): + return "@2024:" @property - def headers(self): - return find_headers("*", self.component_prefix.include) + def component_dir(self): + return "mkl" @property def libs(self): @@ -198,7 +204,9 @@ def _find_mkl_libs(self, shared): ) ) - lib_path = self.component_prefix.lib.intel64 + lib_path = ( + self.component_prefix.lib if self.v2_layout else self.component_prefix.lib.intel64 + ) lib_path = lib_path if isdir(lib_path) else dirname(lib_path) resolved_libs = find_libraries(libs, lib_path, shared=shared) @@ -219,5 +227,11 @@ def _xlp64_lib(self, lib): @run_after("install") def fixup_prefix(self): + # The motivation was to provide a more standard layout so mkl + # would be more likely to work as a virtual dependence. I am + # not sure if this mechanism is useful and it became a problem + # for mpi so disabling for v2_layout. + if self.v2_layout: + return self.symlink_dir(self.component_prefix.include, self.prefix.include) self.symlink_dir(self.component_prefix.lib, self.prefix.lib) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py index fab6c8ca1f466b..2de3c5f7e894bc 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py @@ -21,6 +21,12 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html" + version( + "2021.11.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/2c45ede0-623c-4c8e-9e09-bed27d70fa33/l_mpi_oneapi_p_2021.11.0.49513_offline.sh", + sha256="9a96caeb7abcf5aa08426216db38a2c7936462008b9825036266bc79cb0e30d8", + expand=False, + ) version( "2021.10.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/4f5871da-0533-4f62-b563-905edfb2e9b7/l_mpi_oneapi_p_2021.10.0.49374_offline.sh", @@ -107,6 +113,10 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage): provides("mpi@:3.1") + @property + def v2_layout_versions(self): + return "@2021.11:" + @property def component_dir(self): return "mpi" @@ -155,10 +165,9 @@ def setup_dependent_build_environment(self, env, dependent_spec): @property def headers(self): - headers = find_headers("*", self.component_prefix.include) - if "+ilp64" in self.spec: - headers += find_headers("*", self.component_prefix.include.ilp64) - return headers + return self.header_directories( + [self.component_prefix.include, self.component_prefix.include.ilp64] + ) @property def libs(self): @@ -192,6 +201,13 @@ def fix_wrappers(self): @run_after("install") def fixup_prefix(self): + # The motivation was to provide a more standard layout so impi + # would be more likely to work as a virtual dependence. It + # does not work for v2_layout because of a library conflict. I + # am not sure if this mechanism is useful so disabling for + # v2_layout rather than try to make it work. + if self.v2_layout: + return self.symlink_dir(self.component_prefix.include, self.prefix.include) self.symlink_dir(self.component_prefix.lib, self.prefix.lib) self.symlink_dir(self.component_prefix.lib.release, self.prefix.lib) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py index 6e169cbd84fe56..03ec36c37105ec 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py @@ -22,6 +22,12 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage): "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onetbb.html" ) + version( + "2021.11.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/af3ad519-4c87-4534-87cb-5c7bda12754e/l_tbb_oneapi_p_2021.11.0.49527_offline.sh", + sha256="dd878ee979d7b6da4eb973adfebf814d9d7eed86b875d31e3662d100b2fa0956", + expand=False, + ) version( "2021.10.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95cd995-586b-4688-b7e8-2d4485a1b5bf/l_tbb_oneapi_p_2021.10.0.49543_offline.sh", @@ -101,7 +107,17 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage): def component_dir(self): return "tbb" + @property + def v2_layout_versions(self): + return "@2021.11:" + @run_after("install") def fixup_prefix(self): + # The motivation was to provide a more standard layout so tbb + # would be more likely to work as a virtual dependence. I am + # not sure if this mechanism is useful and it became a problem + # for mpi so disabling for v2_layout. + if self.v2_layout: + return self.symlink_dir(self.component_prefix.include, self.prefix.include) self.symlink_dir(self.component_prefix.lib, self.prefix.lib) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py index 18d93b6afc0344..758a9542989f13 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py @@ -74,6 +74,12 @@ class IntelOneapiVpl(IntelOneApiLibraryPackage): expand=False, ) + # VPL no longer releases as part of oneapi, so there will never be + # a 2024 release + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "vpl" diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py index f9ab11eef76c91..1eaf35dda163b7 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-vtune/package.py @@ -25,6 +25,12 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk): homepage = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html" + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/1722cc83-ceb2-4304-b4dc-2813780222a3/l_oneapi_vtune_p_2024.0.0.49503_offline.sh", + sha256="09537329bdf6e105b0e164f75dc8ae122adc99a64441f6a52225509bcff3b848", + expand=False, + ) version( "2023.2.0", url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/dfae6f23-6c90-4b9f-80e2-fa2a5037fe36/l_oneapi_vtune_p_2023.2.0.49485_offline.sh", @@ -80,6 +86,10 @@ class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk): expand=False, ) + @property + def v2_layout_versions(self): + return "@2024:" + @property def component_dir(self): return "vtune" From fbec91e491776717c72a61f2791473e9c19e6af6 Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Mon, 27 Nov 2023 13:57:10 -0500 Subject: [PATCH 760/806] handle use of an unconfigured compiler (#41213) --- lib/spack/spack/build_environment.py | 12 +++++++++++- lib/spack/spack/compilers/__init__.py | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 36574259d0394d..20d8e75f9bc47b 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -324,19 +324,29 @@ def set_compiler_environment_variables(pkg, env): # ttyout, ttyerr, etc. link_dir = spack.paths.build_env_path - # Set SPACK compiler variables so that our wrapper knows what to call + # Set SPACK compiler variables so that our wrapper knows what to + # call. If there is no compiler configured then use a default + # wrapper which will emit an error if it is used. if compiler.cc: env.set("SPACK_CC", compiler.cc) env.set("CC", os.path.join(link_dir, compiler.link_paths["cc"])) + else: + env.set("CC", os.path.join(link_dir, "cc")) if compiler.cxx: env.set("SPACK_CXX", compiler.cxx) env.set("CXX", os.path.join(link_dir, compiler.link_paths["cxx"])) + else: + env.set("CC", os.path.join(link_dir, "c++")) if compiler.f77: env.set("SPACK_F77", compiler.f77) env.set("F77", os.path.join(link_dir, compiler.link_paths["f77"])) + else: + env.set("F77", os.path.join(link_dir, "f77")) if compiler.fc: env.set("SPACK_FC", compiler.fc) env.set("FC", os.path.join(link_dir, compiler.link_paths["fc"])) + else: + env.set("FC", os.path.join(link_dir, "fc")) # Set SPACK compiler rpath flags so that our wrapper knows what to use env.set("SPACK_CC_RPATH_ARG", compiler.cc_rpath_arg) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 6366fc321b3d06..be9edeecb4226a 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -154,6 +154,14 @@ def add_compilers_to_config(compilers, scope=None, init_config=True): """ compiler_config = get_compiler_config(scope, init_config) for compiler in compilers: + if not compiler.cc: + tty.debug(f"{compiler.spec} does not have a C compiler") + if not compiler.cxx: + tty.debug(f"{compiler.spec} does not have a C++ compiler") + if not compiler.f77: + tty.debug(f"{compiler.spec} does not have a Fortran77 compiler") + if not compiler.fc: + tty.debug(f"{compiler.spec} does not have a Fortran compiler") compiler_config.append(_to_dict(compiler)) spack.config.set("compilers", compiler_config, scope=scope) From c482534c1d3168da8053c4c47a203da300054a71 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 27 Nov 2023 13:15:16 -0700 Subject: [PATCH 761/806] CargoPackage: add new build system for Cargo packages (#41192) Co-authored-by: Tom Scogland --- lib/spack/spack/build_systems/cargo.py | 89 +++++++++++++++++++ lib/spack/spack/cmd/create.py | 38 +++++--- lib/spack/spack/package.py | 1 + share/spack/spack-completion.fish | 2 +- .../repos/builtin/packages/exa/package.py | 25 +++--- .../repos/builtin/packages/eza/package.py | 19 ++++ .../repos/builtin/packages/rust/package.py | 3 + 7 files changed, 152 insertions(+), 25 deletions(-) create mode 100644 lib/spack/spack/build_systems/cargo.py create mode 100644 var/spack/repos/builtin/packages/eza/package.py diff --git a/lib/spack/spack/build_systems/cargo.py b/lib/spack/spack/build_systems/cargo.py new file mode 100644 index 00000000000000..28da47595642e1 --- /dev/null +++ b/lib/spack/spack/build_systems/cargo.py @@ -0,0 +1,89 @@ +# Copyright 2013-2023 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) + +import inspect + +import llnl.util.filesystem as fs + +import spack.builder +import spack.package_base +from spack.directives import build_system, depends_on +from spack.multimethod import when + +from ._checks import BaseBuilder, execute_install_time_tests + + +class CargoPackage(spack.package_base.PackageBase): + """Specialized class for packages built using a Makefiles.""" + + #: This attribute is used in UI queries that need to know the build + #: system base class + build_system_class = "CargoPackage" + + build_system("cargo") + + with when("build_system=cargo"): + depends_on("rust", type="build") + + +@spack.builder.builder("cargo") +class CargoBuilder(BaseBuilder): + """The Cargo builder encodes the most common way of building software with + a rust Cargo.toml file. It has two phases that can be overridden, if need be: + + 1. :py:meth:`~.CargoBuilder.build` + 2. :py:meth:`~.CargoBuilder.install` + + For a finer tuning you may override: + + +-----------------------------------------------+----------------------+ + | **Method** | **Purpose** | + +===============================================+======================+ + | :py:meth:`~.CargoBuilder.build_args` | Specify arguments | + | | to ``cargo install`` | + +-----------------------------------------------+----------------------+ + | :py:meth:`~.CargoBuilder.check_args` | Specify arguments | + | | to ``cargo test`` | + +-----------------------------------------------+----------------------+ + """ + + phases = ("build", "install") + + #: Callback names for install-time test + install_time_test_callbacks = ["check"] + + @property + def build_directory(self): + """Return the directory containing the main Cargo.toml.""" + return self.pkg.stage.source_path + + @property + def build_args(self): + """Arguments for ``cargo build``.""" + return [] + + @property + def check_args(self): + """Argument for ``cargo test`` during check phase""" + return [] + + def build(self, pkg, spec, prefix): + """Runs ``cargo install`` in the source directory""" + with fs.working_dir(self.build_directory): + inspect.getmodule(pkg).cargo( + "install", "--root", "out", "--path", ".", *self.build_args + ) + + def install(self, pkg, spec, prefix): + """Copy build files into package prefix.""" + with fs.working_dir(self.build_directory): + fs.install_tree("out", prefix) + + spack.builder.run_after("install")(execute_install_time_tests) + + def check(self): + """Run "cargo test".""" + with fs.working_dir(self.build_directory): + inspect.getmodule(self.pkg).cargo("test", *self.check_args) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 946e9bc8b960d3..130242a8b1e0dd 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -172,6 +172,14 @@ def configure_args(self): return args""" +class CargoPackageTemplate(PackageTemplate): + """Provides appropriate overrides for cargo-based packages""" + + base_class_name = "CargoPackage" + + body_def = "" + + class CMakePackageTemplate(PackageTemplate): """Provides appropriate overrides for CMake-based packages""" @@ -575,28 +583,29 @@ def __init__(self, name, *args, **kwargs): templates = { - "autotools": AutotoolsPackageTemplate, "autoreconf": AutoreconfPackageTemplate, - "cmake": CMakePackageTemplate, + "autotools": AutotoolsPackageTemplate, + "bazel": BazelPackageTemplate, "bundle": BundlePackageTemplate, - "qmake": QMakePackageTemplate, + "cargo": CargoPackageTemplate, + "cmake": CMakePackageTemplate, + "generic": PackageTemplate, + "intel": IntelPackageTemplate, + "lua": LuaPackageTemplate, + "makefile": MakefilePackageTemplate, "maven": MavenPackageTemplate, - "scons": SconsPackageTemplate, - "waf": WafPackageTemplate, - "bazel": BazelPackageTemplate, + "meson": MesonPackageTemplate, + "octave": OctavePackageTemplate, + "perlbuild": PerlbuildPackageTemplate, + "perlmake": PerlmakePackageTemplate, "python": PythonPackageTemplate, + "qmake": QMakePackageTemplate, "r": RPackageTemplate, "racket": RacketPackageTemplate, - "perlmake": PerlmakePackageTemplate, - "perlbuild": PerlbuildPackageTemplate, - "octave": OctavePackageTemplate, "ruby": RubyPackageTemplate, - "makefile": MakefilePackageTemplate, - "intel": IntelPackageTemplate, - "meson": MesonPackageTemplate, - "lua": LuaPackageTemplate, + "scons": SconsPackageTemplate, "sip": SIPPackageTemplate, - "generic": PackageTemplate, + "waf": WafPackageTemplate, } @@ -679,6 +688,7 @@ def __call__(self, stage, url): clues = [ (r"/CMakeLists\.txt$", "cmake"), (r"/NAMESPACE$", "r"), + (r"/Cargo\.toml$", "cargo"), (r"/configure$", "autotools"), (r"/configure\.(in|ac)$", "autoreconf"), (r"/Makefile\.am$", "autoreconf"), diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index f38ebec2992fcf..0fdfffc177205a 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -37,6 +37,7 @@ cmake_cache_path, cmake_cache_string, ) +from spack.build_systems.cargo import CargoPackage from spack.build_systems.cmake import CMakePackage, generator from spack.build_systems.cuda import CudaPackage from spack.build_systems.generic import Package diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 1029fa6b45e06c..08df9825b6edf9 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1261,7 +1261,7 @@ complete -c spack -n '__fish_spack_using_command create' -l keep-stage -f -a kee complete -c spack -n '__fish_spack_using_command create' -l keep-stage -d 'don\'t clean up staging area when command completes' complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -f -a name complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -d 'name of the package to create' -complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -f -a 'autoreconf autotools bazel bundle cmake generic intel lua makefile maven meson octave perlbuild perlmake python qmake r racket ruby scons sip waf' +complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -f -a 'autoreconf autotools bazel bundle cargo cmake generic intel lua makefile maven meson octave perlbuild perlmake python qmake r racket ruby scons sip waf' complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -d 'build system template to use' complete -c spack -n '__fish_spack_using_command create' -s r -l repo -r -f -a repo complete -c spack -n '__fish_spack_using_command create' -s r -l repo -r -d 'path to a repository where the package should be created' diff --git a/var/spack/repos/builtin/packages/exa/package.py b/var/spack/repos/builtin/packages/exa/package.py index 8488f3b3a11438..21be99414a934d 100644 --- a/var/spack/repos/builtin/packages/exa/package.py +++ b/var/spack/repos/builtin/packages/exa/package.py @@ -6,17 +6,22 @@ from spack.package import * -class Exa(Package): - """exa is a replacement for ls written in Rust.""" +class Exa(CargoPackage): + """DEPRECATED: The exa upstream is no longer maintained, see the eza package for a + replacement. + + exa is a replacement for ls written in Rust.""" homepage = "https://the.exa.website" url = "https://github.com/ogham/exa/archive/v0.9.0.tar.gz" - version("0.10.1", sha256="ff0fa0bfc4edef8bdbbb3cabe6fdbd5481a71abbbcc2159f402dea515353ae7c") - version("0.9.0", sha256="96e743ffac0512a278de9ca3277183536ee8b691a46ff200ec27e28108fef783") - - depends_on("rust") - - def install(self, spec, prefix): - cargo = which("cargo") - cargo("install", "--root", prefix, "--path", ".") + version( + "0.10.1", + sha256="ff0fa0bfc4edef8bdbbb3cabe6fdbd5481a71abbbcc2159f402dea515353ae7c", + deprecated=True, + ) + version( + "0.9.0", + sha256="96e743ffac0512a278de9ca3277183536ee8b691a46ff200ec27e28108fef783", + deprecated=True, + ) diff --git a/var/spack/repos/builtin/packages/eza/package.py b/var/spack/repos/builtin/packages/eza/package.py new file mode 100644 index 00000000000000..df9dd5aa8ba5bb --- /dev/null +++ b/var/spack/repos/builtin/packages/eza/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 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 Eza(CargoPackage): + """A modern, maintained replacement for ls.""" + + homepage = "https://github.com/eza-community/eza" + url = "https://github.com/eza-community/eza/archive/refs/tags/v0.15.3.tar.gz" + + maintainers("trws") + + license("MIT") + + version("0.15.3", sha256="09093e565913104acb7a8eba974f8067c95566b6fbedf31138c9923a8cfde42f") diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index 8d0784d95a203b..a9b7a7530fac65 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -89,6 +89,9 @@ def determine_version(csl, exe): match = re.match(r"rustc (\S+)", output) return match.group(1) if match else None + def setup_dependent_package(self, module, dependent_spec): + module.cargo = Executable(os.path.join(self.spec.prefix.bin, "cargo")) + def setup_build_environment(self, env): # Manually inject the path of ar for build. ar = which("ar", required=True) From abc294e3a2334f5752cba4b65bb2c44bab2b00d2 Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Mon, 27 Nov 2023 15:55:22 -0500 Subject: [PATCH 762/806] Update SST packages to 13.1.0 (#41220) * Update SST packages to 13.1.0 * Allow mismatch between sst-core dependency and current macro version * SST does not work with Python 3.12 yet * Sanity check install binaries for sst-core * Elements compiles with OTF2 but not OTF * Version bounds in specs are inclusive * Remove not-strictly-necessary file check --- var/spack/repos/builtin/packages/sst-core/package.py | 5 +++-- .../repos/builtin/packages/sst-elements/package.py | 8 ++++---- var/spack/repos/builtin/packages/sst-macro/package.py | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/sst-core/package.py b/var/spack/repos/builtin/packages/sst-core/package.py index 860d30d0b38289..891fbf5d2d5c97 100644 --- a/var/spack/repos/builtin/packages/sst-core/package.py +++ b/var/spack/repos/builtin/packages/sst-core/package.py @@ -14,10 +14,11 @@ class SstCore(AutotoolsPackage): homepage = "https://github.com/sstsimulator" git = "https://github.com/sstsimulator/sst-core.git" - url = "https://github.com/sstsimulator/sst-core/releases/download/v13.0.0_Final/sstcore-13.0.0.tar.gz" + url = "https://github.com/sstsimulator/sst-core/releases/download/v13.1.0_Final/sstcore-13.1.0.tar.gz" maintainers("berquist", "naromero77") + version("13.1.0", sha256="0a44c62ee0b18a20a3cb089f4e0d43e293dc5adc6c3fa7639d40986cf5b9854c") version("13.0.0", sha256="c9d868dcdd75d59bef7c73146709a3b2a52a78f0df5ec2c3dc9f21434c51d935") version("12.1.0", sha256="f7530226643439678e2f4183ec4dbadf7750411bdaa44d9443887f81feb97574") version("12.0.1", sha256="8662a778354e587e55b909725943dd5bb01d55121b1abc1a384a4eea161e9f5a") @@ -61,7 +62,7 @@ class SstCore(AutotoolsPackage): variant("preview", default=False, description="Preview build with deprecated features removed") variant("profile", default=False, description="Enable performance profiling of core features") - depends_on("python", type=("build", "run", "link")) + depends_on("python@:3.11", type=("build", "run", "link")) depends_on("mpi", when="+pdes_mpi") depends_on("zoltan", when="+zoltan") depends_on("hdf5", when="+hdf5") diff --git a/var/spack/repos/builtin/packages/sst-elements/package.py b/var/spack/repos/builtin/packages/sst-elements/package.py index 49677daf049f7b..f5f9e7621d0f7a 100644 --- a/var/spack/repos/builtin/packages/sst-elements/package.py +++ b/var/spack/repos/builtin/packages/sst-elements/package.py @@ -14,12 +14,14 @@ class SstElements(AutotoolsPackage): homepage = "https://github.com/sstsimulator" git = "https://github.com/sstsimulator/sst-elements.git" - url = "https://github.com/sstsimulator/sst-elements/releases/download/v13.0.0_Final/sstelements-13.0.0.tar.gz" + url = "https://github.com/sstsimulator/sst-elements/releases/download/v13.1.0_Final/sstelements-13.1.0.tar.gz" maintainers("berquist", "naromero77") + version("13.1.0", sha256="ebda6ee5af858192dff8a7faf3125010001d5c439beec22afe5b9828a74adf1a") version("13.0.0", sha256="1f6f6b403a8c1b22a27cdf2943c9e505825ee14866891e7bc944d4471b7b0321") version("12.1.0", sha256="77948cf8e1f8bf8d238d475cea111c9a72b307cbf403cb429ef0426d0cf708a4") + version("12.0.1", sha256="fe6bd9e2c14ffca77cfb31ee39410d0df3a353524b6a5a35270104dd25836e48") version("12.0.0", sha256="d3caacf8ba621a644151e1670dfc0fd8e91b45a583699998f94312897b0eca26") version("11.1.0", sha256="2dd20ecf2e0896b59eb9d65d31ef928daa0188239016216f4ad11b7e6447ca0b") version("11.0.0", sha256="bf265cb25afc041b74422cc5cddc8e3ae1e7c3efa3e37e699dac4e3f7629be6e") @@ -40,7 +42,6 @@ class SstElements(AutotoolsPackage): # Contact SST developers (https://github.com/sstsimulator) # if your use case requires support for: # - balar - # - OTF2 # - stake (riscv simulator) variant("pin", default=False, description="Enable the Ariel CPU model") @@ -56,7 +57,7 @@ class SstElements(AutotoolsPackage): variant("otf", default=False, description="Build with OTF") variant("otf2", default=False, description="Build with OTF2") - depends_on("python", type=("build", "run")) + depends_on("python@:3.11", type=("build", "run")) depends_on("sst-core") depends_on("sst-core@develop", when="@develop") depends_on("sst-core@master", when="@master") @@ -85,7 +86,6 @@ class SstElements(AutotoolsPackage): conflicts("+dumpi", msg="Dumpi not currently supported, contact SST Developers for help") conflicts("+otf", msg="OTF not currently supported, contact SST Developers for help") - conflicts("+otf2", msg="OTF2 not currently supported, contact SST Developers for help") conflicts( "~dramsim2", when="+hybridsim", diff --git a/var/spack/repos/builtin/packages/sst-macro/package.py b/var/spack/repos/builtin/packages/sst-macro/package.py index df129cfb4f7549..3f7c09bea7bf74 100644 --- a/var/spack/repos/builtin/packages/sst-macro/package.py +++ b/var/spack/repos/builtin/packages/sst-macro/package.py @@ -17,12 +17,14 @@ class SstMacro(AutotoolsPackage): homepage = "https://github.com/sstsimulator" git = "https://github.com/sstsimulator/sst-macro.git" - url = "https://github.com/sstsimulator/sst-macro/releases/download/v13.0.0_Final/sstmacro-13.0.0.tar.gz" + url = "https://github.com/sstsimulator/sst-macro/releases/download/v13.1.0_Final/sstmacro-13.1.0.tar.gz" maintainers("berquist") + version("13.1.0", sha256="022e39daae1067b56c0011dbe87e3234fee4587049fd53671e1ed6b23233f70e") version("13.0.0", sha256="410dad4ac0c7a4c0e16c54da308b6c6b631112af18ae2c37585c8a14472987d4") version("12.1.0", sha256="ee57e08acfd4b6429a0500d981d468ee6ded2638ec5abec7b47f172388b267f1") + version("12.0.1", sha256="1491a149f4554777a6c3aa62730b3cd1a24c43a8d3d7fb61edfb4fe5c773aed8") version("12.0.0", sha256="259237a47cf341830ce3956cfadfd6e77ff1824da05da4a7b212fc5867ce64b2") version("11.1.0", sha256="4b1226e75e2e99faa42b218461d85e8e17c1d4f333dd973e72a5dc052328d34c") version("11.0.0", sha256="30367baed670b5b501320a068671556c9071286a0f0c478f9994a30d8fe5bdea") @@ -50,10 +52,8 @@ class SstMacro(AutotoolsPackage): depends_on("otf2", when="+otf2") depends_on("llvm+clang@5:9", when="+skeletonizer") depends_on("mpi", when="+pdes_mpi") - depends_on("sst-core@develop", when="@develop+core") - depends_on("sst-core@master", when="@master+core") - depends_on("sst-core@10.1.0", when="@10.1.0+core") - depends_on("sst-core@10.0.0", when="@10.0.0+core") + # Allow mismatch between core dependency version and current macro version. + depends_on("sst-core", when="+core") depends_on("gettext") variant("pdes_threads", default=True, description="Enable thread-parallel PDES simulation") From 8ccfe9f710a440a6e0b2f523816d13aa8dac4482 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 27 Nov 2023 14:02:04 -0700 Subject: [PATCH 763/806] cprnc: add new package (#41237) --- .../repos/builtin/packages/cprnc/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cprnc/package.py diff --git a/var/spack/repos/builtin/packages/cprnc/package.py b/var/spack/repos/builtin/packages/cprnc/package.py new file mode 100644 index 00000000000000..190c375d69b5c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/cprnc/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 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 Cprnc(CMakePackage): + """CPRNC is a netcdf file comparison tool used by CESM + and other scientific programs.""" + + url = "https://github.com/ESMCI/cprnc/archive/refs/tags/v1.0.1.tar.gz" + homepage = "https://github.com/ESMCI/cprnc" + + maintainers("jedwards4b", "billsacks") + + version("1.0.1", sha256="19517b52688f5ce40c385d7a718e06bf88a8731335943bc32e2b8410c489d6eb") + + depends_on("netcdf-fortran") + depends_on("cmake@3:", type="build") From cd33becebc37c25220810a827fe2f8decc1cecc8 Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:09:44 -0500 Subject: [PATCH 764/806] CMake: add version 3.27.8 (#41094) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 15eccd6d3e2646..ec9aac6fa06613 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -27,6 +27,7 @@ class Cmake(Package): executables = ["^cmake[0-9]*$"] version("master", branch="master") + version("3.27.8", sha256="fece24563f697870fbb982ea8bf17482c9d5f855d8c9bf0b82463d76c9e8d0cc") version("3.27.7", sha256="08f71a106036bf051f692760ef9558c0577c42ac39e96ba097e7662bd4158d8e") version("3.27.6", sha256="ef3056df528569e0e8956f6cf38806879347ac6de6a4ff7e4105dc4578732cfb") version("3.27.4", sha256="0a905ca8635ca81aa152e123bdde7e54cbe764fdd9a70d62af44cad8b92967af") From ea610d3fe2fec4cab401a405f9949a26a06a5d32 Mon Sep 17 00:00:00 2001 From: Dave Keeshan <96727608+davekeeshan@users.noreply.github.com> Date: Tue, 28 Nov 2023 00:44:44 +0000 Subject: [PATCH 765/806] iverilog-vpi: filter compiler wrappers from a few files (#41244) --- var/spack/repos/builtin/packages/icarus/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/icarus/package.py b/var/spack/repos/builtin/packages/icarus/package.py index b290cd9fedbdfb..d81f7e6fb4e067 100644 --- a/var/spack/repos/builtin/packages/icarus/package.py +++ b/var/spack/repos/builtin/packages/icarus/package.py @@ -13,6 +13,9 @@ class Icarus(AutotoolsPackage): url = "https://github.com/steveicarus/iverilog/archive/refs/tags/v12_0.tar.gz" git = "https://github.com/steveicarus/iverilog.git" + maintainers("davekeeshan") + + version("master", branch="master") version("12_0", sha256="a68cb1ef7c017ef090ebedb2bc3e39ef90ecc70a3400afb4aa94303bc3beaa7d") version("11_0", sha256="6327fb900e66b46803d928b7ca439409a0dc32731d82143b20387be0833f1c95") version("10_3", commit="453c5465895eaca4a792d18b75e9ec14db6ea50e") @@ -38,3 +41,14 @@ def create_install_folders(self): mkdirp(join_path(prefix.lib, "ivl", "include")) mkdirp(join_path(prefix.share, "man")) mkdirp(join_path(prefix.share, "man", "man1")) + + # We need to fix the CC and CXX paths, as they point to the spack + # wrapper scripts which aren't usable without spack + @run_after("install") + def patch_compiler(self): + filter_file( + r"^CC\s*=.*", f"CC={self.compiler.cc}", join_path(self.prefix.bin, "iverilog-vpi") + ) + filter_file( + r"^CXX\s*=.*", f"CXX={self.compiler.cxx}", join_path(self.prefix.bin, "iverilog-vpi") + ) From ed543594545f6943224f1f27e0325f4bd5e2e1cd Mon Sep 17 00:00:00 2001 From: Dave Keeshan <96727608+davekeeshan@users.noreply.github.com> Date: Tue, 28 Nov 2023 01:16:03 +0000 Subject: [PATCH 766/806] Move compiler renaming to filter_compiler_wrappers (#41275) --- .../builtin/packages/verilator/package.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/verilator/package.py b/var/spack/repos/builtin/packages/verilator/package.py index 0890517560f436..df49bf3bb6a33d 100644 --- a/var/spack/repos/builtin/packages/verilator/package.py +++ b/var/spack/repos/builtin/packages/verilator/package.py @@ -75,6 +75,10 @@ class Verilator(AutotoolsPackage): depends_on("perl", type=("build", "run")) depends_on("bash", type="build") + # we need to fix the CXX and LINK paths, as they point to the spack + # wrapper scripts which aren't usable without spack + filter_compiler_wrappers("verilated.mk", relative_root="include") + def setup_run_environment(self, env): env.prepend_path("VERILATOR_ROOT", self.prefix) @@ -87,18 +91,3 @@ def autoreconf(self, spec, prefix): def install_include(self): install_tree("include", prefix.include) install_tree("bin", prefix.bin) - - # we need to fix the CXX and LINK paths, as they point to the spack - # wrapper scripts which aren't usable without spack - @run_after("install") - def patch_cxx(self): - filter_file( - r"^CXX\s*=.*", - f"CXX={self.compiler.cxx}", - join_path(self.prefix.include, "verilated.mk"), - ) - filter_file( - r"^LINK\s*=.*", - f"LINK={self.compiler.cxx}", - join_path(self.prefix.include, "verilated.mk"), - ) From 72ed14e4a9306691648726f12cd952d140eba440 Mon Sep 17 00:00:00 2001 From: Jack Morrison <32687739+jack-morrison@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:04:44 -0800 Subject: [PATCH 767/806] libfabric: Add version 1.20.0 (#41277) --- var/spack/repos/builtin/packages/libfabric/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libfabric/package.py b/var/spack/repos/builtin/packages/libfabric/package.py index fe0c9c6a40e70d..621e2b31f7cecb 100644 --- a/var/spack/repos/builtin/packages/libfabric/package.py +++ b/var/spack/repos/builtin/packages/libfabric/package.py @@ -22,6 +22,7 @@ class Libfabric(AutotoolsPackage): executables = ["^fi_info$"] version("main", branch="main") + version("1.20.0", sha256="7fbbaeb0e15c7c4553c0ac5f54e4ef7aecaff8a669d4ba96fa04b0fc780b9ddc") version("1.19.0", sha256="f14c764be9103e80c46223bde66e530e5954cb28b3835b57c8e728479603ef9e") version("1.18.2", sha256="64d7837853ca84d2a413fdd96534b6a81e6e777cc13866e28cf86cd0ccf1b93e") version("1.18.1", sha256="4615ae1e22009e59c72ae03c20adbdbd4a3dce95aeefbc86cc2bf1acc81c9e38") From 4205ac74e86cbae0f6f583963617c7c5825c8d30 Mon Sep 17 00:00:00 2001 From: "Jose E. Roman" Date: Tue, 28 Nov 2023 03:53:45 +0100 Subject: [PATCH 768/806] slepc: add v3.20.1 (#41274) --- var/spack/repos/builtin/packages/py-slepc4py/package.py | 1 + var/spack/repos/builtin/packages/slepc/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py index 9bf3413fceba4e..cf9637161cc99d 100644 --- a/var/spack/repos/builtin/packages/py-slepc4py/package.py +++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py @@ -16,6 +16,7 @@ class PySlepc4py(PythonPackage): maintainers("joseeroman", "balay") version("main", branch="main") + version("3.20.1", sha256="7e6d156f7b0891bfa0616b38a502460c62797f16ca146b321e16cce4cf139d07") version("3.20.0", sha256="56cbea1f56746136e5a934bf4a481e566f35e475cb950c0a5bce7d5c3cc7690a") version("3.19.2", sha256="da8b6a7aaaf5e4497b896b2e478c42dd9de4fb31da93eb294181bea3bb60c767") version("3.19.1", sha256="68303f4acef8efc0542ab288a19159d0e6cdf313726f573e0bea2edb3d2c9595") diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 979a252dd8ae3a..5a6e3e3b2f45b5 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -22,6 +22,7 @@ class Slepc(Package, CudaPackage, ROCmPackage): test_requires_compiler = True version("main", branch="main") + version("3.20.1", sha256="5a36b664895881d3858d0644f56bf7bb922bdab70d732fa11cbf6442fec11806") version("3.20.0", sha256="780c50260a9bc9b72776cb920774800c73832370938f1d48c2ea5c66d31b7380") version("3.19.2", sha256="ca7ed906795971fbe35f08ee251a26b86a4442a18609b878cba00835c9d62034") version("3.19.1", sha256="280737e9ef762d7f0079ad3ad29913215c799ebf124651c723c1972f71fbc0db") From 4f7f3cbbdf9535c47c11b4033eb6465f48857b2a Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 27 Nov 2023 23:34:49 -0800 Subject: [PATCH 769/806] smee-client: add new package (#41280) --- .../builtin/packages/smee-client/package.py | 42 +++++++++++++++++++ .../builtin/packages/typescript/package.py | 25 +++++++++++ 2 files changed, 67 insertions(+) create mode 100644 var/spack/repos/builtin/packages/smee-client/package.py create mode 100644 var/spack/repos/builtin/packages/typescript/package.py diff --git a/var/spack/repos/builtin/packages/smee-client/package.py b/var/spack/repos/builtin/packages/smee-client/package.py new file mode 100644 index 00000000000000..efb0809dda1de9 --- /dev/null +++ b/var/spack/repos/builtin/packages/smee-client/package.py @@ -0,0 +1,42 @@ +# Copyright 2013-2023 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 * +from spack.util.executable import ProcessError + + +class SmeeClient(Package): + """ + Client and CLI for smee.io, a service that delivers webhooks to your + local development environment. + """ + + homepage = "https://smee.io" + url = "https://github.com/probot/smee-client/archive/refs/tags/v1.2.5.tar.gz" + + maintainers("alecbcs") + + license("ISC") + + version("1.2.3", sha256="b9afff843fc7a3c2b5d6659acf45357b5db7a739243b99f6d18a9b110981a328") + + depends_on("node-js", type=("build", "link", "run")) + depends_on("npm", type="build") + depends_on("typescript", type="build") + + phases = ["build", "install"] + + def build(self, spec, prefix): + npm = which("npm", required=True) + + # Allow tsc to fail with typing "errors" which don't affect results + output = npm("run", "build", output=str, error=str, fail_on_error=False) + if npm.returncode not in (0, 2): + raise ProcessError(output) + + def install(self, spec, prefix): + npm = which("npm", required=True) + npm("install", "--global", f"--prefix={prefix}") diff --git a/var/spack/repos/builtin/packages/typescript/package.py b/var/spack/repos/builtin/packages/typescript/package.py new file mode 100644 index 00000000000000..9a0e0a69e4b1a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/typescript/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 Typescript(Package): + """TypeScript is a superset of JavaScript that compiles to clean JavaScript output.""" + + homepage = "https://www.typescriptlang.org" + url = "https://github.com/microsoft/TypeScript/archive/refs/tags/v5.3.2.tar.gz" + + license("Apache-2.0") + + version("5.3.2", sha256="c5a12507006e7d2b8020dec9589191ce070fd88203f2c80aca00d641cee7866f") + + depends_on("node-js", type=("build", "link", "run")) + depends_on("npm", type="build") + + def install(self, spec, prefix): + npm = which("npm", required=True) + npm("install", "--global", f"--prefix={prefix}") From 70fb0b35e55f8f9b3182b091bc8c40b8770041b7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 28 Nov 2023 10:17:52 +0100 Subject: [PATCH 770/806] py-transformers: add v4.35.2 (#41266) --- .../builtin/packages/py-fsspec/package.py | 1 + .../packages/py-huggingface-hub/package.py | 5 +-- .../builtin/packages/py-tokenizers/package.py | 32 +++++++++++++------ .../packages/py-transformers/package.py | 9 +++--- 4 files changed, 30 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-fsspec/package.py b/var/spack/repos/builtin/packages/py-fsspec/package.py index e9a2d3f41192f9..6413d8413242e0 100644 --- a/var/spack/repos/builtin/packages/py-fsspec/package.py +++ b/var/spack/repos/builtin/packages/py-fsspec/package.py @@ -12,6 +12,7 @@ class PyFsspec(PythonPackage): homepage = "https://github.com/intake/filesystem_spec" pypi = "fsspec/fsspec-0.4.4.tar.gz" + version("2023.10.0", sha256="330c66757591df346ad3091a53bd907e15348c2ba17d63fd54f5c39c4457d2a5") version("2023.1.0", sha256="fbae7f20ff801eb5f7d0bedf81f25c787c0dfac5e982d98fa3884a9cde2b5411") version("2022.11.0", sha256="259d5fd5c8e756ff2ea72f42e7613c32667dc2049a4ac3d84364a7ca034acb8b") version("2021.7.0", sha256="792ebd3b54de0b30f1ce73f0ba0a8bcc864724f2d9f248cb8d0ece47db0cbde8") diff --git a/var/spack/repos/builtin/packages/py-huggingface-hub/package.py b/var/spack/repos/builtin/packages/py-huggingface-hub/package.py index 6865a0d40e08ce..d63a2de77f99e7 100644 --- a/var/spack/repos/builtin/packages/py-huggingface-hub/package.py +++ b/var/spack/repos/builtin/packages/py-huggingface-hub/package.py @@ -14,6 +14,7 @@ class PyHuggingfaceHub(PythonPackage): homepage = "https://github.com/huggingface/huggingface_hub" pypi = "huggingface_hub/huggingface_hub-0.0.10.tar.gz" + version("0.19.4", sha256="176a4fc355a851c17550e7619488f383189727eab209534d7cef2114dae77b22") version("0.14.1", sha256="9ab899af8e10922eac65e290d60ab956882ab0bf643e3d990b1394b6b47b7fbc") version("0.10.1", sha256="5c188d5b16bec4b78449f8681f9975ff9d321c16046cc29bcf0d7e464ff29276") version("0.0.10", sha256="556765e4c7edd2d2c4c733809bae1069dca20e10ff043870ec40d53e498efae2") @@ -28,14 +29,14 @@ class PyHuggingfaceHub(PythonPackage): depends_on("py-setuptools", type="build") depends_on("py-filelock", type=("build", "run")) + depends_on("py-fsspec@2023.5:", when="@0.18:", type=("build", "run")) depends_on("py-fsspec", when="@0.14:", type=("build", "run")) depends_on("py-requests", type=("build", "run")) - depends_on("py-tqdm@4.42.1:", type=("build", "run")) + depends_on("py-tqdm@4.42.1:", when="@0.12:", type=("build", "run")) depends_on("py-tqdm", type=("build", "run")) depends_on("py-pyyaml@5.1:", when="@0.10:", type=("build", "run")) depends_on("py-typing-extensions@3.7.4.3:", when="@0.10:", type=("build", "run")) depends_on("py-typing-extensions", when="@0.0.10:", type=("build", "run")) - depends_on("py-importlib-metadata", when="^python@:3.7", type=("build", "run")) depends_on("py-packaging@20.9:", when="@0.10:", type=("build", "run")) depends_on("py-inquirerpy@0.3.4", when="@0.14:+cli", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/py-tokenizers/package.py b/var/spack/repos/builtin/packages/py-tokenizers/package.py index 5555fcdb087e4c..117239fe9afd0c 100644 --- a/var/spack/repos/builtin/packages/py-tokenizers/package.py +++ b/var/spack/repos/builtin/packages/py-tokenizers/package.py @@ -13,23 +13,35 @@ class PyTokenizers(PythonPackage): homepage = "https://github.com/huggingface/tokenizers" pypi = "tokenizers/tokenizers-0.6.0.tar.gz" + version("0.15.0", sha256="10c7e6e7b4cabd757da59e93f5f8d1126291d16f8b54f28510825ef56a3e5d0e") version("0.13.3", sha256="2e546dbb68b623008a5442353137fbb0123d311a6d7ba52f2667c8862a75af2e") version("0.13.1", sha256="3333d1cee5c8f47c96362ea0abc1f81c77c9b92c6c3d11cbf1d01985f0d5cf1d") version("0.10.3", sha256="1a5d3b596c6d3a237e1ad7f46c472d467b0246be7fd1a364f12576eb8db8f7e6") - version("0.6.0", sha256="1da11fbfb4f73be695bed0d655576097d09a137a16dceab2f66399716afaffac") - version("0.5.2", sha256="b5a235f9c71d04d4925df6c4fa13b13f1d03f9b7ac302b89f8120790c4f742bc") - - depends_on("py-setuptools", type="build") - depends_on("py-setuptools-rust", type="build") - - # A nightly or dev version of rust is required to build older versions. - # https://github.com/huggingface/tokenizers/issues/176 - # https://github.com/PyO3/pyo3/issues/5 - depends_on("rust@nightly", when="@:0.10", type="build") + version( + "0.6.0", + sha256="1da11fbfb4f73be695bed0d655576097d09a137a16dceab2f66399716afaffac", + deprecated=True, + ) + version( + "0.5.2", + sha256="b5a235f9c71d04d4925df6c4fa13b13f1d03f9b7ac302b89f8120790c4f742bc", + deprecated=True, + ) # TODO: This package currently requires internet access to install. + depends_on("py-maturin@1", when="@0.14:", type="build") + depends_on("py-huggingface-hub@0.16.4:0", when="@0.15:", type=("build", "run")) # cargo resolves dependencies, which includes openssl-sys somewhere, which needs # system pkgconfig and openssl. depends_on("pkgconfig", type="build") depends_on("openssl") + + # Historical dependencies + depends_on("py-setuptools", when="@:0.13", type="build") + depends_on("py-setuptools-rust", when="@:0.13", type="build") + + # A nightly or dev version of rust is required to build older versions. + # https://github.com/huggingface/tokenizers/issues/176 + # https://github.com/PyO3/pyo3/issues/5 + depends_on("rust@nightly", when="@:0.8", type="build") diff --git a/var/spack/repos/builtin/packages/py-transformers/package.py b/var/spack/repos/builtin/packages/py-transformers/package.py index 5380f44a78684d..7f4e8306c6db8f 100644 --- a/var/spack/repos/builtin/packages/py-transformers/package.py +++ b/var/spack/repos/builtin/packages/py-transformers/package.py @@ -16,17 +16,15 @@ class PyTransformers(PythonPackage): maintainers("adamjstewart") + version("4.35.2", sha256="2d125e197d77b0cdb6c9201df9fa7e2101493272e448b9fba9341c695bee2f52") version("4.31.0", sha256="4302fba920a1c24d3a429a29efff6a63eac03f3f3cf55b55927fc795d01cb273") version("4.24.0", sha256="486f353a8e594002e48be0e2aba723d96eda839e63bfe274702a4b5eda85559b") version("4.6.1", sha256="83dbff763b7e7dc57cbef1a6b849655d4fcab6bffdd955c5e8bea12a4f76dc10") version("2.8.0", sha256="b9f29cdfd39c28f29e0806c321270dea337d6174a7aa60daf9625bf83dbb12ee") - depends_on("python@3.8:", when="@4.31:", type=("build", "run")) - depends_on("python@3.7:", when="@4.24:", type=("build", "run")) - depends_on("python@3.6:", type=("build", "run")) depends_on("py-setuptools", type="build") - depends_on("py-importlib-metadata", when="@4.6: ^python@:3.7", type=("build", "run")) depends_on("py-filelock", type=("build", "run")) + depends_on("py-huggingface-hub@0.16.4:0", when="@4.34:", type=("build", "run")) depends_on("py-huggingface-hub@0.14.1:0", when="@4.26:", type=("build", "run")) depends_on("py-huggingface-hub@0.10:0", when="@4.24:", type=("build", "run")) depends_on("py-huggingface-hub@0.0.8", when="@4.6.1", type=("build", "run")) @@ -38,7 +36,8 @@ class PyTransformers(PythonPackage): depends_on("py-regex@:2019.12.16,2019.12.18:", type=("build", "run")) depends_on("py-requests", type=("build", "run")) depends_on("py-safetensors@0.3.1:", when="@4.31:", type=("build", "run")) - depends_on("py-tokenizers@0.11.1:0.11.2,0.11.4:0.13", when="@4.24:", type=("build", "run")) + depends_on("py-tokenizers@0.14:0.18", when="@4.35:", type=("build", "run")) + depends_on("py-tokenizers@0.11.1:0.11.2,0.11.4:0.13", when="@4.24:4.33", type=("build", "run")) depends_on("py-tokenizers@0.10.1:0.10", when="@4.6.1", type=("build", "run")) depends_on("py-tokenizers@0.5.2", when="@2.8.0", type=("build", "run")) depends_on("py-tqdm@4.27:", type=("build", "run")) From 5299b84319d34072fae5be6abdf8e57f06be94e9 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 28 Nov 2023 03:18:54 -0600 Subject: [PATCH 771/806] qt-*: new versions 6.6.1 (#41281) * qt-*: new versions 6.6.1 * qt-quick3d: fixup --- var/spack/repos/builtin/packages/qt-base/package.py | 1 + var/spack/repos/builtin/packages/qt-declarative/package.py | 1 + var/spack/repos/builtin/packages/qt-quick3d/package.py | 1 + var/spack/repos/builtin/packages/qt-quicktimeline/package.py | 1 + var/spack/repos/builtin/packages/qt-shadertools/package.py | 1 + var/spack/repos/builtin/packages/qt-svg/package.py | 1 + 6 files changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/qt-base/package.py b/var/spack/repos/builtin/packages/qt-base/package.py index 3fe6f4c654be01..d0bda5fd9cd90a 100644 --- a/var/spack/repos/builtin/packages/qt-base/package.py +++ b/var/spack/repos/builtin/packages/qt-base/package.py @@ -91,6 +91,7 @@ class QtBase(QtPackage): provides("qmake") + version("6.6.1", sha256="eb091c56e8c572d35d3da36f94f9e228892d43aecb559fa4728a19f0e44914c4") version("6.6.0", sha256="882f39ea3a40a0894cd64e515ce51711a4fab79b8c47bc0fe0279e99493a62cf") version("6.5.3", sha256="174021c4a630df2e7e912c2e523844ad3cb5f90967614628fd8aa15ddbab8bc5") version("6.5.2", sha256="221cafd400c0a992a42746b43ea879d23869232e56d9afe72cb191363267c674") diff --git a/var/spack/repos/builtin/packages/qt-declarative/package.py b/var/spack/repos/builtin/packages/qt-declarative/package.py index b93141c4e438d7..805e7910714d01 100644 --- a/var/spack/repos/builtin/packages/qt-declarative/package.py +++ b/var/spack/repos/builtin/packages/qt-declarative/package.py @@ -14,6 +14,7 @@ class QtDeclarative(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.1", sha256="b1f5a75c2ea967d21b2c45f56ba1de66e2bf14a581b2f0d8e776441f1bebd0e7") version("6.6.0", sha256="2e52ef00736a9954426adf454cfb365fabdffb5703c814c188bc866cbf9f4dad") version("6.5.3", sha256="563924e58ac517492acb1952af0fb950cd54045ef6d61b98de06fac728239811") version("6.5.2", sha256="8b9eed849c90fb301d5399c545c2c926c18dc889d724df2b284253152a2ee139") diff --git a/var/spack/repos/builtin/packages/qt-quick3d/package.py b/var/spack/repos/builtin/packages/qt-quick3d/package.py index b2d4fb0456b23f..c5437ab3102050 100644 --- a/var/spack/repos/builtin/packages/qt-quick3d/package.py +++ b/var/spack/repos/builtin/packages/qt-quick3d/package.py @@ -14,6 +14,7 @@ class QtQuick3d(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.1", sha256="57abc6e178d2b28cfac544c71cb20f362409267be5422ca3fbaa46a1bbfd5515") version("6.6.0", sha256="2cda12649cfb6c23261c48e626714ca7eb01fa4b20e0bed02031f9c488c820ad") version("6.5.3", sha256="5df7494824c44fc73c03348b218166db5c4d8d42bd7d221f15e58c962cf657e5") version("6.5.2", sha256="7b40e578fc1ee2a5f5c413873fdb0552bb97829b70296ba3c6844da062608a7e") diff --git a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py index 42fc1a93e2dd18..7a8ef0ee7a7f97 100644 --- a/var/spack/repos/builtin/packages/qt-quicktimeline/package.py +++ b/var/spack/repos/builtin/packages/qt-quicktimeline/package.py @@ -14,6 +14,7 @@ class QtQuicktimeline(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.1", sha256="fe77555566bd6bb0ef0cb67b6ad09e225399fba3d2ec388de84e8a6200c0e2fc") version("6.6.0", sha256="06b94443da3f81153f04dca0cce781481462310d51f97d5550f81322a7a88cd0") version("6.5.3", sha256="fddd90cdb15af093673c6da924e18e22ebd364b9ab215356e1b40db28ac66640") version("6.5.2", sha256="96389af740fde3b2a655bf994001b94fd6e151ef84958ff9982e2ae799f1c3a2") diff --git a/var/spack/repos/builtin/packages/qt-shadertools/package.py b/var/spack/repos/builtin/packages/qt-shadertools/package.py index 5ac23d8626c861..b865bf4b9f259f 100644 --- a/var/spack/repos/builtin/packages/qt-shadertools/package.py +++ b/var/spack/repos/builtin/packages/qt-shadertools/package.py @@ -16,6 +16,7 @@ class QtShadertools(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.1", sha256="1206110464f8829e34ca7277bdcd2044e96a98078c9ab9f8b96ed526a4d81526") version("6.6.0", sha256="8b34908f8bbc7fb00a00babede91dbbeec9826f5138d390041f239d483e1162a") version("6.5.3", sha256="e6c627763db8c60799218947443efb90fb3511342f2212f5e99cd98f6942ed08") version("6.5.2", sha256="2b14cf982753f19cf48a4780bc7d96d8fc0ad3ed1049ae5d3292fc5fc1fd6aef") diff --git a/var/spack/repos/builtin/packages/qt-svg/package.py b/var/spack/repos/builtin/packages/qt-svg/package.py index dfd063bda82e20..eb8b8036a37836 100644 --- a/var/spack/repos/builtin/packages/qt-svg/package.py +++ b/var/spack/repos/builtin/packages/qt-svg/package.py @@ -16,6 +16,7 @@ class QtSvg(QtPackage): url = QtPackage.get_url(__qualname__) list_url = QtPackage.get_list_url(__qualname__) + version("6.6.1", sha256="b947acd83ac51116f29c7f7278d9faed19b8c11e021dbf08616e7d6200118db8") version("6.6.0", sha256="4fd6b4d9307c3cd8fd207e60334823fed07a9acb32f7d53cd9c9be9b6a2f8a30") version("6.5.3", sha256="fb8e5574c2480aab78062fad2d0a521633b4591ada600130b918b703c2ddb09a") version("6.5.2", sha256="2d0c8780f164472ad968bb4eff325a86b2826f101efedbeca5662acdc0b294ba") From 18efd808da878a137a05bb1e2633b67458577b06 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Tue, 28 Nov 2023 01:33:46 -0800 Subject: [PATCH 772/806] GoPackage: add new build system for Go packages (#41164) Co-authored-by: Tom Scogland Co-authored-by: Wouter Deconinck Co-authored-by: Massimiliano Culpo --- lib/spack/spack/build_systems/go.py | 98 +++++++++++++++++++ lib/spack/spack/cmd/create.py | 10 ++ lib/spack/spack/package.py | 1 + share/spack/spack-completion.fish | 2 +- .../repos/builtin/packages/lazygit/package.py | 20 ++++ .../repos/builtin/packages/scc/package.py | 22 +++++ 6 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 lib/spack/spack/build_systems/go.py create mode 100644 var/spack/repos/builtin/packages/lazygit/package.py create mode 100644 var/spack/repos/builtin/packages/scc/package.py diff --git a/lib/spack/spack/build_systems/go.py b/lib/spack/spack/build_systems/go.py new file mode 100644 index 00000000000000..a7dd04fcf6c649 --- /dev/null +++ b/lib/spack/spack/build_systems/go.py @@ -0,0 +1,98 @@ +# Copyright 2013-2023 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) + +import inspect + +import llnl.util.filesystem as fs + +import spack.builder +import spack.package_base +from spack.directives import build_system, extends +from spack.multimethod import when + +from ._checks import BaseBuilder, execute_install_time_tests + + +class GoPackage(spack.package_base.PackageBase): + """Specialized class for packages built using the Go toolchain.""" + + #: This attribute is used in UI queries that need to know the build + #: system base class + build_system_class = "GoPackage" + + #: Legacy buildsystem attribute used to deserialize and install old specs + legacy_buildsystem = "go" + + build_system("go") + + with when("build_system=go"): + # TODO: this seems like it should be depends_on, see + # setup_dependent_build_environment in go for why I kept it like this + extends("go@1.14:", type="build") + + +@spack.builder.builder("go") +class GoBuilder(BaseBuilder): + """The Go builder encodes the most common way of building software with + a golang go.mod file. It has two phases that can be overridden, if need be: + + 1. :py:meth:`~.GoBuilder.build` + 2. :py:meth:`~.GoBuilder.install` + + For a finer tuning you may override: + + +-----------------------------------------------+--------------------+ + | **Method** | **Purpose** | + +===============================================+====================+ + | :py:meth:`~.GoBuilder.build_args` | Specify arguments | + | | to ``go build`` | + +-----------------------------------------------+--------------------+ + | :py:meth:`~.GoBuilder.check_args` | Specify arguments | + | | to ``go test`` | + +-----------------------------------------------+--------------------+ + """ + + phases = ("build", "install") + + #: Callback names for install-time test + install_time_test_callbacks = ["check"] + + def setup_build_environment(self, env): + env.set("GO111MODULE", "on") + env.set("GOTOOLCHAIN", "local") + + @property + def build_directory(self): + """Return the directory containing the main go.mod.""" + return self.pkg.stage.source_path + + @property + def build_args(self): + """Arguments for ``go build``.""" + # Pass ldflags -s = --strip-all and -w = --no-warnings by default + return ["-ldflags", "-s -w", "-o", f"{self.pkg.name}"] + + @property + def check_args(self): + """Argument for ``go test`` during check phase""" + return [] + + def build(self, pkg, spec, prefix): + """Runs ``go build`` in the source directory""" + with fs.working_dir(self.build_directory): + inspect.getmodule(pkg).go("build", *self.build_args) + + def install(self, pkg, spec, prefix): + """Install built binaries into prefix bin.""" + with fs.working_dir(self.build_directory): + fs.mkdirp(prefix.bin) + fs.install(pkg.name, prefix.bin) + + spack.builder.run_after("install")(execute_install_time_tests) + + def check(self): + """Run ``go test .`` in the source directory""" + with fs.working_dir(self.build_directory): + inspect.getmodule(self.pkg).go("test", *self.check_args) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 130242a8b1e0dd..f9d4c30a3db68a 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -194,6 +194,14 @@ def cmake_args(self): return args""" +class GoPackageTemplate(PackageTemplate): + """Provides appropriate overrides for Go-module-based packages""" + + base_class_name = "GoPackage" + + body_def = "" + + class LuaPackageTemplate(PackageTemplate): """Provides appropriate overrides for LuaRocks-based packages""" @@ -590,6 +598,7 @@ def __init__(self, name, *args, **kwargs): "cargo": CargoPackageTemplate, "cmake": CMakePackageTemplate, "generic": PackageTemplate, + "go": GoPackageTemplate, "intel": IntelPackageTemplate, "lua": LuaPackageTemplate, "makefile": MakefilePackageTemplate, @@ -689,6 +698,7 @@ def __call__(self, stage, url): (r"/CMakeLists\.txt$", "cmake"), (r"/NAMESPACE$", "r"), (r"/Cargo\.toml$", "cargo"), + (r"/go\.mod$", "go"), (r"/configure$", "autotools"), (r"/configure\.(in|ac)$", "autoreconf"), (r"/Makefile\.am$", "autoreconf"), diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 0fdfffc177205a..8113d363dd7cf1 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -42,6 +42,7 @@ from spack.build_systems.cuda import CudaPackage from spack.build_systems.generic import Package from spack.build_systems.gnu import GNUMirrorPackage +from spack.build_systems.go import GoPackage from spack.build_systems.intel import IntelPackage from spack.build_systems.lua import LuaPackage from spack.build_systems.makefile import MakefilePackage diff --git a/share/spack/spack-completion.fish b/share/spack/spack-completion.fish index 08df9825b6edf9..1d32fc1d376be5 100755 --- a/share/spack/spack-completion.fish +++ b/share/spack/spack-completion.fish @@ -1261,7 +1261,7 @@ complete -c spack -n '__fish_spack_using_command create' -l keep-stage -f -a kee complete -c spack -n '__fish_spack_using_command create' -l keep-stage -d 'don\'t clean up staging area when command completes' complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -f -a name complete -c spack -n '__fish_spack_using_command create' -s n -l name -r -d 'name of the package to create' -complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -f -a 'autoreconf autotools bazel bundle cargo cmake generic intel lua makefile maven meson octave perlbuild perlmake python qmake r racket ruby scons sip waf' +complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -f -a 'autoreconf autotools bazel bundle cargo cmake generic go intel lua makefile maven meson octave perlbuild perlmake python qmake r racket ruby scons sip waf' complete -c spack -n '__fish_spack_using_command create' -s t -l template -r -d 'build system template to use' complete -c spack -n '__fish_spack_using_command create' -s r -l repo -r -f -a repo complete -c spack -n '__fish_spack_using_command create' -s r -l repo -r -d 'path to a repository where the package should be created' diff --git a/var/spack/repos/builtin/packages/lazygit/package.py b/var/spack/repos/builtin/packages/lazygit/package.py new file mode 100644 index 00000000000000..81395262bff28a --- /dev/null +++ b/var/spack/repos/builtin/packages/lazygit/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 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 Lazygit(GoPackage): + """A simple terminal UI for git commands""" + + homepage = "https://github.com/jesseduffield/lazygit" + url = "https://github.com/jesseduffield/lazygit/archive/refs/tags/v0.40.2.tar.gz" + + maintainers("twrs") + + license("MIT") + + version("0.40.2", sha256="146bd63995fcf2f2373bbc2143b3565b7a2be49a1d4e385496265ac0f69e4128") diff --git a/var/spack/repos/builtin/packages/scc/package.py b/var/spack/repos/builtin/packages/scc/package.py new file mode 100644 index 00000000000000..b0eae1b3c868f4 --- /dev/null +++ b/var/spack/repos/builtin/packages/scc/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2023 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 Scc(GoPackage): + """ + Sloc, Cloc and Code: scc is a very fast accurate code counter with + complexity calculations and COCOMO estimates written in pure Go. + """ + + homepage = "https://github.com/boyter/scc" + url = "https://github.com/boyter/scc/archive/refs/tags/v3.1.0.tar.gz" + git = "https://github.com/boyter/scc.git" + + license("MIT") + + version("3.1.0", sha256="bffea99c7f178bc48bfba3c64397d53a20a751dfc78221d347aabdce3422fd20") From f84557a81baefe7b3a2107ac90c93a1e55a51ae3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:38:38 +0000 Subject: [PATCH 773/806] build(deps): bump vermin from 1.5.2 to 1.6.0 in /.github/workflows/style (#41285) Bumps [vermin](https://github.com/netromdk/vermin) from 1.5.2 to 1.6.0. - [Release notes](https://github.com/netromdk/vermin/releases) - [Commits](https://github.com/netromdk/vermin/compare/v1.5.2...v1.6.0) --- updated-dependencies: - dependency-name: vermin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/style/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style/requirements.txt b/.github/workflows/style/requirements.txt index aadcd83c09fd32..8b33bc51409483 100644 --- a/.github/workflows/style/requirements.txt +++ b/.github/workflows/style/requirements.txt @@ -4,4 +4,4 @@ flake8==6.1.0 isort==5.12.0 mypy==1.6.1 types-six==1.16.21.9 -vermin==1.5.2 +vermin==1.6.0 From f037ef7451834de8678c896b9fa4656b2d716aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raffaele=20Solc=C3=A0?= Date: Tue, 28 Nov 2023 11:31:30 +0100 Subject: [PATCH 774/806] Fix elpa flags (missing optimization) (#41252) Setting CFLAGS/FCFLAGS overrides the default optimization flags. This commit brings them back. --- var/spack/repos/builtin/packages/elpa/package.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index 30061eb9eff857..2f107bb6642bc3 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -132,16 +132,7 @@ def configure_args(self): options.append("--enable-generic") if self.compiler.name == "gcc": - gcc_options = [] - gfortran_options = ["-ffree-line-length-none"] - - space_separator = " " - options.extend( - [ - "CFLAGS=" + space_separator.join(gcc_options), - "FCFLAGS=" + space_separator.join(gfortran_options), - ] - ) + options.extend(["CFLAGS=-O3", "FCFLAGS=-O3 -ffree-line-length-none"]) if "%aocc" in spec: options.extend(["FCFLAGS=-O3", "CFLAGS=-O3"]) From c2d29ca38c774b0885b8ee3ee6a23b623c415301 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 28 Nov 2023 05:42:16 -0800 Subject: [PATCH 775/806] libvips requires pkg-config to find glib (#41184) --- var/spack/repos/builtin/packages/libvips/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libvips/package.py b/var/spack/repos/builtin/packages/libvips/package.py index 95f7cf08ae83e5..6a6596dadd611d 100644 --- a/var/spack/repos/builtin/packages/libvips/package.py +++ b/var/spack/repos/builtin/packages/libvips/package.py @@ -32,6 +32,7 @@ class Libvips(AutotoolsPackage): # TODO: Add more variants! + depends_on("pkgconfig", type="build") depends_on("glib") depends_on("expat") From 6f08daf67020289e6a5ed1df9783ac5b2919e477 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:33:48 +0100 Subject: [PATCH 776/806] root: add a webgui patch (#41289) * root: add a webgui patch * Update var/spack/repos/builtin/packages/root/package.py Co-authored-by: Massimiliano Culpo * Add also the versions that don't need the webgui patch * Fix hash --------- Co-authored-by: jmcarcell Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/root/package.py | 5 ++++ .../repos/builtin/packages/root/webgui.patch | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/root/webgui.patch diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index 6d03b1155dffeb..a055778a472bdc 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -34,11 +34,14 @@ class Root(CMakePackage): # Development version (when more recent than production). # Production version + version("6.30.02", sha256="51a09c86ffa94089abac76daa3adc20812efc6c93b427697b843b12d73e145de") version("6.30.00", sha256="0592c066954cfed42312957c9cb251654456064fe2d8dabdcb8826f1c0099d71") + version("6.28.10", sha256="fc6a2d6c7cba853b0cfd6bd9514c90e9df50e1743899bc1db0472ee6f4e65a0a") version("6.28.06", sha256="af3b673b9aca393a5c9ae1bf86eab2672aaf1841b658c5c6e7a30ab93c586533") version("6.28.04", sha256="70f7f86a0cd5e3f2a0befdc59942dd50140d990ab264e8e56c7f17f6bfe9c965") version("6.28.02", sha256="6643c07710e68972b00227c68b20b1016fec16f3fba5f44a571fa1ce5bb42faa") version("6.28.00", sha256="afa1c5c06d0915411cb9492e474ea9ab12b09961a358e7e559013ed63b5d8084") + version("6.26.12", sha256="229daa0749e3e31b6e0dedc58b6838dbfc1180b4aba4741883b617b0b4fbc966") version("6.26.10", sha256="8e56bec397104017aa54f9eb554de7a1a134474fe0b3bb0f43a70fc4fabd625f") version("6.26.08", sha256="4dda043e7918b40743ad0299ddd8d526b7078f0a3822fd06066df948af47940e") version("6.26.06", sha256="b1f73c976a580a5c56c8c8a0152582a1dfc560b4dd80e1b7545237b65e6c89cb") @@ -106,6 +109,8 @@ class Root(CMakePackage): when="@6.26:6.26.06 +root7 ^nlohmann-json@3.11:", ) + patch("webgui.patch", level=0, when="@6.26.00:6.26.10,6.28.00:6.28.08,6.30.00 +webgui") + if sys.platform == "darwin": # Resolve non-standard use of uint, _cf_ # https://sft.its.cern.ch/jira/browse/ROOT-7886. diff --git a/var/spack/repos/builtin/packages/root/webgui.patch b/var/spack/repos/builtin/packages/root/webgui.patch new file mode 100644 index 00000000000000..932bb1023f850a --- /dev/null +++ b/var/spack/repos/builtin/packages/root/webgui.patch @@ -0,0 +1,25 @@ +--- config/rootrc.in_ORIG 2023-11-28 08:32:42.696061390 +0100 ++++ config/rootrc.in 2023-11-28 08:32:47.672727920 +0100 +@@ -217,7 +217,7 @@ + # Type of tree viewer: TTreeViewer or RTreeViewer + TreeViewer.Name: TTreeViewer + # Type of Browser: TRootBrowser or TRootBrowserLite +-Browser.Name: @root_browser_class@ ++Browser.Name: TRootBrowser + # Browser Options (plugins) + # F: File browser E: Text Editor H: HTML browser + # C: Canvas I: I/O redirection P: Proof G: GL viewer + +--- config/rootrc.in_ORIG 2023-11-28 08:18:11.686085190 +0100 ++++ config/rootrc.in 2023-11-28 08:18:15.839418409 +0100 +@@ -247,8 +247,8 @@ + WebGui.HttpPortMax: 9800 + # Exact IP iddress to bind bind http server (default - empty) + WebGui.HttpBind: +-# Use only loopback address to bind http server (default - no) +-WebGui.HttpLoopback: no ++# Use only loopback address to bind http server (default - yes) ++WebGui.HttpLoopback: yes + # Use https protocol for the http server (default - no) + WebGui.UseHttps: no + WebGui.ServerCert: rootserver.pem \ No newline at end of file From e0da7154ad33a4573f91ab4068239b5a6cd1a549 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Tue, 28 Nov 2023 09:44:15 -0500 Subject: [PATCH 777/806] celeritas: new version 0.4.0 (#41288) --- .../repos/builtin/packages/celeritas/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/celeritas/package.py b/var/spack/repos/builtin/packages/celeritas/package.py index 83690862bfdf9f..b384a4e396c22e 100644 --- a/var/spack/repos/builtin/packages/celeritas/package.py +++ b/var/spack/repos/builtin/packages/celeritas/package.py @@ -17,8 +17,17 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): maintainers("sethrj") - version("0.3.2", sha256="65a33de2518716638375df259d9dfc4d68b821ba1110f56b24c823ef5c5df249") - version("0.3.1", sha256="0f1effab306856d66f5079e8cadcb63e8c1f8a79245b94bf44b89251b3fb0cf0") + version("0.4.0", sha256="8b8eaef84641eeca0fc40321d358205fc9d51e3c6dc7bd1bf03218c1919c774e") + version( + "0.3.2", + sha256="65a33de2518716638375df259d9dfc4d68b821ba1110f56b24c823ef5c5df249", + deprecated=True, + ) + version( + "0.3.1", + sha256="0f1effab306856d66f5079e8cadcb63e8c1f8a79245b94bf44b89251b3fb0cf0", + deprecated=True, + ) version("0.3.0", sha256="f9620b6bcd8c9b5324ef215f8e44461f915c3fff47bf85ae442c9dafacaa79ac") version("0.2.2", sha256="ba5e341d636e00e3d7dbac13a2016b97014917489f46b8b387a2adf9d9563872") version( From 0e65e84768949b6e989036bbc17a2db5b4b62a4c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 28 Nov 2023 16:28:54 +0100 Subject: [PATCH 778/806] ASP-based solver: use a unique ID counter (#41290) * solver: use a unique counter for condition, triggers and effects * Do not reset counters when re-running setup What we need is just a unique ID, it doesn't need to start from zero every time. --- lib/spack/spack/solver/asp.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index b41bcba228ee2c..d33b47eeb24592 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -1117,11 +1117,8 @@ def __init__(self, tests=False): self.reusable_and_possible = ConcreteSpecsByHash() - # id for dummy variables - self._condition_id_counter = itertools.count() - self._trigger_id_counter = itertools.count() + self._id_counter = itertools.count() self._trigger_cache = collections.defaultdict(dict) - self._effect_id_counter = itertools.count() self._effect_cache = collections.defaultdict(dict) # Caches to optimize the setup phase of the solver @@ -1535,7 +1532,7 @@ def condition( # In this way, if a condition can't be emitted but the exception is handled in the caller, # we won't emit partial facts. - condition_id = next(self._condition_id_counter) + condition_id = next(self._id_counter) self.gen.fact(fn.pkg_fact(named_cond.name, fn.condition(condition_id))) self.gen.fact(fn.condition_reason(condition_id, msg)) @@ -1543,7 +1540,7 @@ def condition( named_cond_key = (str(named_cond), transform_required) if named_cond_key not in cache: - trigger_id = next(self._trigger_id_counter) + trigger_id = next(self._id_counter) requirements = self.spec_clauses(named_cond, body=True, required_from=name) if transform_required: @@ -1559,7 +1556,7 @@ def condition( cache = self._effect_cache[named_cond.name] imposed_spec_key = (str(imposed_spec), transform_imposed) if imposed_spec_key not in cache: - effect_id = next(self._effect_id_counter) + effect_id = next(self._id_counter) requirements = self.spec_clauses(imposed_spec, body=False, required_from=name) if transform_imposed: @@ -2573,12 +2570,8 @@ def setup( reuse: list of concrete specs that can be reused allow_deprecated: if True adds deprecated versions into the solve """ - self._condition_id_counter = itertools.count() - - # preliminary checks check_packages_exist(specs) - # get list of all possible dependencies self.possible_virtuals = set(x.name for x in specs if x.virtual) node_counter = _create_counter(specs, tests=self.tests) @@ -2698,8 +2691,8 @@ def setup( def literal_specs(self, specs): for spec in specs: self.gen.h2("Spec: %s" % str(spec)) - condition_id = next(self._condition_id_counter) - trigger_id = next(self._trigger_id_counter) + condition_id = next(self._id_counter) + trigger_id = next(self._id_counter) # Special condition triggered by "literal_solved" self.gen.fact(fn.literal(trigger_id)) @@ -2713,7 +2706,7 @@ def literal_specs(self, specs): "literal specs have different requirements. clear cache before computing literals" ) assert imposed_spec_key not in cache, msg - effect_id = next(self._effect_id_counter) + effect_id = next(self._id_counter) requirements = self.spec_clauses(spec) root_name = spec.name for clause in requirements: From ef8e6a969c75185aa55a22ba4dbbd32d81d41f7c Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Tue, 28 Nov 2023 11:27:58 -0500 Subject: [PATCH 779/806] vtk: Restrict application of patch xdmf2-hdf51.13.2.patch (#40266) The changes in patch xdmf2-hdf51.13.2.patch have effectively been added to vtk@9.2.3 (commit e81a2fe) So restrict application of patch fo @9:9.2 --- var/spack/repos/builtin/packages/vtk/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index d73bb332594ea4..6578a72af94100 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -67,7 +67,8 @@ class Vtk(CMakePackage): # Patch for paraview 5.10: +hdf5 ^hdf5@1.13.2: # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690 - patch("xdmf2-hdf51.13.2.patch", when="@9:9.2 +xdmf") + # patch seems to effectively been added to vtk@9.2.3 (e81a2fe) + patch("xdmf2-hdf51.13.2.patch", when="@9:9.2.2 +xdmf") # We cannot build with both osmesa and qt in spack conflicts("+osmesa", when="+qt") From 430b2dff5c9745c5005b6b18921f8fa91259263b Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:02:00 -0800 Subject: [PATCH 780/806] e4s ci: disable gpu test stack (#41296) --- .../gitlab/cloud_pipelines/.gitlab-ci.yml | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml index e73c492c9f01bf..0c3991efeda561 100644 --- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml +++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml @@ -370,25 +370,25 @@ e4s-rocm-external-build: ######################################## # GPU Testing Pipeline ######################################## -.gpu-tests: - extends: [ ".linux_x86_64_v3" ] - variables: - SPACK_CI_STACK_NAME: gpu-tests +# .gpu-tests: +# extends: [ ".linux_x86_64_v3" ] +# variables: +# SPACK_CI_STACK_NAME: gpu-tests -gpu-tests-generate: - extends: [ ".gpu-tests", ".generate-x86_64"] - image: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01 +# gpu-tests-generate: +# extends: [ ".gpu-tests", ".generate-x86_64"] +# image: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01 -gpu-tests-build: - extends: [ ".gpu-tests", ".build" ] - trigger: - include: - - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - job: gpu-tests-generate - strategy: depend - needs: - - artifacts: True - job: gpu-tests-generate +# gpu-tests-build: +# extends: [ ".gpu-tests", ".build" ] +# trigger: +# include: +# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml +# job: gpu-tests-generate +# strategy: depend +# needs: +# - artifacts: True +# job: gpu-tests-generate ######################################## # E4S OneAPI Pipeline From b719c905f1acea68f2be6209b95506619674f92c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 28 Nov 2023 19:13:55 +0100 Subject: [PATCH 781/806] apple-libuuid: update installation directory (#40416) * apple-libuuid: update installation directory Copy design of Apple GL --- etc/spack/defaults/darwin/packages.yaml | 2 +- .../builtin/packages/apple-libuuid/package.py | 28 +++++-------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/etc/spack/defaults/darwin/packages.yaml b/etc/spack/defaults/darwin/packages.yaml index 63f85bbbd98b65..9fd54f2e6e0991 100644 --- a/etc/spack/defaults/darwin/packages.yaml +++ b/etc/spack/defaults/darwin/packages.yaml @@ -50,4 +50,4 @@ packages: # Apple bundles libuuid in libsystem_c version 1353.100.2, # although the version number used here isn't critical - spec: apple-libuuid@1353.100.2 - prefix: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk + prefix: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk diff --git a/var/spack/repos/builtin/packages/apple-libuuid/package.py b/var/spack/repos/builtin/packages/apple-libuuid/package.py index 4c7526d6118537..9028efc5ac4780 100644 --- a/var/spack/repos/builtin/packages/apple-libuuid/package.py +++ b/var/spack/repos/builtin/packages/apple-libuuid/package.py @@ -18,28 +18,14 @@ class AppleLibuuid(BundlePackage): # Only supported on 'platform=darwin' conflicts("platform=linux") conflicts("platform=cray") + conflicts("platform=windows") @property - def libs(self): - """Export the Apple libuuid library. - - According to https://bugs.freedesktop.org/show_bug.cgi?id=105366, - libuuid is provided as part of libsystem_c. The Apple libsystem_c - library cannot be linked to directly using an absolute path; doing so - will cause the linker to throw an error 'cannot link directly with - /usr/lib/system/libsystem_c.dylib' and the linker will suggest linking - with System.framework instead. Linking to this framework is equivalent - to linking with libSystem.dylib, which can be confirmed on a macOS - system by executing at a terminal the command `ls -l - /System/Library/Frameworks/System.Framework` -- the file "System" is a - symlink to `/usr/lib/libSystem.B.dylib`, and `/usr/lib/libSystem.dylib` - also symlinks to this file. Running `otool -L /usr/lib/libSystem.dylib` - confirms that it will link dynamically to - `/usr/lib/system/libsystem_c.dylib`.""" - - return LibraryList("/usr/lib/libSystem.dylib") + def headers(self): + return HeaderList( + join_path(self.prefix, "System/Library/Frameworks/Kernel.framework/Headers") + ) @property - def headers(self): - """Export the Apple libuuid header.""" - return HeaderList(self.prefix.include.uuid.join("uuid.h")) + def libs(self): + return LibraryList(join_path(self.prefix, "System/Library/Frameworks/Kernel.framework")) From 1ebd37d20cc90f8c9ce12049b8c434114c12c06f Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:17:10 -0500 Subject: [PATCH 782/806] fix hip tests and bump hip-examples to 5.6.1 (#40928) * Initial commit to fix hip tests and bump hip-examples to 5.6.1 * fix styling * add installation of hip samples to share folder --- .../builtin/packages/hip-examples/package.py | 12 ++++++++---- .../repos/builtin/packages/hip/package.py | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/hip-examples/package.py b/var/spack/repos/builtin/packages/hip-examples/package.py index c625d0fe4b76c2..f3d3aed50cd86c 100644 --- a/var/spack/repos/builtin/packages/hip-examples/package.py +++ b/var/spack/repos/builtin/packages/hip-examples/package.py @@ -18,14 +18,18 @@ class HipExamples(Package): maintainers("srekolam", "renjithravindrankannath", "afzpatel") - version("master", branch="master") - + version("5.6.1", sha256="c1b5d30e387f869fae21170790ea3d604f7f0dba7771a9c096d9a5c2351dd001") + version("5.6.0", sha256="b751a0cac938248f7ea0fbeaa9df35688357b54ddd13359e2842a770b7923dfe") + version("5.5.1", sha256="c8522ef3f0804c85eef7e9efe2671f375b0d7f2100de85f55dcc2401efed6389") + version("5.5.0", sha256="bea8a4155bbfbdb3bc1f83c22e4bd1214b1b4e1840b58dc7d37704620de5b103") version("5.4.3", sha256="053b8b7892e2929e3f90bd978d8bb1c9801e4803eadd7d97fc6692ce60af1d47") patch("0001-add-inc-and-lib-paths-to-openmp-helloworld.patch") patch("0002-add-fpic-compile-to-add4.patch") - depends_on("hip") - depends_on("rocm-openmp-extras") + + for ver in ["5.6.1", "5.6.0", "5.5.1", "5.5.0", "5.4.3"]: + depends_on("hip@" + ver, when="@" + ver) + depends_on("rocm-openmp-extras@" + ver, when="@" + ver) def install(self, spec, prefix): stage = os.getcwd() diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 1200cfdd2cb72d..a34805eb6757ea 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -709,6 +709,14 @@ def cmake_args(self): args.append(self.define("CLR_BUILD_OCL", False)), return args + test_src_dir_old = "samples" + test_src_dir = "hip-tests/samples" + + @run_after("install") + def install_samples(self): + if self.spec.satisfies("@5.6.0:"): + install_tree(self.test_src_dir, self.spec.prefix.share.samples) + @run_after("install") def cache_test_sources(self): """Copy the tests source files after the package is installed to an @@ -716,16 +724,18 @@ def cache_test_sources(self): if self.spec.satisfies("@:5.1.0"): return elif self.spec.satisfies("@5.1:5.5"): - self.test_src_dir = "samples" + self.cache_extra_test_sources([self.test_src_dir_old]) elif self.spec.satisfies("@5.6:"): - self.test_src_dir = "hip-tests/samples" - self.cache_extra_test_sources([self.test_src_dir]) + self.cache_extra_test_sources([self.test_src_dir]) def test_samples(self): # configure, build and run all hip samples if self.spec.satisfies("@:5.1.0"): raise SkipTest("Test is only available for specs after version 5.1.0") - test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) + elif self.spec.satisfies("@5.1:5.5"): + test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir_old) + elif self.spec.satisfies("@5.6:"): + test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) prefixes = ";".join( [ self.spec["hip"].prefix, From 92e0d42b6459265db546353cca803ce4f41afac1 Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:49:07 -0500 Subject: [PATCH 783/806] update hipblas rocalution, rocsolver, rocsparse to new syntax (#40135) * initial commit to update hipblas rocalution, rocsolver, rocsparse to new syntax * add rocblas test changes and fixes for hipblas and rocsolver tests * fix styling * remove updates for rocblas --- .../repos/builtin/packages/hipblas/package.py | 11 +++++++---- ...ove-hipblas-clients-file-installation.patch | 18 ++++++++++++++++++ .../builtin/packages/rocalution/package.py | 10 ++++++---- .../builtin/packages/rocsolver/package.py | 11 +++++++---- .../builtin/packages/rocsparse/package.py | 9 ++++++--- 5 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation.patch diff --git a/var/spack/repos/builtin/packages/hipblas/package.py b/var/spack/repos/builtin/packages/hipblas/package.py index b0261bd5db545c..973a8c34b32881 100644 --- a/var/spack/repos/builtin/packages/hipblas/package.py +++ b/var/spack/repos/builtin/packages/hipblas/package.py @@ -132,10 +132,7 @@ class Hipblas(CMakePackage, CudaPackage, ROCmPackage): patch("link-clients-blas.patch", when="@4.3.0:4.3.2") patch("link-clients-blas-4.5.0.patch", when="@4.5.0:4.5.2") patch("hipblas-link-clients-blas-5.0.0.patch", when="@5.0.0:5.0.2") - - def check(self): - exe = join_path(self.build_directory, "clients", "staging", "hipblas-test") - self.run_test(exe, options=["--gtest_filter=-*known_bug*"]) + patch("remove-hipblas-clients-file-installation.patch", when="@5.5:") depends_on("rocm-cmake@5.2.0:", type="build", when="@5.2.0:") depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:") @@ -222,3 +219,9 @@ def cmake_args(self): args.append("-DCMAKE_INSTALL_LIBDIR=lib") return args + + @run_after("build") + @on_package_attributes(run_tests=True) + def check_build(self): + exe = Executable(join_path(self.build_directory, "clients", "staging", "hipblas-test")) + exe("--gtest_filter=-*known_bug*") diff --git a/var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation.patch b/var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation.patch new file mode 100644 index 00000000000000..a1adf8930675be --- /dev/null +++ b/var/spack/repos/builtin/packages/hipblas/remove-hipblas-clients-file-installation.patch @@ -0,0 +1,18 @@ +diff --git a/clients/CMakeLists.txt b/clients/CMakeLists.txt +index 2ae1535..c956e00 100644 +--- a/clients/CMakeLists.txt ++++ b/clients/CMakeLists.txt +@@ -134,13 +134,3 @@ add_custom_command( OUTPUT "${HIPBLAS_GENTEST}" + + add_custom_target( hipblas-common DEPENDS "${HIPBLAS_COMMON}" "${HIPBLAS_TEMPLATE}" "${HIPBLAS_SMOKE}" "${HIPBLAS_GENTEST}" ) + +-rocm_install( +- FILES ${HIPBLAS_COMMON} ${HIPBLAS_TEMPLATE} ${HIPBLAS_SMOKE} +- DESTINATION "${CMAKE_INSTALL_BINDIR}" +- COMPONENT clients-common +-) +-rocm_install( +- PROGRAMS ${HIPBLAS_GENTEST} +- DESTINATION "${CMAKE_INSTALL_BINDIR}" +- COMPONENT clients-common +-) diff --git a/var/spack/repos/builtin/packages/rocalution/package.py b/var/spack/repos/builtin/packages/rocalution/package.py index b0ba2021ba6804..4b80d75ee79033 100644 --- a/var/spack/repos/builtin/packages/rocalution/package.py +++ b/var/spack/repos/builtin/packages/rocalution/package.py @@ -184,10 +184,6 @@ class Rocalution(CMakePackage): # Fix build for most Radeon 5000 and Radeon 6000 series GPUs. patch("0004-fix-navi-1x.patch", when="@5.2.0:5.3") - def check(self): - exe = join_path(self.build_directory, "clients", "staging", "rocalution-test") - self.run_test(exe) - def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) @@ -236,3 +232,9 @@ def cmake_args(self): args.append("-DCMAKE_INSTALL_LIBDIR=lib") return args + + @run_after("build") + @on_package_attributes(run_tests=True) + def check_build(self): + exe = Executable(join_path(self.build_directory, "clients", "staging", "rocalution-test")) + exe() diff --git a/var/spack/repos/builtin/packages/rocsolver/package.py b/var/spack/repos/builtin/packages/rocsolver/package.py index 3b1cfcb51173dd..babf8b9d524cf6 100644 --- a/var/spack/repos/builtin/packages/rocsolver/package.py +++ b/var/spack/repos/builtin/packages/rocsolver/package.py @@ -126,6 +126,7 @@ class Rocsolver(CMakePackage): depends_on("cmake@3.8:", type="build", when="@4.1.0:") depends_on("cmake@3.5:", type="build") depends_on("fmt@7:", type="build", when="@4.5.0:") + depends_on("fmt@7:8.0.1", type="test", when="@5.6:") depends_on("googletest@1.10.0:", type="test") depends_on("netlib-lapack@3.7.1:", type="test") @@ -136,10 +137,6 @@ class Rocsolver(CMakePackage): # Maximize compatibility with other libraries that are using fmt. patch("fmt-9-compatibility.patch", when="@5.2.0:5.5") - def check(self): - exe = join_path(self.build_directory, "clients", "staging", "rocsolver-test") - self.run_test(exe, options=["--gtest_filter=checkin*-*known_bug*"]) - depends_on("hip@4.1.0:", when="@4.1.0:") depends_on("rocm-cmake@master", type="build", when="@master:") depends_on("rocm-cmake@4.5.0:", type="build", when="@4.5.0:") @@ -236,3 +233,9 @@ def cmake_args(self): def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) + + @run_after("build") + @on_package_attributes(run_tests=True) + def check_build(self): + exe = Executable(join_path(self.build_directory, "clients", "staging", "rocsolver-test")) + exe("--gtest_filter=checkin*-*known_bug*") diff --git a/var/spack/repos/builtin/packages/rocsparse/package.py b/var/spack/repos/builtin/packages/rocsparse/package.py index 4fb8fb1646b4fc..e0ae2806622acc 100644 --- a/var/spack/repos/builtin/packages/rocsparse/package.py +++ b/var/spack/repos/builtin/packages/rocsparse/package.py @@ -311,10 +311,13 @@ class Rocsparse(CMakePackage): destination="mtx", ) - def check(self): + @run_after("build") + def check_build(self): if self.spec.satisfies("+test"): - exe = join_path(self.build_directory, "clients", "staging", "rocsparse-test") - self.run_test(exe, options=["--gtest_filter=*quick*:*pre_checkin*-*known_bug*"]) + exe = Executable( + join_path(self.build_directory, "clients", "staging", "rocsparse-test") + ) + exe("--gtest_filter=*quick*:*pre_checkin*-*known_bug*") def setup_build_environment(self, env): env.set("CXX", self.spec["hip"].hipcc) From 4b41b11c30bd5c40cd9bcb11c1a629df50705141 Mon Sep 17 00:00:00 2001 From: "Paul R. C. Kent" Date: Tue, 28 Nov 2023 16:28:28 -0500 Subject: [PATCH 784/806] cuda: add 12.3.0 (#40827) --- var/spack/repos/builtin/packages/cuda/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index e624acbaa9db8d..44134e8e441098 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -25,6 +25,20 @@ preferred_ver = "11.8.0" _versions = { + "12.3.0": { + "Linux-aarch64": ( + "9a8fb8acf46b88faf0d711bda3149e1706efbbae02fcb40ab72addfd0e9ce5df", + "https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux_sbsa.run", + ), + "Linux-x86_64": ( + "7c13face3af64d6e1648d6e3101d31c8111e747143acb0077d973c1690820422", + "https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux.run", + ), + "Linux-ppc64le": ( + "de15c04380ec35b194c07503bf434837bac5b427cf77b19a63962b1653d195d5", + "https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux_ppc64le.run", + ), + }, "12.2.1": { "Linux-aarch64": ( "a9ae6bd02684c7acfb229484368bf2691d592767ce1aed10ae9aed92c81b9f09", From 29b75a7ace4aafd9550ff98fbf3ffe9f14d99450 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 29 Nov 2023 09:09:16 +0100 Subject: [PATCH 785/806] Fix an issue with deconcretization/reconcretization of environments (#41294) --- lib/spack/spack/solver/asp.py | 12 +++++------- lib/spack/spack/test/env.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index d33b47eeb24592..8ad8d5c5c013da 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -2699,15 +2699,13 @@ def literal_specs(self, specs): self.gen.fact(fn.pkg_fact(spec.name, fn.condition_trigger(condition_id, trigger_id))) self.gen.fact(fn.condition_reason(condition_id, f"{spec} requested from CLI")) - # Effect imposes the spec imposed_spec_key = str(spec), None cache = self._effect_cache[spec.name] - msg = ( - "literal specs have different requirements. clear cache before computing literals" - ) - assert imposed_spec_key not in cache, msg - effect_id = next(self._id_counter) - requirements = self.spec_clauses(spec) + if imposed_spec_key in cache: + effect_id, requirements = cache[imposed_spec_key] + else: + effect_id = next(self._id_counter) + requirements = self.spec_clauses(spec) root_name = spec.name for clause in requirements: clause_name = clause.args[0] diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py index 7490a6e0b26204..6ab05a603f9704 100644 --- a/lib/spack/spack/test/env.py +++ b/lib/spack/spack/test/env.py @@ -778,3 +778,32 @@ def test_env_with_include_def_missing(mutable_mock_env_path, mock_packages): with e: with pytest.raises(UndefinedReferenceError, match=r"which does not appear"): e.concretize() + + +@pytest.mark.regression("41292") +def test_deconcretize_then_concretize_does_not_error(mutable_mock_env_path, mock_packages): + """Tests that, after having deconcretized a spec, we can reconcretize an environment which + has 2 or more user specs mapping to the same concrete spec. + """ + mutable_mock_env_path.mkdir() + spack_yaml = mutable_mock_env_path / ev.manifest_name + spack_yaml.write_text( + """spack: + specs: + # These two specs concretize to the same hash + - c + - c@1.0 + # Spec used to trigger the bug + - a + concretizer: + unify: true + """ + ) + e = ev.Environment(mutable_mock_env_path) + with e: + e.concretize() + e.deconcretize(spack.spec.Spec("a"), concrete=False) + e.concretize() + assert len(e.concrete_roots()) == 3 + all_root_hashes = set(x.dag_hash() for x in e.concrete_roots()) + assert len(all_root_hashes) == 2 From 306377684bcf1eb16617b2b9901ecd8e6fd80fdf Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Wed, 29 Nov 2023 04:19:29 -0500 Subject: [PATCH 786/806] CMake: add v3.27.9 (#41301) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index ec9aac6fa06613..bdd38abaabac43 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -27,6 +27,7 @@ class Cmake(Package): executables = ["^cmake[0-9]*$"] version("master", branch="master") + version("3.27.9", sha256="609a9b98572a6a5ea477f912cffb973109ed4d0a6a6b3f9e2353d2cdc048708e") version("3.27.8", sha256="fece24563f697870fbb982ea8bf17482c9d5f855d8c9bf0b82463d76c9e8d0cc") version("3.27.7", sha256="08f71a106036bf051f692760ef9558c0577c42ac39e96ba097e7662bd4158d8e") version("3.27.6", sha256="ef3056df528569e0e8956f6cf38806879347ac6de6a4ff7e4105dc4578732cfb") From fcb3d62093021c7f3fb49defc54ffd7c11caf64a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 29 Nov 2023 11:29:17 +0100 Subject: [PATCH 787/806] unit tests: use --verbose to see order on macos (#41314) --- .github/workflows/unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 7f7f3808b018c0..8e8031dc49d77f 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -215,7 +215,7 @@ jobs: $(which spack) bootstrap disable spack-install $(which spack) solve zlib common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x) - $(which spack) unit-test --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}" + $(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}" - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d with: flags: unittests,macos From 2c4bc287b82f7c736ac95f7749466310182614a6 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 29 Nov 2023 12:14:39 +0100 Subject: [PATCH 788/806] cuda: fix compiler conflicts (#41304) --- lib/spack/spack/build_systems/cuda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_systems/cuda.py b/lib/spack/spack/build_systems/cuda.py index 4a07c8b2c4cf44..9f9348f6610739 100644 --- a/lib/spack/spack/build_systems/cuda.py +++ b/lib/spack/spack/build_systems/cuda.py @@ -136,12 +136,12 @@ def cuda_flags(arch_list): conflicts("%gcc@11:", when="+cuda ^cuda@:11.4.0") conflicts("%gcc@11.2:", when="+cuda ^cuda@:11.5") conflicts("%gcc@12:", when="+cuda ^cuda@:11.8") - conflicts("%gcc@13:", when="+cuda ^cuda@:12.1") + conflicts("%gcc@13:", when="+cuda ^cuda@:12.3") conflicts("%clang@12:", when="+cuda ^cuda@:11.4.0") conflicts("%clang@13:", when="+cuda ^cuda@:11.5") conflicts("%clang@14:", when="+cuda ^cuda@:11.7") conflicts("%clang@15:", when="+cuda ^cuda@:12.0") - conflicts("%clang@16:", when="+cuda ^cuda@:12.1") + conflicts("%clang@16:", when="+cuda ^cuda@:12.3") # https://gist.github.com/ax3l/9489132#gistcomment-3860114 conflicts("%gcc@10", when="+cuda ^cuda@:11.4.0") From 367ca3f0ec1f5b01059e7cd9bf60d394bdb1773c Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 29 Nov 2023 12:50:28 +0100 Subject: [PATCH 789/806] fmt: Add git attribute (#41293) --- var/spack/repos/builtin/packages/fmt/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py index d88823705d2efa..21c5fa5c5b3f52 100644 --- a/var/spack/repos/builtin/packages/fmt/package.py +++ b/var/spack/repos/builtin/packages/fmt/package.py @@ -13,6 +13,7 @@ class Fmt(CMakePackage): homepage = "https://fmt.dev/" url = "https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip" + git = "https://github.com/fmtlib/fmt.git" maintainers("msimberg") license("MIT") From c06f353f558c746e87112f6cae7d6ae4857da14a Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 29 Nov 2023 14:06:41 +0100 Subject: [PATCH 790/806] Simplify _create_mock_configuration_scopes (#41318) --- lib/spack/spack/test/conftest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index fb7608a56bd377..6cf4d7375aa028 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -720,13 +720,13 @@ def configuration_dir(tmpdir_factory, linux_os): def _create_mock_configuration_scopes(configuration_dir): """Create the configuration scopes used in `config` and `mutable_config`.""" - scopes = [spack.config.InternalConfigScope("_builtin", spack.config.CONFIG_DEFAULTS)] - scopes += [ - spack.config.ConfigScope(name, str(configuration_dir.join(name))) - for name in ["site", "system", "user"] + return [ + spack.config.InternalConfigScope("_builtin", spack.config.CONFIG_DEFAULTS), + spack.config.ConfigScope("site", str(configuration_dir.join("site"))), + spack.config.ConfigScope("system", str(configuration_dir.join("system"))), + spack.config.ConfigScope("user", str(configuration_dir.join("user"))), + spack.config.InternalConfigScope("command_line"), ] - scopes += [spack.config.InternalConfigScope("command_line")] - return scopes @pytest.fixture(scope="session") From 72216b503ff1897bc4128595e707a7a02222cfed Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Wed, 29 Nov 2023 15:10:27 +0100 Subject: [PATCH 791/806] dla-future: Add conflicts for compilation issues pre-0.3.1 (#41317) * dla-future: Add conflict for pedantic warnings turning into errors * dla-future: Add conflicts for nvcc/fmt/Umpire compilation issues --- .../repos/builtin/packages/dla-future/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/var/spack/repos/builtin/packages/dla-future/package.py b/var/spack/repos/builtin/packages/dla-future/package.py index c360aa30784bb1..5e90ac112e7247 100644 --- a/var/spack/repos/builtin/packages/dla-future/package.py +++ b/var/spack/repos/builtin/packages/dla-future/package.py @@ -79,6 +79,22 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage): depends_on("rocsolver", when="+rocm") depends_on("rocthrust", when="+rocm") + # nvcc 11.2 and older is unable to detect fmt::formatter specializations. + # DLA-Future 0.3.1 includes a workaround to avoid including fmt in device + # code: + # https://github.com/pika-org/pika/issues/870 + # https://github.com/eth-cscs/DLA-Future/pull/1045 + conflicts("^fmt@10:", when="@:0.3.0 +cuda ^cuda@:11.2") + + # Compilation problem triggered by the bundled fmt in Umpire together with + # fmt 10, which only happens with GCC 9 and nvcc 11.2 and older: + # https://github.com/eth-cscs/DLA-Future/issues/1044 + conflicts("^fmt@10:", when="@:0.3.0 %gcc@9 +cuda ^cuda@:11.2 ^umpire@2022.10:") + + # Pedantic warnings, triggered by GCC 9 and 10, are always errors until 0.3.1: + # https://github.com/eth-cscs/DLA-Future/pull/1043 + conflicts("%gcc@9:10", when="@:0.3.0") + depends_on("hdf5 +cxx+mpi+threadsafe+shared", when="+hdf5") conflicts("+cuda", when="+rocm") From b6f8cb821c7595b054cb03c57fc654a0fa447d8c Mon Sep 17 00:00:00 2001 From: Andrey Perestoronin Date: Wed, 29 Nov 2023 17:09:32 +0000 Subject: [PATCH 792/806] intel-oneapi-ccl 2021.11.1: added new version to packages (#41300) * added new packages * align release with ccl patch * revert version on compiler classics --- .../repos/builtin/packages/intel-oneapi-ccl/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py index 35f31c095ff480..59b48aa3d9c4c6 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py @@ -27,6 +27,12 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage): depends_on("intel-oneapi-mpi") + version( + "2021.11.1", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/07958f2f-8d95-422d-8c18-a4c7352b005c/l_oneapi_ccl_p_2021.11.1.9_offline.sh", + sha256="35817d40f57c0d35b9bacf3935cedc1c82fc8d809513d82580561f63f31cac17", + expand=False, + ) version( "2021.11.0", url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/9e63eba5-2b3d-4032-ad22-21f02e35b518/l_oneapi_ccl_p_2021.11.0.49161_offline.sh", From 3987604b8910f8d90d4696e1c0b7e4c0dd0a3308 Mon Sep 17 00:00:00 2001 From: Sergio Alexis Paz Date: Wed, 29 Nov 2023 17:16:27 -0300 Subject: [PATCH 793/806] Add gipaw when building quantum-espresso with cmake (#41142) * gipaw.x installed by cmake if version >= 5c4a4ce. gipaw.x will only be installed with cmake if the qe-gipaw version is >= 5c4a4ce. Currently, QE source uses the older f5823521 one. Here a patch to the submodule_commit_hash_records to use a newer qe-gipaw version. --- .../quantum-espresso/gipaw-eccee44.patch | 8 +++++++ .../packages/quantum-espresso/package.py | 21 ++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 var/spack/repos/builtin/packages/quantum-espresso/gipaw-eccee44.patch diff --git a/var/spack/repos/builtin/packages/quantum-espresso/gipaw-eccee44.patch b/var/spack/repos/builtin/packages/quantum-espresso/gipaw-eccee44.patch new file mode 100644 index 00000000000000..e2d8179010f4ad --- /dev/null +++ b/var/spack/repos/builtin/packages/quantum-espresso/gipaw-eccee44.patch @@ -0,0 +1,8 @@ +--- spack-src/external/submodule_commit_hash_records.org 2023-11-15 18:38:47.485317449 -0300 ++++ spack-src/external/submodule_commit_hash_records 2023-11-15 18:39:02.661861757 -0300 +@@ -5,4 +5,4 @@ + 82005cbb65bdf5d32ca021848eec8f19da956a77 mbd + f72ab25fa4ea755c1b4b230ae8074b47d5509c70 pw2qmcpack + 1d6b187374a2d50b509e5e79e2cab01a79ff7ce1 wannier90 +-f5823521ad8fdd8b8e9e29197eedb354f9b9146d qe-gipaw ++eccee44d3caf1c930fb72ad9c741fbb743eabf45 qe-gipaw diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index 40c036320d7a7a..dacf771f60b070 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -227,13 +227,8 @@ class QuantumEspresso(CMakePackage, Package): variant( "gipaw", default=False, - when="build_system=generic", description="Builds Gauge-Including Projector Augmented-Waves executable", ) - with when("+gipaw"): - conflicts( - "@:6.3", msg="gipaw standard support available for QE 6.3 or grater version only" - ) # Dependencies not affected by variants depends_on("blas") @@ -260,6 +255,15 @@ class QuantumEspresso(CMakePackage, Package): # NOTE: *SOME* third-party patches will require deactivation of # upstream patches using `~patch` variant + # gipaw + conflicts( + "@:6.2", + when="+gipaw", + msg="gipaw standard support available for QE 6.3 or grater version only", + ) + + conflicts("+gipaw build_system=cmake", when="@:7.1") + # Only CMake will work for @6.8: %aocc conflicts( "build_system=generic", when="@6.8: %aocc", msg="Please use CMake to build with AOCC" @@ -400,6 +404,9 @@ class QuantumEspresso(CMakePackage, Package): # extlibs_makefile updated to work with fujitsu compilers patch("fj-fox.patch", when="+patch %fj") + # gipaw.x will only be installed with cmake if the qe-gipaw version is >= 5c4a4ce. + patch("gipaw-eccee44.patch", when="@7.2+gipaw build_system=cmake") + class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): def cmake_args(self): @@ -416,6 +423,10 @@ def cmake_args(self): self.define_from_variant("QE_ENABLE_MPI_GPU_AWARE", "mpigpu"), ] + if "+gipaw" in spec: + cmake_args.append(self.define("QE_ENABLE_PLUGINS", "gipaw")) + cmake_args.append(self.define("QE_ENABLE_FOX", True)) + if "+cuda" in self.spec: cmake_args.append(self.define("QE_ENABLE_OPENACC", True)) From 889b729e524ce1a872c6789273afa7ed056cb6e9 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 29 Nov 2023 22:14:57 +0100 Subject: [PATCH 794/806] Refactor a test to not use the "working_env" fixture (#41308) Co-authored-by: Harmen Stoppels --- lib/spack/spack/test/conftest.py | 3 --- lib/spack/spack/test/module_parsing.py | 17 +++++++---------- lib/spack/spack/util/module_cmd.py | 20 +++++++++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index 6cf4d7375aa028..326ee143e718e9 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -714,9 +714,6 @@ def configuration_dir(tmpdir_factory, linux_os): t.write(content) yield tmpdir - # Once done, cleanup the directory - shutil.rmtree(str(tmpdir)) - def _create_mock_configuration_scopes(configuration_dir): """Create the configuration scopes used in `config` and `mutable_config`.""" diff --git a/lib/spack/spack/test/module_parsing.py b/lib/spack/spack/test/module_parsing.py index 196c18fe2deec5..6ac41847211dee 100644 --- a/lib/spack/spack/test/module_parsing.py +++ b/lib/spack/spack/test/module_parsing.py @@ -27,16 +27,13 @@ ] -def test_module_function_change_env(tmpdir, working_env): - src_file = str(tmpdir.join("src_me")) - with open(src_file, "w") as f: - f.write("export TEST_MODULE_ENV_VAR=TEST_SUCCESS\n") - - os.environ["NOT_AFFECTED"] = "NOT_AFFECTED" - module("load", src_file, module_template=". {0} 2>&1".format(src_file)) - - assert os.environ["TEST_MODULE_ENV_VAR"] == "TEST_SUCCESS" - assert os.environ["NOT_AFFECTED"] == "NOT_AFFECTED" +def test_module_function_change_env(tmp_path): + environb = {b"TEST_MODULE_ENV_VAR": b"TEST_FAIL", b"NOT_AFFECTED": b"NOT_AFFECTED"} + src_file = tmp_path / "src_me" + src_file.write_text("export TEST_MODULE_ENV_VAR=TEST_SUCCESS\n") + module("load", str(src_file), module_template=f". {src_file} 2>&1", environb=environb) + assert environb[b"TEST_MODULE_ENV_VAR"] == b"TEST_SUCCESS" + assert environb[b"NOT_AFFECTED"] == b"NOT_AFFECTED" def test_module_function_no_change(tmpdir): diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index c05115768f2ff3..41a48f81913572 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -10,6 +10,7 @@ import os import re import subprocess +from typing import MutableMapping, Optional import llnl.util.tty as tty @@ -21,8 +22,13 @@ awk_cmd = r"""awk 'BEGIN{for(name in ENVIRON)""" r"""printf("%s=%s%c", name, ENVIRON[name], 0)}'""" -def module(*args, **kwargs): - module_cmd = kwargs.get("module_template", "module " + " ".join(args)) +def module( + *args, + module_template: Optional[str] = None, + environb: Optional[MutableMapping[bytes, bytes]] = None, +): + module_cmd = module_template or ("module " + " ".join(args)) + environb = environb or os.environb if args[0] in module_change_commands: # Suppress module output @@ -33,10 +39,10 @@ def module(*args, **kwargs): stderr=subprocess.STDOUT, shell=True, executable="/bin/bash", + env=environb, ) - # In Python 3, keys and values of `environ` are byte strings. - environ = {} + new_environb = {} output = module_p.communicate()[0] # Loop over each environment variable key=value byte string @@ -45,11 +51,11 @@ def module(*args, **kwargs): parts = entry.split(b"=", 1) if len(parts) != 2: continue - environ[parts[0]] = parts[1] + new_environb[parts[0]] = parts[1] # Update os.environ with new dict - os.environ.clear() - os.environb.update(environ) # novermin + environb.clear() + environb.update(new_environb) # novermin else: # Simply execute commands that don't change state and return output From 450f93805629ef3d11d2b7c146552a761458ac01 Mon Sep 17 00:00:00 2001 From: Luc Berger Date: Wed, 29 Nov 2023 15:47:15 -0700 Subject: [PATCH 795/806] kokkos: add v4.2.00 (#41203) * Kokkos: adding version 4.2.00 to the package * Kokkos: adding AMD GPU arch * kokkos@4.2.00 +sycl: patch numeric traits unit test --------- Co-authored-by: eugeneswalker Co-authored-by: Todd Gamblin --- .../cloud_pipelines/stacks/e4s-oneapi/spack.yaml | 8 ++++---- var/spack/repos/builtin/packages/kokkos/package.py | 3 +++ .../builtin/packages/kokkos/sycl_bhalft_test.patch | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/kokkos/sycl_bhalft_test.patch diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml index eae204527ce5a6..2e10267f3655bf 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml @@ -198,12 +198,12 @@ spack: # GPU - aml +ze - amrex +sycl - - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples - - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples + - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +examples + - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +examples - ginkgo +sycl - heffte +sycl - - kokkos +sycl +openmp cxxstd=17 +tests +examples - - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples + - kokkos +sycl +openmp cxxstd=17 +examples + - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +examples - petsc +sycl - slate +sycl - sundials +sycl cxxstd=17 +examples-install diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index 5eb7ce5cca0ac3..174e059c8596b1 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -25,6 +25,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): version("master", branch="master") version("develop", branch="develop") + version("4.2.00", sha256="ac08765848a0a6ac584a0a46cd12803f66dd2a2c2db99bb17c06ffc589bf5be8") version("4.1.00", sha256="cf725ea34ba766fdaf29c884cfe2daacfdc6dc2d6af84042d1c78d0f16866275") version("4.0.01", sha256="bb942de8afdd519fd6d5d3974706bfc22b6585a62dd565c12e53bdb82cd154f0") version("4.0.00", sha256="1829a423883d4b44223c7c3a53d3c51671145aad57d7d23e6a1a4bebf710dcf6") @@ -155,6 +156,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): "gfx906": "vega906", "gfx908": "vega908", "gfx90a": "vega90A", + "gfx942": "amd_gfx942", "gfx1030": "navi1030", "gfx1100": "navi1100", } @@ -234,6 +236,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): # Patches patch("hpx_profiling_fences.patch", when="@3.5.00 +hpx") + patch("sycl_bhalft_test.patch", when="@4.2.00 +sycl") variant("shared", default=True, description="Build shared libraries") diff --git a/var/spack/repos/builtin/packages/kokkos/sycl_bhalft_test.patch b/var/spack/repos/builtin/packages/kokkos/sycl_bhalft_test.patch new file mode 100644 index 00000000000000..483bfc493ad075 --- /dev/null +++ b/var/spack/repos/builtin/packages/kokkos/sycl_bhalft_test.patch @@ -0,0 +1,14 @@ +diff -ruN spack-src/core/unit_test/TestNumericTraits.hpp spack-src-patched/core/unit_test/TestNumericTraits.hpp +--- spack-src/core/unit_test/TestNumericTraits.hpp 2023-11-20 13:26:46.000000000 -0800 ++++ spack-src-patched/core/unit_test/TestNumericTraits.hpp 2023-11-28 12:06:44.216150685 -0800 +@@ -110,8 +110,8 @@ + + KOKKOS_FUNCTION void operator()(Epsilon, int, int& e) const { + using Kokkos::Experimental::epsilon; +- auto const eps = epsilon::value; +- auto const one = T(1); ++ T const eps = epsilon::value; ++ T const one = 1; + // Avoid higher precision intermediate representation + compare() = one + eps; + e += (int)!(compare() != one); From 220898b4de380cfa21090c1a2cc1616d25c1f304 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 30 Nov 2023 00:15:07 +0100 Subject: [PATCH 796/806] py-pygeos: add v0.14 (#41248) * py-pygeos: add v0.14 * Python is also a link dep --- var/spack/repos/builtin/packages/py-pygeos/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pygeos/package.py b/var/spack/repos/builtin/packages/py-pygeos/package.py index 3c867e3d1190ca..9c5b312308bd12 100644 --- a/var/spack/repos/builtin/packages/py-pygeos/package.py +++ b/var/spack/repos/builtin/packages/py-pygeos/package.py @@ -18,14 +18,16 @@ class PyPygeos(PythonPackage): maintainers("adamjstewart") + version("0.14", sha256="30fbc17f64844200b85133b885fcfb65541b8779531f6ef4f8fe467d3fba7623") version("0.10", sha256="8ad4703cf8f983a6878a885765be975709a2fe300e54bc6c8623ddbca4903b6c") version("0.9", sha256="c0584b20e95f80ee57277a6eb1e5d7f86600f8b1ef3c627d238e243afdcc0cc7") version("0.8", sha256="45b7e1aaa5fc9ff53565ef089fb75c53c419ace8cee18385ec1d7c1515c17cbc") - depends_on("python@3.6:", when="@0.10:", type=("build", "link", "run")) - depends_on("python@3:", type=("build", "link", "run")) - depends_on("py-setuptools", type="build") + depends_on("python", type=("build", "link", "run")) + depends_on("py-cython@0.29:0", when="@0.14:", type="build") depends_on("py-cython", type="build") + depends_on("py-setuptools@61:", when="@0.14:", type="build") + depends_on("py-setuptools", type="build") depends_on("py-numpy@1.13:", when="@0.9:", type=("build", "link", "run")) depends_on("py-numpy@1.10:", type=("build", "link", "run")) depends_on("geos@3.5:") From f4f67adf499f8af2d2904cb9e424b9bda3ce40d0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 30 Nov 2023 00:17:34 +0100 Subject: [PATCH 797/806] py-numba: add v0.58.1 (#41262) * py-numba: add v0.58.1 * Passing tests --- var/spack/repos/builtin/packages/py-numba/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-numba/package.py b/var/spack/repos/builtin/packages/py-numba/package.py index c266f53a7487d0..965f865874db9f 100644 --- a/var/spack/repos/builtin/packages/py-numba/package.py +++ b/var/spack/repos/builtin/packages/py-numba/package.py @@ -13,6 +13,9 @@ class PyNumba(PythonPackage): pypi = "numba/numba-0.35.0.tar.gz" git = "https://github.com/numba/numba.git" + skip_modules = ["numba.core.rvsdg_frontend"] + + version("0.58.1", sha256="487ded0633efccd9ca3a46364b40006dbdaca0f95e99b8b83e778d1195ebcbaa") version("0.57.0", sha256="2af6d81067a5bdc13960c6d2519dbabbf4d5d597cf75d640c5aeaefd48c6420a") version("0.56.4", sha256="32d9fef412c81483d7efe0ceb6cf4d3310fde8b624a9cecca00f790573ac96ee") version("0.56.0", sha256="87a647dd4b8fce389869ff71f117732de9a519fe07663d9a02d75724eb8e244d") @@ -24,14 +27,16 @@ class PyNumba(PythonPackage): version("0.48.0", sha256="9d21bc77e67006b5723052840c88cc59248e079a907cc68f1a1a264e1eaba017") version("0.40.1", sha256="52d046c13bcf0de79dbfb936874b7228f141b9b8e3447cc35855e9ad3e12aa33") - depends_on("python@3.8:3.11", when="@0.57", type=("build", "run")) + depends_on("python@3.8:3.11", when="@0.57:", type=("build", "run")) depends_on("python@3.7:3.10", when="@0.55:0.56", type=("build", "run")) depends_on("python@3.7:3.9", when="@0.54", type=("build", "run")) depends_on("python@3.6:3.9", when="@0.53", type=("build", "run")) depends_on("python@3.6:3.8", when="@0.52", type=("build", "run")) depends_on("python@3.6:3.8", when="@0.48:0.51", type=("build", "run")) depends_on("python@3.3:3.7", when="@0.40.1:0.47", type=("build", "run")) - depends_on("py-numpy@1.21:1.24", when="@0.57:", type=("build", "run")) + depends_on("py-numpy@1.22:1.26", when="@0.58.1:", type=("build", "run")) + depends_on("py-numpy@1.21:1.25", when="@0.58.0", type=("build", "run")) + depends_on("py-numpy@1.21:1.24", when="@0.57", type=("build", "run")) depends_on("py-numpy@1.18:1.23", when="@0.56.1:0.56.4", type=("build", "run")) depends_on("py-numpy@1.18:1.22", when="@0.55.2:0.56.0", type=("build", "run")) depends_on("py-numpy@1.18:1.21", when="@0.55.0:0.55.1", type=("build", "run")) @@ -39,6 +44,7 @@ class PyNumba(PythonPackage): depends_on("py-numpy@1.15:1.20", when="@0.48:0.53", type=("build", "run")) depends_on("py-numpy@1.10:1.20", when="@:0.47", type=("build", "run")) depends_on("py-setuptools", type=("build", "run")) + depends_on("py-llvmlite@0.41", when="@0.58", type=("build", "run")) depends_on("py-llvmlite@0.40", when="@0.57", type=("build", "run")) depends_on("py-llvmlite@0.39", when="@0.56", type=("build", "run")) depends_on("py-llvmlite@0.38", when="@0.55", type=("build", "run")) From 2ececcd03eb37e706b3e89fcf4b962c8dce7484c Mon Sep 17 00:00:00 2001 From: Chris White Date: Wed, 29 Nov 2023 20:32:50 -0800 Subject: [PATCH 798/806] MFEM: add mpi link dir (#41337) Also fix netcdf-c zlib reference --- var/spack/repos/builtin/packages/mfem/package.py | 14 ++++++++------ .../repos/builtin/packages/netcdf-c/package.py | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 75eeda7b1fd51b..588a4627ed02df 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -751,12 +751,14 @@ def find_optional_library(name, prefix): ) gfortran_lib = LibraryList(libfile) sp_lib += [ld_flags_from_library_list(gfortran_lib)] - if ("^mpich" in strumpack) or ("^mvapich2" in strumpack): - sp_lib += ["-lmpifort"] - elif "^openmpi" in strumpack: - sp_lib += ["-lmpi_mpifh"] - elif "^spectrum-mpi" in strumpack: - sp_lib += ["-lmpi_ibm_mpifh"] + if "+mpi" in strumpack: + mpi = strumpack["mpi"] + if ("^mpich" in strumpack) or ("^mvapich2" in strumpack): + sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpifort"])] + elif "^openmpi" in strumpack: + sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpi_mpifh"])] + elif "^spectrum-mpi" in strumpack: + sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpi_ibm_mpifh"])] if "+openmp" in strumpack: # The '+openmp' in the spec means strumpack will TRY to find # OpenMP; if not found, we should not add any flags -- how do diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index f111264e811725..220a1edc950ddc 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -441,7 +441,7 @@ def configure_args(self): if "~shared" in hdf5: if "+szip" in hdf5: extra_libs.append(hdf5["szip"].libs) - extra_libs.append(hdf5["zlib"].libs) + extra_libs.append(hdf5["zlib-api"].libs) if self.spec.satisfies("@4.9.0:+shared"): lib_search_dirs.extend(self.spec["zlib-api"].libs.directories) From 0a9c84dd25f91f9eaf670fa2fc4fe6a63c3632f3 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Wed, 29 Nov 2023 21:38:05 -0700 Subject: [PATCH 799/806] SEACAS: new release (#41273) Replace last release due to build issues on windows. Tag was applied incorrectly --- var/spack/repos/builtin/packages/seacas/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/seacas/package.py b/var/spack/repos/builtin/packages/seacas/package.py index 44b4b6a6034cce..a2106a301436d1 100644 --- a/var/spack/repos/builtin/packages/seacas/package.py +++ b/var/spack/repos/builtin/packages/seacas/package.py @@ -32,7 +32,12 @@ class Seacas(CMakePackage): # ###################### Versions ########################## version("master", branch="master") version( - "2023-10-24", sha256="f93bf0327329c302ed3feb6adf2e3968f01ec325084a457b2c2dbbf6c4f751a2" + "2023-11-27", sha256="fea1c0a6959d46af7478c9c16aac64e76c6dc358da38e2fe8793c15c1cffa8fc" + ) + version( + "2023-10-24", + sha256="f93bf0327329c302ed3feb6adf2e3968f01ec325084a457b2c2dbbf6c4f751a2", + deprecated=True, ) version( "2023-05-30", sha256="3dd982841854466820a3902163ad1cf1b3fbab65ed7542456d328f2d1a5373c1" From 377e7de0d283be78dea97c971f30a0bc7e8b7a8e Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 30 Nov 2023 07:18:41 +0100 Subject: [PATCH 800/806] tests: fix issue with os.environ binding (#41342) --- lib/spack/spack/test/util/environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/util/environment.py b/lib/spack/spack/test/util/environment.py index b797331b779cb9..21fbf4ebe62f01 100644 --- a/lib/spack/spack/test/util/environment.py +++ b/lib/spack/spack/test/util/environment.py @@ -147,7 +147,8 @@ def test_reverse_environment_modifications(working_env): reversal = to_reverse.reversed() - os.environ = start_env.copy() + os.environ.clear() + os.environ.update(start_env) print(os.environ) to_reverse.apply_modifications() From 4b93c57d440b244532597d0c5b840a9f8b3412ec Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 30 Nov 2023 08:37:11 +0100 Subject: [PATCH 801/806] argparse: make scope choices lazy s.t. validation in tests works (#41344) --- lib/spack/spack/cmd/add.py | 2 +- lib/spack/spack/cmd/bootstrap.py | 7 +++---- lib/spack/spack/cmd/buildcache.py | 6 ++---- lib/spack/spack/cmd/change.py | 2 +- lib/spack/spack/cmd/clean.py | 2 +- lib/spack/spack/cmd/common/arguments.py | 10 ++++++++++ lib/spack/spack/cmd/common/env_utility.py | 2 +- lib/spack/spack/cmd/compiler.py | 11 +++++------ lib/spack/spack/cmd/compilers.py | 5 ++--- lib/spack/spack/cmd/config.py | 10 ++++------ lib/spack/spack/cmd/deconcretize.py | 2 +- lib/spack/spack/cmd/dependencies.py | 2 +- lib/spack/spack/cmd/dependents.py | 2 +- lib/spack/spack/cmd/deprecate.py | 2 +- lib/spack/spack/cmd/dev_build.py | 2 +- lib/spack/spack/cmd/develop.py | 2 +- lib/spack/spack/cmd/diff.py | 2 +- lib/spack/spack/cmd/env.py | 2 +- lib/spack/spack/cmd/extensions.py | 2 +- lib/spack/spack/cmd/external.py | 8 +++----- lib/spack/spack/cmd/fetch.py | 2 +- lib/spack/spack/cmd/find.py | 2 +- lib/spack/spack/cmd/gpg.py | 2 +- lib/spack/spack/cmd/graph.py | 2 +- lib/spack/spack/cmd/info.py | 2 +- lib/spack/spack/cmd/install.py | 2 +- lib/spack/spack/cmd/list.py | 2 +- lib/spack/spack/cmd/load.py | 2 +- lib/spack/spack/cmd/location.py | 2 +- lib/spack/spack/cmd/mark.py | 2 +- lib/spack/spack/cmd/mirror.py | 15 ++++++--------- lib/spack/spack/cmd/modules/__init__.py | 2 +- lib/spack/spack/cmd/patch.py | 2 +- lib/spack/spack/cmd/pkg.py | 2 +- lib/spack/spack/cmd/remove.py | 2 +- lib/spack/spack/cmd/repo.py | 8 ++++---- lib/spack/spack/cmd/restage.py | 2 +- lib/spack/spack/cmd/solve.py | 2 +- lib/spack/spack/cmd/spec.py | 2 +- lib/spack/spack/cmd/stage.py | 2 +- lib/spack/spack/cmd/test.py | 2 +- lib/spack/spack/cmd/tutorial.py | 2 +- lib/spack/spack/cmd/undevelop.py | 2 +- lib/spack/spack/cmd/uninstall.py | 2 +- lib/spack/spack/cmd/unload.py | 2 +- lib/spack/spack/cmd/versions.py | 2 +- 46 files changed, 76 insertions(+), 78 deletions(-) diff --git a/lib/spack/spack/cmd/add.py b/lib/spack/spack/cmd/add.py index 53544ad40a110c..dd5338e3ca6d7d 100644 --- a/lib/spack/spack/cmd/add.py +++ b/lib/spack/spack/cmd/add.py @@ -6,7 +6,7 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments +from spack.cmd.common import arguments description = "add a spec to an environment" section = "environments" diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index 71c3d3a04526e7..7c076258954e86 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -15,13 +15,13 @@ import spack.bootstrap import spack.bootstrap.config import spack.bootstrap.core -import spack.cmd.common.arguments import spack.config import spack.main import spack.mirror import spack.spec import spack.stage import spack.util.path +from spack.cmd.common import arguments description = "manage bootstrap configuration" section = "system" @@ -68,10 +68,9 @@ def _add_scope_option(parser): - scopes = spack.config.scopes() parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, help="configuration scope to read/modify", ) @@ -106,7 +105,7 @@ def setup_parser(subparser): disable.add_argument("name", help="name of the source to be disabled", nargs="?", default=None) reset = sp.add_parser("reset", help="reset bootstrapping configuration to Spack defaults") - spack.cmd.common.arguments.add_common_arguments(reset, ["yes_to_all"]) + arguments.add_common_arguments(reset, ["yes_to_all"]) root = sp.add_parser("root", help="get/set the root bootstrap directory") _add_scope_option(root) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 94cce16030be32..7896b543735f53 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -21,7 +21,6 @@ import spack.binary_distribution as bindist import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment as ev import spack.error @@ -40,6 +39,7 @@ import spack.util.web as web_util from spack.build_environment import determine_number_of_jobs from spack.cmd import display_specs +from spack.cmd.common import arguments from spack.oci.image import ( Digest, ImageReference, @@ -182,11 +182,9 @@ def setup_parser(subparser: argparse.ArgumentParser): ) # used to construct scope arguments below - scopes = spack.config.scopes() - check.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope containing mirrors to check", diff --git a/lib/spack/spack/cmd/change.py b/lib/spack/spack/cmd/change.py index 0a57cb6da5b5be..3662dc22e63602 100644 --- a/lib/spack/spack/cmd/change.py +++ b/lib/spack/spack/cmd/change.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import spack.cmd -import spack.cmd.common.arguments as arguments +from spack.cmd.common import arguments description = "change an existing spec in an environment" section = "environments" diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py index 5a1831cda5a43d..59b0529fd27eca 100644 --- a/lib/spack/spack/cmd/clean.py +++ b/lib/spack/spack/cmd/clean.py @@ -12,13 +12,13 @@ import spack.bootstrap import spack.caches -import spack.cmd.common.arguments as arguments import spack.cmd.test import spack.config import spack.repo import spack.stage import spack.store import spack.util.path +from spack.cmd.common import arguments from spack.paths import lib_path, var_path description = "remove temporary build files and/or downloaded archives" diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index 9aa3edac479f50..79f844d0e2c680 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -124,6 +124,16 @@ def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, deptype) +class ConfigScopeChoices: + """A lazy list of config scope values (values may change at runtime in tests).""" + + def __contains__(self, item): + return item in spack.config.scopes() + + def __iter__(self): + return iter(spack.config.scopes().keys()) + + def _cdash_reporter(namespace): """Helper function to create a CDash reporter. This function gets an early reference to the argparse namespace under construction, so it can later use it to create the object. diff --git a/lib/spack/spack/cmd/common/env_utility.py b/lib/spack/spack/cmd/common/env_utility.py index b8a6338d924f83..175105d9061c55 100644 --- a/lib/spack/spack/cmd/common/env_utility.py +++ b/lib/spack/spack/cmd/common/env_utility.py @@ -8,13 +8,13 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.deptypes as dt import spack.error import spack.paths import spack.spec import spack.store from spack import build_environment, traverse +from spack.cmd.common import arguments from spack.context import Context from spack.util.environment import dump_environment, pickle_environment diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 76eb8d31508a67..6ba6371087d1ae 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -14,6 +14,7 @@ import spack.compilers import spack.config import spack.spec +from spack.cmd.common import arguments description = "manage compilers" section = "system" @@ -23,8 +24,6 @@ def setup_parser(subparser): sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="compiler_command") - scopes = spack.config.scopes() - # Find find_parser = sp.add_parser( "find", @@ -47,7 +46,7 @@ def setup_parser(subparser): find_parser.add_argument("add_paths", nargs=argparse.REMAINDER) find_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope("compilers"), help="configuration scope to modify", @@ -61,7 +60,7 @@ def setup_parser(subparser): remove_parser.add_argument("compiler_spec") remove_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=None, help="configuration scope to modify", @@ -71,7 +70,7 @@ def setup_parser(subparser): list_parser = sp.add_parser("list", help="list available compilers") list_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_list_scope(), help="configuration scope to read from", @@ -82,7 +81,7 @@ def setup_parser(subparser): info_parser.add_argument("compiler_spec") info_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_list_scope(), help="configuration scope to read from", diff --git a/lib/spack/spack/cmd/compilers.py b/lib/spack/spack/cmd/compilers.py index 6d0ff43ea2e88d..25831da7fb827a 100644 --- a/lib/spack/spack/cmd/compilers.py +++ b/lib/spack/spack/cmd/compilers.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import spack.config +from spack.cmd.common import arguments from spack.cmd.compiler import compiler_list description = "list available compilers" @@ -12,11 +13,9 @@ def setup_parser(subparser): - scopes = spack.config.scopes() - subparser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, help="configuration scope to read/modify", ) diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index 14514400a86ceb..c99f0458765005 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -10,7 +10,6 @@ import llnl.util.filesystem as fs import llnl.util.tty as tty -import spack.cmd.common.arguments import spack.config import spack.environment as ev import spack.repo @@ -18,6 +17,7 @@ import spack.schema.packages import spack.store import spack.util.spack_yaml as syaml +from spack.cmd.common import arguments from spack.util.editor import editor description = "get and set configuration options" @@ -26,12 +26,10 @@ def setup_parser(subparser): - scopes = spack.config.scopes() - # User can only choose one subparser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, help="configuration scope to read/modify", ) @@ -101,13 +99,13 @@ def setup_parser(subparser): setup_parser.add_parser = add_parser update = sp.add_parser("update", help="update configuration files to the latest format") - spack.cmd.common.arguments.add_common_arguments(update, ["yes_to_all"]) + arguments.add_common_arguments(update, ["yes_to_all"]) update.add_argument("section", help="section to update") revert = sp.add_parser( "revert", help="revert configuration files to their state before update" ) - spack.cmd.common.arguments.add_common_arguments(revert, ["yes_to_all"]) + arguments.add_common_arguments(revert, ["yes_to_all"]) revert.add_argument("section", help="section to update") diff --git a/lib/spack/spack/cmd/deconcretize.py b/lib/spack/spack/cmd/deconcretize.py index dbcf72ea8b3a29..706986e2b36889 100644 --- a/lib/spack/spack/cmd/deconcretize.py +++ b/lib/spack/spack/cmd/deconcretize.py @@ -10,10 +10,10 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.cmd.common.confirmation as confirmation import spack.environment as ev import spack.spec +from spack.cmd.common import arguments description = "remove specs from the concretized lockfile of an environment" section = "environments" diff --git a/lib/spack/spack/cmd/dependencies.py b/lib/spack/spack/cmd/dependencies.py index ed85d47d2266d0..abc79f8904c357 100644 --- a/lib/spack/spack/cmd/dependencies.py +++ b/lib/spack/spack/cmd/dependencies.py @@ -9,11 +9,11 @@ from llnl.util.tty.colify import colify import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.package_base import spack.repo import spack.store +from spack.cmd.common import arguments description = "show dependencies of a package" section = "basic" diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py index 733feaf71559b9..302fde6c7583d2 100644 --- a/lib/spack/spack/cmd/dependents.py +++ b/lib/spack/spack/cmd/dependents.py @@ -9,10 +9,10 @@ from llnl.util.tty.colify import colify import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.repo import spack.store +from spack.cmd.common import arguments description = "show packages that depend on another" section = "basic" diff --git a/lib/spack/spack/cmd/deprecate.py b/lib/spack/spack/cmd/deprecate.py index dca9b49756b501..4e9ebd1468af20 100644 --- a/lib/spack/spack/cmd/deprecate.py +++ b/lib/spack/spack/cmd/deprecate.py @@ -20,9 +20,9 @@ from llnl.util.symlink import symlink import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.store +from spack.cmd.common import arguments from spack.database import InstallStatuses from spack.error import SpackError diff --git a/lib/spack/spack/cmd/dev_build.py b/lib/spack/spack/cmd/dev_build.py index 90008c8b3ef601..59f68a26c638f3 100644 --- a/lib/spack/spack/cmd/dev_build.py +++ b/lib/spack/spack/cmd/dev_build.py @@ -9,9 +9,9 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.repo +from spack.cmd.common import arguments description = "developer build: build from code in current working directory" section = "build" diff --git a/lib/spack/spack/cmd/develop.py b/lib/spack/spack/cmd/develop.py index ac7e89596fa851..f515352175d4d1 100644 --- a/lib/spack/spack/cmd/develop.py +++ b/lib/spack/spack/cmd/develop.py @@ -8,10 +8,10 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.spec import spack.util.path import spack.version +from spack.cmd.common import arguments from spack.error import SpackError description = "add a spec to an environment's dev-build information" diff --git a/lib/spack/spack/cmd/diff.py b/lib/spack/spack/cmd/diff.py index e321c28afbf43f..f6a5c5ce7a0b49 100644 --- a/lib/spack/spack/cmd/diff.py +++ b/lib/spack/spack/cmd/diff.py @@ -10,11 +10,11 @@ from llnl.util.tty.color import cprint, get_color_when import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.solver.asp as asp import spack.util.environment import spack.util.spack_json as sjson +from spack.cmd.common import arguments description = "compare two specs" section = "basic" diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index bb1ad13ec2b985..41a7b08bfaf1ed 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -20,7 +20,6 @@ import spack.cmd import spack.cmd.common import spack.cmd.common.arguments -import spack.cmd.common.arguments as arguments import spack.cmd.install import spack.cmd.modules import spack.cmd.uninstall @@ -31,6 +30,7 @@ import spack.schema.env import spack.spec import spack.tengine +from spack.cmd.common import arguments from spack.util.environment import EnvironmentModifications description = "manage virtual environments" diff --git a/lib/spack/spack/cmd/extensions.py b/lib/spack/spack/cmd/extensions.py index 1bf5c9ecffc4d9..e021623d524377 100644 --- a/lib/spack/spack/cmd/extensions.py +++ b/lib/spack/spack/cmd/extensions.py @@ -10,10 +10,10 @@ from llnl.util.tty.colify import colify import spack.cmd as cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.repo import spack.store +from spack.cmd.common import arguments description = "list extensions for package" section = "extensions" diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py index 081ec8039438bd..c3e791fd6a8bfc 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -14,12 +14,12 @@ import spack import spack.cmd -import spack.cmd.common.arguments import spack.config import spack.cray_manifest as cray_manifest import spack.detection import spack.error import spack.util.environment +from spack.cmd.common import arguments description = "manage external packages in Spack configuration" section = "config" @@ -29,8 +29,6 @@ def setup_parser(subparser): sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="external_command") - scopes = spack.config.scopes() - find_parser = sp.add_parser("find", help="add external packages to packages.yaml") find_parser.add_argument( "--not-buildable", @@ -48,7 +46,7 @@ def setup_parser(subparser): ) find_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope("packages"), help="configuration scope to modify", @@ -56,7 +54,7 @@ def setup_parser(subparser): find_parser.add_argument( "--all", action="store_true", help="search for all packages that Spack knows about" ) - spack.cmd.common.arguments.add_common_arguments(find_parser, ["tags", "jobs"]) + arguments.add_common_arguments(find_parser, ["tags", "jobs"]) find_parser.add_argument("packages", nargs=argparse.REMAINDER) find_parser.epilog = ( 'The search is by default on packages tagged with the "build-tools" or ' diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index 227f7e89732a27..a11ba35c67fc9b 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -6,11 +6,11 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment as ev import spack.repo import spack.traverse +from spack.cmd.common import arguments description = "fetch archives for packages" section = "build" diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index a0570038456018..0dbd751c412117 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -12,9 +12,9 @@ import spack.bootstrap import spack.cmd as cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.repo +from spack.cmd.common import arguments from spack.database import InstallStatuses description = "list and search installed packages" diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py index 0bce5f473664c5..b22c21178b2277 100644 --- a/lib/spack/spack/cmd/gpg.py +++ b/lib/spack/spack/cmd/gpg.py @@ -7,11 +7,11 @@ import os import spack.binary_distribution -import spack.cmd.common.arguments as arguments import spack.mirror import spack.paths import spack.util.gpg import spack.util.url +from spack.cmd.common import arguments description = "handle GPG actions for spack" section = "packaging" diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py index 4122d8d58894e2..212aac3953b4f2 100644 --- a/lib/spack/spack/cmd/graph.py +++ b/lib/spack/spack/cmd/graph.py @@ -5,10 +5,10 @@ from llnl.util import tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment as ev import spack.store +from spack.cmd.common import arguments from spack.graph import DAGWithDependencyTypes, SimpleDAG, graph_ascii, graph_dot, static_graph_dot description = "generate graphs of package dependency relationships" diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 1f90831f65ebd3..0ce04ef23b631b 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -11,13 +11,13 @@ import llnl.util.tty.color as color from llnl.util.tty.colify import colify -import spack.cmd.common.arguments as arguments import spack.deptypes as dt import spack.fetch_strategy as fs import spack.install_test import spack.repo import spack.spec import spack.version +from spack.cmd.common import arguments from spack.package_base import preferred_version description = "get detailed information on a particular package" diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index b74f982755115b..5db30ba7b5f483 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -14,7 +14,6 @@ import spack.build_environment import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment as ev import spack.fetch_strategy @@ -23,6 +22,7 @@ import spack.report import spack.spec import spack.store +from spack.cmd.common import arguments from spack.error import SpackError from spack.installer import PackageInstaller diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index a46d7fa5e079c6..0bfe8041f5ec8e 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -15,9 +15,9 @@ import llnl.util.tty as tty from llnl.util.tty.colify import colify -import spack.cmd.common.arguments as arguments import spack.deptypes as dt import spack.repo +from spack.cmd.common import arguments from spack.version import VersionList description = "list and search available packages" diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 5cdd2909c7ae40..3945651341e11e 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -8,12 +8,12 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.cmd.find import spack.environment as ev import spack.store import spack.user_environment as uenv import spack.util.environment +from spack.cmd.common import arguments description = "add package to the user environment" section = "user environment" diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index b4bbaf54b82a8a..d2aa0bc98171b2 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -9,11 +9,11 @@ import spack.builder import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.paths import spack.repo import spack.stage +from spack.cmd.common import arguments description = "print out locations of packages and spack directories" section = "basic" diff --git a/lib/spack/spack/cmd/mark.py b/lib/spack/spack/cmd/mark.py index 61939c9458322c..a31beacd1c0692 100644 --- a/lib/spack/spack/cmd/mark.py +++ b/lib/spack/spack/cmd/mark.py @@ -8,11 +8,11 @@ from llnl.util import tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.error import spack.package_base import spack.repo import spack.store +from spack.cmd.common import arguments from spack.database import InstallStatuses description = "mark packages as explicitly or implicitly installed" diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index 1036dcbe917e35..a9c93618c7f9e5 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -11,7 +11,6 @@ import spack.caches import spack.cmd -import spack.cmd.common.arguments as arguments import spack.concretize import spack.config import spack.environment as ev @@ -20,6 +19,7 @@ import spack.spec import spack.util.path import spack.util.web as web_util +from spack.cmd.common import arguments from spack.error import SpackError description = "manage mirrors (source and binary)" @@ -88,16 +88,13 @@ def setup_parser(subparser): "--mirror-url", metavar="mirror_url", type=str, help="find mirror to destroy by url" ) - # used to construct scope arguments below - scopes = spack.config.scopes() - # Add add_parser = sp.add_parser("add", help=mirror_add.__doc__) add_parser.add_argument("name", help="mnemonic name for mirror", metavar="mirror") add_parser.add_argument("url", help="url of mirror directory from 'spack mirror create'") add_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope to modify", @@ -117,7 +114,7 @@ def setup_parser(subparser): remove_parser.add_argument("name", help="mnemonic name for mirror", metavar="mirror") remove_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope to modify", @@ -136,7 +133,7 @@ def setup_parser(subparser): ) set_url_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope to modify", @@ -165,7 +162,7 @@ def setup_parser(subparser): set_parser.add_argument("--url", help="url of mirror directory from 'spack mirror create'") set_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope to modify", @@ -176,7 +173,7 @@ def setup_parser(subparser): list_parser = sp.add_parser("list", help=mirror_list.__doc__) list_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_list_scope(), help="configuration scope to read from", diff --git a/lib/spack/spack/cmd/modules/__init__.py b/lib/spack/spack/cmd/modules/__init__.py index 65b174a06f6628..c63e14aba51d48 100644 --- a/lib/spack/spack/cmd/modules/__init__.py +++ b/lib/spack/spack/cmd/modules/__init__.py @@ -14,11 +14,11 @@ from llnl.util.tty import color import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.modules import spack.modules.common import spack.repo +from spack.cmd.common import arguments description = "manipulate module files" section = "environment" diff --git a/lib/spack/spack/cmd/patch.py b/lib/spack/spack/cmd/patch.py index 2d2596c9c53e57..c8277b26ee0d4e 100644 --- a/lib/spack/spack/cmd/patch.py +++ b/lib/spack/spack/cmd/patch.py @@ -6,12 +6,12 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment as ev import spack.package_base import spack.repo import spack.traverse +from spack.cmd.common import arguments description = "patch expanded archive sources in preparation for install" section = "build" diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index 9bbd34ca812ae5..0f025ace253ea6 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -12,11 +12,11 @@ from llnl.util.tty.colify import colify import spack.cmd -import spack.cmd.common.arguments as arguments import spack.paths import spack.repo import spack.util.executable as exe import spack.util.package_hash as ph +from spack.cmd.common import arguments description = "query packages associated with particular git revisions" section = "developer" diff --git a/lib/spack/spack/cmd/remove.py b/lib/spack/spack/cmd/remove.py index 4fdb36a5e53b05..ca6d6417270103 100644 --- a/lib/spack/spack/cmd/remove.py +++ b/lib/spack/spack/cmd/remove.py @@ -6,7 +6,7 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments +from spack.cmd.common import arguments description = "remove specs from an environment" section = "environments" diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 7953f227e51bc4..a8bba6c2dc5368 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -11,6 +11,7 @@ import spack.config import spack.repo import spack.util.path +from spack.cmd.common import arguments description = "manage package source repositories" section = "config" @@ -19,7 +20,6 @@ def setup_parser(subparser): sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="repo_command") - scopes = spack.config.scopes() # Create create_parser = sp.add_parser("create", help=repo_create.__doc__) @@ -43,7 +43,7 @@ def setup_parser(subparser): list_parser = sp.add_parser("list", help=repo_list.__doc__) list_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_list_scope(), help="configuration scope to read from", @@ -54,7 +54,7 @@ def setup_parser(subparser): add_parser.add_argument("path", help="path to a Spack package repository directory") add_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope to modify", @@ -67,7 +67,7 @@ def setup_parser(subparser): ) remove_parser.add_argument( "--scope", - choices=scopes, + choices=arguments.ConfigScopeChoices(), metavar=spack.config.SCOPES_METAVAR, default=spack.config.default_modify_scope(), help="configuration scope to modify", diff --git a/lib/spack/spack/cmd/restage.py b/lib/spack/spack/cmd/restage.py index ab4d68dcc9460b..3078f59cdded7c 100644 --- a/lib/spack/spack/cmd/restage.py +++ b/lib/spack/spack/cmd/restage.py @@ -6,8 +6,8 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.repo +from spack.cmd.common import arguments description = "revert checked out package source code" section = "build" diff --git a/lib/spack/spack/cmd/solve.py b/lib/spack/spack/cmd/solve.py index 4a30b1694b9ac2..c97428b8e364c7 100644 --- a/lib/spack/spack/cmd/solve.py +++ b/lib/spack/spack/cmd/solve.py @@ -12,12 +12,12 @@ import spack import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment import spack.hash_types as ht import spack.package_base import spack.solver.asp as asp +from spack.cmd.common import arguments description = "concretize a specs using an ASP solver" section = "developer" diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py index 0abd63ff6a69b6..d55fa3d3b866c6 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -10,11 +10,11 @@ import spack import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.hash_types as ht import spack.spec import spack.store +from spack.cmd.common import arguments description = "show what would be installed, given a spec" section = "build" diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 4405ddedca47c9..acb0b53dea4931 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -8,13 +8,13 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments import spack.config import spack.environment as ev import spack.package_base import spack.repo import spack.stage import spack.traverse +from spack.cmd.common import arguments description = "expand downloaded archive in preparation for install" section = "build" diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 99c2e906047fc5..2f13e8cb5b1442 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -15,12 +15,12 @@ from llnl.util.tty import colify import spack.cmd -import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.install_test import spack.package_base import spack.repo import spack.report +from spack.cmd.common import arguments description = "run spack's tests for an install" section = "admin" diff --git a/lib/spack/spack/cmd/tutorial.py b/lib/spack/spack/cmd/tutorial.py index 5759912b66ffc7..fcfab00513755e 100644 --- a/lib/spack/spack/cmd/tutorial.py +++ b/lib/spack/spack/cmd/tutorial.py @@ -10,11 +10,11 @@ from llnl.util.filesystem import working_dir import spack -import spack.cmd.common.arguments as arguments import spack.config import spack.paths import spack.util.git import spack.util.gpg +from spack.cmd.common import arguments from spack.util.spack_yaml import syaml_dict description = "set up spack for our tutorial (WARNING: modifies config!)" diff --git a/lib/spack/spack/cmd/undevelop.py b/lib/spack/spack/cmd/undevelop.py index f633a6d0d6652f..8f3c19cd1a043c 100644 --- a/lib/spack/spack/cmd/undevelop.py +++ b/lib/spack/spack/cmd/undevelop.py @@ -6,7 +6,7 @@ import llnl.util.tty as tty import spack.cmd -import spack.cmd.common.arguments as arguments +from spack.cmd.common import arguments description = "remove specs from an environment" section = "environments" diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 3288404151d230..59ea18edc888ab 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -10,13 +10,13 @@ from llnl.util.tty.colify import colify import spack.cmd -import spack.cmd.common.arguments as arguments import spack.cmd.common.confirmation as confirmation import spack.environment as ev import spack.package_base import spack.spec import spack.store import spack.traverse as traverse +from spack.cmd.common import arguments from spack.database import InstallStatuses description = "remove installed packages" diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index 7fe634c56de91e..cd161f61c5dfbd 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -7,10 +7,10 @@ import sys import spack.cmd -import spack.cmd.common.arguments as arguments import spack.error import spack.user_environment as uenv import spack.util.environment +from spack.cmd.common import arguments description = "remove package from the user environment" section = "user environment" diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index 9ac6c9e4da72ba..3ca23dcbe65631 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -8,9 +8,9 @@ import llnl.util.tty as tty from llnl.util.tty.colify import colify -import spack.cmd.common.arguments as arguments import spack.repo import spack.spec +from spack.cmd.common import arguments from spack.version import infinity_versions, ver description = "list available versions of a package" From 3b045c289dabda35a8c754a8683fb4214c206d04 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 30 Nov 2023 09:44:51 +0100 Subject: [PATCH 802/806] Fix a typo in an integrity constraint (#41334) --- lib/spack/spack/solver/concretize.lp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index d5f24ddc3b33f0..a692c072a17205 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -20,7 +20,7 @@ % Integrity constraints on DAG nodes :- attr("root", PackageNode), not attr("node", PackageNode). :- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode). -:- attr("node_version_satisfies", PackageNode), not attr("node", PackageNode). +:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode). :- attr("hash", PackageNode, _), not attr("node", PackageNode). :- attr("node_platform", PackageNode, _), not attr("node", PackageNode). :- attr("node_os", PackageNode, _), not attr("node", PackageNode). From 3bc8a7aa5fb0560312728ec7acfced222e1e30c1 Mon Sep 17 00:00:00 2001 From: Christopher Christofi <77968333+ChristopherChristofi@users.noreply.github.com> Date: Thu, 30 Nov 2023 08:46:02 +0000 Subject: [PATCH 803/806] use double quotes where spack style finds errors (#41349) --- lib/spack/docs/build_systems/cmakepackage.rst | 40 +++++++++---------- lib/spack/docs/build_systems/intelpackage.rst | 14 +++---- lib/spack/docs/build_systems/luapackage.rst | 2 +- lib/spack/docs/build_systems/mavenpackage.rst | 14 +++---- lib/spack/docs/build_systems/mesonpackage.rst | 10 ++--- lib/spack/docs/build_systems/perlpackage.rst | 12 +++--- lib/spack/docs/build_systems/qmakepackage.rst | 8 ++-- lib/spack/docs/build_systems/rpackage.rst | 38 +++++++++--------- lib/spack/docs/build_systems/rubypackage.rst | 12 +++--- lib/spack/docs/build_systems/sippackage.rst | 2 +- lib/spack/docs/build_systems/wafpackage.rst | 8 ++-- 11 files changed, 80 insertions(+), 80 deletions(-) diff --git a/lib/spack/docs/build_systems/cmakepackage.rst b/lib/spack/docs/build_systems/cmakepackage.rst index fc1de918fd925b..6134c1b94669de 100644 --- a/lib/spack/docs/build_systems/cmakepackage.rst +++ b/lib/spack/docs/build_systems/cmakepackage.rst @@ -82,7 +82,7 @@ class already contains: .. code-block:: python - depends_on('cmake', type='build') + depends_on("cmake", type="build") If you need to specify a particular version requirement, you can @@ -90,7 +90,7 @@ override this in your package: .. code-block:: python - depends_on('cmake@2.8.12:', type='build') + depends_on("cmake@2.8.12:", type="build") ^^^^^^^^^^^^^^^^^^^ @@ -137,10 +137,10 @@ and without the :meth:`~spack.build_systems.cmake.CMakeBuilder.define` and def cmake_args(self): args = [ - '-DWHATEVER:STRING=somevalue', - self.define('ENABLE_BROKEN_FEATURE', False), - self.define_from_variant('DETECT_HDF5', 'hdf5'), - self.define_from_variant('THREADS'), # True if +threads + "-DWHATEVER:STRING=somevalue", + self.define("ENABLE_BROKEN_FEATURE", False), + self.define_from_variant("DETECT_HDF5", "hdf5"), + self.define_from_variant("THREADS"), # True if +threads ] return args @@ -151,10 +151,10 @@ and CMake simply ignores the empty command line argument. For example the follow .. code-block:: python - variant('example', default=True, when='@2.0:') + variant("example", default=True, when="@2.0:") def cmake_args(self): - return [self.define_from_variant('EXAMPLE', 'example')] + return [self.define_from_variant("EXAMPLE", "example")] will generate ``'cmake' '-DEXAMPLE=ON' ...`` when `@2.0: +example` is met, but will result in ``'cmake' '' ...`` when the spec version is below ``2.0``. @@ -193,9 +193,9 @@ a variant to control this: .. code-block:: python - variant('build_type', default='RelWithDebInfo', - description='CMake build type', - values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel')) + variant("build_type", default="RelWithDebInfo", + description="CMake build type", + values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel")) However, not every CMake package accepts all four of these options. Grep the ``CMakeLists.txt`` file to see if the default values are @@ -205,9 +205,9 @@ package overrides the default variant with: .. code-block:: python - variant('build_type', default='DebugRelease', - description='The build type to build', - values=('Debug', 'Release', 'DebugRelease')) + variant("build_type", default="DebugRelease", + description="The build type to build", + values=("Debug", "Release", "DebugRelease")) For more information on ``CMAKE_BUILD_TYPE``, see: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html @@ -250,7 +250,7 @@ generator is Ninja. To switch to the Ninja generator, simply add: .. code-block:: python - generator = 'Ninja' + generator = "Ninja" ``CMakePackage`` defaults to "Unix Makefiles". If you switch to the @@ -258,7 +258,7 @@ Ninja generator, make sure to add: .. code-block:: python - depends_on('ninja', type='build') + depends_on("ninja", type="build") to the package as well. Aside from that, you shouldn't need to do anything else. Spack will automatically detect that you are using @@ -288,7 +288,7 @@ like so: .. code-block:: python - root_cmakelists_dir = 'src' + root_cmakelists_dir = "src" Note that this path is relative to the root of the extracted tarball, @@ -304,7 +304,7 @@ different sub-directory, simply override ``build_directory`` like so: .. code-block:: python - build_directory = 'my-build' + build_directory = "my-build" ^^^^^^^^^^^^^^^^^^^^^^^^^ Build and install targets @@ -324,8 +324,8 @@ library or build the documentation, you can add these like so: .. code-block:: python - build_targets = ['all', 'docs'] - install_targets = ['install', 'docs'] + build_targets = ["all", "docs"] + install_targets = ["install", "docs"] ^^^^^^^ Testing diff --git a/lib/spack/docs/build_systems/intelpackage.rst b/lib/spack/docs/build_systems/intelpackage.rst index 9afe1a8b919543..8b2905f19a1460 100644 --- a/lib/spack/docs/build_systems/intelpackage.rst +++ b/lib/spack/docs/build_systems/intelpackage.rst @@ -934,9 +934,9 @@ a *virtual* ``mkl`` package is declared in Spack. .. code-block:: python # Examples for absolute and conditional dependencies: - depends_on('mkl') - depends_on('mkl', when='+mkl') - depends_on('mkl', when='fftw=mkl') + depends_on("mkl") + depends_on("mkl", when="+mkl") + depends_on("mkl", when="fftw=mkl") The ``MKLROOT`` environment variable (part of the documented API) will be set during all stages of client package installation, and is available to both @@ -972,8 +972,8 @@ a *virtual* ``mkl`` package is declared in Spack. def configure_args(self): args = [] ... - args.append('--with-blas=%s' % self.spec['blas'].libs.ld_flags) - args.append('--with-lapack=%s' % self.spec['lapack'].libs.ld_flags) + args.append("--with-blas=%s" % self.spec["blas"].libs.ld_flags) + args.append("--with-lapack=%s" % self.spec["lapack"].libs.ld_flags) ... .. tip:: @@ -989,13 +989,13 @@ a *virtual* ``mkl`` package is declared in Spack. .. code-block:: python - self.spec['blas'].headers.include_flags + self.spec["blas"].headers.include_flags and to generate linker options (``-L

-llibname ...``), use the same as above, .. code-block:: python - self.spec['blas'].libs.ld_flags + self.spec["blas"].libs.ld_flags See :ref:`MakefilePackage ` diff --git a/lib/spack/docs/build_systems/luapackage.rst b/lib/spack/docs/build_systems/luapackage.rst index 71a0c3962c6100..c70d0de4267d77 100644 --- a/lib/spack/docs/build_systems/luapackage.rst +++ b/lib/spack/docs/build_systems/luapackage.rst @@ -88,7 +88,7 @@ override the ``luarocks_args`` method like so: .. code-block:: python def luarocks_args(self): - return ['flag1', 'flag2'] + return ["flag1", "flag2"] One common use of this is to override warnings or flags for newer compilers, as in: diff --git a/lib/spack/docs/build_systems/mavenpackage.rst b/lib/spack/docs/build_systems/mavenpackage.rst index 70c57024acfb33..1e28cb56205835 100644 --- a/lib/spack/docs/build_systems/mavenpackage.rst +++ b/lib/spack/docs/build_systems/mavenpackage.rst @@ -48,8 +48,8 @@ class automatically adds the following dependencies: .. code-block:: python - depends_on('java', type=('build', 'run')) - depends_on('maven', type='build') + depends_on("java", type=("build", "run")) + depends_on("maven", type="build") In the ``pom.xml`` file, you may see sections like: @@ -72,8 +72,8 @@ should add: .. code-block:: python - depends_on('java@7:', type='build') - depends_on('maven@3.5.4:', type='build') + depends_on("java@7:", type="build") + depends_on("maven@3.5.4:", type="build") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -88,9 +88,9 @@ the build phase. For example: def build_args(self): return [ - '-Pdist,native', - '-Dtar', - '-Dmaven.javadoc.skip=true' + "-Pdist,native", + "-Dtar", + "-Dmaven.javadoc.skip=true" ] diff --git a/lib/spack/docs/build_systems/mesonpackage.rst b/lib/spack/docs/build_systems/mesonpackage.rst index e2f2e0a99eba63..6b662c114e3062 100644 --- a/lib/spack/docs/build_systems/mesonpackage.rst +++ b/lib/spack/docs/build_systems/mesonpackage.rst @@ -86,8 +86,8 @@ the ``MesonPackage`` base class already contains: .. code-block:: python - depends_on('meson', type='build') - depends_on('ninja', type='build') + depends_on("meson", type="build") + depends_on("ninja", type="build") If you need to specify a particular version requirement, you can @@ -95,8 +95,8 @@ override this in your package: .. code-block:: python - depends_on('meson@0.43.0:', type='build') - depends_on('ninja', type='build') + depends_on("meson@0.43.0:", type="build") + depends_on("ninja", type="build") ^^^^^^^^^^^^^^^^^^^ @@ -121,7 +121,7 @@ override the ``meson_args`` method like so: .. code-block:: python def meson_args(self): - return ['--warnlevel=3'] + return ["--warnlevel=3"] This method can be used to pass flags as well as variables. diff --git a/lib/spack/docs/build_systems/perlpackage.rst b/lib/spack/docs/build_systems/perlpackage.rst index c29dfaad55caf3..11fa24322691ae 100644 --- a/lib/spack/docs/build_systems/perlpackage.rst +++ b/lib/spack/docs/build_systems/perlpackage.rst @@ -118,7 +118,7 @@ so ``PerlPackage`` contains: .. code-block:: python - extends('perl') + extends("perl") If your package requires a specific version of Perl, you should @@ -132,14 +132,14 @@ properly. If your package uses ``Makefile.PL`` to build, add: .. code-block:: python - depends_on('perl-extutils-makemaker', type='build') + depends_on("perl-extutils-makemaker", type="build") If your package uses ``Build.PL`` to build, add: .. code-block:: python - depends_on('perl-module-build', type='build') + depends_on("perl-module-build", type="build") ^^^^^^^^^^^^^^^^^ @@ -165,11 +165,11 @@ arguments to ``Makefile.PL`` or ``Build.PL`` by overriding .. code-block:: python def configure_args(self): - expat = self.spec['expat'].prefix + expat = self.spec["expat"].prefix return [ - 'EXPATLIBPATH={0}'.format(expat.lib), - 'EXPATINCPATH={0}'.format(expat.include), + "EXPATLIBPATH={0}".format(expat.lib), + "EXPATINCPATH={0}".format(expat.include), ] diff --git a/lib/spack/docs/build_systems/qmakepackage.rst b/lib/spack/docs/build_systems/qmakepackage.rst index 98d625ede08b6a..0956bd80fb08dd 100644 --- a/lib/spack/docs/build_systems/qmakepackage.rst +++ b/lib/spack/docs/build_systems/qmakepackage.rst @@ -83,7 +83,7 @@ base class already contains: .. code-block:: python - depends_on('qt', type='build') + depends_on("qt", type="build") If you want to specify a particular version requirement, or need to @@ -91,7 +91,7 @@ link to the ``qt`` libraries, you can override this in your package: .. code-block:: python - depends_on('qt@5.6.0:') + depends_on("qt@5.6.0:") ^^^^^^^^^^^^^^^^^^^^^^^^^^ Passing arguments to qmake @@ -103,7 +103,7 @@ override the ``qmake_args`` method like so: .. code-block:: python def qmake_args(self): - return ['-recursive'] + return ["-recursive"] This method can be used to pass flags as well as variables. @@ -118,7 +118,7 @@ sub-directory by adding the following to the package: .. code-block:: python - build_directory = 'src' + build_directory = "src" ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/build_systems/rpackage.rst b/lib/spack/docs/build_systems/rpackage.rst index a5a5fcee3182e2..6781c6248441fe 100644 --- a/lib/spack/docs/build_systems/rpackage.rst +++ b/lib/spack/docs/build_systems/rpackage.rst @@ -163,28 +163,28 @@ attributes that can be used to set ``homepage``, ``url``, ``list_url``, and .. code-block:: python - cran = 'caret' + cran = "caret" is equivalent to: .. code-block:: python - homepage = 'https://cloud.r-project.org/package=caret' - url = 'https://cloud.r-project.org/src/contrib/caret_6.0-86.tar.gz' - list_url = 'https://cloud.r-project.org/src/contrib/Archive/caret' + homepage = "https://cloud.r-project.org/package=caret" + url = "https://cloud.r-project.org/src/contrib/caret_6.0-86.tar.gz" + list_url = "https://cloud.r-project.org/src/contrib/Archive/caret" Likewise, the following ``bioc`` attribute: .. code-block:: python - bioc = 'BiocVersion' + bioc = "BiocVersion" is equivalent to: .. code-block:: python - homepage = 'https://bioconductor.org/packages/BiocVersion/' - git = 'https://git.bioconductor.org/packages/BiocVersion' + homepage = "https://bioconductor.org/packages/BiocVersion/" + git = "https://git.bioconductor.org/packages/BiocVersion" ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -200,7 +200,7 @@ base class contains: .. code-block:: python - extends('r') + extends("r") Take a close look at the homepage for ``caret``. If you look at the @@ -209,7 +209,7 @@ You should add this to your package like so: .. code-block:: python - depends_on('r@3.2.0:', type=('build', 'run')) + depends_on("r@3.2.0:", type=("build", "run")) ^^^^^^^^^^^^^^ @@ -227,7 +227,7 @@ and list all of their dependencies in the following sections: * LinkingTo As far as Spack is concerned, all 3 of these dependency types -correspond to ``type=('build', 'run')``, so you don't have to worry +correspond to ``type=("build", "run")``, so you don't have to worry about the details. If you are curious what they mean, https://github.com/spack/spack/issues/2951 has a pretty good summary: @@ -330,7 +330,7 @@ the dependency: .. code-block:: python - depends_on('r-lattice@0.20:', type=('build', 'run')) + depends_on("r-lattice@0.20:", type=("build", "run")) ^^^^^^^^^^^^^^^^^^ @@ -361,20 +361,20 @@ like so: .. code-block:: python def configure_args(self): - mpi_name = self.spec['mpi'].name + mpi_name = self.spec["mpi"].name # The type of MPI. Supported values are: # OPENMPI, LAM, MPICH, MPICH2, or CRAY - if mpi_name == 'openmpi': - Rmpi_type = 'OPENMPI' - elif mpi_name == 'mpich': - Rmpi_type = 'MPICH2' + if mpi_name == "openmpi": + Rmpi_type = "OPENMPI" + elif mpi_name == "mpich": + Rmpi_type = "MPICH2" else: - raise InstallError('Unsupported MPI type') + raise InstallError("Unsupported MPI type") return [ - '--with-Rmpi-type={0}'.format(Rmpi_type), - '--with-mpi={0}'.format(spec['mpi'].prefix), + "--with-Rmpi-type={0}".format(Rmpi_type), + "--with-mpi={0}".format(spec["mpi"].prefix), ] diff --git a/lib/spack/docs/build_systems/rubypackage.rst b/lib/spack/docs/build_systems/rubypackage.rst index d5c38b863b9478..ec60765eb1aeea 100644 --- a/lib/spack/docs/build_systems/rubypackage.rst +++ b/lib/spack/docs/build_systems/rubypackage.rst @@ -84,8 +84,8 @@ The ``*.gemspec`` file may contain something like: .. code-block:: ruby - summary = 'An implementation of the AsciiDoc text processor and publishing toolchain' - description = 'A fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.' + summary = "An implementation of the AsciiDoc text processor and publishing toolchain" + description = "A fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML 5, DocBook 5, and other formats." Either of these can be used for the description of the Spack package. @@ -98,7 +98,7 @@ The ``*.gemspec`` file may contain something like: .. code-block:: ruby - homepage = 'https://asciidoctor.org' + homepage = "https://asciidoctor.org" This should be used as the official homepage of the Spack package. @@ -112,21 +112,21 @@ the base class contains: .. code-block:: python - extends('ruby') + extends("ruby") The ``*.gemspec`` file may contain something like: .. code-block:: ruby - required_ruby_version = '>= 2.3.0' + required_ruby_version = ">= 2.3.0" This can be added to the Spack package using: .. code-block:: python - depends_on('ruby@2.3.0:', type=('build', 'run')) + depends_on("ruby@2.3.0:", type=("build", "run")) ^^^^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/build_systems/sippackage.rst b/lib/spack/docs/build_systems/sippackage.rst index a4f52bf18648c4..06d3ba56265551 100644 --- a/lib/spack/docs/build_systems/sippackage.rst +++ b/lib/spack/docs/build_systems/sippackage.rst @@ -124,7 +124,7 @@ are wrong, you can provide the names yourself by overriding .. code-block:: python - import_modules = ['PyQt5'] + import_modules = ["PyQt5"] These tests often catch missing dependencies and non-RPATHed diff --git a/lib/spack/docs/build_systems/wafpackage.rst b/lib/spack/docs/build_systems/wafpackage.rst index c9bbf8bb5a42c2..6b2abc9a8f18d5 100644 --- a/lib/spack/docs/build_systems/wafpackage.rst +++ b/lib/spack/docs/build_systems/wafpackage.rst @@ -63,8 +63,8 @@ run package-specific unit tests. .. code-block:: python def installtest(self): - with working_dir('test'): - pytest = which('py.test') + with working_dir("test"): + pytest = which("py.test") pytest() @@ -93,7 +93,7 @@ the following dependency automatically: .. code-block:: python - depends_on('python@2.5:', type='build') + depends_on("python@2.5:", type="build") Waf only supports Python 2.5 and up. @@ -113,7 +113,7 @@ phase, you can use: args = [] if self.run_tests: - args.append('--test') + args.append("--test") return args From eec9eced1bcf4d00ae476f74a1901f1c2e445eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius?= Date: Thu, 30 Nov 2023 07:23:57 -0300 Subject: [PATCH 804/806] simgrid: add v3.34 and v3.35 (#41340) --- var/spack/repos/builtin/packages/simgrid/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/simgrid/package.py b/var/spack/repos/builtin/packages/simgrid/package.py index c21ef353ab1c77..97edfe67a601a1 100644 --- a/var/spack/repos/builtin/packages/simgrid/package.py +++ b/var/spack/repos/builtin/packages/simgrid/package.py @@ -19,6 +19,8 @@ class Simgrid(CMakePackage): maintainers("viniciusvgp") + version("3.35", sha256="b4570d3de18d319cbd2e16c5a669f90760307673c0cc9940d4d11cfc537e69a8") + version("3.34", sha256="161f1c6c0ebb588c587aea6388114307bb31b3c6d5332fa3dc678151f1d0564d") version("3.32", sha256="837764eb81562f04e49dd20fbd8518d9eb1f94df00a4e4555e7ec7fa8aa341f0") version("3.31", sha256="4b44f77ad40c01cf4e3013957c9cbe39f33dec9304ff0c9c3d9056372ed4c61d") version("3.30", sha256="0cad48088c106e72efb42fb423e65d77fc9053cc03d6f3a5ff7ba4c712bb4eb8") From 34d791189da2ba941bb8d8e3b8be202f0d855e97 Mon Sep 17 00:00:00 2001 From: Taillefumier Mathieu <29380261+mtaillefumier@users.noreply.github.com> Date: Thu, 30 Nov 2023 12:08:22 +0100 Subject: [PATCH 805/806] Update SIRIUS version for CP2K master (#41264) * Update SIRIUS version for CP2K master * Update var/spack/repos/builtin/packages/cp2k/package.py Co-authored-by: Rocco Meli --------- Co-authored-by: Rocco Meli --- var/spack/repos/builtin/packages/cp2k/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 5234f46f7a67c4..233e43f68afeaa 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -271,7 +271,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage): depends_on("sirius@7.0.0:7.0", when="@8:8.2") depends_on("sirius@7.2", when="@8.3:8.9") depends_on("sirius@7.3:", when="@9.1") - depends_on("sirius@7.4:", when="@2023.2") + depends_on("sirius@7.4:7.5", when="@2023.2") + depends_on("sirius@7.5:", when="@master") conflicts("~mpi", msg="SIRIUS requires MPI") # sirius support was introduced in 7, but effectively usable starting from CP2K 9 conflicts("@:8") From 4c2734fe14be603c4d3028ad10c44fa3f72b02a2 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 30 Nov 2023 15:35:21 +0100 Subject: [PATCH 806/806] --scope: lazy defaults (#41353) --- lib/spack/spack/cmd/bootstrap.py | 5 +---- lib/spack/spack/cmd/buildcache.py | 5 ++--- lib/spack/spack/cmd/common/arguments.py | 29 ++++++++++++++++++++----- lib/spack/spack/cmd/compiler.py | 21 ++++++------------ lib/spack/spack/cmd/compilers.py | 6 +---- lib/spack/spack/cmd/config.py | 5 +---- lib/spack/spack/cmd/external.py | 5 ++--- lib/spack/spack/cmd/mirror.py | 25 +++++++++------------ lib/spack/spack/cmd/repo.py | 15 +++++-------- 9 files changed, 53 insertions(+), 63 deletions(-) diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index 7c076258954e86..c9b20a07adb023 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -69,10 +69,7 @@ def _add_scope_option(parser): parser.add_argument( - "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - help="configuration scope to read/modify", + "--scope", action=arguments.ConfigScope, help="configuration scope to read/modify" ) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 7896b543735f53..05b7bd783a286b 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -184,9 +184,8 @@ def setup_parser(subparser: argparse.ArgumentParser): # used to construct scope arguments below check.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope containing mirrors to check", ) check_spec_or_specfile = check.add_mutually_exclusive_group(required=True) diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py index 79f844d0e2c680..883a7d31c26b3a 100644 --- a/lib/spack/spack/cmd/common/arguments.py +++ b/lib/spack/spack/cmd/common/arguments.py @@ -124,14 +124,31 @@ def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, deptype) -class ConfigScopeChoices: - """A lazy list of config scope values (values may change at runtime in tests).""" +class ConfigScope(argparse.Action): + """Pick the currently configured config scopes.""" - def __contains__(self, item): - return item in spack.config.scopes() + def __init__(self, *args, **kwargs) -> None: + kwargs.setdefault("metavar", spack.config.SCOPES_METAVAR) + super().__init__(*args, **kwargs) - def __iter__(self): - return iter(spack.config.scopes().keys()) + @property + def default(self): + return self._default() if callable(self._default) else self._default + + @default.setter + def default(self, value): + self._default = value + + @property + def choices(self): + return spack.config.scopes().keys() + + @choices.setter + def choices(self, value): + pass + + def __call__(self, parser, namespace, values, option_string=None): + setattr(namespace, self.dest, values) def _cdash_reporter(namespace): diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 6ba6371087d1ae..6cfb73c3e82ed7 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -46,9 +46,8 @@ def setup_parser(subparser): find_parser.add_argument("add_paths", nargs=argparse.REMAINDER) find_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope("compilers"), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope("compilers"), help="configuration scope to modify", ) @@ -59,20 +58,15 @@ def setup_parser(subparser): ) remove_parser.add_argument("compiler_spec") remove_parser.add_argument( - "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=None, - help="configuration scope to modify", + "--scope", action=arguments.ConfigScope, default=None, help="configuration scope to modify" ) # List list_parser = sp.add_parser("list", help="list available compilers") list_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_list_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_list_scope(), help="configuration scope to read from", ) @@ -81,9 +75,8 @@ def setup_parser(subparser): info_parser.add_argument("compiler_spec") info_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_list_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_list_scope(), help="configuration scope to read from", ) diff --git a/lib/spack/spack/cmd/compilers.py b/lib/spack/spack/cmd/compilers.py index 25831da7fb827a..7bd8cd4f37b69a 100644 --- a/lib/spack/spack/cmd/compilers.py +++ b/lib/spack/spack/cmd/compilers.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import spack.config from spack.cmd.common import arguments from spack.cmd.compiler import compiler_list @@ -14,10 +13,7 @@ def setup_parser(subparser): subparser.add_argument( - "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - help="configuration scope to read/modify", + "--scope", action=arguments.ConfigScope, help="configuration scope to read/modify" ) diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index c99f0458765005..e7d459ff77c297 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -28,10 +28,7 @@ def setup_parser(subparser): # User can only choose one subparser.add_argument( - "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - help="configuration scope to read/modify", + "--scope", action=arguments.ConfigScope, help="configuration scope to read/modify" ) sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="config_command") diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py index c3e791fd6a8bfc..eb96dfad98c816 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -46,9 +46,8 @@ def setup_parser(subparser): ) find_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope("packages"), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope("packages"), help="configuration scope to modify", ) find_parser.add_argument( diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index a9c93618c7f9e5..91a3f279318548 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -94,9 +94,8 @@ def setup_parser(subparser): add_parser.add_argument("url", help="url of mirror directory from 'spack mirror create'") add_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope to modify", ) add_parser.add_argument( @@ -114,9 +113,8 @@ def setup_parser(subparser): remove_parser.add_argument("name", help="mnemonic name for mirror", metavar="mirror") remove_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope to modify", ) @@ -133,9 +131,8 @@ def setup_parser(subparser): ) set_url_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope to modify", ) arguments.add_connection_args(set_url_parser, False) @@ -162,9 +159,8 @@ def setup_parser(subparser): set_parser.add_argument("--url", help="url of mirror directory from 'spack mirror create'") set_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope to modify", ) arguments.add_connection_args(set_parser, False) @@ -173,9 +169,8 @@ def setup_parser(subparser): list_parser = sp.add_parser("list", help=mirror_list.__doc__) list_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_list_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_list_scope(), help="configuration scope to read from", ) diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index a8bba6c2dc5368..71b6cbc0d47076 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -43,9 +43,8 @@ def setup_parser(subparser): list_parser = sp.add_parser("list", help=repo_list.__doc__) list_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_list_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_list_scope(), help="configuration scope to read from", ) @@ -54,9 +53,8 @@ def setup_parser(subparser): add_parser.add_argument("path", help="path to a Spack package repository directory") add_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope to modify", ) @@ -67,9 +65,8 @@ def setup_parser(subparser): ) remove_parser.add_argument( "--scope", - choices=arguments.ConfigScopeChoices(), - metavar=spack.config.SCOPES_METAVAR, - default=spack.config.default_modify_scope(), + action=arguments.ConfigScope, + default=lambda: spack.config.default_modify_scope(), help="configuration scope to modify", )