[1715] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | cp -n ../context_grid_dynamico.xml ./ |
---|
| 4 | cp -n ../dynamico_grid.nc ./ |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | rm -f sub_config1.py |
---|
| 8 | rm -f sub_config2.py |
---|
| 9 | rm -f sub_check.py |
---|
| 10 | rm -f default_param.py |
---|
| 11 | |
---|
| 12 | cp -n ../../user_config.py sub_config1.py |
---|
| 13 | cp -n ../../config.py sub_config2.py |
---|
| 14 | cp -n ../../check.py sub_check.py |
---|
| 15 | cp -n ../../default_param.py default_param.py |
---|
| 16 | |
---|
[1721] | 17 | # Black 0;30 Dark Gray 1;30 |
---|
| 18 | # Red 0;31 Light Red 1;31 |
---|
| 19 | # Green 0;32 Light Green 1;32 |
---|
| 20 | # Brown/Orange 0;33 Yellow 1;33 |
---|
| 21 | # Blue 0;34 Light Blue 1;34 |
---|
| 22 | # Purple 0;35 Light Purple 1;35 |
---|
| 23 | # Cyan 0;36 Light Cyan 1;36 |
---|
| 24 | # Light Gray 0;37 White 1;37 |
---|
[1715] | 25 | |
---|
[1721] | 26 | |
---|
| 27 | Color='\033[0;36m' |
---|
| 28 | NC='\033[0m' # No Color |
---|
| 29 | |
---|
| 30 | |
---|
[1715] | 31 | touch report.txt |
---|
| 32 | > report.txt |
---|
[1716] | 33 | echo " " >> report.txt |
---|
| 34 | echo " " >> report.txt |
---|
[1721] | 35 | echo -e "testing ${Color}maximum${NC} reduce..." >> report.txt |
---|
[1716] | 36 | echo " " >> report.txt |
---|
[1715] | 37 | |
---|
[1723] | 38 | |
---|
| 39 | touch report.html |
---|
| 40 | > report.html |
---|
[1725] | 41 | echo "<br> " >> report.html |
---|
| 42 | echo "<br> " >> report.html |
---|
| 43 | echo "<br> " >> report.html |
---|
[1723] | 44 | echo "<p>testing <font color="blue">maximum</font> reduce...</p>" >> report.html |
---|
[1725] | 45 | echo "<br> " >> report.html |
---|
[1723] | 46 | |
---|
[1715] | 47 | nb_config=$(python sub_config1.py 2>&1) |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | counter=0 |
---|
| 51 | while [ $counter -lt $nb_config ] |
---|
| 52 | do |
---|
| 53 | |
---|
| 54 | rm -f user_param.py |
---|
| 55 | |
---|
| 56 | cp user_param.py.$counter user_param.py |
---|
| 57 | |
---|
| 58 | ((counter++)) |
---|
| 59 | |
---|
| 60 | nb_proc=$(python sub_config2.py 2>&1) |
---|
[1725] | 61 | nb_jz=$(($nb_proc-1)) |
---|
[1715] | 62 | |
---|
[1725] | 63 | if [[ ($machine_name == irene) ]] |
---|
[1718] | 64 | then |
---|
| 65 | ccc_mprun -n $nb_proc ../../../build_prod/bin/generic_testcase.exe |
---|
[1725] | 66 | elif [[($machine_name == ada)]] |
---|
| 67 | then |
---|
| 68 | echo "Testing on ADA" |
---|
| 69 | mpirun -np $nb_proc ../../../build_prod/bin/generic_testcase.exe |
---|
| 70 | elif [[($machine_name == jeanzay)]] |
---|
| 71 | then |
---|
| 72 | echo "Testing on Jean-Zay" |
---|
| 73 | # touch srun.conf |
---|
| 74 | # > srun.conf |
---|
| 75 | # echo "0-"$nb_jz " ../../../build_prod/bin/generic_testcase.exe">> srun.conf |
---|
| 76 | # srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf |
---|
| 77 | srun -n $nb_proc --mpi=pmi2 ../../../build_prod/bin/generic_testcase.exe |
---|
[1718] | 78 | else |
---|
[1725] | 79 | echo "other machine" |
---|
[1718] | 80 | fi |
---|
[1715] | 81 | |
---|
| 82 | python sub_check.py |
---|
| 83 | |
---|
| 84 | rm -f iodef.xml |
---|
| 85 | mv iodef.xml.bkp iodef.xml |
---|
| 86 | |
---|
| 87 | done |
---|