OCCT7 +TBB
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
OCCT7 +TBB
OCCT7 advertises better multi-threading support. I've been able to compile OCCT7 with TBB support on Win VS2013, and then link FreeCAD against it.
Can we devise a test to see if it's worth it?
Related threads.
viewtopic.php?f=22&t=17042#p134845
viewtopic.php?f=4&t=17501&start=80#p142368
Thanks in advance.
Can we devise a test to see if it's worth it?
Related threads.
viewtopic.php?f=22&t=17042#p134845
viewtopic.php?f=4&t=17501&start=80#p142368
Thanks in advance.
"fight the good fight"
- wandererfan
- Veteran
- Posts: 6321
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: OCCT7 +TBB
These files from: https://github.com/WandererFan/FCDraw2T ... anceIssues spend 10-20 seconds per item in the HLR routines and the timing results are already in the log output.sgrogan wrote:Can we devise a test to see if it's worth it?
BellowsSaveProjGroup.fcstd
Log: TIMING - ProjItem GO spent: 12805.528 millisecs in HLRBRep_Algo & co
Log: TIMING - ProjItem001 GO spent: 12420.271 millisecs in HLRBRep_Algo & co
Log: TIMING - ProjItem002 GO spent: 12682.243 millisecs in HLRBRep_Algo & co
Bellows_FC017_normandc2.fcstd
Log: TIMING - ProjItem GO spent: 8430.903 millisecs in HLRBRep_Algo & co
Log: TIMING - ProjItem001 GO spent: 18968.696 millisecs in HLRBRep_Algo & co
If HLR uses multithreading they might be useful.
wf
EDIT: fixed url
Re: OCCT7 +TBB
wandererfan wrote:If HLR uses multithreading they might be useful.
Thanks guys, maybe a little more help is necessarytriplus wrote:Here is one test you can try out:
From DeepSOIC:
"The changes are required, but are minimal (I think). Just need to add "mkFuse.setRunParallel(true);".
From gkv311:
"Intel TBB, optional for several modules.
It is NOT mandatory for activating parallel algorithms in OCCT,
but can be more efficient for this task then built-in OCCT parallelization routines (OSD_Parallel)."
Is there a similar change for HLR?
I think triplus example will test mkFuse if I can find where to appy DeepSoic's change.
"fight the good fight"
Re: OCCT7 +TBB
Well you can always do the test yourself. Set the number of rows/cols to lets say 200 and after run the macro:
viewtopic.php?t=6197&start=40#p91404
To see if you get intense multi-threading phase (likely meshing) or not when you compare OCCT7 +TBB to just using OCCT7.
And at the bottom of that debate there is a table showing the results. Therefore we would need C++ developer that would add such support to FreeCAD. I am guessing wherever we use:
We would need to enable parallel mode explicitly. Or better it would be used based on the user made setting.
viewtopic.php?t=6197&start=40#p91404
To see if you get intense multi-threading phase (likely meshing) or not when you compare OCCT7 +TBB to just using OCCT7.
AFAIK no (ATM).Is there a similar change for HLR?
For boolean operations indeed this would be needed:Just need to add "mkFuse.setRunParallel(true);"
https://dev.opencascade.org/index.php?q ... omment-641So, for every usage of BRepAlgoAPI you have to explicitly set the parallel mode via BRepAlgoAPI_Algo::SetRunParallel().
And at the bottom of that debate there is a table showing the results. Therefore we would need C++ developer that would add such support to FreeCAD. I am guessing wherever we use:
Code: Select all
BRepAlgoAPI_Cut
BRepAlgoAPI_Fuse
BRepAlgoAPI_Common
BRepAlgoAPI_Section
Re: OCCT7 +TBB
I have created a feature request:
issue #002750
There isn't that much places where we use:
Therefore likely one of the core devs will know on how to tackle this. That is where to apply SetRunParallel() if it really is that simple.
P.S. And by doing that to give us some parallel BOA operations in the FreeCAD!
I guess i should have looked for similar feature requests as it was already reported in the past:
issue #002334
Well at least now we know for sure what is the current situation. Meshing (run the above macro for tests): Yes if OCC/OCE + TBB or maybe OCE + OpenMP is used. BOA: No (not due to the lack of such capability in OCC/OCE instead FreeCAD needs to enable such support).
issue #002750
There isn't that much places where we use:
Code: Select all
BRepAlgoAPI_Cut
BRepAlgoAPI_Fuse
BRepAlgoAPI_Common
BRepAlgoAPI_Section
P.S. And by doing that to give us some parallel BOA operations in the FreeCAD!
I guess i should have looked for similar feature requests as it was already reported in the past:
issue #002334
Well at least now we know for sure what is the current situation. Meshing (run the above macro for tests): Yes if OCC/OCE + TBB or maybe OCE + OpenMP is used. BOA: No (not due to the lack of such capability in OCC/OCE instead FreeCAD needs to enable such support).
Re: OCCT7 +TBB
As a side note, the FreeCAD 0.17 macOS / OS X builds are built with OCCT7 TBB support.sgrogan wrote:OCCT7 advertises better multi-threading support. I've been able to compile OCCT7 with TBB support on Win VS2013, and then link FreeCAD against it.
Can we devise a test to see if it's worth it?
Related threads.
viewtopic.php?f=22&t=17042#p134845
viewtopic.php?f=4&t=17501&start=80#p142368
Thanks in advance.
- wandererfan
- Veteran
- Posts: 6321
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: OCCT7 +TBB
No idea. I'll look into it.sgrogan wrote:Is there a similar change for HLR?
Re: OCCT7 +TBB
I think i figured out where to apply .setRunParallel(true) for Part and PartDesign BOA operations (using FreeCAD 0.17 + OCC 7 + TBB).
I first focused on Part BOA operations. I made some Part geometry and tried to apply BOA operations on it. It doesn't look like there is any multithreading going on in the process.
I first focused on Part BOA operations. I made some Part geometry and tried to apply BOA operations on it. It doesn't look like there is any multithreading going on in the process.
Re: OCCT7 +TBB
First results. I started focusing on bigger number of geometry involved in single boolean operation. Part Sphere was used in Draft Array. Using Fuse property (Part Fuse) started to make a difference:
PC with 2 core CPU
FreeCAD 0.17 + OCC 7 + TBB
Fuse Draft Array of Spheres (2 x 10)
RunParallel True:
PC with 2 core CPU
FreeCAD 0.17 + OCC 7 + TBB
Fuse Draft Array of Spheres (2 x 10)
RunParallel True:
- 47s
- 1min 23s