source: XIOS/trunk/xios_test_suite/TEST_SUITE/run_sub_test.sh @ 1806

Last change on this file since 1806 was 1806, checked in by ymipsl, 2 years ago

XIOS test suite : files for test suite runs

YM

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.7 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
22if [[ ($machine_name == irene) ]]
23then
24    echo "Testing on Irene"
25    echo "build_dir="$build_dir
26    ccc_mprun -n $nb_proc $xios_dir/$build_dir/bin/generic_testcase.exe
27elif [[($machine_name == ada)]]
28then
29    echo "Testing on ADA"
30    mpirun -np $nb_proc $xios_dir/$build_dir/bin/generic_testcase.exe
31elif [[($machine_name == jeanzay)]]
32then
33    echo "Testing on Jean-Zay" 
34    echo "build_dir="$build_dir
35    srun -n $nb_proc --mpi=pmi2 $xios_dir/$build_dir/bin/generic_testcase.exe
36    if [ $? -ne 0 ]
37        then
38            echo "execution failed"
39            rm -f iodef.xml
40            rm -f user_param.py
41            rm -f default_param.py
42            rm -f sub_config.py
43            rm -f sub_check.py
44            exit 1234
45    fi
46else
47    echo "other machine"
48    exit 1234
49fi
50
51
52{ check_stderr=$(python sub_check.py 2>&1 1>&3-) ;} 3>&1  #captures stderr, letting stdout through
53
54if [[ "$check_stderr" -ne 0 ]]
55then
56    echo "check.py failed"
57    rm -f iodef.xml
58    rm -f user_param.py
59    rm -f default_param.py
60    rm -f sub_config.py
61    rm -f sub_check.py
62    exit 1234
63fi
64
65
66rm -f iodef.xml
67rm -f user_param.py
68rm -f default_param.py
69rm -f sub_config.py
70rm -f sub_check.py
Note: See TracBrowser for help on using the repository browser.