Can’t parallel the solver

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Maxim Gryaznov
Posts: 5
Joined: Tue Dec 11, 2018 2:51 pm

Can’t parallel the solver

Post by Maxim Gryaznov »

Hi, CfdOF / CFD members!

I want to run simulations on several cores. So, i write in Solver:
Parallel = true
Parallel cores = 4.


Then i press “Write OpenFOAM case”. When it completes, i press “Run Solver”. After about 30 seconds, it exits with an error:
ERROR: Failed to post close command error 1726
ERROR: unable to tear down the job tree. exiting...


— there are the same two lines in log.simpleFoam only.

Status window:
0.0: Checking dependencies...
0.0: OpenFOAM case writer is called
3.8: Write OpenFOAM case is completed
0.2: Starting solver command:
0.2: C:\BLUECF~1\OPENFO~1.X\..\msys64\usr\bin\bash --login -O expand_aliases -c cd "/c/tselli/FreeCAD CFDOF/Cube/case" && ./Allrun
0.3: Solver started
36.3: Simulation exited with error


Report window:
ERROR: Failed to post close command error 1726
ERROR: unable to tear down the job tree. exiting...

Last lines in Python window:
>>> FreeCAD.getDocument("Cube").getObject("OpenFOAM").Parallel = True
>>> FreeCAD.getDocument("Cube").getObject("OpenFOAM").ParallelCores = 4

report & python.png
report & python.png (201.64 KiB) Viewed 4992 times

If i don’t run parallel, it works ok. So, what should i do to run the parallel solver?

P. S. Before FreeCAD/BlueCFD/CfdOF i made parallel simulations in STAR CCM+: 4 cores worked great.

___
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Russian/RussianFederation (ru_RU)
Last edited by Maxim Gryaznov on Sat Dec 15, 2018 3:37 pm, edited 2 times in total.
✌️ Maxim Gryaznov
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Can’t parallel the solver

Post by thschrader »

Hi Maxim,
welcome to the FreeCAD-forum.
Can you post your FreeCAD-file?
It is easier to have a concrete problem than to guess a solution.
Thomas
Maxim Gryaznov
Posts: 5
Joined: Tue Dec 11, 2018 2:51 pm

Re: Can’t parallel the solver

Post by Maxim Gryaznov »

thschrader wrote: Tue Dec 11, 2018 5:14 pm Can you post your FreeCAD-file?
It is easier to have a concrete problem than to guess a solution.
Thomas
Thanks for your quick response, Thomas!

There is a working directory with FCStd files and cases. Hope, it’s enough:
https://drive.google.com/file/d/1OYLtXi ... sp=sharing
✌️ Maxim Gryaznov
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Can’t parallel the solver

Post by thschrader »

Hi Maxim,
I have no problem to run your file. But I get strange results.
When running a laminar case, it "works".
Thomas
cpu_load.JPG
cpu_load.JPG (80.83 KiB) Viewed 5085 times
your_case_turbulent.JPG
your_case_turbulent.JPG (31.59 KiB) Viewed 5085 times
cube_laminar.JPG
cube_laminar.JPG (28.12 KiB) Viewed 5085 times
Maxim Gryaznov
Posts: 5
Joined: Tue Dec 11, 2018 2:51 pm

Re: Can’t parallel the solver

Post by Maxim Gryaznov »

Thank you Thomas!

thschrader wrote: Wed Dec 12, 2018 11:31 am But I get strange results.
When running a laminar case, it "works".
Thomas
It’s strange: i got the second picture with the turbulent case.

Turbulent.PNG
Turbulent.PNG (141.44 KiB) Viewed 5077 times

Did you make any setups on your computer before running parallel calculations? Maybe i should make something to allow OpenFOAM to make parallel runs?
✌️ Maxim Gryaznov
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Can’t parallel the solver

Post by oliveroxtoby »

Maxim Gryaznov wrote: Wed Dec 12, 2018 12:01 pm Did you make any setups on your computer before running parallel calculations? Maybe i should make something to allow OpenFOAM to make parallel runs?
My guess would be that there is a problem with your installation of MPI. Try re-installing blueCFD-Core, and make sure to install the MSMPI library (it is installed by default).

If that doesn't work please take a look at https://forum.freecadweb.org/viewtopic.php?f=37&t=27055 and follow the instrucitons - there may be some output that would give a clue.
Please provide all the information requested in this post before reporting problems with CfdOF.
Maxim Gryaznov
Posts: 5
Joined: Tue Dec 11, 2018 2:51 pm

Re: Can’t parallel the solver

Post by Maxim Gryaznov »

oliveroxtoby wrote: Wed Dec 12, 2018 1:00 pm My guess would be that there is a problem with your installation of MPI. Try re-installing blueCFD-Core, and make sure to install the MSMPI library (it is installed by default).

If that doesn't work please take a look at https://forum.freecadweb.org/viewtopic.php?f=37&t=27055 and follow the instrucitons - there may be some output that would give a clue.
Oliveroxtoby!

Sorry for the late reply. I reinstalled blueCFD-Core and MPI: now i have 7.1.12437.25 version. It was in an installation tutorial (http://bluecfd.github.io/Core/UserGuide/). Unfortunately, i have the same error.
✌️ Maxim Gryaznov
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Can’t parallel the solver

Post by oliveroxtoby »

Maxim Gryaznov wrote: Sat Dec 15, 2018 3:37 pm
oliveroxtoby wrote: Wed Dec 12, 2018 1:00 pm If that doesn't work please take a look at https://forum.freecadweb.org/viewtopic.php?f=37&t=27055 and follow the instrucitons - there may be some output that would give a clue.
Apologies - I didn't notice that you had attached a screenshot the first time.

Some googling suggests this is some sort of an issue with MS MPI. I can only suggest you try installing the latest one in place of the version that came with blue CFD - https://docs.microsoft.com/en-us/messag ... rosoft-mpi.

Good luck!
Please provide all the information requested in this post before reporting problems with CfdOF.
Maxim Gryaznov
Posts: 5
Joined: Tue Dec 11, 2018 2:51 pm

Re: Can’t parallel the solver

Post by Maxim Gryaznov »

Hey, oliveroxtoby!
oliveroxtoby wrote: Sat Dec 15, 2018 7:56 pm Apologies - I didn't notice that you had attached a screenshot the first time.
No, that’s my bad: i uploaded the screenshot after your message — i didn’t say, that i updated my post. I’m sorry.

oliveroxtoby wrote: Sat Dec 15, 2018 7:56 pm Some googling suggests this is some sort of an issue with MS MPI. I can only suggest you try installing the latest one in place of the version that came with blue CFD - https://docs.microsoft.com/en-us/messag ... rosoft-mpi.
I tried three versions:
1. 8.1.many-numbers-after when i created this topic
2. 7.1.12437.25 after your suggestion about reinstallation blue-core
3. 10.0.12498.5 after your last message.

Unfortunately, they didn’t solve my issue.
✌️ Maxim Gryaznov
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Can’t parallel the solver

Post by thschrader »

Maxim Gryaznov wrote: Sat Dec 15, 2018 9:20 pm Unfortunately, they didn’t solve my issue.
There is a video from Bruno Santos how to install bluecfd.
Goto 2:30. The MS-MPI installer given with bluecfd should overwrite an existing MPI.
But sometimes this does not work (on my machine). So be sure to uninstall all
existing MPI (reboot system) before installing bluecfd.
About computing forces in paraview please see pics.
https://www.youtube.com/watch?v=nl7er2t-TnU
cell_normals.JPG
cell_normals.JPG (68.84 KiB) Viewed 4931 times
calculator.JPG
calculator.JPG (76.14 KiB) Viewed 4931 times
force.JPG
force.JPG (157.69 KiB) Viewed 4931 times
Post Reply