Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
6091cdb0
Commit
6091cdb0
authored
Jan 02, 2011
by
Mark Olesen
Browse files
BUG: incorrect log-check in runParallel (RunFunctions)
STYLE: minor rewording, drop grep/sed in favour of sed only
parent
185d4175
Changes
4
Hide whitespace changes
Inline
Side-by-side
bin/tools/RunFunctions
View file @
6091cdb0
...
...
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C)
1991
-2010 OpenCFD Ltd.
# \\ / A nd | Copyright (C)
2008
-2010 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
...
...
@@ -25,23 +25,23 @@
# RunFunctions
#
# Description
#
#
Miscellaneous functions for running tutorial cases
#------------------------------------------------------------------------------
getApplication
()
{
grep
application system/controlDict |
sed
"s/application *
\(
[a-zA-Z]*
\)
;/
\1
/"
sed
-ne
's/^ *application *\([a-zA-Z]*\) *;.*$/\1/p'
system/controlDict
}
runApplication
()
{
APP_RUN
=
$1
APP_NAME
=
${
1
##*/
}
shift
APP_NAME
=
${
APP_RUN
##*/
}
if
[
-f
log.
$APP_NAME
]
then
echo
"
$APP_NAME
already run on
$PWD
: remove log file to run"
echo
"
$APP_NAME
already run on
$PWD
: remove log file to
re-
run"
else
echo
"Running
$APP_RUN
on
$PWD
"
$APP_RUN
$*
>
log.
$APP_NAME
2>&1
...
...
@@ -51,14 +51,15 @@ runApplication()
runParallel
()
{
APP_RUN
=
$1
APP_NAME
=
${
1
##*/
}
shift
if
[
-f
$
log
.
$APP_
RUN
]
if
[
-f
log.
$APP_
NAME
]
then
echo
"
$APP_
RUN
already run on
$PWD
: remove log file to run"
echo
"
$APP_
NAME
already run on
$PWD
: remove log file to
re-
run"
else
echo
"Running
$APP_RUN
in parallel on
$PWD
using
$1
processes"
(
mpirun
-np
$1
$APP_RUN
-parallel
< /dev/null
>
log.
$APP_
RUN
2>&1
)
(
mpirun
-np
$1
$APP_RUN
-parallel
< /dev/null
>
log.
$APP_
NAME
2>&1
)
fi
}
...
...
tutorials/basic/laplacianFoam/flange/Allrun
View file @
6091cdb0
...
...
@@ -11,7 +11,7 @@ runAnsysToFoam()
{
if
[
-f
log.ansysToFoam
]
then
echo
"ansysToFoam already run on
$PWD
: remove log file to run"
echo
"ansysToFoam already run on
$PWD
: remove log file to
re-
run"
else
echo
"ansysToFoam: converting mesh
$1
"
ansysToFoam
$1
-scale
$2
>
log.ansysToFoam 2>&1
...
...
tutorials/combustion/engineFoam/kivaTest/Allrun
View file @
6091cdb0
...
...
@@ -11,7 +11,7 @@ runKivaToFoam()
{
if
[
-f
log.kivaToFoam
]
then
echo
"kivaToFoam already run: remove log file to run"
echo
"kivaToFoam already run: remove log file to
re-
run"
else
echo
"kivaToFoam: converting kiva file"
kivaToFoam
-file
$1
>
log.kivaToFoam 2>&1
...
...
@@ -23,7 +23,7 @@ restartApplication()
{
if
[
-f
log-2.
$1
]
then
echo
"
$1
already run: remove log file to run"
echo
"
$1
already run: remove log file to
re-
run"
else
echo
"Running
$1
"
$1
>
log-2.
$1
2>&1
...
...
tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun
View file @
6091cdb0
...
...
@@ -11,7 +11,7 @@ runStarToFoam()
{
if
[
-f
log.star3ToFoam
-o
-f
log.starToFoam
]
then
echo
"star3ToFoam already run on
$PWD
: remove log file to run"
echo
"star3ToFoam already run on
$PWD
: remove log file to
re-
run"
else
echo
"star3ToFoam: converting mesh
$1
"
star3ToFoam
$1
>
log.star3ToFoam 2>&1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment