Skip to content

Commit

Permalink
Build latest master, enabling metatensor
Browse files Browse the repository at this point in the history
  • Loading branch information
Luthaf committed Oct 8, 2024
1 parent 9afcf3c commit d212f4a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
15 changes: 13 additions & 2 deletions plumed/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand All @@ -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

14 changes: 8 additions & 6 deletions plumed/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down

0 comments on commit d212f4a

Please sign in to comment.