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