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

Last change on this file since 1781 was 1781, checked in by yushan, 4 years ago

dev_trunk_omp : update html et al

  • Property svn:executable set to *
File size: 3.9 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}
17module unload intel-all hdf5 netcdf netcdf-cxx netcdf-fortran
18module load intel-all/19.0.4
19module load hdf5/1.10.5/intel-19.0.4-mpi
20module load netcdf/4.7.2/intel-19.0.4-mpi
21module load netcdf-cxx/4.2/intel-19.0.4-mpi
22module load netcdf-fortran/4.5.2/intel-19.0.4-mpi
23
24module load cmake
25module load cdo
26module load subversion
27#module load arm-forge
28
29ulimit -c 0
30#export ALLINEA_NO_TIMEOUT=1
31
32
33# Compile XIOS in case of newer revision
34bash -c "cd .. && ./make_xios --arch X64_JEANZAY --prod --omp --job 4 --build_dir build_prod"
35
36# Copy and extract reference from store
37cp $STORE/XIOS/reference/*.zip ./ZIP
38for i in $(ls  ZIP/)
39do
40  echo ${i%%}
41  folder=$(echo ${i%%} | sed -e 's/\(.zip\)*$//g')
42  echo $folder
43  bash -c "cd $folder && rm -rf config_*" 
44  bash -c "cp ZIP/${i%%} ./ && unzip ${i%%} && rm -f ${i%%}"
45done
46
47rm -rf test_domain_algo/config_*
48
49export machine_name=jeanzay
50export machine_full_name=Jean-Zay
51export build_dir=build_prod
52export xios_dir=/gpfswork/rech/psl/rpsl954/xios/dev_trunk_omp
53
54rm -f plein_report.txt
55echo -n "#revision " >> plein_report.txt
56svn info --show-item revision .. >> plein_report.txt
57echo -n "#relurl " >> plein_report.txt
58svn info --show-item relative-url .. >> plein_report.txt
59echo -n "#machine " >> plein_report.txt
60echo $machine_name >> plein_report.txt
61echo -n "#build_dir " >> plein_report.txt
62echo $xios_dir/$build_dir >> plein_report.txt
63
64export arch_dir=$(readlink ../$build_dir/arch.fcm .. 2>&1)
65echo $arch_dir
66my_arch=$(echo $arch_dir | sed 's|.*/arch-||' | sed 's|\(.*\).fcm.*|\1|' 2>&1)
67echo $my_arch
68
69
70echo -n "#arch " >> plein_report.txt
71echo $my_arch >> plein_report.txt
72
73export xios_revision=$(svn info --show-item revision .. 2>&1)
74echo $xios_revision
75
76rm -f setup.sh
77touch setup.sh
78>setup.sh
79for i in $(ls -d test_*/)
80do
81  cp setup.py ${i%%/}     
82  cp run_sub_test.sh ${i%%/}     
83  echo "bash -c \"cd " ${i%%/} " && python setup.py \" ">> setup.sh
84  echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh
85done
86
87export output=$(python user_config.py 2>&1 >/dev/null)
88
89if [ "$output" -ne 0 ]
90then
91        echo "user_config.py failed"
92        exit
93else
94        echo "user_config.py OK"
95fi
96
97
98cmake .
99ctest -V
100#ctest --output-on-failure
101make report
102
103#echo "Generic testcase report" | mailx -s "report" -a report.html yushan.wang@lsce.ipsl.fr
104
105rm -f test_*/setup.py
106rm -f test_*/run_sub_test.sh
107rm -f test_*/run_test_*.py
108rm -f test_*/CMakeLists.txt
109rm -f test_*/context_grid_dynamico.xml
110rm -f test_*/dynamico_grid.nc
111rm -f test_*/default_param.pyc
112rm -f test_*/user_param.pyc
113rm -f test_*/user_param.py.*
114
115
116
117cp plein_report.txt ../html/jz_plein_report_$xios_revision.txt
118
119mkdir -p ../$machine_full_name
120mkdir -p ../$machine_full_name/$xios_revision
121mkdir -p ../$machine_full_name/$xios_revision/GENERIC_TESTCASE
122
123bash -c "cd ../html/ && python generate.py"
124
125for i in $(ls -d test_*/)
126do
127  mkdir -p ../$machine_full_name/$xios_revision/GENERIC_TESTCASE/${i%%} 
128  cp ${i%%/}/user_params.def ../$machine_full_name/$xios_revision/GENERIC_TESTCASE/${i%%/}     
129  for j in $(ls -d ${i%%/}/config_*/)
130  do
131    mkdir -p ../$machine_full_name/$xios_revision/GENERIC_TESTCASE/${j%%/}
132    mkdir -p ../$machine_full_name/$xios_revision/GENERIC_TESTCASE/${j%%/}/setup
133    cp ${j%%/}/setup/all_param.def ../$machine_full_name/$xios_revision/GENERIC_TESTCASE/${j%%/}/setup
134    cp ${j%%/}/setup/user_param.def ../$machine_full_name/$xios_revision/GENERIC_TESTCASE/${j%%/}/setup
135  done
136
137done
138
139
Note: See TracBrowser for help on using the repository browser.