Skip to content

Commit

Permalink
Updates platypus-deps dockerfile to address warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Palmer committed Jun 27, 2024
1 parent 36eec7a commit c7d10df
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions docker/platypus-deps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
ARG compile_cores=4

# By default checkout mfem-moose branch
ARG WORKDIR="opt"
ARG OPT_DIR="opt"

# Install apt dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
build-essential \
bison \
flex \
Expand Down Expand Up @@ -50,30 +50,30 @@ RUN pip install packaging && \
pip install jinja2

# Install CMake
RUN cd /$WORKDIR && \
git clone https://github.com/Kitware/CMake.git && \
WORKDIR /$OPT_DIR
RUN git clone https://github.com/Kitware/CMake.git && \
cd CMake/ && \
git checkout 78ae759 && \
./bootstrap --parallel="$compile_cores" && \
make -j"$compile_cores" && \
make install && \
alias cmake='/$WORKDIR/CMake/bin/cmake'
alias cmake='/$OPT_DIR/CMake/bin/cmake'

# Download SuperLU
RUN cd /$WORKDIR && \
curl -LJO https://github.com/xiaoyeli/superlu_dist/archive/refs/tags/v8.1.0.tar.gz
WORKDIR /$OPT_DIR
RUN curl -LJO https://github.com/xiaoyeli/superlu_dist/archive/refs/tags/v8.1.0.tar.gz

# Download PETSc
RUN cd /$WORKDIR && \
mkdir petsc && \
WORKDIR /$OPT_DIR
RUN mkdir petsc && \
cd petsc && \
curl -L -O http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.19.3.tar.gz && \
tar -xf petsc-3.19.3.tar.gz -C .

# Build PETSc
RUN cd /$WORKDIR/petsc/petsc-3.19.3 && \
./configure \
--prefix=/$WORKDIR/petsc \
WORKDIR /$OPT_DIR/petsc/petsc-3.19.3
RUN ./configure \
--prefix=/$OPT_DIR/petsc \
CXXOPTFLAGS='-O3 -funroll-loops' COPTFLAGS='-O3 -funroll-loops' FOPTFLAGS='-O3' \
--with-debugging=0 \
--with-ssl=0 \
Expand All @@ -88,7 +88,7 @@ RUN cd /$WORKDIR/petsc/petsc-3.19.3 && \
--download-metis=1 \
--download-ptscotch=1 \
--download-parmetis=1 \
--download-superlu_dist=/$WORKDIR/superlu_dist-8.1.0.tar.gz \
--download-superlu_dist=/$OPT_DIR/superlu_dist-8.1.0.tar.gz \
--download-scalapack=1 \
--download-mumps=1 \
--download-slepc=1 \
Expand All @@ -97,16 +97,16 @@ RUN cd /$WORKDIR/petsc/petsc-3.19.3 && \
make

# Install PETSc
RUN cd /$WORKDIR/petsc/petsc-3.19.3 && \
make PETSC_DIR=/$WORKDIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt install && \
make PETSC_DIR=/$WORKDIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt check && \
WORKDIR /$OPT_DIR/petsc/petsc-3.19.3
RUN make PETSC_DIR=/$OPT_DIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt install && \
make PETSC_DIR=/$OPT_DIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt check && \
cd .. && \
cd .. && \
export PETSC_DIR=/$WORKDIR/petsc
export PETSC_DIR=/$OPT_DIR/petsc

# Build MFEM and common miniapp
RUN cd /$WORKDIR && \
git clone https://github.com/Heinrich-BR/mfem.git && \
WORKDIR /$OPT_DIR
RUN git clone https://github.com/Heinrich-BR/mfem.git && \
cd mfem && \
git checkout SubmeshBoundary && \
mkdir build && \
Expand All @@ -116,38 +116,38 @@ RUN cd /$WORKDIR && \
-DCMAKE_POSITION_INDEPENDENT_CODE=YES \
-DMFEM_USE_OPENMP=NO \
-DMFEM_THREAD_SAFE=NO \
-DHYPRE_DIR=/$WORKDIR/petsc/ \
-DBLAS_LIBRARIES=/$WORKDIR/petsc/lib/libfblas.a \
-DLAPACK_LIBRARIES=/$WORKDIR/petsc/lib/libflapack.a \
-DHYPRE_DIR=/$OPT_DIR/petsc/ \
-DBLAS_LIBRARIES=/$OPT_DIR/petsc/lib/libfblas.a \
-DLAPACK_LIBRARIES=/$OPT_DIR/petsc/lib/libflapack.a \
-DMFEM_USE_MPI=YES \
-DMFEM_USE_METIS_5=YES \
-DMETIS_DIR=/$WORKDIR/petsc/ \
-DParMETIS_DIR=/$WORKDIR/petsc/ \
-DMETIS_DIR=/$OPT_DIR/petsc/ \
-DParMETIS_DIR=/$OPT_DIR/petsc/ \
-DMFEM_USE_SUPERLU=YES \
-DSuperLUDist_DIR=/$WORKDIR/petsc/ \
-DSuperLUDist_DIR=/$OPT_DIR/petsc/ \
-DMFEM_USE_NETCDF=YES \
-DHDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/mpich/ \
make -j"$compile_cores" && \
cd miniapps/common && \
make -j"$compile_cores"

# Build GLVis
RUN cd /$WORKDIR && \
git clone https://github.com/GLVis/glvis.git && \
WORKDIR /$OPT_DIR
RUN git clone https://github.com/GLVis/glvis.git && \
cd glvis/ && \
mkdir build && \
cd build/ && \
cmake -G Ninja -DMFEM_DIR=/$WORKDIR/mfem/build .. && \
cmake -G Ninja -DMFEM_DIR=/$OPT_DIR/mfem/build .. && \
ninja

# Configure MOOSE
WORKDIR /$WORKDIR
WORKDIR /$OPT_DIR
# hadolint ignore=DL3003
RUN export MOOSE_JOBS=$compile_cores && \
git clone https://github.com/idaholab/moose && \
cd moose && \
git checkout master && \
export PETSC_DIR=/$WORKDIR/petsc && \
export PETSC_DIR=/$OPT_DIR/petsc && \
export PETSC_ARCH=arch-linux-c-opt && \
export CC=mpicc && \
export CXX=mpicxx && \
Expand All @@ -158,22 +158,22 @@ RUN export MOOSE_JOBS=$compile_cores && \
./configure --with-derivative-size=200

# Build WASP
WORKDIR /$WORKDIR/moose/scripts
WORKDIR /$OPT_DIR/moose/scripts
RUN METHODS=opt ./update_and_rebuild_wasp.sh

# Build MOOSE
WORKDIR /$WORKDIR/moose/framework
WORKDIR /$OPT_DIR/moose/framework
RUN METHOD=opt make -j$compile_cores

WORKDIR /$WORKDIR/moose/test
WORKDIR /$OPT_DIR/moose/test
RUN METHOD=opt make -j$compile_cores

# This is needed or it mpiexec complains because docker runs as root
# Discussion on this issue https://github.com/open-mpi/ompi/issues/4451
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

# WORKDIR /$WORKDIR/moose/test
# WORKDIR /$OPT_DIR/moose/test
# RUN ./run_tests -j"$compile_cores" --re='(?!initial_condition.newton_with_exact_initialization)'

# ENV OMPI_ALLOW_RUN_AS_ROOT=
Expand Down

0 comments on commit c7d10df

Please sign in to comment.