source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/job_irene.sh @ 1795

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

dev_trunk_omp : corrections

File size: 6.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_intelmpi_prod =============================
21
22
23cd $BRIDGE_MSUB_PWD
24
25module load subversion
26export arch=X64_IRENE_intelmpi
27export mode=prod
28export machine_name=irene
29export machine_full_name=Irene
30export xios_dir=/ccc/cont003/home/gencmip6/wangyush/cron_xios/dev_trunk_omp
31export reference_dir=${CCCWORKDIR}
32export reference_file=xios_reference.tar.gz
33export reference_folder=xios_reference
34
35export build_dir=build_${arch}_${mode}
36export xios_revision=$(svn info --show-item revision .. 2>&1)
37export relurl=$(svn info --show-item relative-url .. 2>&1)
38
39source ../arch/arch-${arch}.env
40module load nco
41module load cdo
42module load subversion
43
44export KMP_STACKSIZE=3g
45export KMP_LIBRARY=turnaround
46export MKL_SERIAL=YES
47export OMP_NUM_THREADS=${BRIDGE_MSUB_NCORE}
48
49set -x
50
51
52bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --omp --build_dir ${build_dir} --job 4"
53
54#----------- Fetch reference -----------
55cp ${reference_dir}/${reference_file} ./
56tar -xzvf ${reference_file}
57
58rm -f ${reference_file}
59
60for i in $(ls ${reference_folder}/) 
61do
62  folder=${i%%}
63  bash -c "cd ${folder} && rm -rf config_*"
64  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
65done
66
67rm -rf ${reference_folder}
68
69
70rm -f plein_report.txt
71
72echo "#revision" ${xios_revision} >> plein_report.txt
73echo "#relurl" ${relurl} >> plein_report.txt
74echo "#machine" ${machine_name} >> plein_report.txt
75echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
76echo "#arch" ${arch} >> plein_report.txt
77echo "#mode" ${mode} >> plein_report.txt
78
79
80rm -f setup.sh
81touch setup.sh
82>setup.sh
83for i in $(ls -d test_*/)
84do
85  cp setup.py ${i%%/}     
86  cp run_sub_test.sh ${i%%/}   
87  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
88  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
89done
90
91export output=$(python user_config.py 2>&1 >/dev/null)
92
93if [ "$output" -ne 0 ]
94then
95        echo "user_config.py failed"
96        exit
97else
98        echo "user_config.py OK"
99fi
100
101
102cmake .
103ctest -V
104#ctest --output-on-failure
105make report
106
107rm -f test_*/setup.py
108rm -f test_*/run_sub_test.sh
109rm -f test_*/run_test_*.py
110rm -f test_*/CMakeLists.txt
111rm -f test_*/context_grid_dynamico.xml
112rm -f test_*/dynamico_grid.nc
113rm -f test_*/default_param.pyc
114rm -f test_*/user_param.pyc
115rm -f test_*/user_param.py.*
116
117mkdir -p ../html
118mkdir -p ../html/test_${machine_name}
119
120cp plein_report.txt ../html/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
121
122mkdir -p ../html/def_files
123mkdir -p ../html/def_files/${xios_revision}
124
125for i in $(ls -d test_*/)
126do
127  mkdir -p ../html/def_files/${xios_revision}/${i%%}
128  cp ${i%%}/user_params.def ../html/def_files/${xios_revision}/${i%%}     
129  for j in $(ls -d ${i%%/}/config_*)
130  do
131    mkdir -p ../html/def_files/${xios_revision}/${j%%}
132    cp ${j%%}/setup/all_param.def ../html/def_files/${xios_revision}/${j%%} 
133  done
134done
135
136
137
138bash -c "cd ../html && python generate_test.py"
139
140
141
142
143
144
145#============================= X64_IRENE_intelmpi_debug =============================
146
147
148cd $BRIDGE_MSUB_PWD
149
150module load subversion
151export arch=X64_IRENE_intelmpi
152export mode=debug
153export machine_name=irene
154export machine_full_name=Irene
155export xios_dir=/ccc/cont003/home/gencmip6/wangyush/cron_xios/dev_trunk_omp
156export reference_dir=${CCCWORKDIR}
157export reference_file=xios_reference.tar.gz
158export reference_folder=xios_reference
159
160export build_dir=build_${arch}_${mode}
161export xios_revision=$(svn info --show-item revision .. 2>&1)
162export relurl=$(svn info --show-item relative-url .. 2>&1)
163
164source ../arch/arch-${arch}.env
165module load nco
166module load cdo
167module load subversion
168
169export KMP_STACKSIZE=3g
170export KMP_LIBRARY=turnaround
171export MKL_SERIAL=YES
172export OMP_NUM_THREADS=${BRIDGE_MSUB_NCORE}
173
174set -x
175
176
177bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --omp --build_dir ${build_dir} --job 4"
178
179#----------- Fetch reference -----------
180cp ${reference_dir}/${reference_file} ./
181tar -xzvf ${reference_file}
182
183rm -f ${reference_file}
184
185for i in $(ls ${reference_folder}/) 
186do
187  folder=${i%%}
188  bash -c "cd ${folder} && rm -rf config_*"
189  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
190done
191
192rm -rf ${reference_folder}
193
194
195rm -f plein_report.txt
196
197echo "#revision" ${xios_revision} >> plein_report.txt
198echo "#relurl" ${relurl} >> plein_report.txt
199echo "#machine" ${machine_name} >> plein_report.txt
200echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
201echo "#arch" ${arch} >> plein_report.txt
202echo "#mode" ${mode} >> plein_report.txt
203
204
205rm -f setup.sh
206touch setup.sh
207>setup.sh
208for i in $(ls -d test_*/)
209do
210  cp setup.py ${i%%/}     
211  cp run_sub_test.sh ${i%%/}   
212  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
213  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
214done
215
216export output=$(python user_config.py 2>&1 >/dev/null)
217
218if [ "$output" -ne 0 ]
219then
220        echo "user_config.py failed"
221        exit
222else
223        echo "user_config.py OK"
224fi
225
226
227cmake .
228ctest -V
229#ctest --output-on-failure
230make report
231
232rm -f test_*/setup.py
233rm -f test_*/run_sub_test.sh
234rm -f test_*/run_test_*.py
235rm -f test_*/CMakeLists.txt
236rm -f test_*/context_grid_dynamico.xml
237rm -f test_*/dynamico_grid.nc
238rm -f test_*/default_param.pyc
239rm -f test_*/user_param.pyc
240rm -f test_*/user_param.py.*
241
242mkdir -p ../html
243mkdir -p ../html/test_${machine_name}
244
245cp plein_report.txt ../html/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
246
247mkdir -p ../html/def_files
248mkdir -p ../html/def_files/${xios_revision}
249
250for i in $(ls -d test_*/)
251do
252  mkdir -p ../html/def_files/${xios_revision}/${i%%}
253  cp ${i%%}/user_params.def ../html/def_files/${xios_revision}/${i%%}     
254  for j in $(ls -d ${i%%/}/config_*)
255  do
256    mkdir -p ../html/def_files/${xios_revision}/${j%%}
257    cp ${j%%}/setup/all_param.def ../html/def_files/${xios_revision}/${j%%} 
258  done
259done
260
261
262bash -c "cd ../html && python generate_test.py"
263
Note: See TracBrowser for help on using the repository browser.