source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/test_scalar_algo/run_sub_test.sh @ 1725

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

Generic_testcase : Update for Jean-Zay

  • Property svn:executable set to *
File size: 2.0 KB
Line 
1#!/bin/bash
2rm -f sub_config1.py
3rm -f sub_config2.py
4rm -f sub_check.py
5rm -f default_param.py
6
7cp -n ../user_config.py sub_config1.py
8cp -n ../config.py sub_config2.py
9cp -n ../check.py sub_check.py
10cp -n ../default_param.py default_param.py
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
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}scalar${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">scalar</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) 
54nb_jz=$(($nb_proc-1))
55
56if [[ ($machine_name == irene) ]]
57then
58    ccc_mprun -n $nb_proc ../../build_prod/bin/generic_testcase.exe
59elif [[($machine_name == ada)]]
60then
61    echo "Testing on ADA"
62    mpirun -np $nb_proc ../../build_prod/bin/generic_testcase.exe
63elif [[($machine_name == jeanzay)]]
64then
65    echo "Testing on Jean-Zay" 
66    # touch srun.conf
67    # > srun.conf
68    # echo "0-"$nb_jz " ../../build_prod/bin/generic_testcase.exe">> srun.conf
69    # srun --mpi=pmi2 -K1 --multi-prog -m cyclic ./srun.conf
70    srun -n $nb_proc --mpi=pmi2 ../../build_prod/bin/generic_testcase.exe
71else
72    echo "other machine"
73fi
74python sub_check.py
75
76rm -f iodef.xml
77mv iodef.xml.bkp iodef.xml
78
79done
Note: See TracBrowser for help on using the repository browser.