Last change
on this file since 731 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
|
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 | |
---|
| 12 | function cmd_mpi() |
---|
| 13 | { |
---|
| 14 | NB_MPI=$1 |
---|
| 15 | shift |
---|
| 16 | mpirun -np $NB_MPI python -u $* |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | TEST=$PWD |
---|
[617] | 20 | DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd) |
---|
| 21 | |
---|
[717] | 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 | |
---|
[676] | 30 | export OMP_STACKSIZE=128M |
---|
[717] | 31 | ulimit -s unlimited |
---|
[676] | 32 | |
---|
[717] | 33 | CMD=$1 |
---|
| 34 | shift |
---|
| 35 | cmd_$CMD $* |
---|
Note: See
TracBrowser
for help on using the repository browser.