From feed30d63cb2825ec2d5b855861b6d7e90e314fc Mon Sep 17 00:00:00 2001
From: mark <mark@opencfd>
Date: Tue, 2 Aug 2016 18:31:50 +0200
Subject: [PATCH] BUG: runParallel ignores presence of log file (closes #203)

- was a small typo
---
 bin/tools/RunFunctions | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index bfbe53c9a3d..2a330f6a382 100755
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -54,7 +54,6 @@ getApplication()
 
 runApplication()
 {
-    LOG_NAME=
     APP_RUN=
     LOG_IGNORE=false
     LOG_APPEND=false
@@ -100,18 +99,18 @@ runApplication()
 
 runParallel()
 {
-    LOG_NAME=
     APP_RUN=
-    # Store any parsed additional arguments e.g. decomposeParDict
-    APP_PARARGS=
     LOG_IGNORE=false
     LOG_APPEND=false
     LOG_SUFFIX=
+
+    # Store any parsed additional arguments e.g. decomposeParDict
+    APP_PARARGS=
     # Check the default decomposeParDict if available
-    nProcs=$(getNumberOfProcessors "system/decomposeParDict")
+    nProcs=$(getNumberOfProcessors system/decomposeParDict)
 
     # Parse options and executable
-    while [ $# -gt 0 ] && [ -z "$APP_RUN" ] ; do
+    while [ $# -gt 0 ] && [ -z "$APP_RUN" ]; do
         key="$1"
         case "$key" in
             -append|-a)
@@ -144,7 +143,7 @@ runParallel()
         shift
     done
 
-    if [ -f log.$SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
+    if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ]
     then
         echo "$APP_NAME already run on $PWD:" \
              "remove log file 'log.$LOG_SUFFIX' to re-run"
-- 
GitLab