[1729] | 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 |
---|
[1771] | 8 | #SBATCH -o output.out # Nom du fichier de sortie |
---|
| 9 | #SBATCH -e error.err # Nom du fichier d'erreur |
---|
[1729] | 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 | |
---|
| 18 | module purge |
---|
| 19 | module load intel-all/19.0.4 |
---|
| 20 | module load netcdf/4.7.0/intel-19.0.4-mpi |
---|
| 21 | module load netcdf-cxx/4.2/intel-19.0.4-mpi |
---|
| 22 | module load netcdf-fortran/4.4.5/intel-19.0.4-mpi |
---|
| 23 | module load gcc/6.5.0/gcc-4.8.5 |
---|
| 24 | module load cmake |
---|
| 25 | module load cdo |
---|
[1776] | 26 | module load subversion |
---|
[1729] | 27 | #module load arm-forge |
---|
| 28 | |
---|
| 29 | ulimit -c 0 |
---|
| 30 | #export ALLINEA_NO_TIMEOUT=1 |
---|
| 31 | |
---|
| 32 | #ddt --connect srun --mpi=pmi2 -K1 -m block:block --multi-prog ./mpmd_srun.conf |
---|
| 33 | #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./mpmd_srun.conf |
---|
| 34 | export machine_name=jeanzay |
---|
[1743] | 35 | export xios_dir=/gpfswork/rech/psl/rpsl954/xios/dev_trunk_omp |
---|
| 36 | export build_dir=build_prod |
---|
[1729] | 37 | |
---|
[1734] | 38 | # python user_config.py |
---|
[1737] | 39 | |
---|
[1771] | 40 | rm -f plein_report.txt |
---|
[1776] | 41 | echo -n "#revision " >> plein_report.txt |
---|
| 42 | svn info --show-item revision .. >> plein_report.txt |
---|
| 43 | # echo -n "#url " >> plein_report.txt |
---|
| 44 | # svn info --show-item url .. >> plein_report.txt |
---|
| 45 | echo -n "#relurl " >> plein_report.txt |
---|
| 46 | svn info --show-item relative-url .. >> plein_report.txt |
---|
| 47 | echo -n "#machine " >> plein_report.txt |
---|
| 48 | echo $machine_name >> plein_report.txt |
---|
| 49 | echo -n "#build_dir " >> plein_report.txt |
---|
| 50 | echo $build_dir >> plein_report.txt |
---|
[1771] | 51 | |
---|
[1776] | 52 | export arch_dir=$(readlink ../$build_dir/arch.fcm .. 2>&1) |
---|
| 53 | echo $arch_dir |
---|
| 54 | my_arch=$(echo $arch_dir | sed 's|.*/arch-||' | sed 's|\(.*\).fcm.*|\1|' 2>&1) |
---|
| 55 | echo $my_arch |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | echo -n "#arch " >> plein_report.txt |
---|
| 59 | echo $my_arch >> plein_report.txt |
---|
| 60 | |
---|
| 61 | export xios_revision=$(svn info --show-item revision .. 2>&1) |
---|
| 62 | echo $xios_revision |
---|
| 63 | |
---|
[1737] | 64 | rm -f setup.sh |
---|
| 65 | touch setup.sh |
---|
| 66 | >setup.sh |
---|
| 67 | for i in $(ls -d test_*/) |
---|
| 68 | do |
---|
| 69 | cp setup.py ${i%%/} |
---|
| 70 | cp run_sub_test.sh ${i%%/} |
---|
[1771] | 71 | echo "bash -c \"cd " ${i%%/} " && python setup.py \" ">> setup.sh |
---|
[1737] | 72 | echo "echo \"setup.py called from " ${i%%/} "\"">> setup.sh |
---|
| 73 | done |
---|
| 74 | |
---|
[1734] | 75 | export output=$(python user_config.py 2>&1 >/dev/null) |
---|
| 76 | |
---|
| 77 | if [ "$output" -ne 0 ] |
---|
| 78 | then |
---|
| 79 | echo "user_config.py failed" |
---|
| 80 | exit |
---|
| 81 | else |
---|
| 82 | echo "user_config.py OK" |
---|
| 83 | fi |
---|
| 84 | |
---|
[1737] | 85 | |
---|
[1729] | 86 | cmake . |
---|
[1771] | 87 | ctest -V |
---|
| 88 | #ctest --output-on-failure |
---|
[1729] | 89 | make report |
---|
| 90 | |
---|
[1771] | 91 | #echo "Generic testcase report" | mailx -s "report" -a report.html yushan.wang@lsce.ipsl.fr |
---|
[1737] | 92 | |
---|
| 93 | rm -f test_*/setup.py |
---|
| 94 | rm -f test_*/run_sub_test.sh |
---|
| 95 | rm -f test_*/run_test_*.py |
---|
| 96 | rm -f test_*/CMakeLists.txt |
---|
[1743] | 97 | rm -f test_*/context_grid_dynamico.xml |
---|
| 98 | rm -f test_*/dynamico_grid.nc |
---|
| 99 | rm -f test_*/default_param.pyc |
---|
| 100 | rm -f test_*/user_param.pyc |
---|
| 101 | rm -f test_*/user_param.py.* |
---|
[1737] | 102 | |
---|
| 103 | |
---|
[1729] | 104 | #srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf |
---|
| 105 | #srun --mpi=pmi2 ../bin/test_client.exe |
---|
| 106 | |
---|
[1776] | 107 | cp plein_report.txt ../Web/plein_report_$xios_revision.txt |
---|