Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
8596a86a
Commit
8596a86a
authored
14 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: bin/foamRunTutorials: run in parallel
parent
9b38b768
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/foamRunTutorials
+43
-8
43 additions, 8 deletions
bin/foamRunTutorials
with
43 additions
and
8 deletions
bin/foamRunTutorials
+
43
−
8
View file @
8596a86a
...
...
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
...
...
@@ -31,6 +31,39 @@
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Select the version of make to be used
#------------------------------------------------------------------------------
# normally use "make"
make
=
"make"
# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
if
[
-z
"
$WM_NCOMPPROCS
"
-a
-n
"
$WM_HOSTS
"
-a
-n
"
$WM_SCHEDULER
"
]
then
WM_NCOMPPROCS
=
$(
wmakeScheduler
-count
)
[
$?
-eq
0
]
||
unset
WM_NCOMPPROCS
fi
if
[
"
$WM_NCOMPPROCS
"
]
then
if
[
"
$WM_NCOMPPROCS
"
-gt
1
-a
!
"
$MAKEFLAGS
"
]
then
lockDir
=
$HOME
/.
$WM_PROJECT
/.wmake
if
[
-d
$lockDir
]
then
rm
-f
$lockDir
/
*
else
mkdir
-p
$lockDir
fi
make
=
"make --no-print-directory -j "
$WM_NCOMPPROCS
fi
fi
# Source tutorial functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
...
...
@@ -62,13 +95,15 @@ else
fi
done
# Recurse to subdirectories
for
caseName
in
*
do
if
[
-d
$caseName
]
then
(
cd
$caseName
&&
$thisScript
)
fi
done
#for caseName in *
#do
# if [ -d $caseName ]
# then
# ( cd $caseName && $thisScript )
# fi
#done
FOAM_TARGETS
=
$(
for
d
in
*
;
do
[
-d
"
$d
"
]
&&
echo
"
$d
"
;
done
| xargs
)
$make
-k
-f
$WM_PROJECT_DIR
/bin/tools/MakefileDirs
FOAM_TARGETS
=
"
$FOAM_TARGETS
"
FOAM_APP
=
$thisScript
fi
#------------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment