Last change
on this file since 806 was
804,
checked in by dubos, 6 years ago
|
devel/Python : introduced Python/dynamico/dev/ subdirectory
|
-
Property svn:executable set to
*
|
File size:
809 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_gdb() |
---|
13 | { |
---|
14 | set -x |
---|
15 | LD_PRELOAD=$PYTHON_PRELOAD gdb --args python -u $* |
---|
16 | } |
---|
17 | |
---|
18 | function cmd_mpi() |
---|
19 | { |
---|
20 | NB_MPI=$1 |
---|
21 | shift |
---|
22 | rm -f xios_client*.* |
---|
23 | mpirun -np $NB_MPI python -u $* 2>&1 | tee dynamico.log |
---|
24 | } |
---|
25 | |
---|
26 | TEST=$PWD |
---|
27 | DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd) |
---|
28 | |
---|
29 | cd $DYNAMICO_ROOT |
---|
30 | |
---|
31 | cp -i -u -r Python/dynamico/* lib/dynamico/ |
---|
32 | |
---|
33 | . arch.env |
---|
34 | . arch.path |
---|
35 | cd $DYNAMICO_ROOT/Python/env |
---|
36 | . $CURRENT_ARCH.env |
---|
37 | |
---|
38 | cd $TEST |
---|
39 | |
---|
40 | export OMP_STACKSIZE=128M |
---|
41 | ulimit -s unlimited |
---|
42 | |
---|
43 | CMD=$1 |
---|
44 | shift |
---|
45 | cmd_$CMD $* |
---|
Note: See
TracBrowser
for help on using the repository browser.