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