Last change
on this file since 983 was
983,
checked in by dubos, 5 years ago
|
devel/Python : minor bugfix after reorganization of Python modules
|
-
Property svn:executable set to
*
|
File size:
956 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # usage : ./python.sh mode [n] script script_args |
---|
3 | # mode is 'serial' or mpi |
---|
4 | # if mode is 'mpi' then argument [n] specifies the number of MPI processes |
---|
5 | |
---|
6 | # This script relies on ../.. being DYNAMICO_ROOT |
---|
7 | # If you move it, set DYNAMICO_ROOT accordingly in the script or before calling the script |
---|
8 | |
---|
9 | function cmd_serial() |
---|
10 | { |
---|
11 | python -u $* |
---|
12 | } |
---|
13 | |
---|
14 | function cmd_gdb() |
---|
15 | { |
---|
16 | set -x |
---|
17 | LD_PRELOAD=$PYTHON_PRELOAD gdb --args python -u $* |
---|
18 | } |
---|
19 | |
---|
20 | function cmd_mpi() |
---|
21 | { |
---|
22 | NB_MPI=$1 |
---|
23 | shift |
---|
24 | rm -f xios_client*.* |
---|
25 | mpirun --mca mpi_warn_on_fork 0 -np $NB_MPI python -u $* 2>&1 | tee dynamico.log |
---|
26 | } |
---|
27 | |
---|
28 | TEST=$PWD |
---|
29 | DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd) # change/remove this line if you move this script |
---|
30 | |
---|
31 | cd $DYNAMICO_ROOT |
---|
32 | |
---|
33 | cp -i -u Python/dynamico/*.py lib/dynamico/ |
---|
34 | cp -i -u Python/dev/*.py lib/dynamico/dev/ |
---|
35 | |
---|
36 | . arch.env |
---|
37 | . arch.path |
---|
38 | cd arch |
---|
39 | . arch-${CURRENT_ARCH}.dev |
---|
40 | |
---|
41 | cd $TEST |
---|
42 | |
---|
43 | export OMP_STACKSIZE=128M |
---|
44 | ulimit -s unlimited |
---|
45 | |
---|
46 | CMD=$1 |
---|
47 | shift |
---|
48 | cmd_$CMD $* |
---|
Note: See
TracBrowser
for help on using the repository browser.