source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_function/test_minimum/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# 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
27Color='\033[0;36m'
28NC='\033[0m' # No Color
29
30touch report.txt
31> report.txt
32echo " " >> report.txt
33echo " " >> report.txt
34echo -e "testing ${Color}minimum${NC} reduce..." >> report.txt
35echo " " >> report.txt
36
37touch report.html
38> report.html
39echo "<br> " >> report.html
40echo "<br> " >> report.html
41echo "<br> " >> report.html
42echo "<p>testing  <font color="blue">minimum</font> reduce...</p>" >> report.html
43echo "<br> " >> report.html
44
45nb_config=$(python sub_config1.py 2>&1)                                                                                                                   
46
47
48counter=0
49while [ $counter -lt $nb_config ]
50do
51
52rm -f user_param.py
53
54cp user_param.py.$counter user_param.py
55
56((counter++))
57
58nb_proc=$(python sub_config2.py 2>&1) 
59
60if [[ ($machine_name == irene) ]]
61then
62    echo "Testing on Irene"
63    ccc_mprun -n $nb_proc ../../../build_prod/bin/generic_testcase.exe
64elif [[($machine_name == ada)]]
65then
66    echo "Testing on ADA"
67    mpirun -np $nb_proc ../../../build_prod/bin/generic_testcase.exe
68elif [[($machine_name == jeanzay)]]
69then
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
93else
94    echo "other machine"
95    exit 1234
96fi
97
98python sub_check.py
99
100rm -f iodef.xml
101mv iodef.xml.bkp iodef.xml
102
103done
104rm -f default_param.py
105rm -f default_param.pyc
106rm -f user_param.pyc
107rm -f user_param.py.*
108rm -f sub_*.py
Note: See TracBrowser for help on using the repository browser.