Changeset 717


Ignore:
Timestamp:
08/08/18 13:45:55 (6 years ago)
Author:
dubos
Message:

devel/unstructured : more flexible wrapper to execute test cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/Python/test/python.sh

    r676 r717  
    11#!/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 
     7function cmd_serial() 
     8{ 
     9    LD_PRELOAD=$PYTHON_PRELOAD python -u $* 
     10} 
     11 
     12function cmd_mpi() 
     13{ 
     14    NB_MPI=$1 
     15    shift 
     16    mpirun -np $NB_MPI python -u $* 
     17} 
     18 
     19TEST=$PWD 
    320DYNAMICO_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 
     22cd $DYNAMICO_ROOT 
     23. arch.env 
     24. arch.path 
     25cd $DYNAMICO_ROOT/Python//env 
     26. $CURRENT_ARCH.env 
     27 
     28cd $TEST 
    729 
    830export OMP_STACKSIZE=128M 
     31ulimit -s unlimited 
    932 
    10 LD_PRELOAD=$PYTHON_PRELOAD python -u $* 
     33CMD=$1 
     34shift 
     35cmd_$CMD $* 
Note: See TracChangeset for help on using the changeset viewer.