bin/tools/RunFunctions: runParallel now obtains the number of processors from numberOfSubdomains

in decomposeParDict.

This default number of processors may be overridden by the new "-np"
option to runParallel which must be specified before the application
name e.g.:

runParallel -np 4 pisoFoam
This commit is contained in:
Henry Weller
2016-01-27 14:19:25 +00:00
parent cd265693f5
commit b3d47f0423
40 changed files with 73 additions and 83 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -81,6 +81,7 @@ runParallel()
APP_RUN=
LOG_IGNORE=false
LOG_APPEND=false
nProcs=$(getNumberOfProcessors)
# Parse options and executable
while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
@ -93,12 +94,13 @@ runParallel()
-overwrite)
LOG_IGNORE=true
;;
-np)
nProcs="$2"
shift
;;
*)
APP_RUN="$key"
APP_NAME="${key##*/}"
# also read number of processors
nProcs="$2"
shift
;;
esac
shift