diff --git a/plumed/build.sh b/plumed/build.sh index 338ec44..ba0bd14 100644 --- a/plumed/build.sh +++ b/plumed/build.sh @@ -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" + +# libtorch puts some headers in a non-standard place +export CPPFLAGS="-I$PREFIX/include/torch/csrc/api/include $CPPFLAGS" # enable MPI export CXX=mpic++ @@ -26,8 +30,15 @@ export CXX=mpic++ # --disable-libsearch forces to link only explicitely requested libraries # --disable-static-patch avoid tests that are only required for static patches # --disable-static-archive makes package smaller -./configure --prefix=$PREFIX --disable-python --disable-libsearch --disable-static-patch --disable-static-archive --enable-modules=all --enable-boost_serialization +./configure --prefix=$PREFIX \ + --disable-python \ + --disable-libsearch \ + --disable-static-patch \ + --disable-static-archive \ + --enable-modules=all \ + --enable-boost_serialization \ + --enable-metatensor \ + --enable-libtorch make -j3 make install - diff --git a/plumed/meta.yaml b/plumed/meta.yaml index dd7bbf1..05d74d3 100644 --- a/plumed/meta.yaml +++ b/plumed/meta.yaml @@ -1,15 +1,16 @@ {% set name = "plumed" %} -{% set version = "2.9.0" %} +{% set version = "2.10" %} +{% set git_rev = "322300d9f2c71bf5de57dbfec92b7c4a109e8f26" %} package: name: {{ name|lower }} - version: {{ version }} + version: {{ version }}.git.{{ git_rev }} source: - url: https://github.com/plumed/plumed2/archive/v{{ version }}.tar.gz - sha256: 612d2387416b5f82dd8545709921440370e144fd46cef633654cf0ee43bac5f8 - #git_url: https://github.com/plumed/plumed2.git - #git_rev: ddb59d16b21d6afb054fd9f6352f5d290e8575bf + # url: https://github.com/plumed/plumed2/archive/v{{ version }}.tar.gz + # sha256: 612d2387416b5f82dd8545709921440370e144fd46cef633654cf0ee43bac5f8 + git_url: https://github.com/lab-cosmo/plumed2.git + git_rev: {{ git_rev }} build: number: 0 @@ -34,12 +35,16 @@ requirements: - liblapack - llvm-openmp # [osx] - zlib + - libtorch + - libmetatensor-torch >=0.5.0,<0.6.0 run: # for some not clear reason boost-cpp is needed here as well - boost-cpp - openmpi - gawk - llvm-openmp # [osx] + - libtorch + - libmetatensor-torch >=0.5.0,<0.6.0 test: commands: