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

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

dev_trunk_omp : corrections

  • Property svn:executable set to *
File size: 6.0 KB
Line 
1#!/bin/bash
2##SBATCH --nodes=2
3#SBATCH --ntasks=8              # Nombre total de processus MPI
4#SBATCH --ntasks-per-node=16
5##SBATCH --cpus-per-task=1
6#SBATCH --hint=nomultithread
7#SBATCH -t 00:10:00              # Temps elapsed maximum d'exécution
8#SBATCH -o output.out     # Nom du fichier de sortie
9#SBATCH -e error.err     # Nom du fichier d'erreur
10##SBATCH -p cpu_port             # Nom de la partition d'exécution
11##SBATCH -A sos@cpu
12##SBATCH --distribution=arbitrary
13#SBATCH --account=psl@cpu
14
15
16cd ${SLURM_SUBMIT_DIR}
17
18
19#============================= X64_JEANZAY_prod =============================
20
21module load subversion
22export arch=X64_JEANZAY
23export mode=prod
24export machine_name=jeanzay
25export machine_full_name=Jean-Zay
26export xios_dir=/gpfswork/rech/psl/rpsl954/cron_xios/dev_trunk_omp
27export reference_dir=${WORK}
28export reference_file=xios_reference.tar.gz
29export reference_folder=xios_reference
30
31export build_dir=build_${arch}_${mode}
32export xios_revision=$(svn info --show-item revision .. 2>&1)
33export relurl=$(svn info --show-item relative-url .. 2>&1)
34
35source ../arch/arch-${arch}.env
36module load cmake
37module load cdo
38module load subversion
39
40ulimit -c 0
41
42bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --omp --build_dir ${build_dir} --job 4"
43
44#----------- Fetch reference -----------
45cp ${reference_dir}/${reference_file} ./
46tar -xzvf ${reference_file}
47
48rm -f ${reference_file}
49
50for i in $(ls ${reference_folder}/) 
51do
52  folder=${i%%}
53  bash -c "cd ${folder} && rm -rf config_*"
54  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
55done
56
57rm -rf ${reference_folder}
58
59
60rm -f plein_report.txt
61
62echo "#revision" ${xios_revision} >> plein_report.txt
63echo "#relurl" ${relurl} >> plein_report.txt
64echo "#machine" ${machine_name} >> plein_report.txt
65echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
66echo "#arch" ${arch} >> plein_report.txt
67echo "#mode" ${mode} >> plein_report.txt
68
69
70rm -f setup.sh
71touch setup.sh
72>setup.sh
73for i in $(ls -d test_*/)
74do
75  cp setup.py ${i%%/}     
76  cp run_sub_test.sh ${i%%/}   
77  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
78  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
79done
80
81export output=$(python user_config.py 2>&1 >/dev/null)
82
83if [ "$output" -ne 0 ]
84then
85        echo "user_config.py failed"
86        exit
87else
88        echo "user_config.py OK"
89fi
90
91
92cmake .
93ctest -V
94#ctest --output-on-failure
95make report
96
97rm -f test_*/setup.py
98rm -f test_*/run_sub_test.sh
99rm -f test_*/run_test_*.py
100rm -f test_*/CMakeLists.txt
101rm -f test_*/context_grid_dynamico.xml
102rm -f test_*/dynamico_grid.nc
103rm -f test_*/default_param.pyc
104rm -f test_*/user_param.pyc
105rm -f test_*/user_param.py.*
106
107mkdir -p ../html
108mkdir -p ../html/test_${machine_name}
109cp plein_report.txt ../html/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
110
111
112mkdir -p ../html/def_files
113mkdir -p ../html/def_files/${xios_revision}
114
115for i in $(ls -d test_*/)
116do
117  mkdir -p ../html/def_files/${xios_revision}/${i%%}
118  cp ${i%%}/user_params.def ../html/def_files/${xios_revision}/${i%%}     
119  for j in $(ls -d ${i%%/}/config_*)
120  do
121    mkdir -p ../html/def_files/${xios_revision}/${j%%}
122    cp ${j%%}/setup/all_param.def ../html/def_files/${xios_revision}/${j%%} 
123  done
124done
125
126
127bash -c "cd ../html && python generate_test.py"
128
129
130
131#============================= X64_JEANZAY_debug =============================
132
133module load subversion
134export arch=X64_JEANZAY
135export mode=debug
136export machine_name=jeanzay
137export machine_full_name=Jean-Zay
138export xios_dir=/gpfswork/rech/psl/rpsl954/cron_xios/dev_trunk_omp
139export reference_dir=${WORK}
140export reference_file=xios_reference.tar.gz
141export reference_folder=xios_reference
142
143export build_dir=build_${arch}_${mode}
144export xios_revision=$(svn info --show-item revision .. 2>&1)
145export relurl=$(svn info --show-item relative-url .. 2>&1)
146
147source ../arch/arch-${arch}.env
148module load cmake
149module load cdo
150module load subversion
151
152ulimit -c 0
153
154bash -c "cd .. && ./make_xios --arch ${arch} --${mode} --omp --build_dir ${build_dir} --job 4"
155
156#----------- Fetch reference -----------
157cp ${reference_dir}/${reference_file} ./
158tar -xzvf ${reference_file}
159
160rm -f ${reference_file}
161
162for i in $(ls ${reference_folder}/) 
163do
164  folder=${i%%}
165  bash -c "cd ${folder} && rm -rf config_*"
166  bash -c "cp -r ${reference_folder}/${folder}/config_* ./${folder}"
167done
168
169rm -rf ${reference_folder}
170
171
172rm -f plein_report.txt
173
174echo "#revision" ${xios_revision} >> plein_report.txt
175echo "#relurl" ${relurl} >> plein_report.txt
176echo "#machine" ${machine_name} >> plein_report.txt
177echo "#build_dir" ${xios_dir}/${build_dir} >> plein_report.txt
178echo "#arch" ${arch} >> plein_report.txt
179echo "#mode" ${mode} >> plein_report.txt
180
181
182rm -f setup.sh
183touch setup.sh
184>setup.sh
185for i in $(ls -d test_*/)
186do
187  cp setup.py ${i%%/}     
188  cp run_sub_test.sh ${i%%/}   
189  echo "bash -c \"cd " ${i%%/} " && python setup.py\" ">> setup.sh
190  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
191done
192
193export output=$(python user_config.py 2>&1 >/dev/null)
194
195if [ "$output" -ne 0 ]
196then
197        echo "user_config.py failed"
198        exit
199else
200        echo "user_config.py OK"
201fi
202
203
204cmake .
205ctest -V
206#ctest --output-on-failure
207make report
208
209rm -f test_*/setup.py
210rm -f test_*/run_sub_test.sh
211rm -f test_*/run_test_*.py
212rm -f test_*/CMakeLists.txt
213rm -f test_*/context_grid_dynamico.xml
214rm -f test_*/dynamico_grid.nc
215rm -f test_*/default_param.pyc
216rm -f test_*/user_param.pyc
217rm -f test_*/user_param.py.*
218
219mkdir -p ../html
220mkdir -p ../html/test_${machine_name}
221
222cp plein_report.txt ../html/test_${machine_name}/test_${xios_revision}_${machine_name}_${arch}_${mode}.txt
223
224mkdir -p ../html/def_files
225mkdir -p ../html/def_files/${xios_revision}
226
227for i in $(ls -d test_*/)
228do
229  mkdir -p ../html/def_files/${xios_revision}/${i%%}
230  cp ${i%%}/user_params.def ../html/def_files/${xios_revision}/${i%%}     
231  for j in $(ls -d ${i%%/}/config_*)
232  do
233    mkdir -p ../html/def_files/${xios_revision}/${j%%}
234    cp ${j%%}/setup/all_param.def ../html/def_files/${xios_revision}/${j%%} 
235  done
236done
237
238
239bash -c "cd ../html && python generate_test.py"
240
241
Note: See TracBrowser for help on using the repository browser.