Last change
on this file since 777 was
777,
checked in by dubos, 6 years ago
|
devel/Python : update dynamico modules at beginning of python.sh
|
-
Property svn:executable set to
*
|
File size:
757 bytes
|
Rev | Line | |
---|
[617] | 1 | #!/bin/bash |
---|
[717] | 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 | |
---|
[759] | 12 | function cmd_gdb() |
---|
| 13 | { |
---|
| 14 | set -x |
---|
| 15 | LD_PRELOAD=$PYTHON_PRELOAD gdb --args python -u $* |
---|
| 16 | } |
---|
| 17 | |
---|
[717] | 18 | function cmd_mpi() |
---|
| 19 | { |
---|
| 20 | NB_MPI=$1 |
---|
| 21 | shift |
---|
| 22 | mpirun -np $NB_MPI python -u $* |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | TEST=$PWD |
---|
[617] | 26 | DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd) |
---|
| 27 | |
---|
[717] | 28 | cd $DYNAMICO_ROOT |
---|
[777] | 29 | |
---|
| 30 | cp -i -u Python/dynamico/* lib/dynamico/ |
---|
| 31 | |
---|
[717] | 32 | . arch.env |
---|
| 33 | . arch.path |
---|
[777] | 34 | cd $DYNAMICO_ROOT/Python/env |
---|
[717] | 35 | . $CURRENT_ARCH.env |
---|
| 36 | |
---|
| 37 | cd $TEST |
---|
| 38 | |
---|
[676] | 39 | export OMP_STACKSIZE=128M |
---|
[717] | 40 | ulimit -s unlimited |
---|
[676] | 41 | |
---|
[717] | 42 | CMD=$1 |
---|
| 43 | shift |
---|
| 44 | cmd_$CMD $* |
---|
Note: See
TracBrowser
for help on using the repository browser.