-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from geodynamics/developer
Merge developer to master
- Loading branch information
Showing
10 changed files
with
276 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM ubuntu:20.04 | ||
|
||
WORKDIR /home | ||
|
||
# build environment | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND='noninteractive' \ | ||
DEBCONF_NONINTERACTIVE_SEEN='true' \ | ||
apt-get install --yes wget build-essential git cmake gfortran openmpi-bin && \ | ||
\ | ||
\ | ||
# install hdf5 1.12.1, and remain packages \ | ||
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.1/src/hdf5-1.12.1.tar.gz && \ | ||
tar xzf hdf5-1.12.1.tar.gz && rm hdf5-1.12.1.tar.gz && cd hdf5-1.12.1 && ./configure --prefix=/usr/local/hdf5 --enable-parallel --enable-build-mode=production && \ | ||
make -j4 && make install && cd .. && \ | ||
apt-get install --yes libproj-dev libhdf5-mpi-dev libfftw3-dev libfftw3-mpi-dev \ | ||
liblapack-dev python3-h5py libcurl3-dev && \ | ||
\ | ||
\ | ||
# install zfp and H5Z-ZFP \ | ||
git -c http.sslVerify=false clone https://github.com/LLNL/zfp.git && cd zfp/ && \ | ||
sed -i 's/# DEFS += -DBIT_STREAM_WORD_TYPE=uint8/DEFS += -DBIT_STREAM_WORD_TYPE=uint8/g' Config && \ | ||
make && cd .. && \ | ||
git -c http.sslVerify=false clone https://github.com/LLNL/H5Z-ZFP.git && cd H5Z-ZFP/ && \ | ||
make FC= CC=mpicc ZFP_HOME=/home/zfp HDF5_HOME=/usr/local/hdf5 all install && \ | ||
cd .. | ||
|
||
# changing BUILD_TIME will break the cache here so that sw4 can be built each time | ||
ARG BUILD_TIME=unknown | ||
|
||
# build sw4 | ||
RUN git -c http.sslVerify=false clone https://github.com/geodynamics/sw4.git && \ | ||
cd sw4/ && git switch developer && rm -r .git/ && \ | ||
make sw4 CXX=mpicxx FC=gfortran debug=no proj=yes hdf5=yes fftw=yes zfp=yes prec=double EXTRA_LINK_FLAGS="-L/usr/lib64 -lgfortran -lhdf5 -llapack" HDF5ROOT=/usr/local/hdf5 FFTWHOME=/usr/lib/x86_64-linux-gnu ZFPROOT=/home/zfp H5ZROOT=/home/H5Z-ZFP/install -j4 | ||
|
||
ENV PATH="$PATH:/home/sw4/optimize_mp" \ | ||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/hdf5/lib" | ||
|
||
# run sw4 | ||
# I typically use: | ||
# docker run --cap-add=SYS_PTRACE -it -v $(pwd):/home/model/ sw4:zfp | ||
# to run the docker container in avoid of the CMA issue (https://github.com/open-mpi/ompi/issues/4948) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.