source: XIOS/trunk/GENERIC_TESTCASE/job_irene.sh @ 1791

Last change on this file since 1791 was 1791, checked in by yushan, 2 years ago

trunk : add job scripts for Irene and Jean-Zay

File size: 5.2 KB
Line 
1#!/bin/bash
2######################
3## CURIE   TGCC/CEA ##
4######################
5#MSUB -r XIOS
6#MSUB -o client_output.out    # standard output
7#MSUB -e client_error.err    #error output
8#MSUB -eo
9#MSUB -c 1
10#MSUB -n 16  # Number of MPI tasks (SPMD case) or cores (MPMD case)
11#MSUB -X
12#MSUB -x
13#MSUB -T 1800      # Wall clock limit (seconds)
14#MSUB -q skylake           # thin nodes
15#MSUB -A devcmip6
16#MSUB -Q test
17#MSUB -m work
18
19
20#============================= X64_IRENE_prod =============================
21
22
23cd $BRIDGE_MSUB_PWD
24
25export arch=X64_IRENE
26export mode=prod
27export machine_name=irene
28export machine_full_name=Irene
29export xios_dir=/ccc/cont003/home/gencmip6/wangyush/XIOS/trunk
30export reference_dir=${CCCWORKDIR}
31export reference_file=xios_reference.tar.gz
32export reference_folder=xios_reference
33
34export build_dir=build_${arch}_${mode}
35export xios_revision=$(svn info --show-item revision .. 2>&1)
36export relurl=$(svn info --show-item relative-url .. 2>&1)
37
38source ../arch/arch-${arch}.env
39module load nco
40module load cdo
41module load subversion
42
43export KMP_STACKSIZE=3g
44export KMP_LIBRARY=turnaround
45export MKL_SERIAL=YES
46export OMP_NUM_THREADS=${BRIDGE_MSUB_NCORE}
47
48set -x
49
50
51bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --build_dir ${build_dir} --job 4"
52
53#----------- Fetch reference -----------
54cp ${reference_dir}/${reference_file} ./
55tar -xzvf ${reference_file}
56
57rm -f ${reference_file}
58
59for i in $(ls ${reference_folder}/) 
60do
61  folder=${i%%}
62  bash -c "cd ${folder} && rm -rf config_*"
63  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
64done
65
66rm -rf ${reference_folder}
67
68
69rm -f plein_report.txt
70
71echo "#revision" ${xios_revision} >> plein_report.txt
72echo "#relurl" ${relurl} >> plein_report.txt
73echo "#machine" ${machine_name} >> plein_report.txt
74echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
75echo "#arch" ${arch} >> plein_report.txt
76echo "#mode" ${mode} >> plein_report.txt
77
78
79rm -f setup.sh
80touch setup.sh
81>setup.sh
82for i in $(ls -d test_*/)
83do
84  cp setup.py ${i%%/}     
85  cp run_sub_test.sh ${i%%/}   
86  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
87  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
88done
89
90export output=$(python user_config.py 2>&1 >/dev/null)
91
92if [ "$output" -ne 0 ]
93then
94        echo "user_config.py failed"
95        exit
96else
97        echo "user_config.py OK"
98fi
99
100
101cmake .
102ctest -V
103#ctest --output-on-failure
104make report
105
106rm -f test_*/setup.py
107rm -f test_*/run_sub_test.sh
108rm -f test_*/run_test_*.py
109rm -f test_*/CMakeLists.txt
110rm -f test_*/context_grid_dynamico.xml
111rm -f test_*/dynamico_grid.nc
112rm -f test_*/default_param.pyc
113rm -f test_*/user_param.pyc
114rm -f test_*/user_param.py.*
115
116mkdir -p ../html
117mkdir -p ../html/test_irene
118
119cp plein_report.txt ../html/test_irene/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
120
121bash -c "cd ../html && python generate_test.py"
122
123
124
125
126
127
128#============================= X64_IRENE_debug =============================
129
130
131cd $BRIDGE_MSUB_PWD
132
133export arch=X64_IRENE
134export mode=debug
135export machine_name=irene
136export machine_full_name=Irene
137export xios_dir=/ccc/cont003/home/gencmip6/wangyush/XIOS/trunk
138export reference_dir=${CCCWORKDIR}
139export reference_file=xios_reference.tar.gz
140export reference_folder=xios_reference
141
142export build_dir=build_${arch}_${mode}
143export xios_revision=$(svn info --show-item revision .. 2>&1)
144export relurl=$(svn info --show-item relative-url .. 2>&1)
145
146source ../arch/arch-${arch}.env
147module load nco
148module load cdo
149module load subversion
150
151export KMP_STACKSIZE=3g
152export KMP_LIBRARY=turnaround
153export MKL_SERIAL=YES
154export OMP_NUM_THREADS=${BRIDGE_MSUB_NCORE}
155
156set -x
157
158
159bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --build_dir ${build_dir} --job 4"
160
161#----------- Fetch reference -----------
162cp ${reference_dir}/${reference_file} ./
163tar -xzvf ${reference_file}
164
165rm -f ${reference_file}
166
167for i in $(ls ${reference_folder}/) 
168do
169  folder=${i%%}
170  bash -c "cd ${folder} && rm -rf config_*"
171  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
172done
173
174rm -rf ${reference_folder}
175
176
177rm -f plein_report.txt
178
179echo "#revision" ${xios_revision} >> plein_report.txt
180echo "#relurl" ${relurl} >> plein_report.txt
181echo "#machine" ${machine_name} >> plein_report.txt
182echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
183echo "#arch" ${arch} >> plein_report.txt
184echo "#mode" ${mode} >> plein_report.txt
185
186
187rm -f setup.sh
188touch setup.sh
189>setup.sh
190for i in $(ls -d test_*/)
191do
192  cp setup.py ${i%%/}     
193  cp run_sub_test.sh ${i%%/}   
194  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
195  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
196done
197
198export output=$(python user_config.py 2>&1 >/dev/null)
199
200if [ "$output" -ne 0 ]
201then
202        echo "user_config.py failed"
203        exit
204else
205        echo "user_config.py OK"
206fi
207
208
209cmake .
210ctest -V
211#ctest --output-on-failure
212make report
213
214rm -f test_*/setup.py
215rm -f test_*/run_sub_test.sh
216rm -f test_*/run_test_*.py
217rm -f test_*/CMakeLists.txt
218rm -f test_*/context_grid_dynamico.xml
219rm -f test_*/dynamico_grid.nc
220rm -f test_*/default_param.pyc
221rm -f test_*/user_param.pyc
222rm -f test_*/user_param.py.*
223
224mkdir -p ../html
225mkdir -p ../html/test_irene
226
227cp plein_report.txt ../html/test_irene/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
228
229bash -c "cd ../html && python generate_test.py"
230
231
232
233
234
Note: See TracBrowser for help on using the repository browser.