Skip to content

Commit

Permalink
Updated Dockerfiles to build with a more recent version of gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
bourdin committed Nov 24, 2020
1 parent 385bcc8 commit 31a9baf
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 173 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
*log
*.ener*
*_out.gen
_minted*
36 changes: 19 additions & 17 deletions containers/Dockerfile.centos7-petsc3.3-mpich3.2
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,33 @@
# Use an official Python runtime as a parent image
FROM centos:7 AS centos7mpich32base

# install development tools
RUN yum -y install epel-release deltarpm ; \
yum -y update ; \
yum install -y git patch make cmake3 gmake perl m4 valgrind valgrind-devel dos2unix wget man sudo which zlib zlib-devel blas blas-devel lapack lapack-devel boost-devel gcc-c++ mesa-libGLU libXrender libXcursor libXft libXinerama python3 python3-devel python mpich-3.2-devel ; \
ln -s /usr/bin/cmake3 /usr/bin/cmake ; \
### install the Software Collection development tools for gcc-9 and other development tools
RUN yum -y install deltarpm ;\
yum -y update; \
yum -y install centos-release-scl epel-release; \
yum -y install devtoolset-9-gcc* devtoolset-9-gdb devtoolset-9-valgrind devtoolset-9-valgrind-devel ;\
yum -y install git patch make cmake3 gmake perl m4 wget man sudo which zlib zlib-devel blas blas-devel lapack lapack-devel boost-devel mesa-libGLU libXrender libXcursor libXft libXinerama python3 python3-devel python mpich-3.2-devel
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake ; \
mkdir -p /usr/lib64/mpich-3.2/include ; \
pip3 install pyaml numpy matplotlib

ENV MPI_HOME /usr/lib64/mpich-3.2
ENV PATH $MPI_HOME/bin:$PATH
ENV LD_LIBRARY_PATH $MPI_HOME/lib:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH /opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/usr/lib64/mpich-3.2/lib
ENV MANPATH /opt/rh/devtoolset-9/root/usr/share/man
ENV PATH /opt/rh/devtoolset-9/root/usr/bin:/usr/lib64/mpich-3.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PCP_DIR /opt/rh/devtoolset-9/root
ENV PKG_CONFIG_PATH /opt/rh/devtoolset-9/root/usr/lib64/pkgconfig
ENV X_SCLS devtoolset-9

## Install gmsh
RUN curl http://gmsh.info/bin/Linux/gmsh-4.5.6-Linux64.tgz | tar zxvf - --strip-components=1 -C /usr/local
### Install gmsh
RUN curl http://gmsh.info/bin/Linux/gmsh-4.7.1-Linux64.tgz | tar zxvf - --strip-components=1 -C /usr/local


### Build petsc for a mef90 development or production environment
FROM centos7mpich32base AS centos7mpich32petsc33
ENV PETSC_DIR /opt/HPC/petsc-3.3-mef90
ENV PATH $PETSC_DIR/bin:$PETSC_DIR/$PETSC_ARCH/bin:$PATH
#RUN mkdir -p /opt/HPC/petsc-3.3-mef90/${PETSC_ARCH}/cbind/include /opt/HPC/petsc-3.3-mef90/${PETSC_ARCH}/forbind/include
ENV PATH $PETSC_DIR/bin:$PATH

RUN mkdir -p /opt/HPC
RUN git clone --single-branch --branch mef90-3.3 https://gitlab.com/blaisebourdin/petsc.git ${PETSC_DIR} ;

ENV PETSC_ARCH centos7-gcc4.8-mpich3.2-mef90-g
Expand All @@ -48,14 +54,12 @@ RUN cd ${PETSC_DIR} ; \
--download-exodusii=1 \
--download-f-blas-lapack=1 \
--download-chaco=1 \
--download-hdf5=1 \
--download-hypre=1 \
--download-metis=1 \
--download-ml=1 \
--download-netcdf=1 \
--download-parmetis=1 \
--download-sowing=1 \
--download-triangle=1 \
--download-yaml=1 \
--with-boost=1 \
--with-clanguage=C++ \
Expand All @@ -79,14 +83,12 @@ RUN cd ${PETSC_DIR} ; \
--download-exodusii=1 \
--download-f-blas-lapack=1 \
--download-chaco=1 \
--download-hdf5=1 \
--download-hypre=1 \
--download-metis=1 \
--download-ml=1 \
--download-netcdf=1 \
--download-parmetis=1 \
--download-sowing=1 \
--download-triangle=1 \
--download-yaml=1 \
--with-boost=1 \
--with-clanguage=C++ \
Expand All @@ -98,4 +100,4 @@ RUN cd ${PETSC_DIR} ; \
--with-sieve=1 \
--with-c2html=0 \
--with-x11=0; \
make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} all
make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} all
148 changes: 81 additions & 67 deletions containers/Dockerfile.centos7-petsc3.3-openmpi-1.6.4
Original file line number Diff line number Diff line change
Expand Up @@ -16,85 +16,99 @@
# Use an official Python runtime as a parent image
FROM centos:7 AS centos7openmpi164base

# install development tools
RUN yum -y install epel-release deltarpm ; \
yum -y update ; \
yum install -y git patch make cmake3 gmake perl m4 valgrind valgrind-devel dos2unix wget man sudo which zlib zlib-devel blas blas-devel lapack lapack-devel boost-devel compat-openmpi16-devel gcc-c++ mesa-libGLU libXrender libXcursor libXft libXinerama python3 python3-devel python ; \
ln -s /usr/bin/cmake3 /usr/bin/cmake ; \
### install the Software Collection development tools for gcc-9 and other development tools
RUN yum -y install deltarpm ;\
yum -y update; \
yum -y install centos-release-scl epel-release; \
yum -y install devtoolset-9-gcc* devtoolset-9-gdb devtoolset-9-valgrind devtoolset-9-valgrind-devel ;\
yum -y install git patch make cmake3 gmake perl m4 wget man sudo which zlib zlib-devel blas blas-devel lapack lapack-devel boost-devel mesa-libGLU libXrender libXcursor libXft libXinerama python3 python3-devel python compat-openmpi16-devel
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake ; \
mkdir -p /usr/lib64/compat-openmpi16/include ; \
pip3 install pyaml numpy matplotlib

ENV MPI_HOME /usr/lib64/compat-openmpi16
ENV PATH $MPI_HOME/bin:$PATH
ENV LD_LIBRARY_PATH $MPI_HOME/lib:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH /opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/usr/lib64/compat-openmpi16/lib
ENV MANPATH /opt/rh/devtoolset-9/root/usr/share/man
ENV PATH /opt/rh/devtoolset-9/root/usr/bin:/usr/lib64/compat-openmpi16/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PCP_DIR /opt/rh/devtoolset-9/root
ENV PKG_CONFIG_PATH /opt/rh/devtoolset-9/root/usr/lib64/pkgconfig
ENV X_SCLS devtoolset-9



## Install gmsh
RUN curl http://gmsh.info/bin/Linux/gmsh-4.5.6-Linux64.tgz | tar zxvf - --strip-components=1 -C /usr/local
RUN curl http://gmsh.info/bin/Linux/gmsh-4.7.1-Linux64.tgz | tar zxvf - --strip-components=1 -C /usr/local

RUN mkdir -p /opt/HPC/

### Build petsc for a mef90 development or production environment
FROM centos7openmpi164base AS centos7openmpi164petsc33

ENV PETSC_DIR /opt/HPC/petsc-3.3-mef90
ENV PATH $PETSC_DIR/bin:$PETSC_DIR/$PETSC_ARCH/bin:$PATH
#RUN mkdir -p /opt/HPC/petsc-3.3-mef90/${PETSC_ARCH}/cbind/include /opt/HPC/petsc-3.3-mef90/${PETSC_ARCH}/forbind/include
RUN git clone --single-branch --branch mef90-3.3 https://gitlab.com/blaisebourdin/petsc.git ${PETSC_DIR} ;
ENV PATH $PETSC_DIR/bin:$PATH

RUN mkdir -p /opt/HPC
RUN git clone --single-branch --branch mef90-3.3 https://gitlab.com/blaisebourdin/petsc.git ${PETSC_DIR}

ENV PETSC_ARCH centos7-gcc4.8-openmpi1.6.4-mef90-g
RUN cd ${PETSC_DIR} ; \
./configure \
COPTFLAGS='-g' \
CXXOPTFLAGS='-g' \
FOPTFLAGS='-g' \
--download-exodusii=1 \
--download-f-blas-lapack=1 \
--download-chaco=1 \
--download-hdf5=1 \
--download-hypre=1 \
--download-metis=1 \
--download-ml=1 \
--download-netcdf=1 \
--download-parmetis=1 \
--download-sowing=1 \
--download-triangle=1 \
--download-yaml=1 \
--with-boost=1 \
--with-clanguage=C++ \
--with-debugging=1 \
--with-fortran-datatypes=1 \
--with-gnu-compilers=1 \
--with-mpi-dir=$MPI_HOME \
--with-shared-libraries=1 \
--with-sieve=1 \
--with-c2html=0 \
--with-x11=0; \
RUN cd ${PETSC_DIR} ; \
./configure \
COPTFLAGS='-g' \
CXXOPTFLAGS='-g' \
FOPTFLAGS='-g' \
FFLAGS='-Wno-aliasing' \
CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable' \
CFLAGS='-Wno-unused-variable' \
--download-exodusii=1 \
--download-f-blas-lapack=1 \
--download-chaco=1 \
--download-hypre=1 \
--download-metis=1 \
--download-ml=1 \
--download-netcdf=1 \
--download-parmetis=1 \
--download-sowing=1 \
--download-yaml=1 \
--with-boost=1 \
--with-clanguage=C++ \
--with-debugging=1 \
--with-fortran-datatypes=1 \
--with-gnu-compilers=1 \
--with-mpi-dir=$MPI_HOME \
--with-shared-libraries=1 \
--with-sieve=1 \
--with-c2html=0 \
--with-x11=0; \
make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} all

ENV PETSC_ARCH centos7-gcc4.8-openmpi1.6.4-mef90-O
RUN cd ${PETSC_DIR} ; \
rm -Rf externalpackages ; \
./configure \
COPTFLAGS='-g -O3 -march=native' \
CXXOPTFLAGS='-g -O3 -march=native'\
FOPTFLAGS='-g -O3 -march=native' \
--download-exodusii=1 \
--download-f-blas-lapack=1 \
--download-chaco=1 \
--download-hdf5=1 \
--download-hypre=1 \
--download-metis=1 \
--download-ml=1 \
--download-netcdf=1 \
--download-parmetis=1 \
--download-sowing=1 \
--download-triangle=1 \
--download-yaml=1 \
--with-boost=1 \
--with-clanguage=C++ \
--with-debugging=0 \
--with-fortran-datatypes=1 \
--with-gnu-compilers=1 \
--with-mpi-dir=$MPI_HOME \
--with-shared-libraries=1 \
--with-sieve=1 \
--with-c2html=0 \
--with-x11=0; \
make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} all
RUN cd ${PETSC_DIR} ; \
rm -Rf externalpackages ; \
./configure \
COPTFLAGS='-g -O3 -march=native' \
CXXOPTFLAGS='-g -O3 -march=native' \
FOPTFLAGS='-g -O3 -march=native' \
FFLAGS='-Wno-aliasing' \
CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable' \
CFLAGS='-Wno-unused-variable' \
--download-exodusii=1 \
--download-f-blas-lapack=1 \
--download-chaco=1 \
--download-hypre=1 \
--download-metis=1 \
--download-ml=1 \
--download-netcdf=1 \
--download-parmetis=1 \
--download-sowing=1 \
--download-yaml=1 \
--with-boost=1 \
--with-clanguage=C++ \
--with-debugging=0 \
--with-fortran-datatypes=1 \
--with-gnu-compilers=1 \
--with-mpi-dir=$MPI_HOME \
--with-shared-libraries=1 \
--with-sieve=1 \
--with-c2html=0 \
--with-x11=0; \
make PETSC_DIR=${PETSC_DIR} PETSC_ARCH=${PETSC_ARCH} all
80 changes: 0 additions & 80 deletions containers/Dockerfile.mef90centos7openmpi-1.6.4

This file was deleted.

21 changes: 12 additions & 9 deletions containers/getDependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ else
mkdir tarball
cd tarball
fi
wget http://ftp.mcs.anl.gov/pub/petsc/externalpackages/Chaco-2.2.tar.gz
wget https://github.com/gsjaardema/seacas/archive/b37ad5be658bd447717faa714f77ea3e4aa9537b.tar.gz
wget http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hypre-2.8.0b.tar.gz
wget http://ftp.mcs.anl.gov/pub/petsc/externalpackages/ml-6.2-win.tar.gz
wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdfc-4.7.4.tar.gz
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
wget http://gmsh.info/bin/Linux/gmsh-4.5.6-Linux64.tgz
#wget http://ftp.mcs.anl.gov/pub/petsc/externalpackages/boost_minimal_1_42_0.tar.gz
#wget http://ftp.mcs.anl.gov/pub/petsc/externalpackages/sowing-1.1.16d.tar.gz

echo 'Downloading netcdf '; curl -O https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz
echo 'Downloading chaco '; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/Chaco-2.2.tar.gz
echo 'Downloading exodusii'; curl -O https://github.com/gsjaardema/seacas/archive/0ac6baa46262ab17a7b3c0a07b8832ce8d088324.tar.gz
echo 'Downloading yaml '; curl -O http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
echo 'Downloading hypre '; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hypre-2.8.0b.tar.gz
echo 'Downloading sowing '; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/sowing-1.1.26-p1.tar.gz
echo 'Downloading ml '; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/ml-6.2-p3.tar.gz
echo 'Downloading parmetis'; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/parmetis-4.0.2-p3.tar.gz
echo 'Downloading hdf5 '; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hdf5-1.8.8-p1.tar.gz
echo 'Downloading metis '; curl -O http://ftp.mcs.anl.gov/pub/petsc/externalpackages/metis-5.0.2-p3.tar.gz
#echo 'Downloading gmsh '; curl -O http://gmsh.info/bin/Linux/gmsh-4.7.1-Linux64.tgz

if [ -d petsc-3.3-mef90 ]; then
cd petsc-3.3-mef90
Expand Down

0 comments on commit 31a9baf

Please sign in to comment.