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