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

problem with mpi when trying to run parallel.

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Yann
  • 1 Post By siavash_mansouri
  • 3 Post By Agi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2023, 02:11
Post problem with mpi when trying to run parallel.
  #1
New Member
 
Join Date: Mar 2023
Posts: 4
Rep Power: 3
siavash_mansouri is on a distinguished road
Dear All,

I am trying to run OpenFoam(OF4Win 20.09) on windows 10 in parallel mode, first copied decomposeParDict to my system folder with 3 Subdomains and simple method then executed decomposePar in terminal and after that executed <mpi run -np 3 simpleFoam -parallel> in terminal but it shows me <-bash: mpi: command not found> and it doesn't run.

Your any comments on my problem would be great helpful for me like OpenFoam beginner.

Best wishes,
siavash_mansouri is offline   Reply With Quote

Old   March 5, 2023, 16:37
Default OpenFOAM parallel processing no longer working
  #2
New Member
 
Vaughan Thompson
Join Date: Mar 2023
Posts: 5
Rep Power: 3
vaughan is on a distinguished road
I believe I may have a similar issue. I have been using OpenFOAM v2206 on my Windows 10 PC since Dec 2022 via FreeCAD CfdOF using multiple cores. But recently these runs have failed resulting in the follow error message:


--> FOAM FATAL ERROR: (openfoam-2206)
attempt to run parallel on 1 processor
From static bool Foam::UPstream::init(int&, char**&, bool)
in file UPstream.C at line 286.


FOAM aborting



I can still run simulations with parallel set to false but would like to restore parallel running.



Looking around on the forums, I think the problem may be due to a recent operating system update on my pc, and may be cured by adjusting environment variables. I would appreciate any advise here as most of the information I have seen relates to linux os.
Many thanks.
vaughan is offline   Reply With Quote

Old   March 6, 2023, 03:31
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,177
Rep Power: 27
Yann will become famous soon enough
Quote:
Originally Posted by siavash_mansouri View Post
Dear All,

I am trying to run OpenFoam(OF4Win 20.09) on windows 10 in parallel mode, first copied decomposeParDict to my system folder with 3 Subdomains and simple method then executed decomposePar in terminal and after that executed <mpi run -np 3 simpleFoam -parallel> in terminal but it shows me <-bash: mpi: command not found> and it doesn't run.

Your any comments on my problem would be great helpful for me like OpenFoam beginner.

Best wishes,
Hello,

The proper command is mpirun (without space between mpi and run):
Code:
mpirun -np 3 simpleFoam -parallel
Cheers,
Yann
Yann is offline   Reply With Quote

Old   March 7, 2023, 01:12
Post
  #4
New Member
 
Join Date: Mar 2023
Posts: 4
Rep Power: 3
siavash_mansouri is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

The proper command is mpirun (without space between mpi and run):
Code:
mpirun -np 3 simpleFoam -parallel
Cheers,
Yann


Hello,
I tried <mpirun -np 3 simpleFoam -parallel> but it still doesn't work.
and I am still having <-bash: mpi: command not found> when I execute for parallel computation.
siavash_mansouri is offline   Reply With Quote

Old   March 7, 2023, 04:40
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,177
Rep Power: 27
Yann will become famous soon enough
Hello,

It looks like a MPI libraries matter.

I didn't notice you were using OF4Win (provided by CFD support).
Have you tried running:

Code:
mpiexec -np 3 simpleFoam -parallel
It seems to be what they advise to run parallel cases with OF4Win: https://www.cfdsupport.com/openfoam-for-windows.html

Regards,
Yann
Agi likes this.
Yann is offline   Reply With Quote

Old   March 7, 2023, 12:52
Default Running OpenFOAM from FreeCAD
  #6
New Member
 
Vaughan Thompson
Join Date: Mar 2023
Posts: 5
Rep Power: 3
vaughan is on a distinguished road
I am running OpenFOAM via FreeCAD CfdOF. FreeCAD gives a console with Python commands, but I do not use these directly so far. I believe the issue may be associated with Microsoft MPI being affected by a recent Windows 10 update but I am not sure. Any suggestions for working around this issue would be much appreciated.
Thanks.
vaughan is offline   Reply With Quote

Old   March 8, 2023, 03:23
Default
  #7
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,177
Rep Power: 27
Yann will become famous soon enough
I am sorry but I have no experience with FreeCAD CfdOF so I cannot really suggest any solution.
The only thing I can tell is that the error seems to be related to MPI libraries (either a missing library, or an issue with mpi library defined in the OpenFOAM environment setup)

Let us know if you find a solution, it might help other people using FreeCAD CfdOF!

Regards,
Yann
Yann is offline   Reply With Quote

Old   March 8, 2023, 05:07
Default CfdOF
  #8
New Member
 
Vaughan Thompson
Join Date: Mar 2023
Posts: 5
Rep Power: 3
vaughan is on a distinguished road
Many thanks for the comments Yann. I think my next move should be to uninstall and reinstall OpenFOAM which should do a refresh of Microsoft MPI. I could also try to run OpenFOAM via the command line, rather that via CfdOF in FreeCAD but don't normaly use this so would appreciate any guidance on how to do this.
And, of course, I will report back any useful results.
vaughan is offline   Reply With Quote

Old   March 12, 2023, 02:19
Smile
  #9
New Member
 
Join Date: Mar 2023
Posts: 4
Rep Power: 3
siavash_mansouri is on a distinguished road
I solved the problem, but I didn't know anything about environment variables with just copping my case to run folder and tried to execute <mpiexec -np 3 simpleFoam -parallel> in run folder and now openFoam detects the true MPI everywhere in computer.
vaughan likes this.
siavash_mansouri is offline   Reply With Quote

Old   March 13, 2023, 13:40
Default Windows for Ubuntu
  #10
New Member
 
Vaughan Thompson
Join Date: Mar 2023
Posts: 5
Rep Power: 3
vaughan is on a distinguished road
Thanks for the information Siavash. I presume that you and Yann are using OpenFOAM linux version via Unbuntu LTS or similar on a Windows machine? I have been able to install Ubuntu 20.04.05 LTS on my Windows 10 machine but I will hang back on installing the Linux version of OpenFOAM to avoid having both Linux and Windows OpenFOAM on my PC. I may revisit this later if I run into problems using just one core (so far this has not been a significant problem) and I don't get a resolution with the Windows version.
Thanks Again
Vaughan
vaughan is offline   Reply With Quote

Old   April 19, 2023, 04:11
Default Issue with mpiexec
  #11
Agi
New Member
 
Alkan Sahin
Join Date: Mar 2023
Posts: 2
Rep Power: 0
Agi is on a distinguished road
In my pc is running Windows 10 and OpenFOAM v2212 is installed. Before I was able to run with the command "mpiexec" parallel simulations. I don't know if it is really related to this but after the last update 2023-04 Cumulative Update for Windows 10 Version 21H2 for x64-based Systems (KB5025221) I am not able to run parallel simulations with "mpiexec" since mpiexec command cannot be found:

$ mpiexec -np 8 simpleFoam -parallel
bash: mpiexec: Kommando nicht gefunden.


I've reinstalled OpenFOAM and nothing has changed. Could anybody help me?

Regards
Agi is offline   Reply With Quote

Old   April 19, 2023, 05:59
Default
  #12
Agi
New Member
 
Alkan Sahin
Join Date: Mar 2023
Posts: 2
Rep Power: 0
Agi is on a distinguished road
Quote:
Originally Posted by Agi View Post
In my pc is running Windows 10 and OpenFOAM v2212 is installed. Before I was able to run with the command "mpiexec" parallel simulations. I don't know if it is really related to this but after the last update 2023-04 Cumulative Update for Windows 10 Version 21H2 for x64-based Systems (KB5025221) I am not able to run parallel simulations with "mpiexec" since mpiexec command cannot be found:

$ mpiexec -np 8 simpleFoam -parallel
bash: mpiexec: Kommando nicht gefunden.


I've reinstalled OpenFOAM and nothing has changed. Could anybody help me?

Regards
I found the solution.
I copied the executable file <mpiexec.exe> under <Programm Files\Microsoft MPI\Bin> into the folder <~\OpenFOAM\v2212\msys64\usr\bin>. Then it has worked as before. In this case i cannot understand/explain why it worked before.

Regards
vaughan, Quokka and ksndm like this.
Agi is offline   Reply With Quote

Old   October 9, 2024, 11:45
Smile Worked for Me Also!
  #13
New Member
 
Vaughan Thompson
Join Date: Mar 2023
Posts: 5
Rep Power: 3
vaughan is on a distinguished road
Many thanks Agi, the loss of parallel processing has really been bugging me and your suggestion worked a treat. Analyses are going through like lightning again now with 4 prosessors!

Thanks again.
vaughan is offline   Reply With Quote

Reply

Tags
mpi command not found, parallel, windows 10


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
sloshingTank3D6DoF failed to run in parallel phsieh2005 OpenFOAM Running, Solving & CFD 1 May 18, 2023 23:51
[snappyHexMesh] SnappyHexMesh Parallel run - face ordering problem DaveR OpenFOAM Meshing & Mesh Conversion 8 November 9, 2016 10:53
Run Mode:Platform MPI Local Parallel core problem mztcu CFX 0 October 13, 2016 03:14
[snappyHexMesh] Problem with parallel run of snappyHexMesh Lorenzo92 OpenFOAM Meshing & Mesh Conversion 5 April 15, 2016 04:12
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58


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