From 5104547efecb45445b54e9126007d410d0fbabe6 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Tue, 10 Nov 2020 19:24:26 +0100 Subject: [PATCH] Improved CentOS image Added MPI, boost, all modules --- .travis/install.boost | 10 +++++----- docker/centos7 | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.travis/install.boost b/.travis/install.boost index b42e574962..228f50b09f 100755 --- a/.travis/install.boost +++ b/.travis/install.boost @@ -19,11 +19,11 @@ cd boost_${version_} ./bootstrap.sh --with-libraries=serialization --prefix="$HOME/opt" +if [ "$1" = release ] ; then +# release build: +./b2 release install -j 4 > /dev/null 2> /dev/null +else # debug build: ./b2 debug cxxflags=-D_GLIBCXX_DEBUG install -j 4 > /dev/null 2> /dev/null - -# release build would be this one: -#./b2 release install -j 4 -# not needed since we can use system boost - +fi diff --git a/docker/centos7 b/docker/centos7 index bd53fc1f54..5bf16e3f75 100644 --- a/docker/centos7 +++ b/docker/centos7 @@ -3,7 +3,8 @@ FROM centos:7 RUN yum -y update \ && yum -y group install "Development Tools" \ - && yum -y install gawk vim zlib-devel gsl-devel fftw-devel + && yum -y install environment-modules gawk vim wget \ + lapack-devel blas-devel zlib-devel gsl-devel fftw-devel openmpi-devel RUN useradd -ms /bin/bash plumed USER plumed @@ -14,9 +15,19 @@ WORKDIR /home/plumed COPY plumed2.tgz /home/plumed # build and test plumed (no install) -RUN tar xzf plumed2.tgz \ +RUN . /etc/bashrc \ + && module load mpi \ + && export OMPI_MCA_btl_base_warn_component_unused=0 \ + && export PATH=$HOME/opt/bin:$PATH \ + && export CPATH=$HOME/opt/include:$CPATH \ + && export INCLUDE=$HOME/opt/include:$INCLUDE \ + && export LIBRARY_PATH=$HOME/opt/lib:$LIBRARY_PATH \ + && export LD_LIBRARY_PATH=$HOME/opt/lib:$LD_LIBRARY_PATH \ + && tar xzf plumed2.tgz \ && cd plumed2 \ - && ./configure \ + && .travis/install.boost release \ + && .travis/install.xdrfile \ + && ./configure --enable-modules=all --enable-boost_serialization \ && make -j 4 \ && make check