Skip to content

Commit

Permalink
Merge pull request #8 from thomas-robinson/2021.03Update
Browse files Browse the repository at this point in the history
2021.03 update container definition files
  • Loading branch information
thomas-robinson authored Aug 31, 2021
2 parents 53fc4aa + ea4b966 commit 1b7b4ad
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Earth System Model 4

## What Is Included
* [src/]((https://github.com/NOAA-GFDL/ESM4/tree/master/src) source code for the ESM4 model (all code is in submodules)
* [exec/]((https://github.com/NOAA-GFDL/ESM4/tree/master/exec) Makefiles to compile the code
* [run/]((https://github.com/NOAA-GFDL/ESM4/tree/master/run) Simple run script
* [src]((https://github.com/NOAA-GFDL/ESM4/tree/master/src) source code for the ESM4 model (all code is in submodules)
* [exec]((https://github.com/NOAA-GFDL/ESM4/tree/master/exec) Makefiles to compile the code
* [run]((https://github.com/NOAA-GFDL/ESM4/tree/master/run) Simple run script

## Cloning
To clone the ESM4 model please use the recursive option
Expand Down
2 changes: 1 addition & 1 deletion container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN . /opt/spack/share/spack/setup-env.sh
## Make the ESM4 directory
RUN mkdir -p /opt/ESM4
## Build the ESM4 from github
RUN git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.02 \
RUN git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.03 \
&& cd ESM4/exec \
&& make gcc=on HDF_INCLUDE=-I/opt/hdf5/include SH=sh CLUBB=off \
&& cp esm4.1.x /opt/ESM4 \
Expand Down
2 changes: 1 addition & 1 deletion container/Dockerfile.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN . /opt/spack/share/spack/setup-env.sh
## Make the ESM4 directory
RUN mkdir -p /opt/ESM4
## Build the ESM4 from github
RUN git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.02 \
RUN git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.03 \
&& cd ESM4/exec \
&& make gcc=on HDF_INCLUDE=-I/opt/hdf5/include SH=sh CLUBB=off \
&& cp esm4.1.x /opt/ESM4 \
Expand Down
2 changes: 1 addition & 1 deletion container/Dockerfile.intel_sources
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ENV LIBRARY_PATH=${LD_LIBRARY_PATH}

## Build the model
RUN mkdir -p /opt/ESM4
RUN git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.02 \
RUN git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.03 \
&& cd ESM4/exec \
&& make HDF_INCLUDE=-I/opt/hdf5/include HDF_LIBS="-L/opt/hdf5/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -lhdf5hl_fortran" SH=sh \
&& cp esm4.1.x /opt/ESM4 \
Expand Down
2 changes: 1 addition & 1 deletion container/Singularity.esm4
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Stage: build
# Install all the required software
. /opt/spack/share/spack/setup-env.sh
# Install ESM4
git clone --recursive -b 2021.02 https://github.com/NOAA-GFDL/ESM4.git && cd ESM4/exec
git clone --recursive -b 2021.03 https://github.com/NOAA-GFDL/ESM4.git && cd ESM4/exec
make gcc=on OPENMP=on SH=sh CLUBB=off
mkdir -p /opt/ESM4
cp esm4.1.x /opt/ESM4
Expand Down
14 changes: 8 additions & 6 deletions container/Singularity.intel_esm4
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
Bootstrap: localimage
From: intel_netcdf_ubuntu.sif
From: intel2021.2_netcdfc4.7.4_ubuntu.sif
Stage: build
## Singularity def file used to create ESM4

%post
cd /opt
## Build the ESM4 from github
git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.02
git clone --recursive https://github.com/NOAA-GFDL/ESM4.git -b 2021.03
cd ESM4/exec
make -j 20 HDF_INCLUDE=-I/opt/hdf5/include HDF_LIBS="-L/opt/hdf5/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -lhdf5hl_fortran" SH=sh
make -j 20 HDF_INCLUDE=-I/opt/hdf5/include HDF_LIBS="-L/opt/hdf5/lib -lhdf5 -lhdf5_fortran -lhdf5_hl -lhdf5hl_fortran"
cp esm4.1.x /opt/ESM4
make clean_all
chmod 777 /opt/ESM4/esm4.1.x

## Move FMS to opt
cp -r fms /opt

Bootstrap: docker
From: intel/oneapi-runtime:ubuntu18.04
Expand All @@ -22,12 +23,13 @@ Stage: final
/opt/hdf5
/opt/netcdf-c
/opt/netcdf-fortran
/opt/fms
/opt/ESM4/esm4.1.x
## Add the ESM4 executable to the path
%environment
PATH=/opt/ESM4:/opt/netcdf-c/bin:/opt/netcdf-fortran/bin:${PATH}
LD_LIBRARY_PATH=/opt/netcdf-c/lib:/opt/netcdf-fortran/lib:/opt/hdf5/lib:/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64/:/opt/intel/oneapi/lib/intel64/lib:/opt/intel/oneapi/lib/intel64/libfabric:${LD_LIBRARY_PATH}
export LIBRARY_PATH=/opt/netcdf-c/lib:/opt/netcdf-fortran/lib:/opt/hdf5/lib:/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64/:/opt/intel/oneapi/lib/intel64/lib:/opt/intel/oneapi/lib/intel64/libfabric
LD_LIBRARY_PATH=/opt/fms/build/libFMS/.libs:/opt/netcdf-c/lib:/opt/netcdf-fortran/lib:/opt/hdf5/lib:/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64/:/opt/intel/oneapi/lib/intel64/lib:/opt/intel/oneapi/lib/intel64/libfabric:${LD_LIBRARY_PATH}
export LIBRARY_PATH=/opt/fms/build/libFMS/.libs:/opt/netcdf-c/lib:/opt/netcdf-fortran/lib:/opt/hdf5/lib:/opt/intel/oneapi/lib:/opt/intel/oneapi/lib/intel64/:/opt/intel/oneapi/lib/intel64/lib:/opt/intel/oneapi/lib/intel64/libfabric
export KMP_STACKSIZE=512m
export NC_BLKSZ=1M
export F_UFMTENDIAN=big
Expand Down
10 changes: 8 additions & 2 deletions container/Singularity.intel_netcdf
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
Bootstrap: docker
From: intel/oneapi-hpckit:devel-ubuntu18.04
From: intel/oneapi-hpckit:2021.2-devel-ubuntu18.04
Stage: build

%post
## Set up oneAPI
apt-get -yqq update
apt-get -yqq upgrade
apt-get -yqq install git make
apt-get -yqq install git
apt-get -yqq install make
apt-get -yqq install wget
apt-get -yqq install m4
apt-get -yqq install autoconf
apt-get -yqq install automake
apt-get -yqq install libtool
apt-get -yqq install autogen
apt-get -yqq install intltool
# use wget to fetch the Intel repository public key
# cd /tmp
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
Expand Down
4 changes: 2 additions & 2 deletions container/singularity_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

singularity build -f intel_netcdf_ubuntu.sif Singularity.intel_netcdf
singularity build -f esm4_2021.02_ubuntu_intel.sif Singularity.intel_esm4
singularity build -f intel2021.2_netcdfc4.7.4_ubuntu.sif Singularity.intel_netcdf
singularity build -f esm4_2021.03_ubuntu_intel.sif Singularity.intel_esm4

0 comments on commit 1b7b4ad

Please sign in to comment.