diff --git a/plumed/build.sh b/plumed/build.sh index 338ec44..f3cc68e 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 and requires C++17 +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..36b468b 100644 --- a/plumed/meta.yaml +++ b/plumed/meta.yaml @@ -1,15 +1,15 @@ {% set name = "plumed" %} -{% set version = "2.9.0" %} +{% set version = "7d43d94a15d5800805572c6f09f22b41ac74fdb3" %} package: name: {{ name|lower }} - version: {{ version }} + version: git.{{ version }} 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: {{ version }} build: number: 0 @@ -34,12 +34,14 @@ requirements: - liblapack - llvm-openmp # [osx] - zlib + - 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] + - libmetatensor-torch >=0.5.0,<0.6.0 test: commands: