-
Notifications
You must be signed in to change notification settings - Fork 413
plumed: add libtorch and metatomic support #1990
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
base: develop
Are you sure you want to change the base?
Conversation
|
@spackbot fix style |
|
Let me see if I can fix that for you! |
|
I was able to run spack style --fixrepos/spack_repo/builtin/packages/dd4hep/package.py
repos/spack_repo/builtin/packages/graphviz/package.py
repos/spack_repo/builtin/packages/mapl/package.py
repos/spack_repo/builtin/packages/petaca/package.py
repos/spack_repo/builtin/packages/plumed/package.py
repos/spack_repo/builtin/packages/podio/package.py
repos/spack_repo/builtin/packages/py_cartopy/package.py
repos/spack_repo/builtin/packages/py_pygobject/package.py
repos/spack_repo/builtin/packages/py_torch/package.py
repos/spack_repo/builtin/packages/seacas/package.py
repos/spack_repo/builtin/packages/truchas/package.py
�[1;34m==> �[0mrunning flake8
repos/spack_repo/builtin/packages/plumed/package.py:273: [W293] blank line contains whitespace
repos/spack_repo/builtin/packages/plumed/package.py:286: [E501] line too long (106 > 99 characters)
repos/spack_repo/builtin/packages/plumed/package.py:304: [E741] ambiguous variable name 'l'
repos/spack_repo/builtin/packages/plumed/package.py:335: [E303] too many blank lines (2)
repos/spack_repo/builtin/packages/py_torch/package.py:809: [E501] line too long (110 > 99 characters)
�[1;34m==> �[0mrunning isort
Fixing /tmp/tmpvornvl89/fork/repos/spack_repo/builtin/packages/plumed/package.py
�[1;34m==> �[0mrunning black
I've updated the branch with style fixes. |
| depends_on("py-cython", type="build") | ||
|
|
||
| depends_on("py-torch", when="+pytorch") | ||
| conflicts("+metatomic ~pytorch", msg="metatomic support requires PyTorch") |
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.
is there a way to automatically enable pytorch when the user request metatomic, and only error if the user explicitly disable pytorch?
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 is what this conflicts does. It allows +pytorch ~metatomic (which is valid, as far as I understand), but disallows ~pytorch +metatomic. If you select only +metatomic then the pytorch variant automatically needs to be +pytorch if not specified in order to satisfy the constraint. However, if a user explicitly requires +metatomic ~pytorch, then an error is triggered.
This is essentially because the conflicts is stronger than the variant default value, see https://spack.readthedocs.io/en/latest/frequently_asked_questions.html#why-does-spack-pick-particular-versions-and-variants
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.
Thanks for the explanation! 🙏
Co-authored-by: Guillaume Fraux <[email protected]>
No description provided.