-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Successfully Concretize Python3-Based DAGs #7926
Conversation
@@ -114,7 +114,7 @@ class Petsc(Package): | |||
depends_on('mpi', when='+mpi') | |||
|
|||
# Build dependencies | |||
depends_on('python@2.6:2.8', type='build') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check if PETSc support 3.x? Maybe that should be
depends_on('python@2.6:2.8,3.abc:', type='build')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've asked the authors. Until then, I'm assuming it's Python2 only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the intention is to avoid using Spack's python and hope the user has python 2 in path?
p.s. I thought there were some PRs merged on conretization of build dependencies separately (@adamjstewart @alalazo ?) that might help here to have 2 different version of python in the graph.
p.p.s. you should also adjust slepc then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davydden Yes that is the intention. Whatever concretization fixes were merged, they don't solve this problem. If you try concretizing a software stack that involves python@3
and petsc
, concretization will fail. This PR is never going to be merged, it is simply a resource for people to get their Python3 stuff working.
p.p.s. you should also adjust slepc then
Since I don't use slepc
, I'm not going to bother.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is never going to be merged, it is simply a resource for people to get their Python3 stuff working.
ah, i see, i missed that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there were some PRs merged on conretization of build dependencies separately
You're thinking of #2548, which still hasn't been merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which still hasn't been merged
petsc configure uses python-2 - and does not yet work with python-3
…On Thu, 26 Apr 2018, Denis Davydov wrote:
davydden commented on this pull request.
> @@ -114,7 +114,7 @@ class Petsc(Package):
depends_on('mpi', when='+mpi')
# Build dependencies
- ***@***.***:2.8', type='build')
can you check if PETSc support 3.x? Maybe that should be
```
***@***.***:2.8, 3.abc:', type='build')
```
|
Should add:
petsc-3.9 has the following change:
https://bitbucket.org/petsc/petsc/commits/a3e07f7d98935102301a2849d6c5439db2167066
i.e if 'python3 configure' is invoked - it looks for python2 in path - and attempts to use it.
…On Thu, 26 Apr 2018, Denis Davydov wrote:
davydden commented on this pull request.
> @@ -114,7 +114,7 @@ class Petsc(Package):
depends_on('mpi', when='+mpi')
# Build dependencies
- ***@***.***:2.8', type='build')
so the intention is to avoid using Spack's python and hope the user has python 2 in path?
p.s. I thought there were some PRs merged on conretization of build dependencies separately ***@***.*** @alalazo ?) that might help here to have 2 different version of python in the graph.
p.p.s. you should also adjust slepc then
|
I'm not a huge fan of PRs that are never intended to be merged... What about a note in http://spack.readthedocs.io/en/latest/known_issues.html that describes what the problem is and how to resolve it if you run into it? |
Having a pr there makes it easier to merge in if you need it.
…On Thu, Apr 26, 2018 at 4:12 PM Adam J. Stewart ***@***.***> wrote:
I'm not a huge fan of PRs that are never intended to be merged...
What about a note in
http://spack.readthedocs.io/en/latest/known_issues.html that describes
what the problem is and how to resolve it if you run into it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7926 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd07nG3J9drXa7qGWK770NeW252yCks5tsioMgaJpZM4TnCKG>
.
|
I realized this could be turned into a mergeable PR. Packages that need it can have a |
OK... I've made this PR mergeable. Please see the documentation for how it works. If we can merge this, then we will get a substantial improvement for anyone using Python3 in their software stack. |
variant to the problematic package, with the understanding that the | ||
user must set ``all: ['+python3']`` in ``packages.yaml`` for software | ||
stacks involving Python3. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe mention #2548 as a WIP which should resolved this issue.
@@ -91,6 +91,8 @@ class Petsc(Package): | |||
multi=False) | |||
variant('suite-sparse', default=False, | |||
description='Activates support for SuiteSparse') | |||
variant('python3', default=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would add a comment above
FIXME: remove once #2548 is merged and tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe just merge #2548 and forget about this crazy PR. @tgamblin @scheibelp ping???
Yaaaaay python3!!! 2020 is coming up pretty soon ;) If the decision is to merge this please ping me and I will PR to your PR with other affected packages I've hacked locally for python 3. I don't know how I feel about introducing the variant, because when it disappears it'll orphan those packages. However, having a PR open even if it doesn't get merged means people can at the very least apply the patch here with two commands (fetch the pr and merge) rather than needing to find them all in their own. That works for me because I only do python3, but may have more serious implications for traditional spack usage (I'm only administering my local system, not a cluster). |
Ugh sorry I read too fast / got too excited. Given the no merge intention, I will submit the PR when I have access to that computer again tonight / tomorrow. |
Please create a PR based on this branch (
At first, this PR was no merge, because it would break Python2. Now with the
That's why I left a note on #2548 to revert this PR once it is merged. The more we can collect all our Python3 fixes in one place resulting in a single merge, the easier that reversion will be. At worst, someone (@citibeth?) will have to grep through the packages for
@tgamblin Yes that's why we need to merge either this or #2548 sooner, rather than later. |
python3: more
I've made a separate PR for python-3 only version of ipython. Since ipython and matplotlib along with numpy and scipy are now python-3 only, it's strange to see python-3 support being a variant not the other way around! |
Since ipython and matplotlib along with numpy and scipy are now python-3
only, it's strange to see python-3 support being a variant not the other
way around!
At some point we will almost certainly switch from supportying Python2 by
default to python3. I just don't know when that point will be.
|
I was wondering if we could split the python package into 2 packages, one for python2 and another for python3. This would be a simpler fix than trying to fix the concretizer itself. Did spack decide against this ? |
On Fri, Jun 8, 2018 at 4:06 PM, Sajid Ali ***@***.***> wrote:
I was wondering if we could split the python package into 2 packages, one
for python2 and another for python3. This would be a simpler fix than
trying to fix the concretizer itself. Did spack decide against this ?
The current arrangement is considered to be preferable. We will either fix
the concretizer, or eventually merge something like this PR.
|
To overcome the limitation of current concretiser in spack. See spack#7926
To overcome the limitation of current concretiser in spack. See spack#7926
|
||
This can happen for two reasons, both related to the concretizer: | ||
|
||
1. A package requires ``python@2`` as a build dependency only (eg: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inverse of this happens as well. For instance, mesa required python 3 as a build-only dependency, but paraview requires python 2. Thus paraview+python
fails to concretize. The workaround at the moment is to do a two stage install where you first install mesa explicitly. Then when you install par5aview, the concretizer only evaluates the link and runtime dependencies of the installed mesa.
I've been using: packages:
python:
version: ['3:'] in my |
This is an on-going PR to collect unmergable changes ("hacks") to Spack packages required to build Python3-based software stacks. The hacks are due to shortcomings in the concretizer, which will be solved someday. Until then, this can serve as a resource. Please add to this PR if you find more changes needed.