-
Notifications
You must be signed in to change notification settings - Fork 1
/
xios.def
61 lines (44 loc) · 1.6 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
Bootstrap: localimage
From: base_container/baseOS.sif
####
##
## Authors: Michael Wathen, Plymouth Marine Laboratory <[email protected]>
##
## Definition file for building XIOS Singularity Containers
##
#####
%files
input_files/arch/xios-arch/arch-singularity.fcm input_files/arch/xios-arch/arch-singularity.fcm
input_files/arch/xios-arch/arch-singularity.env input_files/arch/xios-arch/arch-singularity.env
input_files/arch/xios-arch/arch-singularity.path input_files/arch/xios-arch/arch-singularity.path
%post
apt-get install subversion
svn checkout http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 xios
PATH=$PATH:/opt/mpi/install/bin:/opt/hdf5/install/bin
LD_LIBRARY_PATH=/opt/hdf5/install/lib:$LD_LIBRARY_PATH
cd xios
cp /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 /xios/bin/xios_server.exe /opt/xios
%environment
export XIOS_DIR=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 [email protected]
%help
The definition file used to build XIOS:
To build the container, run
singularity build xios.sif xios.def