petsc,py-petsc4py,slepc,py-slepc4py: add version 3.18.0 (#32938)
* petsc,py-petsc4py,slepc,py-slepc4py: add version 3.18.0 * workaround for dealii build failure [with petsc version check] * pism: add compatibility fix to for petsc@3.18 * add in hipsolver dependency
This commit is contained in:
parent
c44934a44d
commit
6983d520fa
@ -22,6 +22,8 @@ class Petsc(Package, CudaPackage, ROCmPackage):
|
||||
|
||||
version("main", branch="main")
|
||||
|
||||
version("3.18.0", sha256="9da802e703ad79fb7ef0007d17f68916573011073ee9712dcd1673537f6a5f68")
|
||||
version("3.17.5", sha256="a1193e6c50a1676c3972a1edf0a06eec9fac8ecc2f3771f2689a8997423e4c71")
|
||||
version("3.17.4", sha256="99c127486722a3ffd95a268b4ceb0976cbf217926c681a9631bd7246eab8cb2a")
|
||||
version("3.17.3", sha256="5c24ade5e4b32cc04935ba0db1dafe48d633bebaaa30a3033f1e58788d37875f")
|
||||
version("3.17.2", sha256="2313dd1ca41bf0ace68671ea6f8d4abf90011ed899f5e1e08658d3f18478359d")
|
||||
@ -201,6 +203,7 @@ def check_fortran_compiler(self):
|
||||
patch("xcode_stub_out_of_sync.patch", when="@:3.10.4")
|
||||
patch("xlf_fix-dup-petscfecreate.patch", when="@3.11.0")
|
||||
patch("disable-DEPRECATED_ENUM.diff", when="@3.14.1 +cuda")
|
||||
patch("revert-3.18.0-ver-format-for-dealii.patch", when="@3.18.0")
|
||||
|
||||
depends_on("diffutils", type="build")
|
||||
|
||||
@ -217,6 +220,7 @@ def check_fortran_compiler(self):
|
||||
depends_on("hip", when="+rocm")
|
||||
depends_on("hipblas", when="+rocm")
|
||||
depends_on("hipsparse", when="+rocm")
|
||||
depends_on("hipsolver", when="+rocm")
|
||||
depends_on("rocsparse", when="+rocm")
|
||||
depends_on("rocsolver", when="+rocm")
|
||||
depends_on("rocblas", when="+rocm")
|
||||
@ -543,7 +547,7 @@ def configure_options(self):
|
||||
if not spec.satisfies("amdgpu_target=none"):
|
||||
hip_arch = spec.variants["amdgpu_target"].value
|
||||
options.append("--with-hip-arch={0}".format(hip_arch[0]))
|
||||
hip_pkgs = ["hipsparse", "hipblas", "rocsparse", "rocsolver", "rocblas"]
|
||||
hip_pkgs = ["hipsparse", "hipblas", "hipsolver", "rocsparse", "rocsolver", "rocblas"]
|
||||
hip_ipkgs = hip_pkgs + ["rocthrust", "rocprim"]
|
||||
hip_lpkgs = hip_pkgs
|
||||
if spec.satisfies("^rocrand@5.1:"):
|
||||
|
@ -0,0 +1,57 @@
|
||||
--- a/include/petscversion.h 2022-10-01 13:55:26.000000000 -0500
|
||||
+++ b/include/petscversion.h 2022-10-10 18:03:11.525297321 -0500
|
||||
@@ -2,11 +2,11 @@
|
||||
#define PETSCVERSION_H
|
||||
#include <petscconf.h>
|
||||
|
||||
-#define PETSC_VERSION_RELEASE 1
|
||||
-#define PETSC_VERSION_MAJOR 3
|
||||
-#define PETSC_VERSION_MINOR 18
|
||||
-#define PETSC_VERSION_SUBMINOR 0
|
||||
-#define PETSC_RELEASE_DATE "Sep 30, 2022"
|
||||
+#define PETSC_VERSION_RELEASE 1
|
||||
+#define PETSC_VERSION_MAJOR 3
|
||||
+#define PETSC_VERSION_MINOR 18
|
||||
+#define PETSC_VERSION_SUBMINOR 0
|
||||
+#define PETSC_RELEASE_DATE "Sep 30, 2022"
|
||||
#define PETSC_VERSION_DATE "Sep 30, 2022"
|
||||
|
||||
#if !defined(PETSC_VERSION_GIT)
|
||||
@@ -17,17 +17,30 @@
|
||||
#define PETSC_VERSION_DATE_GIT "2022-09-30 20:39:36 -0500"
|
||||
#endif
|
||||
|
||||
-#define PETSC_VERSION_EQ(MAJOR, MINOR, SUBMINOR) ((PETSC_VERSION_MAJOR == (MAJOR)) && (PETSC_VERSION_MINOR == (MINOR)) && (PETSC_VERSION_SUBMINOR == (SUBMINOR)) && (PETSC_VERSION_RELEASE == 1))
|
||||
+#define PETSC_VERSION_EQ(MAJOR,MINOR,SUBMINOR) \
|
||||
+ ((PETSC_VERSION_MAJOR == (MAJOR)) && \
|
||||
+ (PETSC_VERSION_MINOR == (MINOR)) && \
|
||||
+ (PETSC_VERSION_SUBMINOR == (SUBMINOR)) && \
|
||||
+ (PETSC_VERSION_RELEASE == 1))
|
||||
|
||||
#define PETSC_VERSION_ PETSC_VERSION_EQ
|
||||
|
||||
-#define PETSC_VERSION_LT(MAJOR, MINOR, SUBMINOR) \
|
||||
- (PETSC_VERSION_RELEASE == 1 && (PETSC_VERSION_MAJOR < (MAJOR) || (PETSC_VERSION_MAJOR == (MAJOR) && (PETSC_VERSION_MINOR < (MINOR) || (PETSC_VERSION_MINOR == (MINOR) && (PETSC_VERSION_SUBMINOR < (SUBMINOR)))))))
|
||||
+#define PETSC_VERSION_LT(MAJOR,MINOR,SUBMINOR) \
|
||||
+ (PETSC_VERSION_RELEASE == 1 && \
|
||||
+ (PETSC_VERSION_MAJOR < (MAJOR) || \
|
||||
+ (PETSC_VERSION_MAJOR == (MAJOR) && \
|
||||
+ (PETSC_VERSION_MINOR < (MINOR) || \
|
||||
+ (PETSC_VERSION_MINOR == (MINOR) && \
|
||||
+ (PETSC_VERSION_SUBMINOR < (SUBMINOR)))))))
|
||||
+
|
||||
+#define PETSC_VERSION_LE(MAJOR,MINOR,SUBMINOR) \
|
||||
+ (PETSC_VERSION_LT(MAJOR,MINOR,SUBMINOR) || \
|
||||
+ PETSC_VERSION_EQ(MAJOR,MINOR,SUBMINOR))
|
||||
|
||||
-#define PETSC_VERSION_LE(MAJOR, MINOR, SUBMINOR) (PETSC_VERSION_LT(MAJOR, MINOR, SUBMINOR) || PETSC_VERSION_EQ(MAJOR, MINOR, SUBMINOR))
|
||||
+#define PETSC_VERSION_GT(MAJOR,MINOR,SUBMINOR) \
|
||||
+ (0 == PETSC_VERSION_LE(MAJOR,MINOR,SUBMINOR))
|
||||
|
||||
-#define PETSC_VERSION_GT(MAJOR, MINOR, SUBMINOR) (0 == PETSC_VERSION_LE(MAJOR, MINOR, SUBMINOR))
|
||||
-
|
||||
-#define PETSC_VERSION_GE(MAJOR, MINOR, SUBMINOR) (0 == PETSC_VERSION_LT(MAJOR, MINOR, SUBMINOR))
|
||||
+#define PETSC_VERSION_GE(MAJOR,MINOR,SUBMINOR) \
|
||||
+ (0 == PETSC_VERSION_LT(MAJOR,MINOR,SUBMINOR))
|
||||
|
||||
#endif
|
@ -47,6 +47,8 @@ class Pism(CMakePackage):
|
||||
description = "Report errors through Everytrace (requires Everytrace)"
|
||||
variant("everytrace", default=False, description=description)
|
||||
|
||||
patch("pism-petsc-3.18.diff", when="@1.1.4 ^petsc@3.18:")
|
||||
|
||||
# CMake build options not transferred to Spack variants
|
||||
# (except from CMakeLists.txt)
|
||||
#
|
||||
|
22
var/spack/repos/builtin/packages/pism/pism-petsc-3.18.diff
Normal file
22
var/spack/repos/builtin/packages/pism/pism-petsc-3.18.diff
Normal file
@ -0,0 +1,22 @@
|
||||
--- spack-src/src/util/options.cc~ 2019-06-17 13:14:35.000000000 -0500
|
||||
+++ spack-src/src/util/options.cc 2022-10-10 19:50:05.309762538 -0500
|
||||
@@ -59,8 +59,7 @@
|
||||
memset(tmp, 0, TEMPORARY_STRING_LENGTH);
|
||||
|
||||
PetscErrorCode ierr;
|
||||
- ierr = PetscOptionsBegin(MPI_COMM_SELF, "", "", "");
|
||||
- PISM_CHK(ierr, "PetscOptionsBegin");
|
||||
+ PetscOptionsBegin(MPI_COMM_SELF, "", "", "");
|
||||
|
||||
ierr = PetscOptionsString(option.c_str(),
|
||||
description.c_str(),
|
||||
@@ -71,8 +70,7 @@
|
||||
&flag); // PETSC_TRUE if found, else PETSC_FALSE
|
||||
PISM_CHK(ierr, "PetscOptionsString");
|
||||
|
||||
- ierr = PetscOptionsEnd();
|
||||
- PISM_CHK(ierr, "PetscOptionsEnd");
|
||||
+ PetscOptionsEnd();
|
||||
|
||||
std::string result = tmp;
|
||||
|
@ -16,6 +16,8 @@ class PyPetsc4py(PythonPackage):
|
||||
maintainers = ["balay"]
|
||||
|
||||
version("main", branch="main")
|
||||
version("3.18.0", sha256="76bad2d35f380f698f5649c3f38eabd153b9b19b1fe3ce3a1d3de9aa5824a4d2")
|
||||
version("3.17.5", sha256="e435d927bf22950c71c30bda538e1ae75f48f6931a63205c6fbeff6cf4393f09")
|
||||
version("3.17.4", sha256="216c3da074557946615d37d0826bc89f1f2e599323e2dacbdc45326d78bd50c6")
|
||||
version("3.17.3", sha256="c588ab4a17deebe7f0a57f966b3368d88f01d1a1c09f220f63fe8e3b37a32899")
|
||||
version("3.17.2", sha256="7e256e13013ce12c8e52edee35920e3d2c1deaae1b71597a3064201eba7abc1c")
|
||||
@ -61,6 +63,7 @@ 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.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")
|
||||
|
@ -16,6 +16,7 @@ class PySlepc4py(PythonPackage):
|
||||
maintainers = ["joseeroman", "balay"]
|
||||
|
||||
version("main", branch="main")
|
||||
version("3.18.0", sha256="aa83f46f942aca05ffcbc8be29b496f56837f564e0396f5b39cec4946654ee78")
|
||||
version("3.17.2", sha256="e5b235486b6901cd4ff0d94083f0e5eeacaef3a2893e1714769717ad488a3885")
|
||||
version("3.17.1", sha256="967d5d045526088ff5b7b2cde76f8b4d1fee3a2a68481f85224b0795e6613eb9")
|
||||
version("3.17.0", sha256="cab298eb794739579167fd60ff900db90476c4c93b4ae4e0204e989a6eeb3767")
|
||||
@ -41,6 +42,7 @@ class PySlepc4py(PythonPackage):
|
||||
depends_on("py-setuptools", type="build")
|
||||
|
||||
depends_on("py-petsc4py", 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"))
|
||||
@ -53,6 +55,7 @@ class PySlepc4py(PythonPackage):
|
||||
depends_on("py-petsc4py@3.7.0:3.7", when="@3.7.0:3.7", type=("build", "run"))
|
||||
|
||||
depends_on("slepc")
|
||||
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")
|
||||
|
@ -22,6 +22,7 @@ class Slepc(Package, CudaPackage, ROCmPackage):
|
||||
test_requires_compiler = True
|
||||
|
||||
version("main", branch="main")
|
||||
version("3.18.0", sha256="18af535d979a646363df01f407c75f0e3b0dd97b3fdeb20dca25b30cd89239ee")
|
||||
version("3.17.2", sha256="f784cca83a14156631d6e0f5726ca0778e259e1fe40c927607d5fb12d958d705")
|
||||
version("3.17.1", sha256="11386cd3f4c0f9727af3c1c59141cc4bf5f83bdf7c50251de0845e406816f575")
|
||||
version("3.17.0", sha256="d4685fed01b2351c66706cbd6d08e4083a4645df398ef5ccd68fdfeb2f86ea97")
|
||||
@ -69,6 +70,7 @@ 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.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")
|
||||
|
Loading…
Reference in New Issue
Block a user