Changeset 717 for codes/icosagcm
- Timestamp:
- 08/08/18 13:45:55 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/test/python.sh
r676 r717 1 1 #!/bin/bash 2 # pleae do not move this script as relies on ../.. being DYNAMICO_ROOT 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 3 20 DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd) 4 . $DYNAMICO_ROOT/arch.env 5 . $DYNAMICO_ROOT/arch.path 6 . $DYNAMICO_ROOT/Python//env/$CURRENT_ARCH.env 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 7 29 8 30 export OMP_STACKSIZE=128M 31 ulimit -s unlimited 9 32 10 LD_PRELOAD=$PYTHON_PRELOAD python -u $* 33 CMD=$1 34 shift 35 cmd_$CMD $*
Note: See TracChangeset
for help on using the changeset viewer.