-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnemo_orca2.def
108 lines (86 loc) · 3.41 KB
/
nemo_orca2.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Bootstrap: localimage
<<<<<<< HEAD
From: /home/singularity/xios.sif
####
##
## Authors: Michael Wathen, Plymouth Marine Laboratory <[email protected]>
## Carsten Lackner, TU Berlin <[email protected]>
=======
From: /home/singularity/fabm.sif
####
##
## Authors: Michael Wathen, Plymouth Marine Laboratory <[email protected]>
##
>>>>>>> f3b7e75 (major changes to pmlmodelling NEMO-container add fabm and ersem ;update to Nemo 4.20 and xios 2.5 with changed flags and file updates according to J Mak)
## Definition file for building NEMO Singularity Containers
##
#####
%files
/home/singularity/input_files/arch/nemo-arch/arch-singularity.fcm
<<<<<<< HEAD
=======
<<<<<<<< HEAD:nemo_fabm.def
/home/singularity/nemo_fabm.zip
%post
cd home/singularity
unzip nemo_fabm.zip
rm nemo_fabm.zip
cd /home/singularity/nemo
cp /home/singularity/input_files/arch/nemo-arch/* /home/singularity/nemo/arch
echo "Compiling nemo ORCA2_FABM Config"
./makenemo -m singularity -r ORCA2_FABM -j 8
mkdir /opt/nemo
mv /home/singularity/nemo/cfgs/ORCA2_FABM/BLD/bin/nemo.exe /opt/nemo_fabm
mv /home/singularity/nemo/cfgs/ORCA2_FABM/EXP00 /home/singularity/ORCA2_FABM/EXP00
========
>>>>>>> f3b7e75 (major changes to pmlmodelling NEMO-container add fabm and ersem ;update to Nemo 4.20 and xios 2.5 with changed flags and file updates according to J Mak)
/home/singularity/nemo_420.zip
%post
cd /home/singularity
unzip nemo_420.zip
rm nemo_420.zip
cd /home/singularity/nemo
cp /home/singularity/input_files/arch/nemo-arch/* /home/singularity/nemo/arch
echo "Compiling nemo ORCA2_ICE Config"
./makenemo -m singularity -r ORCA2_ICE_PISCES -j 8
mkdir /opt/nemo
mv /home/singularity/nemo/cfgs/ORCA2_ICE_PISCES/BLD/bin/nemo.exe /opt/nemo
mv /home/singularity/nemo/cfgs/ORCA2_ICE_PISCES/EXP00 /home/singularity/ORCA2_ICE_PISCES/EXP00
<<<<<<< HEAD
rm -rf /home/singularity/xios
=======
>>>>>>>> f3b7e75 (major changes to pmlmodelling NEMO-container add fabm and ersem ;update to Nemo 4.20 and xios 2.5 with changed flags and file updates according to J Mak):nemo_orca2.def
>>>>>>> f3b7e75 (major changes to pmlmodelling NEMO-container add fabm and ersem ;update to Nemo 4.20 and xios 2.5 with changed flags and file updates according to J Mak)
rm -rf /home/singularity/nemo
# The above didnt seem to work so blanket chmod for time being
chmod -Rv 755 /opt
# Clean up
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/info/*
%environment
export LD_LIBRARY_PATH=/opt/hdf5/install/lib:$LD_LIBRARY_PATH
%runscript
#!/bin/bash
# This runscript will take 2 arguments: program to run (NEMO or XIOS), and an
# output directory. By default, the output directory will be the job id
# (passed using $SLURM_JOB_ID).
if ! [[ $1 == "nemo" || $1 == "xios" ]]
then
echo "The program argument should be either 'nemo' or 'xios'"
exit 1
fi
if [[ $1 == 'nemo' ]]
then
/opt/nemo/nemo.exe
else
/opt/xios/xios_server.exe
fi
%labels
<<<<<<< HEAD
Author [email protected]
=======
Author [email protected]
>>>>>>> f3b7e75 (major changes to pmlmodelling NEMO-container add fabm and ersem ;update to Nemo 4.20 and xios 2.5 with changed flags and file updates according to J Mak)
%help
The definition file used to build XIOS:
To build the container, run
singularity build nemo.sif nemo.def