Skip to content

mpi4py: do not re-generate cython sources that already exist in mpi4py release tarball#39661

Closed
balay wants to merge 1 commit intodevelopfrom
balay/petsc4py-remove-cython-dep
Closed

mpi4py: do not re-generate cython sources that already exist in mpi4py release tarball#39661
balay wants to merge 1 commit intodevelopfrom
balay/petsc4py-remove-cython-dep

Conversation

@balay
Copy link
Copy Markdown
Contributor

@balay balay commented Aug 28, 2023

(that depend on cython < 0.29.36)

This avoids conflict with petsc4py versions that have a dependency on cython@3.0.0

ref: mpi4py/mpi4py#386 (comment)

…y release tarball (that depend on cython < 0.29.36)

This avoids conflict with petsc4py versions that have a dependency on cython@3.0.0

- revert #36460, #38996
- update cython dependency for mpi4py@master
@haampie
Copy link
Copy Markdown
Member

haampie commented Aug 28, 2023

I thought we moved towards cythonizing everything nonetheless, cause old cython may generate code that is not forward compatible with python (it relies on python internals that change over time). Should this change be accompanied with upperbounds on python for older releases?

@balay
Copy link
Copy Markdown
Contributor Author

balay commented Aug 28, 2023

The cython@3.0 dependency issues appear to be a bit wider than just mpi4py.

I noticed numpy also has a similar issue [no version that supprots cython-3.0] - so the concretizer resolves to using py-numpy-1.17.5 and python-3.8.17 - that's causing grief in other use cases [for ex: an intel build using intel python 3.9]..

balay@xsdk:/data/balay/spack>./bin/spack spec py-numpy |egrep '(python|cython|numpy)@'
 -   py-numpy@1.25.2%gcc@11.3.1+blas+lapack build_system=python_pip patches=873745d arch=linux-rocky9-cascadelake
 -       ^py-cython@0.29.36%gcc@11.3.1 build_system=python_pip arch=linux-rocky9-cascadelake
 -       ^python@3.10.12%gcc@11.3.1+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,7d40923,f2fd060 arch=linux-rocky9-cascadelake
balay@xsdk:/data/balay/spack>./bin/spack spec py-numpy ^py-cython@3.0.0 |egrep '(python|cython|numpy)@'
 -       ^py-cython@3.0.0
 -   py-numpy@1.17.5%gcc@11.3.1+blas+lapack build_system=python_pip patches=cf407c1 arch=linux-rocky9-cascadelake
[+]                  ^py-cython@3.0.0%gcc@11.3.1 build_system=python_pip arch=linux-rocky9-cascadelake
[+]      ^python@3.8.17%gcc@11.3.1+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,4c24573,f2fd060 arch=linux-rocky9-cascadelake

So I'm not sure what the best way to proceed here is..

@haampie
Copy link
Copy Markdown
Member

haampie commented Aug 28, 2023

@alalazo has a pull request to support multiple versions of the same build dep per dag

@balay
Copy link
Copy Markdown
Contributor Author

balay commented Aug 28, 2023

old cython may generate code that is not forward compatible with python

what is the max version of python that cython@0.29.36 is compatible with?

@dalcinl
Copy link
Copy Markdown

dalcinl commented Aug 28, 2023

what is the max version of python that cython@0.29.36 is compatible with?

Python 3.12, which is in release candidate stage (API frozen).

@balay
Copy link
Copy Markdown
Contributor Author

balay commented Aug 28, 2023

what is the max version of python that cython@0.29.36 is compatible with?

Python 3.12, which is in release candidate stage (API frozen).

To clarify - the incompatibly will start with python-3.13 (and not 3.12)?

@dalcinl
Copy link
Copy Markdown

dalcinl commented Aug 28, 2023

To clarify - the incompatibly will start with python-3.13 (and not 3.12)?

Yes, exactly.

@adamjstewart
Copy link
Copy Markdown
Member

Should this change be accompanied with upperbounds on python for older releases?

Yes, probably

@alalazo has a pull request to support multiple versions of the same build dep per dag

#38447 has been merged, but it's opt-in at the moment, so the spec would still fail to resolve unless the user knows what they're doing. #38671 is also waiting on this to become the default behavior.

alalazo added a commit to alalazo/spack that referenced this pull request Sep 20, 2023
For cases like the one in spack#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.
alalazo added a commit to alalazo/spack that referenced this pull request Sep 26, 2023
For cases like the one in spack#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.
alalazo added a commit to alalazo/spack that referenced this pull request Sep 27, 2023
For cases like the one in spack#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.
alalazo added a commit to alalazo/spack that referenced this pull request Oct 5, 2023
For cases like the one in spack#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.
alalazo added a commit to alalazo/spack that referenced this pull request Oct 5, 2023
* Allow branching out of the "generic build" unification set

For cases like the one in spack#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.
alalazo added a commit that referenced this pull request Oct 6, 2023
* Allow branching out of the "generic build" unification set

For cases like the one in #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"
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Nov 2, 2023
* Allow branching out of the "generic build" unification set

For cases like the one in spack#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"
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jan 11, 2024
* Allow branching out of the "generic build" unification set

For cases like the one in spack#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"
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jan 31, 2024
* Allow branching out of the "generic build" unification set

For cases like the one in spack#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"
@alalazo
Copy link
Copy Markdown
Member

alalazo commented Nov 27, 2024

I believe this is not needed anymore (we default to multiple versions of build deps), but feel free to reopen if I'm wrong.

@alalazo alalazo closed this Nov 27, 2024
@alalazo alalazo deleted the balay/petsc4py-remove-cython-dep branch November 27, 2024 13:08
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