CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

parallel solving in mingw build

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By ghastbug

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2021, 04:57
Default parallel solving in mingw build
  #1
Member
 
Join Date: Mar 2018
Posts: 33
Rep Power: 8
ghastbug is on a distinguished road
I have installed the OpenFOAM mingw build for windows. And I have been trying to run the PitzDaily case in parallel. It does not work properly



My decomposeParDict is set with 6 cores, scotch, and coeff( 3,2,1). It works fine. So when I run decomposePar, it works


However, when I run mpirun -nc 6 simpleFOAM -parallel, I get an error:
"bash: mpirun: could not find the command" EDIT: it is mpirun -np 6 simpleFoam -parallel, the previous command is a typo, thx Yann


I also tried the foamjob version: foamJob -s -parallel simpleFoam, and I get the error: 'mpirun' not found


Idea: I think I don't have openMPI installed. I mean, I installed MSMPI with openFOAM by default, but they are different things... I think, yeah.



Idea 2: I ran :mpiexec -n 6 simpleFoam. Because I found in How to ues MSMPI in CONVERGE? that msmpi can be run with mpiexec. But it is slower than running simpleFoam alone.
simpleFoam: clocktime = 6 seconds
mpiexec- -n 6 simpleFoam: clocktime = 10 seconds
Actually, running mpiexec simpleFoam takes 26 seconds. So the problem is that mpiexec is slower than the default openFOAM mpi stuff

Idea3: if I run the airfoil2D tutorial case with ./Allrun, it works, with parallel processing included. However, I do not even know in what programming language the Allrun file is writtten. I mean, probably C, but there are lines of code I don't understand


Questions:


1-What is the correct command to run solvers in parallel with mingw?
2- Do I have to install openmpi? I think there is no windows version
3- why is it slower when I run mpiexec ? what is the difference between writing simpleFoam and mpiexdc simpleFoam

Last edited by ghastbug; November 8, 2021 at 09:48.
ghastbug is offline   Reply With Quote

Old   November 8, 2021, 06:37
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,096
Rep Power: 26
Yann will become famous soon enough
Hi,

Quote:
Originally Posted by ghastbug View Post
However, when I run mpirun -nc 6 simpleFOAM -parallel, I get an error:

"bash: mpirun: could not find the command"
I'm not sure this is related to your error and I'm also not sure if you made some typos when writing your post but just to be sure, this is the exact command you should type:

Code:
mpirun -np 6 simpleFoam -parallel
Quote:
Originally Posted by ghastbug View Post

Idea 2: I ran :mpiexec -n 6 simpleFoam. Because I found in How to ues MSMPI in CONVERGE? that msmpi can be run with mpiexec. But it is slower than running simpleFoam alone.
simpleFoam: clocktime = 6 seconds
mpiexec- -n 6 simpleFoam: clocktime = 10 seconds
Actually, running mpiexec simpleFoam takes 26 seconds. So the problem is that mpiexec is slower than the default openFOAM mpi stuff
The "-parallel" option is missing. If this is not a typo it means you are running 6 instances of simpleFoam in serial, and this is why it's longer. The correct command should be:

Code:
mpiexec -n 6 simpleFoam -parallel
Quote:
Originally Posted by ghastbug View Post

Idea3: if I run the airfoil2D tutorial case with ./Allrun, it works, with parallel processing included. However, I do not even know in what programming language the Allrun file is writtten. I mean, probably C, but there are lines of code I don't understand
Allrun files are written in shell and it uses RunFunctions which are functions defined in OpenFOAM (for instance, runApplication and runParallel are RunFunctions)

Not sure this will solve your openMPI issues but I hope at least it will give you some hints.
Yann
ghastbug likes this.
Yann is offline   Reply With Quote

Old   November 8, 2021, 09:47
Default
  #3
Member
 
Join Date: Mar 2018
Posts: 33
Rep Power: 8
ghastbug is on a distinguished road
1- mpirun -nc 6 simpleFOAM -parallel is a typo, I'm adding a note to the OP


2- mpiexe -n 6 simpleFoam -parallel : oooh, beautiful, it works, thx.


3- shell files with runfunctions: exactly what I asked, thx. Now I can get some introductory knowledge on shell scripts from google and check where the runfunctions are located in openfoam
Yann likes this.
ghastbug 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
Problem with chtMultiregionFoam radiation boundary condition baran_foam OpenFOAM Running, Solving & CFD 10 December 17, 2019 17:36
problem with Min/max rho tH3f0rC3 OpenFOAM 8 July 31, 2019 09:48
conjugate heat transfer in OpenFOAM skuznet OpenFOAM Running, Solving & CFD 99 March 16, 2017 05:07
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


All times are GMT -4. The time now is 09:58.