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

Last change on this file since 825 was 825, checked in by dubos, 5 years ago

devel/Python : moved Fortran bindings and *.pyx to dynamico/dev module + necessary changes to test/py/*.py

  • Property svn:executable set to *
File size: 886 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    rm -f xios_client*.*
23    mpirun --mca mpi_warn_on_fork 0 -np $NB_MPI python -u $* 2>&1 | tee dynamico.log
24}
25
26TEST=$PWD
27DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd)
28
29cd $DYNAMICO_ROOT
30
31cp -i -u Python/dynamico/*.py lib/dynamico/
32cp -i -u Python/dynamico/dev/*.py lib/dynamico/dev/
33
34. arch.env
35. arch.path
36cd $DYNAMICO_ROOT/Python/env
37. $CURRENT_ARCH.env
38
39cd $TEST
40
41export OMP_STACKSIZE=128M
42ulimit -s unlimited
43
44CMD=$1
45shift
46cmd_$CMD $*
Note: See TracBrowser for help on using the repository browser.