From a088d5d592c05cf83a5033a8eb3bb091dc0e5707 Mon Sep 17 00:00:00 2001 From: ulmononian Date: Thu, 20 Apr 2023 08:45:45 -0500 Subject: [PATCH 1/3] Add scotch@7.0.3. checksum to builtin scotch package.py; add scotch to ufs-weather-model-env in jcsdca-emc-bundles. --- var/spack/repos/builtin/packages/scotch/package.py | 1 + .../jcsda-emc-bundles/packages/ufs-weather-model-env/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index b957db31bf958e..3921fea32e257e 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -20,6 +20,7 @@ class Scotch(CMakePackage, MakefilePackage): maintainers = ["pghysels"] + version("7.0.3", sha256="5b5351f0ffd6fcae9ae7eafeccaa5a25602845b9ffd1afb104db932dd4d4f3c5") version("7.0.1", sha256="0618e9bc33c02172ea7351600fce4fccd32fe00b3359c4aabb5e415f17c06fed") version("6.1.3", sha256="4e54f056199e6c23d46581d448fcfe2285987e5554a0aa527f7931684ef2809e") version("6.1.2", sha256="9c2c75c75f716914a2bd1c15dffac0e29a2f8069b2df1ad2b6207c984b699450") diff --git a/var/spack/repos/jcsda-emc-bundles/packages/ufs-weather-model-env/package.py b/var/spack/repos/jcsda-emc-bundles/packages/ufs-weather-model-env/package.py index f26d354064bb92..1f8b23725fba0d 100644 --- a/var/spack/repos/jcsda-emc-bundles/packages/ufs-weather-model-env/package.py +++ b/var/spack/repos/jcsda-emc-bundles/packages/ufs-weather-model-env/package.py @@ -34,6 +34,7 @@ class UfsWeatherModelEnv(BundlePackage): depends_on("ip", type="run") depends_on("sp", type="run") depends_on("w3emc", type="run") + depends_on("scotch", type="run") depends_on("esmf~debug", type="run", when="~debug") depends_on("esmf+debug", type="run", when="+debug") From 942c025d47a3141f0e29756488058b9367b306be Mon Sep 17 00:00:00 2001 From: Cameron Book <43379611+ulmononian@users.noreply.github.com> Date: Thu, 20 Apr 2023 20:11:05 -0700 Subject: [PATCH 2/3] update bison version in dependency --- var/spack/repos/builtin/packages/scotch/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 3921fea32e257e..ea31ebfc55aa71 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -54,7 +54,7 @@ class Scotch(CMakePackage, MakefilePackage): # Does not build with flex 2.6.[23] depends_on("flex@:2.6.1,2.6.4:", type="build") - depends_on("bison", type="build") + depends_on("bison@3.4:", type="build") depends_on("mpi", when="+mpi") depends_on("zlib", when="+compression") From a473eb9424c807ce610a35c89f45756d32ddcdc3 Mon Sep 17 00:00:00 2001 From: ulmononian Date: Thu, 18 May 2023 17:40:12 -0500 Subject: [PATCH 3/3] Add threading variants to scotch package.py. --- var/spack/repos/builtin/packages/scotch/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 7db4f0f7e5bd3f..a83d0919f258ab 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -37,6 +37,8 @@ class Scotch(CMakePackage, MakefilePackage): version("5.1.10b", sha256="54c9e7fafefd49d8b2017d179d4f11a655abe10365961583baaddc4eeb6a9add") build_system(conditional("cmake", when="@7:"), "makefile", default="cmake") + variant("threads", default=True, description="use POSIX Pthreads within Scotch and PT-Scotch") + variant("mpi_thread", default=True, description="use multi-threaded algorithms in conjunction with MPI") variant("mpi", default=True, description="Compile parallel libraries") variant("compression", default=True, description="May use compressed files") variant("esmumps", default=False, description="Compile esmumps (needed by mumps)") @@ -115,6 +117,8 @@ def cmake_args(self): self.define_from_variant("BUILD_LIBESMUMPS", "esmumps"), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("BUILD_PTSCOTCH", "mpi"), + self.define_from_variant("THREADS", "threads"), + self.define_from_variant("MPI_THREAD_MULTIPLE", "mpi_thread") ] # TODO should we enable/disable THREADS?