source: codes/icosagcm/devel/Python/test/python.sh @ 759

Last change on this file since 759 was 759, checked in by dubos, 6 years ago

devel/unstructured : towards XIOS output with curvilinear mesh

  • Property svn:executable set to *
File size: 715 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
7function cmd_serial()
8{
9    LD_PRELOAD=$PYTHON_PRELOAD python -u $*
10}
11
12function cmd_gdb()
13{
14    set -x
15    LD_PRELOAD=$PYTHON_PRELOAD gdb --args python -u $*
16}
17
18function cmd_mpi()
19{
20    NB_MPI=$1
21    shift
22    mpirun -np $NB_MPI python -u $*
23}
24
25TEST=$PWD
26DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd)
27
28cd $DYNAMICO_ROOT
29. arch.env
30. arch.path
31cd $DYNAMICO_ROOT/Python//env
32. $CURRENT_ARCH.env
33
34cd $TEST
35
36export OMP_STACKSIZE=128M
37ulimit -s unlimited
38
39CMD=$1
40shift
41cmd_$CMD $*
Note: See TracBrowser for help on using the repository browser.