Notes about running OpenFOAM in parallel
Posted February 27, 2011 at 10:22 by wyldckat
Updated October 31, 2015 at 09:25 by wyldckat (added more links)
Updated October 31, 2015 at 09:25 by wyldckat (added more links)
This is a rough list of informations to be compiled and posted on openfoamwiki.net on a page about running OpenFOAM in parallel. If someone picks up on this and wants to start the article in the wiki, be my guest. Leave a comment pointing to the wiki page, so we can cooperate
List of already catalogued applications on the wiki for pre/post processing for parallel mode: http://openfoamwiki.net/index.php/Ca...sing_utilities
Yet to be catalogued:
OpenFOAM's script for running applications in parallel: foamJob
OpenFOAM's script with helpful functions, including for running in parallel: "bin/tools/RunFunctions", namely function runParallel
Threads with very useful information:
About NFS and OpenMPI tweaks:
Items to talk about:
List of already catalogued applications on the wiki for pre/post processing for parallel mode: http://openfoamwiki.net/index.php/Ca...sing_utilities
Yet to be catalogued:
- redistributeMesh
- renumberMesh - useful for optimizing the mesh in each processor for improving cooperative performance.
- reconstructParMesh
OpenFOAM's script for running applications in parallel: foamJob
OpenFOAM's script with helpful functions, including for running in parallel: "bin/tools/RunFunctions", namely function runParallel
Threads with very useful information:
- On how to test if MPI is working: post #4 of "openfoam 1.6 on debian etch", and/or post #19 of "OpenFOAM updates" - Note: As of OpenFOAM 2.0.0, the application "parallelTest" is now called "Test-parallel".
- For using this utility in foam-extend: http://www.cfd-online.com/Forums/ope...tml#post560394 - post #12
- decomposed case to 2-cores (Not working) (more precisely post #21 has valuable info)
- renumberMesh: http://www.cfd-online.com/Forums/ope...tml#post341181 post #2
- Further diagnoses when checking if things can even run in parallel: http://www.cfd-online.com/Forums/ope...tml#post326351 posts #8 and #10.
- http://www.cfd-online.com/Forums/ope...am-solved.html
- http://www.cfd-online.com/Forums/ope...und-error.html
- Cyclic patches and parallel postprocessing problems #8 - about preserving cyclic patches in one sub-domain.
- Installing OpenFOAM-1.5-dev on a cluster #2 - check out the report for some references for clusters and the valuable reference benchmark. Notice the super-scale up when using more than one machine, even when all machines are multi-core!
- Notes about figuring out why it doesn't scale as we wanted it to: Parallel processing of OpenFOAM cases on multicore processor??? post #11
- On BlueGene/P: FOAM FATAL ERROR in Foam::findEtcFile() : could not find mandatory file - post #9
- Anyone succesful on static executable solver? - see my posts!
- Quote:CFD performance with unstructured grids on AMD's multi-socket boards is extremely poor. This article from anandtech tries to investigate why. I am assuming that Interlagos won't fix this entirely.
- Running OpenFOAM in parallel with different locations for each process
- A nice summary of how-to: http://www.cfd-online.com/Forums/ope...tml#post355234 post #13
- How to run concurrent MPI jobs within a node or set of nodes - post #9 - A must read for when using Open-MPI with more than one job on a single machine!
- Another discussion: http://www.cfd-online.com/Forums/ope...l-cluster.html
- snappyHexMesh with more than 100 processes in parallel: http://www.cfd-online.com/Forums/ope...processes.html
- Caution: Open-MPI 1.5.3 is a beta version: http://www.cfd-online.com/Forums/ope...s-openmpi.html
- Diagnosing NFS+MPI lock-ups: http://www.cfd-online.com/Forums/ope...tml#post380889 post #10
- Notes on scalability: http://www.cfd-online.com/Forums/ope...tml#post230087 post #20 (reference: http://www.cfd-online.com/Forums/blo...-parallel.html)
- Performance tuning: http://www.cfd-online.com/Forums/har...arameters.html
- More tips related to mpirun: http://www.cfd-online.com/Forums/ope...not-quite.html - in particular read post #8!
- How to change the MPI library toolbox to be used: http://www.cfd-online.com/Forums/ope...tml#post340456 - see post #2
- Diagnosing why a parallel run crashed or locked up: http://www.cfd-online.com/Forums/ope...tml#post448586 - see posts #26
- Solution for precision issues with reconstructParMesh, such as:
Code:--> FOAM FATAL ERROR: Your current settings specify ASCII writing with 6 digits precision. Your merging tolerance (1e-07) is finer than this. Please change your writeFormat to binary or increase the writePrecision or adjust the merge tolerance (-mergeTol). From function reconstructParMesh in file reconstructParMesh.C at line 341. FOAM exiting
- Diagnosing limitations: http://www.cfd-online.com/Forums/ope...tml#post449674 post #4
- Inn the same thread, comparison of PCG vs GAMG: http://www.cfd-online.com/Forums/ope...tml#post450069 post #6
- Another pearl of wisdom, this time regarding profiling parallel runs: http://www.cfd-online.com/Forums/ope...tml#post450593 post #14
- http://www.cfd-online.com/Forums/ope...-openfoam.html
- http://www.cfd-online.com/Forums/ope...-64-cores.html - 2 solutions on post #3!
- Another possibility for issues with MVAPICH2: http://www.cfd-online.com/Forums/ope...tml#post560654 - post #19
- http://www.cfd-online.com/Forums/ope...tml#post324934 - post #28 provides a list of known reasons why a run might not go well in parallel
- http://www.cfd-online.com/Forums/ope...tml#post462959 post #3
- http://www.cfd-online.com/Forums/ope...tml#post528170 post #14 - use the full path to mpirun if you get "opal_shmem_base_select failed".
- http://www.cfd-online.com/Forums/ope...tml#post550463 - post #6 - a reminder of how OpenFOAM should be installed and configured on each machine.
- Building with MVAPICH2: http://www.cfd-online.com/Forums/ope...tml#post550718
- Is the output from mpirun (Open-MPI) only coming out at the end of the run? Check this post: http://www.cfd-online.com/Forums/ope...tml#post559776 post #9
- Document "Optimising the Parallelisation of OpenFOAM Simulations" by Shannon Keough: http://www.dtic.mil/get-tr-doc/pdf?AD=ADA612337
About NFS and OpenMPI tweaks:
Items to talk about:
- Intro on how things work
- Passwordless ssh and possibly rsh
- NFS and in case the network can't handle NFS
- .bashrc and foamExec
- using mpirun app, foamJob script, and RunParallel function
- Testing operationality
- Tweaking mpirun, including telling it how to use rsh instead of ssh
- Running cases and benchmarks
- Tips on improving performance with OpenFOAM tools.
Total Comments 15
Comments
-
Do you have any notes on how to use simple decomposition for parallel processing. I am running on a dual hexacore (12 core) machine, and no matter what I try, my decomposeParDict in sloshingtank2D just wont work, and I get errors something like:
Decomposing mesh region0
Create mesh
Calculating distribution of cells
Selecting decompositionMethod hierarchical
--> FOAM FATAL ERROR:
Wrong number of processor divisions in geomDecomp:
Number of domains : 12
Wanted decomposition : (4 2 2)
From function geomDecomp::geomDecomp(const dictionary& decompositionDict)
in file geomDecomp/geomDecomp.C at line 50.
Any suggestions? why wont (6 6 1) work? Isnt that 12 sub domains? I look forward to your reply.
:Posted July 18, 2013 at 00:43 by musahossein -
Quote:Do you have any notes on how to use simple decomposition for parallel processing. I am running on a dual hexacore (12 core) machine, and no matter what I try, my decomposeParDict in sloshingtank2D just wont work, and I get errors something like:
Decomposing mesh region0
Create mesh
Calculating distribution of cells
Selecting decompositionMethod hierarchical
--> FOAM FATAL ERROR:
Wrong number of processor divisions in geomDecomp:
Number of domains : 12
Wanted decomposition : (4 2 2)
From function geomDecomp::geomDecomp(const dictionary& decompositionDict)
in file geomDecomp/geomDecomp.C at line 50.
Any suggestions? why wont (6 6 1) work? Isnt that 12 sub domains? I look forward to your reply.
:
Well, 4*2*2 would make 16 Regions. 6*6*1 separations would be 36.
What would work for 12 domains/processors is (3 2 2).
The Numbers represent the slides through the Mesh parallel to the related coordinate-axe.Posted August 16, 2013 at 09:26 by Kenna -
Posted September 16, 2013 at 07:55 by Tobi -
Quote:what is faster in a Special case:
a) decompose in (10 1 1)
b) decompose in (1 10 1)
c) decompose in (1 1 10)
d) decompose in (2 5 1)
and so on...
Also if you use ubuntu you can use the command 'top´ in a further console to look up the actual use of processor capacity.Posted September 16, 2013 at 11:27 by Kenna -
Hi Kenna,
10 cores are a lot? Not really or - I think 100 cores are okay
Well I know the fact of splitting the mesh in a optimal way so that not only 2 cores get the whole work.
But I just wanted to know if there are any benchmarks where you can see the effect of a "wrong" splitted mesh.
Maybe in time increase of 10% or sth. like thatPosted September 16, 2013 at 13:04 by Tobi -
The decomposition in geomDecomp.C looks something like this:
nProcessors_!=n_.x()*n_.y()*n_.z().
So the product cannot exceed the number of cores that you specify. If you are running 2D problems and the mesh is more finer in one direction and coarse in the other direction, then cores in the x direction is 1 and you vary the two others as necessary. In 3d, however, you can utilise the cores in all directions. What I have found useful is to dedicate more cores in the direction where the mesh is fine or varies greatly. Also since the product must equal to or be less than the number of crores available, the user is limited in how they can vary the cores in all directions, since the product of the number or cores in each direction cannot exceed the number of cores available.
IN other words trial and error would be the norm.Posted September 16, 2013 at 20:58 by musahossein -
OK... I've hit the limit of 10000 characters on this blog post... I'm going to have to move this to a wiki page sometime soon... Anyone would like to help?
By the way, the link for the document by Shannon Keough was sent me by our fellow forum member KateEisenhower: http://www.cfd-online.com/Forums/ope...mulations.htmlPosted October 31, 2015 at 09:28 by wyldckat -
And another link: http://www.cfd-online.com/Forums/ope...m-2-3-1-a.html - neat solutions for SSH issues with Open-MPI newer than 1.6.5
Posted January 6, 2016 at 18:30 by wyldckat -
And another one, this time on PBS jobs: http://www.cfd-online.com/Forums/ope...ble-basis.html
Posted May 1, 2016 at 20:11 by wyldckat -
Another one, as a reminder for selecting any other MPI versions based on module load: https://www.cfd-online.com/Forums/op...fic-linux.html
Posted December 22, 2016 at 11:15 by wyldckat -
Posted April 7, 2017 at 13:13 by alia -
Hi Ali,
Quote:
If you have figured out how to run those solvers in parallel, feel free to edit that wiki page and add a section for it.
As for running in parallel in general, feel free to start the wiki page https://openfoamwiki.net/index.php/H...un_In_Parallel
Best regards,
BrunoPosted April 8, 2017 at 08:39 by wyldckat -
Quote:Hi Ali,
For fsiFoam, you need to contact the current author, Željko Tuković. Because as far as I know, running in parallel is not yet fully implemented, not even in the latest source package for foam-extend 4.0, that is provided here: https://openfoamwiki.net/index.php/E...re_interaction
If you have figured out how to run those solvers in parallel, feel free to edit that wiki page and add a section for it.
As for running in parallel in general, feel free to start the wiki page https://openfoamwiki.net/index.php/H...un_In_Parallel
Best regards,
BrunoPosted April 10, 2017 at 07:55 by alia -
Yet another solution for the error message:
Code:opal_shmem_base_select failed --> Returned value -1 instead of OPAL_SUCCESS
Posted June 4, 2017 at 21:14 by wyldckat -
Since I've already hit the 10000 characters limit on the main blog post:
- Post on how to avoid having OpenFOAM stop running when unplugged to the Internet midway: https://www.cfd-online.com/Forums/op...tml#post687661
Posted April 8, 2018 at 15:45 by wyldckat