source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_axis_algo/run_sub_test.sh @ 1726

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

Generic_testcase : Cleanup and better organization

  • Property svn:executable set to *
File size: 1.9 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
10
11# Black        0;30     Dark Gray     1;30
12# Red          0;31     Light Red     1;31
13# Green        0;32     Light Green   1;32
14# Brown/Orange 0;33     Yellow        1;33
15# Blue         0;34     Light Blue    1;34
16# Purple       0;35     Light Purple  1;35
17# Cyan         0;36     Light Cyan    1;36
18# Light Gray   0;37     White         1;37
19
20
21
22Color='\033[0;36m'
23NC='\033[0m' # No Color
24
25touch report.txt
26> report.txt
27echo " " >> report.txt
28echo " " >> report.txt
29echo -e "testing ${Color}axis${NC} algorithms..." >> report.txt
30echo " " >> report.txt
31
32touch report.html
33> report.html
34echo "<br> " >> report.html
35echo "<br> " >> report.html
36echo "<br> " >> report.html
37echo "<p>testing  <font color="blue">axis</font> algorithms...</p>" >> report.html
38echo "<br> " >> report.html
39
40nb_config=$(python sub_config1.py 2>&1)                                                                                                                   
41
42
43counter=0
44while [ $counter -lt $nb_config ]
45do
46
47rm -f user_param.py
48
49cp user_param.py.$counter user_param.py
50
51((counter++))
52
53nb_proc=$(python sub_config2.py 2>&1) 
54
55if [[ ($machine_name == irene) ]]
56then
57    ccc_mprun -n $nb_proc ../../build_prod/bin/generic_testcase.exe
58elif [[($machine_name == ada)]]
59then
60    echo "Testing on ADA"
61    mpirun -np $nb_proc ../../build_prod/bin/generic_testcase.exe
62elif [[($machine_name == jeanzay)]]
63then
64    echo "Testing on Jean-Zay" 
65    srun -n $nb_proc --mpi=pmi2 ../../build_prod/bin/generic_testcase.exe
66else
67    echo "other machine"
68fi
69
70python sub_check.py
71
72rm -f iodef.xml
73mv iodef.xml.bkp iodef.xml
74
75done
76rm -f default_param.py
77rm -f default_param.pyc
78rm -f user_param.pyc
79rm -f user_param.py.*
80rm -f sub_*.py
Note: See TracBrowser for help on using the repository browser.