Skip to content
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

Build HEAD of v2.10 branch, enabling metatensor #5

Open
wants to merge 7 commits into
base: cecam-2023
Choose a base branch
from

Conversation

Luthaf
Copy link

@Luthaf Luthaf commented Oct 8, 2024

Creating this as a draft PR for @GiovanniBussi to comment on

This will need plumed/plumed2#1122 and plumed/plumed2#1123 to be merged first, and is currently pulling from a plumed fork with both PR merged. I'll update to use from plumed master later!

@GiovanniBussi
Copy link
Member

Thanks @Luthaf !!! Shall we have an explicit dependence on libtorch in plumed/meta.yaml as well?

@GiovanniBussi
Copy link
Member

It would also make sense to customize the label cecam-2023 here:
https://github.com/plumed/conda/blob/cecam-2023/.github/workflows/ci.yml

If this contains everything, we might call it tutorials-2024. I would also push this on a branch with a different name rather than merging on cecam-2023 (I can do it manually)

@Luthaf
Copy link
Author

Luthaf commented Oct 8, 2024

Shall we have an explicit dependence on libtorch in plumed/meta.yaml as well?

There is already a transitive dependency on libtorch through metatensor-torch, but I can add an explicit one if you prefer!

It would also make sense to customize the label cecam-2023 here

Sure, I'll customize the label!

@Luthaf
Copy link
Author

Luthaf commented Oct 10, 2024

Is there a way to also build py-plumed from this repository? Since I would need a version with plumed/plumed2#1129 included for the tutorial. If not, I can also try to run the simulation using some plumed-enabled LAMMPS build.

@GiovanniBussi
Copy link
Member

Traditionally we didn't, mostly because it was not necessary. But you can add it.

I think it makes sense if the python package for the tutorials is different from the official one. Otherwise, it should not be necessary

@Luthaf
Copy link
Author

Luthaf commented Oct 10, 2024

So I sould copy the code from https://github.com/conda-forge/py-plumed-feedstock/ here and adapt accordingly?

@Luthaf Luthaf changed the title Build latest master, enabling metatensor Build HEAD of v2.10 branch, enabling metatensor Oct 14, 2024
@Luthaf
Copy link
Author

Luthaf commented Oct 14, 2024

Ok, this has been changed to build the HEAD of v2.10 branch, and now includes py-plumed as well.

@Luthaf
Copy link
Author

Luthaf commented Oct 14, 2024

Updated to pull from https://github.com/plumed/plumed2, at commit plumed/plumed2@b0ffcb5

@Luthaf Luthaf marked this pull request as ready for review October 14, 2024 12:06
@@ -18,6 +18,10 @@ export CXXFLAGS="${CXXFLAGS//-O2/-O3}"

# libraries are explicitly listed here due to --disable-libsearch
export LIBS="-lboost_serialization -lfftw3 -lgsl -lgslcblas -llapack -lblas -lz $LIBS"
export LIBS="-lmetatensor_torch -lmetatensor -ltorch -lc10 -ltorch_cpu $LIBS"
Copy link
Member

Choose a reason for hiding this comment

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

@Luthaf any specific reason for removing libraries here (boost, fftw3, gslm etc)? I suspect they won't be linked

Copy link
Author

Choose a reason for hiding this comment

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

I did not remove anything, I added another line below. The full set of libraries will be -lmetatensor_torch -lmetatensor -ltorch -lc10 -ltorch_cpu -lboost_serialization -lfftw3 -lgsl -lgslcblas -llapack -lblas -lz, plus whatever was in $LIBS before these two lines

Copy link
Member

Choose a reason for hiding this comment

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

Sorry I didn't read correctly the script, it's fine as you did

conda-build -c conda-forge plumed
conda-build -c conda-forge gromacs
conda-build -c conda-forge lammps
conda-build -m .github/conda_build_config.yaml -c conda-forge plumed
Copy link
Member

@GiovanniBussi GiovanniBussi Oct 14, 2024

Choose a reason for hiding this comment

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

Useful trick (-m), so that we have them in a single place, thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Yes! And this is intentionally not in the repository root, to prevent it from being picked on local builds: https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html#conda-build-variant-config-files

@@ -0,0 +1,52 @@
{% set name = "py-plumed" %}
{% set version = "2.10" %}
Copy link
Member

Choose a reason for hiding this comment

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

Is there a standard way to make sure the date is baked in the version in some way? What I am thinking about is if a few weeks we release 2.10 it should override this one. Or shall we just increase the build: number below?

Copy link
Author

Choose a reason for hiding this comment

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

If you look below, the actual version ends up being 2.10.git.<hash>. I'm not sure if this will be treated as an alpha version by conda, but I can check that. If that's the case, the future 2.10 release should have priority over the alpha release!

Copy link
Author

Choose a reason for hiding this comment

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

Ok, I changed this to have the version be 2.10.dev1 and store the git sha in the build string instead. The whole package is then plumed-2.10.dev1-git.b0ffcb55ad8cc3c71ec5c30a1bd46f68dd33bceb.

This means that when 2.10 is released, it will be used instead of this one, since conda is following PEP440: https://peps.python.org/pep-0440/

@Luthaf
Copy link
Author

Luthaf commented Oct 16, 2024

CI failed trying to pull binutils on macos (to build lammps & gromacs). Not sure why this is needed though, they don't seems to be used by the build script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants