-
Notifications
You must be signed in to change notification settings - Fork 1
/
fabm.def
47 lines (34 loc) · 1.24 KB
/
fabm.def
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Bootstrap: localimage
From: xios.sif
####
##
## Authors: Michael Wathen, Plymouth Marine Laboratory <[email protected]>
##
## Definition file for building FABM-ERSEM Singularity Container
##
#####
%post
apt update
apt install -y zip \
cmake \
g++
PATH=$PATH:/opt/mpi/install/bin:/opt/hdf5/install/bin
LD_LIBRARY_PATH=/opt/hdf5/install/lib:$LD_LIBRARY_PATH
git clone https://github.com/pmlmodelling/ersem.git ersem
git clone https://github.com/fabm-model/fabm.git fabm
export ERSEM_DIR=/ersem
export FABM_DIR=/fabm
export FABM_INSTALL=/fabm-gcc
mkdir $FABM_INSTALL
cd $FABM_INSTALL
cmake $FABM_DIR/src -DFABM_HOST=nemo -DCMAKE_Fortran_COMPILER=mpif90 -DFABM_ERSEM_BASE=$ERSEM_DIR -DFABM_EMBED_VERSION=ON -DCMAKE_INSTALL_PREFIX=$FABM_INSTALL -DCMAKE_Fortran_FLAGS:STRING="-fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -cpp -ffree-line-length-none" #-DCMAKE_BUILD_TYPE=debug
make
make install -j8
%environment
export LD_LIBRARY_PATH=/opt/hdf5/install/lib:fabm-gcc:$LD_LIBRARY_PATH
%labels
Author [email protected]
%help
The definition file used to build FABM-ERSEM:
To build the container, run
singularity build fabm.sif fabm.def