diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions index 1f21022b23..55776db644 100644 --- a/bin/tools/RunFunctions +++ b/bin/tools/RunFunctions @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -86,9 +86,15 @@ runApplication() shift done + if [ -z "$APP_RUN" ] + then + echo "Error: application not specified" + return 1 + fi + if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ] then - echo "$APP_NAME already run on $PWD:" \ + echo "$APP_RUN already run on $PWD:" \ "remove log file 'log.$LOG_SUFFIX' to re-run" else echo "Running $APP_RUN on $PWD" @@ -137,9 +143,15 @@ runParallel() shift done + if [ -z "$APP_RUN" ] + then + echo "Error: application not specified" + return 1 + fi + if [ -f log.$LOG_SUFFIX ] && [ "$LOG_IGNORE" = "false" ] then - echo "$APP_NAME already run on $PWD:" \ + echo "$APP_RUN already run on $PWD:" \ "remove log file 'log.$LOG_SUFFIX' to re-run" else echo "Running $APP_RUN in parallel on $PWD using $nProcs processes"