-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxios.def
67 lines (50 loc) · 1.81 KB
/
xios.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
Bootstrap: localimage
From: /home/singularity/baseOS.sif
# From: /home/singularity/fabm.sif
####
##
## Authors: Michael Wathen, Plymouth Marine Laboratory <miwa@pml.ac.uk>
## Carsten Lackner, Technische Universität Berlin <carsten.lackner@tu-berlin.de>
##
## Definition file for building XIOS Singularity Containers
##
#####
%files
/home/singularity/input_files/arch/xios-arch/arch-singularity.fcm
/home/singularity/input_files/arch/xios-arch/arch-singularity.env
/home/singularity/input_files/arch/xios-arch/arch-singularity.path
# take xios zip
/home/singularity/xios2.zip
%post
cd /home/singularity
# apt-get install subversion
# svn checkout http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 xios
unzip xios2.zip xios
PATH=$PATH:/opt/mpi/install/bin:/opt/hdf5/install/bin
LD_LIBRARY_PATH=/opt/hdf5/install/lib:$LD_LIBRARY_PATH
cd /home/singularity/xios
cp /home/singularity/input_files/arch/xios-arch/arch* ./arch
echo "Compiling xios"
./make_xios --full --prod --arch singularity --netcdf_lib netcdf4_par -j 8
mkdir /opt/xios
mv /home/singularity/xios/bin/xios_server.exe /opt/xios
%environment
export XIOS_DIR=/home/singularity/xios
export XIOS_HOME=$XIOS_DIR
%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 == "xios" ]]
then
echo "The program argument should be either 'nemo' or 'xios'"
exit 1
fi
/opt/xios/xios_server.exe
%labels
Author carsten.lackner@tu-berlin.de
%help
The definition file used to build XIOS:
To build the container, run
singularity build xios.sif xios.def