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
RevLine 
[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
7function cmd_serial()
8{
9    LD_PRELOAD=$PYTHON_PRELOAD python -u $*
10}
11
[759]12function cmd_gdb()
13{
14    set -x
15    LD_PRELOAD=$PYTHON_PRELOAD gdb --args python -u $*
16}
17
[717]18function cmd_mpi()
19{
20    NB_MPI=$1
21    shift
[790]22    rm -f xios_client*.*
[825]23    mpirun --mca mpi_warn_on_fork 0 -np $NB_MPI python -u $* 2>&1 | tee dynamico.log
[717]24}
25
26TEST=$PWD
[617]27DYNAMICO_ROOT=$(cd -P $(dirname $0)/../.. ; pwd)
28
[717]29cd $DYNAMICO_ROOT
[777]30
[825]31cp -i -u Python/dynamico/*.py lib/dynamico/
32cp -i -u Python/dynamico/dev/*.py lib/dynamico/dev/
[777]33
[717]34. arch.env
35. arch.path
[777]36cd $DYNAMICO_ROOT/Python/env
[717]37. $CURRENT_ARCH.env
38
39cd $TEST
40
[676]41export OMP_STACKSIZE=128M
[717]42ulimit -s unlimited
[676]43
[717]44CMD=$1
45shift
46cmd_$CMD $*
Note: See TracBrowser for help on using the repository browser.