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