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