MantisBT - Open CASCADE
View Issue Details
0028199Open CASCADE[OCCT] OCCT:Foundation Classespublic2016-12-07 09:472021-09-09 22:39
[OCCT] 7.1.0 
[OCCT] 7.7.0 
0028199: Add possibility to set number of threads for parallel execution
Nowadays OCCT library contains set of algorithms with parallel sections. Now it is possible to turn on parallel mode and not possible to set number of threads.
No tags attached.
related to 0026365verified bugmaster Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface 
parent of 0030573closed apn OSD_Parallel_TBB: limit number of execution threads using settings of OSD_ThreadPool::DefaultPool() 
related to 0029935closed bugmaster Foundation Classes - introduce OSD_ThreadPool class defining a thread pool 
Issue History
2016-12-07 09:47amlNew Issue
2016-12-07 09:47amlAssigned To => abv
2016-12-07 10:10kgvSeverityminor => feature
2017-01-18 17:32abvAssigned Toabv => ski
2017-01-18 17:32abvStatusnew => assigned
2017-07-20 12:31kgvTarget Version7.2.0 => 7.4.0
2017-07-20 12:34kgvRelationship addedrelated to 0026365
2018-07-07 02:32kgvRelationship addedrelated to 0029935
2019-01-10 16:28kgvNote Added: 0081719
2019-01-10 16:29kgvNote Edited: 0081719bug_revision_view_page.php?bugnote_id=81719#r20531
2019-01-11 11:12msvNote Added: 0081751
2019-03-25 14:23kgvRelationship addedparent of 0030573
2019-07-10 19:27abvTarget Version7.4.0 => 7.5.0
2020-09-11 15:34utverdovTarget Version7.5.0 => 7.6.0*
2020-09-11 15:44kgvTarget Version7.6.0* => 7.5.0
2020-09-22 18:46szyTarget Version7.5.0 => 7.6.0*
2021-09-09 22:39kgvAssigned Toski =>
2021-09-09 22:39kgvCategoryOCCT:Coding => OCCT:Foundation Classes
2021-09-09 22:39kgvTarget Version7.6.0* => 7.7.0

2019-01-10 16:28   
(edited on: 2019-01-10 16:29)
Since OSD_ThreadPool introduction by 0029935 it is now possible specifying number of threads within OSD_ThreadPool::Launcher constructor (to specify lower amount of threads from pool) and within OSD_ThreadPool constructor / OSD_ThreadPool::Init() to specify amount of threads in pool.

This does not affect properties of TBB pool, when it is used instead of OSD pool.

2019-01-11 11:12   
Just an idea to consider may be during this patch preparation. BO has the option IsParallel. If the user does not set it to true he expects all the code will run in one thread. But the code of GeomLib_CheckCurveOnSurface is always called in multi-thread mode (the argument of Perform() method isTheMultyTheradDisabled = Standard_False).

So, in order to make consistent behavior of the code regarding the flag myRunParallel of BO, it is needed to pass this flag through the chain of calls BOPAlgo_PaveFiller::PerformFF() -> IntTools_FaceFace -> IntTools_Tools::ComputeTolerance() -> GeomLib_CheckCurveOnSurface::Perform().