-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile.mpi
32 lines (28 loc) · 1022 Bytes
/
Dockerfile.mpi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM fedora:33
RUN dnf -y update \
&& dnf -y install \
gcc-gfortran \
make \
netcdf-fortran-devel \
sundials-devel \
gsl-devel \
openmpi-devel \
cmake \
&& dnf clean all
# NOTE: Modify .dockerignore to whitelist files/directories to copy.
COPY . /partmc/
ENV PATH="{$PATH}:/usr/lib64/openmpi/bin/"
ENV LD_LIBRARY_PATH="{$LD_LIBRARY_PATH}:/usr/lib64/openmpi/lib"
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
ENV FC=mpif90
ENV CC=mpicc
RUN mkdir /build \
&& cd /build \
&& cmake -D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS_RELEASE="-O2 -g -Werror -Wall -Wextra" \
-D CMAKE_Fortran_FLAGS_RELEASE="-O2 -g -Werror -fimplicit-none -Wall -Wextra -Wconversion -Wunderflow -Wimplicit-interface -Wno-compare-reals -Wno-unused -Wno-unused-parameter -Wno-unused-dummy-argument -fbounds-check" \
-D ENABLE_GSL:BOOL=TRUE \
-D ENABLE_MPI:BOOL=TRUE \
/partmc \
&& make