1 #---------------------------------*- sh -*-------------------------------------
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 # \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 #------------------------------------------------------------------------------
9 # This file is part of OpenFOAM.
11 # OpenFOAM is free software; you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by the
13 # Free Software Foundation; either version 2 of the License, or (at your
14 # option) any later version.
16 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 # You should have received a copy of the GNU General Public License
22 # along with OpenFOAM; if not, write to the Free Software Foundation,
23 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #------------------------------------------------------------------------------
36 if [ -f log.$APP_RUN ] ; then
37 echo "$APP_RUN already run on $PWD: remove log file to run"
39 echo "Running $APP_RUN on $PWD"
40 $APP_RUN $* > log.$APP_RUN 2>&1
48 if [ -f $log.$APP_RUN ] ; then
49 echo "$APP_RUN already run on $PWD: remove log file to run"
51 if [ "$WM_MPLIB" = LAM ]
53 echo "Starting LAM using $2 machines file"
56 echo "Running $APP_RUN in parallel on $PWD using $1 processes"
57 ( mpirun -np $1 $APP_RUN -parallel < /dev/null > log.$APP_RUN 2>&1 )
58 if [ "$WM_MPLIB" = LAM ]
68 echo "Compiling $1 application"
75 echo "Case already cloned: remove case directory $2 to clone"
77 echo "Cloning $2 case from $1"
79 cpfiles="0 system constant"
87 #------------------------------------------------------------------------------