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

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

dev_trunk_omp : update and cleanup of unit tests

File size: 6.1 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
25export arch=X64_IRENE_intelmpi
26export mode=prod
27export machine_name=irene
28export machine_full_name=Irene
29export xios_dir=/ccc/cont003/home/gencmip6/wangyush/cron_xios/dev_trunk_omp
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} --omp --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_${machine_name}
118
119cp plein_report.txt ../html/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
120
121mkdir -p ../html/def_files
122mkdir -p ../html/def_files/${xios_revision}
123
124for i in $(ls -d test_*/)
125do
126  mkdir -p ../html/def_files/${xios_revision}/${i%%}
127  cp ${i%%}/user_params.def ../html/def_files/${xios_revision}/${i%%}     
128  for j in $(ls -d ${i%%/}/config_*)
129  do
130    mkdir -p ../html/def_files/${xios_revision}/${j%%}
131    cp ${j%%}/setup/all_param.def ../html/def_files/${xios_revision}/${j%%} 
132  done
133done
134
135
136
137bash -c "cd ../html && python generate_test.py"
138
139
140
141
142
143
144#============================= X64_IRENE_intelmpi_debug =============================
145
146
147cd $BRIDGE_MSUB_PWD
148
149export arch=X64_IRENE_intelmpi
150export mode=debug
151export machine_name=irene
152export machine_full_name=Irene
153export xios_dir=/ccc/cont003/home/gencmip6/wangyush/cron_xios/dev_trunk_omp
154export reference_dir=${CCCWORKDIR}
155export reference_file=xios_reference.tar.gz
156export reference_folder=xios_reference
157
158export build_dir=build_${arch}_${mode}
159export xios_revision=$(svn info --show-item revision .. 2>&1)
160export relurl=$(svn info --show-item relative-url .. 2>&1)
161
162source ../arch/arch-${arch}.env
163module load nco
164module load cdo
165module load subversion
166
167export KMP_STACKSIZE=3g
168export KMP_LIBRARY=turnaround
169export MKL_SERIAL=YES
170export OMP_NUM_THREADS=${BRIDGE_MSUB_NCORE}
171
172set -x
173
174
175bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --omp --build_dir ${build_dir} --job 4"
176
177#----------- Fetch reference -----------
178cp ${reference_dir}/${reference_file} ./
179tar -xzvf ${reference_file}
180
181rm -f ${reference_file}
182
183for i in $(ls ${reference_folder}/) 
184do
185  folder=${i%%}
186  bash -c "cd ${folder} && rm -rf config_*"
187  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
188done
189
190rm -rf ${reference_folder}
191
192
193rm -f plein_report.txt
194
195echo "#revision" ${xios_revision} >> plein_report.txt
196echo "#relurl" ${relurl} >> plein_report.txt
197echo "#machine" ${machine_name} >> plein_report.txt
198echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
199echo "#arch" ${arch} >> plein_report.txt
200echo "#mode" ${mode} >> plein_report.txt
201
202
203rm -f setup.sh
204touch setup.sh
205>setup.sh
206for i in $(ls -d test_*/)
207do
208  cp setup.py ${i%%/}     
209  cp run_sub_test.sh ${i%%/}   
210  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
211  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
212done
213
214export output=$(python user_config.py 2>&1 >/dev/null)
215
216if [ "$output" -ne 0 ]
217then
218        echo "user_config.py failed"
219        exit
220else
221        echo "user_config.py OK"
222fi
223
224
225cmake .
226ctest -V
227#ctest --output-on-failure
228make report
229
230rm -f test_*/setup.py
231rm -f test_*/run_sub_test.sh
232rm -f test_*/run_test_*.py
233rm -f test_*/CMakeLists.txt
234rm -f test_*/context_grid_dynamico.xml
235rm -f test_*/dynamico_grid.nc
236rm -f test_*/default_param.pyc
237rm -f test_*/user_param.pyc
238rm -f test_*/user_param.py.*
239
240mkdir -p ../html
241mkdir -p ../html/test_${machine_name}
242
243cp plein_report.txt ../html/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
244
245mkdir -p ../html/def_files
246mkdir -p ../html/def_files/${xios_revision}
247
248for i in $(ls -d test_*/)
249do
250  mkdir -p ../html/def_files/${xios_revision}/${i%%}
251  cp ${i%%}/user_params.def ../html/def_files/${xios_revision}/${i%%}     
252  for j in $(ls -d ${i%%/}/config_*)
253  do
254    mkdir -p ../html/def_files/${xios_revision}/${j%%}
255    cp ${j%%}/setup/all_param.def ../html/def_files/${xios_revision}/${j%%} 
256  done
257done
258
259
260bash -c "cd ../html && python generate_test.py"
261
Note: See TracBrowser for help on using the repository browser.