source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_grid_algo/run_sub_test.sh @ 1728

Last change on this file since 1728 was 1728, checked in by yushan, 5 years ago

GENERIC_TESTCASE : update for JeanZay?

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/bin/bash
2yes | cp ../context_grid_dynamico.xml ./
3yes | cp ../dynamico_grid.nc ./
4
5yes | cp ../user_config.py sub_config1.py
6yes | cp ../config.py sub_config2.py
7yes | cp ../check.py sub_check.py
8yes | cp ../default_param.py default_param.py
9
10yes | cp ../iodef.xml iodef.xml
11
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
23Color='\033[0;36m'
24NC='\033[0m' # No Color
25
26touch report.txt
27> report.txt
28echo " " >> report.txt
29echo " " >> report.txt
30echo -e "testing ${Color}grid${NC} algorithms..." >> report.txt
31echo " " >> report.txt
32
33touch report.html
34> report.html
35echo "<br> " >> report.html
36echo "<br> " >> report.html
37echo "<br> " >> report.html
38echo "<p>testing  <font color="blue">grid</font> algorithms...</p>" >> report.html
39echo "<br> " >> report.html
40
41nb_config=$(python sub_config1.py 2>&1)                                                                                                                   
42
43
44counter=0
45while [ $counter -lt $nb_config ]
46do
47
48rm -f user_param.py
49
50cp user_param.py.$counter user_param.py
51
52((counter++))
53
54nb_proc=$(python sub_config2.py 2>&1) 
55
56if [[ ($machine_name == irene) ]]
57then
58          echo "Testing on Irene"
59    ccc_mprun -n $nb_proc ../../build_prod/bin/generic_testcase.exe
60elif [[($machine_name == ada)]]
61then
62    echo "Testing on ADA"
63    mpirun -np $nb_proc ../../build_prod/bin/generic_testcase.exe
64elif [[($machine_name == jeanzay)]]
65then
66    echo "Testing on Jean-Zay" 
67    srun -n $nb_proc --mpi=pmi2 ../../build_prod/bin/generic_testcase.exe
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
80else
81    echo "other machine"
82    exit 1234
83fi
84
85python sub_check.py
86
87rm -f iodef.xml
88mv iodef.xml.bkp iodef.xml
89
90done
91rm -f default_param.py
92rm -f default_param.pyc
93rm -f user_param.pyc
94rm -f user_param.py.*
95rm -f sub_*.py
Note: See TracBrowser for help on using the repository browser.