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