CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Running Case in Parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2020, 14:36
Default Running Case in Parallel
  #1
Typ
New Member
 
Join Date: Apr 2020
Posts: 19
Rep Power: 6
Typ is on a distinguished road
Hello,
i wanted to run the Case "damBreak" in Parallel on 6 Processors. But when i excecute my Allrun file the calculation just finish really quick and i have no time directory or processor0, processor1... directorys in my case directory.

First I changed the decomposeParDict like this:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 6;

method          simple;

coeffs
{
    n           (3 2 1);
}

distributed     no;

roots           ( );


// ************************************************************************* //
Then i changed the Allrun file in this way:

Code:
#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------
runApplication decomposePar -force
runApplication blockMesh
runParallel setFields
runParallel $(getApplication)
runApplication reconstructPar -newTimes

#------------------------------------------------------------------------------
That what the Bash says:


Code:
/mnt/c/users/typus/tutorials/multiphase/interfoam/laminar/damBreak/damBreak$ ./Allrun
Running decomposePar on /mnt/c/users/typus/tutorials/multiphase/interfoam/laminar/damBreak/damBreak
Running blockMesh on /mnt/c/users/typus/tutorials/multiphase/interfoam/laminar/damBreak/damBreak
Running setFields (6 processes) on /mnt/c/users/typus/tutorials/multiphase/interfoam/laminar/damBreak/damBreak
Running interFoam (6 processes) on /mnt/c/users/typus/tutorials/multiphase/interfoam/laminar/damBreak/damBreak
Running reconstructPar on /mnt/c/users/typus/tutorials/multiphase/interfoam/laminar/damBreak/damBreak
I think that i missed to change something but i couldnt find anything in the OpenFoam Manual.
Typ is offline   Reply With Quote

Old   May 8, 2020, 14:48
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Some output from OpenFOAM would be helpful.

You need to run blockMesh before decomposePar

You should have processor dirs if decomposePar ran. And if that was successful, you should have 0 dirs in each of the processor dirs if setFields ran.


You don't need to use setFields in parallel. Can't you just stick with the regular tutorial?

Code:
runApplication blockMesh
runApplication setFields
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
LuckyTran is offline   Reply With Quote

Old   May 8, 2020, 15:00
Default
  #3
Typ
New Member
 
Join Date: Apr 2020
Posts: 19
Rep Power: 6
Typ is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Some output from OpenFOAM would be helpful.

You need to run blockMesh before decomposePar

This was the problem now it works. Thank you.
Typ is offline   Reply With Quote

Old   May 8, 2020, 16:59
Default
  #4
Typ
New Member
 
Join Date: Apr 2020
Posts: 19
Rep Power: 6
Typ is on a distinguished road
I have one more question.
Is there a way to omptimize the decomposePar if you for example have 40 Processors then you can split them up in different ways in:
n (10 1 4)
n (5 4 2)
...and so on

is there a way to find the best allocation? With the shortest simulation time?
Typ is offline   Reply With Quote

Old   May 8, 2020, 19:59
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You are doing a tutorial, why worry about these things...

The answer is no, there isn't. At least, there isn't a magic wand like you want.

The time it takes you to find the best mesh with fastest possible simulation time I can almost certainly guarantee will be longer than the time it takes you run the case even with a bad mesh partitioning.

When you move on to doing productive simulations with more complex geometry, you'll likely stop using simple and move on to things like scotch and metis.


Even still, the time it takes to solve a given partition depends also on what is being solved in the partition. You could have multiple physics for example and then one partition ends up being solved much faster than another. Even with a single set of physics, the time it takes to solve the same partition is dependent on the flow itself. To complicate things even further, the time it takes to solve each partition is also dependent on your hardware... There's an endless list of things you need to optimize for to find the perfect mesh.
LuckyTran is offline   Reply With Quote

Old   May 11, 2020, 03:43
Default
  #6
Typ
New Member
 
Join Date: Apr 2020
Posts: 19
Rep Power: 6
Typ is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
You are doing a tutorial, why worry about these things...
Because i want to learn and practice besides this was an generally question.
Ok so i have to test out whats the best allocation in the decomposeParDict.
Thank you.
Typ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
damBreak case parallel run problem behzad-cfd OpenFOAM Running, Solving & CFD 5 August 2, 2015 17:18
Performance of GGI case in parallel hannes OpenFOAM Running, Solving & CFD 26 August 3, 2011 03:07
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 23:07.