source: XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/run_sub_test.sh @ 1745

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

Generic_testcase: build flag --omp to enable EP with intelmpi. --omp2 to enable EP with openmpi. tested on Irene with compiler=intel17, mpi=intelmpi&openmpi, with and without EP

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3cp ../context_grid_dynamico.xml ./
4cp ../dynamico_grid.nc ./
5cp ../config.py sub_config.py
6cp ../check.py sub_check.py
7cp ../default_param.py default_param.py
8
9
10# Black        0;30     Dark Gray     1;30
11# Red          0;31     Light Red     1;31
12# Green        0;32     Light Green   1;32
13# Brown/Orange 0;33     Yellow        1;33
14# Blue         0;34     Light Blue    1;34
15# Purple       0;35     Light Purple  1;35
16# Cyan         0;36     Light Cyan    1;36
17# Light Gray   0;37     White         1;37
18
19
20{ nb_proc=$(python sub_config.py 2>&1 1>&3-) ;} 3>&1
21# nb_proc=$(python sub_config.py 2>&1)
22
23# echo $nb_proc
24if [[ ($machine_name == irene) ]]
25then
26    echo "Testing on Irene"
27    echo "build_dir="$build_dir
28    ccc_mprun -n $nb_proc $xios_dir/$build_dir/bin/generic_testcase.exe
29elif [[($machine_name == ada)]]
30then
31    echo "Testing on ADA"
32    mpirun -np $nb_proc $xios_dir/$build_dir/bin/generic_testcase.exe
33elif [[($machine_name == jeanzay)]]
34then
35    echo "Testing on Jean-Zay" 
36    srun -n $nb_proc --mpi=pmi2 $xios_dir/$build_dir/bin/generic_testcase.exe
37    if [ $? -ne 0 ]
38        then
39            echo "execution failed"
40            rm -f iodef.xml
41            rm -f user_param.py
42            rm -f default_param.py
43            rm -f sub_config.py
44            rm -f sub_check.py
45            exit 1234
46    fi
47else
48    echo "other machine"
49    exit 1234
50fi
51
52
53{ check_stderr=$(python sub_check.py 2>&1 1>&3-) ;} 3>&1  #captures stderr, letting stdout through
54# check_stderr=$(python sub_check.py 2>&1 >/dev/null)
55
56if [[ "$check_stderr" -ne 0 ]]
57then
58    echo "check.py failed"
59    rm -f iodef.xml
60    rm -f user_param.py
61    rm -f default_param.py
62    rm -f sub_config.py
63    rm -f sub_check.py
64    exit 1234
65# else
66#     echo "check.py OK"
67fi
68
69
70rm -f iodef.xml
71rm -f user_param.py
72rm -f default_param.py
73rm -f sub_config.py
74rm -f sub_check.py
Note: See TracBrowser for help on using the repository browser.