Skip to content

New patch release SLEPc 3.18.3#36401

Merged
adamjstewart merged 1 commit intospack:developfrom
joseeroman:jose/new-patch-release-slepc-3.18.3
Mar 27, 2023
Merged

New patch release SLEPc 3.18.3#36401
adamjstewart merged 1 commit intospack:developfrom
joseeroman:jose/new-patch-release-slepc-3.18.3

Conversation

@joseeroman
Copy link
Copy Markdown
Contributor

No description provided.

balay
balay previously approved these changes Mar 24, 2023
@adamjstewart adamjstewart enabled auto-merge (squash) March 24, 2023 14:10
Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I believe this is missing:

depends_on("py-cython@0.24:", type="build")

@adamjstewart adamjstewart disabled auto-merge March 24, 2023 14:56
@joseeroman
Copy link
Copy Markdown
Contributor Author

Actually, I believe this is missing:

depends_on("py-cython@0.24:", type="build")

In the previous patch release we added this

depends_on("py-cython@0.24:", type="build", when="@main")

Do you mean I should remove the when argument?

@adamjstewart
Copy link
Copy Markdown
Member

Either remove when if the dependency was always necessary, or change it to @X.Y.Z: where X.Y.Z is the first version where cython was required to install.

@balay
Copy link
Copy Markdown
Contributor

balay commented Mar 24, 2023

@joseeroman similar issue [and change] at #36406

@joseeroman
Copy link
Copy Markdown
Contributor Author

@balay this happens also in petsc4py. From which version is cython 0.24 needed?

@joseeroman
Copy link
Copy Markdown
Contributor Author

Ah, thanks. Will change.

Copy link
Copy Markdown
Contributor

@tldahlgren tldahlgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the new sha256.

adamjstewart
adamjstewart previously approved these changes Mar 25, 2023
@balay
Copy link
Copy Markdown
Contributor

balay commented Mar 27, 2023

@joseeroman here are the changes from #36406 that work with py-slepc4py

diff --git a/var/spack/repos/builtin/packages/py-slepc4py/ldshared-dev.patch b/var/spack/repos/builtin/packages/py-slepc4py/ldshared-dev.patch
index fbe430af1b..be5b2569aa 100644
--- a/var/spack/repos/builtin/packages/py-slepc4py/ldshared-dev.patch
+++ b/var/spack/repos/builtin/packages/py-slepc4py/ldshared-dev.patch
@@ -1,7 +1,7 @@
 diff --git a/src/binding/slepc4py/conf/baseconf.py b/src/binding/slepc4py/conf/baseconf.py
 index b0707a65a..44ba8f194 100644
---- a/src/binding/slepc4py/conf/baseconf.py
-+++ b/src/binding/slepc4py/conf/baseconf.py
+--- a/src/binding/slepc4py/conf/confpetsc.py
++++ b/src/binding/slepc4py/conf/confpetsc.py
 @@ -213,7 +213,7 @@ class PetscConfig:
          ldshared = getenv('LDSHARED', ldshared)
          ldflags = getenv('LDFLAGS', cflags + ' ' + (ldflags or ''))
diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py
index 293242612f..3a7924da48 100644
--- a/var/spack/repos/builtin/packages/py-slepc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py
@@ -37,8 +37,8 @@ class PySlepc4py(PythonPackage):
     patch("ldshared.patch", when="@:99")
     patch("ldshared-dev.patch", when="@main")
 
-    depends_on("py-cython@0.29.32:", when="@3.19: ^python@3.11:", type="build")
-    depends_on("py-cython@0.24:", when="@3.19:", type="build")
+    depends_on("py-cython@0.29.32:", when="^python@3.11:", type="build")
+    depends_on("py-cython@0.24:", type="build")
     depends_on("py-setuptools", type="build")
 
     depends_on("py-petsc4py", type=("build", "run"))
@@ -67,3 +67,8 @@ def build_directory(self):
             return os.path.join(self.stage.source_path, "src", "binding", "slepc4py")
         else:
             return self.stage.source_path
+
+    @run_before("install")
+    def cythonize(self):
+        with working_dir(self.build_directory):
+            python(join_path("conf", "cythonize.py"))

Additionally:

diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py
index a23002aac2..9c2ce75f8c 100644
--- a/var/spack/repos/builtin/packages/py-slepc4py/package.py
+++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py
@@ -40,6 +40,7 @@ class PySlepc4py(PythonPackage):
     depends_on("py-setuptools", type="build")
 
     depends_on("py-petsc4py", type=("build", "run"))
+    depends_on("py-petsc4py@main", when="@main", 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"))
@@ -49,6 +50,7 @@ class PySlepc4py(PythonPackage):
     depends_on("py-petsc4py@3.11.0:3.11", when="@3.11.0:3.11", type=("build", "run"))
 
     depends_on("slepc")
+    depends_on("slepc@main", when="@main")
     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")

@joseeroman
Copy link
Copy Markdown
Contributor Author

Pushed. Thanks.

Thanks-To: Satish Balay
@joseeroman joseeroman force-pushed the jose/new-patch-release-slepc-3.18.3 branch from 967439e to 85ec5a3 Compare March 27, 2023 09:18
@@ -36,10 +37,12 @@ class PySlepc4py(PythonPackage):
patch("ldshared.patch", when="@:99")
patch("ldshared-dev.patch", when="@main")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, where are these patches needed, and is there any way to solve the issue in slepc/petsc main?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code attempts to handle certain corner cases [perhaps with intel compilers?]. And this breaks with spack - as it changes compilers underneath - hence this fix to skip that code during spack build.

@dalcinl I don' think this change will affect other usages - so perhaps ok to add to petsc/slepc mainline?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel bad hardcoding things in petsc/slepc just for Spack (although maybe Spack is one of the more popular ways of installing things). I do frequently see patches specific to Homebrew, but those also break things for Spack. Maybe a more general solution that checks if the compiler is a symlink or something.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have strong opinions about this. Most of these hideous hacks were done just to workaround limitations of Python's distutils.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the change in file names [that was reflected in one of the changes in this PR] - I think we'll need another patch file added to spack for 3.19. So if we can add this to petsc/slepc mainline - then we can avoid adding additional copy of this patch to spack.

I'll create a MR for petsc

@adamjstewart adamjstewart merged commit e612436 into spack:develop Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants