Last change
on this file since 752 was
717,
checked in by dubos, 6 years ago
|
devel/unstructured : more flexible wrapper to execute test cases
|
-
Property svn:executable set to
*
|
File size:
625 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # please do not move this script as relies on ../.. being DYNAMICO_ROOT |
---|
3 | # usage : ./python.sh mode [n] script script_args |
---|
4 | # mode is 'serial' or mpi |
---|
5 | # if mode is 'mpi' then argument [n] specifies the number of MPI processes |
---|
6 | |
---|
7 | function cmd_serial() |
---|
8 | { |
---|
9 | LD_PRELOAD=$PYTHON_PRELOAD python -u $* |
---|
10 | } |
---|
11 | |
---|
12 | function cmd_mpi() |
---|
13 | { |
---|
14 | NB_MPI=$1 |
---|
15 | shift |
---|
16 | mpirun -np $NB_MPI python -u $* |
---|
17 | } |
---|
18 | |
---|
19 | TEST=$PWD |
---|
20 | DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd) |
---|
21 | |
---|
22 | cd $DYNAMICO_ROOT |
---|
23 | . arch.env |
---|
24 | . arch.path |
---|
25 | cd $DYNAMICO_ROOT/Python//env |
---|
26 | . $CURRENT_ARCH.env |
---|
27 | |
---|
28 | cd $TEST |
---|
29 | |
---|
30 | export OMP_STACKSIZE=128M |
---|
31 | ulimit -s unlimited |
---|
32 | |
---|
33 | CMD=$1 |
---|
34 | shift |
---|
35 | cmd_$CMD $* |
---|
Note: See
TracBrowser
for help on using the repository browser.