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

Last change on this file since 1840 was 1840, checked in by yushan, 3 years ago

dev_trunk_omp : typo error

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