View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026365 | Open CASCADE | OCCT:Foundation Classes | public | 2015-06-23 14:28 | 2021-05-29 13:12 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface | ||||
Description | Existing OCCT parallelization algorithm (without TBB) requires using many system resources (it creates a thread for every parallel process) and much time (time spent on thread creation sometimes is much more than time for execution this thread). It is not optimal and we need to recode this algorithm. | ||||
Steps To Reproduce | Not required | ||||
Additional information and documentation updates | 1. See OSD_Parallel class. Especially, OSD_Parallel::For(...) member. 2. After the fix, please change the following fragment of BRepLib_CheckCurveOnSurface::Compute(...) method: #ifdef HAVE_TBB OSD_Parallel::For(anIntervals.Lower(), anIntervals.Upper(), aComp); #else ... OSD_Parallel::For(anIntervals.Lower(), anIntervals.Upper(), aComp, Standard_True); #endif should be replaced with OSD_Parallel::For(anIntervals.Lower(), anIntervals.Upper(), aComp); | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
related to | 0026506 | closed | bugmaster | Open CASCADE | Change class BRepLib_CheckCurveOnSurface |
related to | 0028931 | closed | bugmaster | Open CASCADE | Eliminate dependency from TBB in OSD_Parallel header |
related to | 0028199 | assigned | dpasukhi | Open CASCADE | Foundation Classes - Add possibility to set number of threads for parallel execution |
related to | 0022146 | closed | Open CASCADE | Foundation Classes - Integration of OCC in-house parallelization tool | |
related to | 0029935 | closed | bugmaster | Open CASCADE | Foundation Classes - introduce OSD_ThreadPool class defining a thread pool |
related to | 0029059 | closed | bugmaster | Open CASCADE | Modeling Algorithms - It is necessary to have a unique way of checking of the validity of the edge and its 2D curves |
|
Dear Andrey, please include this task in planning. |
|
Branch CR26365 has been created by kgv. SHA-1: 1984a15e669e7f8567d13956ed65a71966b72809 Detailed log of new commits: Author: kgv Date: Thu Jan 10 16:35:25 2019 +0300 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface Removed workaround within GeomLib_CheckCurveOnSurface. |
|
The issue with threads re-creation has been handled within patch for 0029935. This bug describes the problem, but does not provide any reproducer nor numbers, so that it is difficult to check how parallelization affects performance in this particular case. Patch CR26365 removes HAVE_TBB check; through it is desired verifying performance - hints / test cases are welcome. |
|
Dear Nikolay, could you recommend the test cases to check performance of the considered code? |
|
Unfortunately I do not remember all problematic test cases. However, you can find the tests where following DRAW commands are used: "xdistef", "checkcurveonsurf". Additionally, this algorithm has already been implemented in "bopargcheck" algorithm and in FACE/FACE intersection algorithm called from Boolean operation. Please try to switch on Parallel mode option in corresponding test cases and check their performance. |
|
Actually, this algorithm works each time when intersection of 2 faces is performed inside PaveFiller. I.e., during each Boolean operation. So, any BO test can be impacted by this change if HAVE_TBB is not defined. There is another simple way to call this code from Draw, it is to run the command: checkcurveonsurf shape It will call this code for each pcurve of the shape. I have another concern about this patch. 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(). I propose to include this change in the current patch. |
|
My proposed above change can be done later in scope of another bug, e.g. linked 0028199. And the current patch is worth to be integrated as is. |
|
For simplicity, please just run the standard tests to check the patch if there is no regressions in no HAVE_TBB mode. |
|
Branch CR26365_1 has been created by kgv. SHA-1: 35785ecaa27eee8a7e7a9b1cc466bf6fa4132655 Detailed log of new commits: Author: kgv Date: Thu Jan 10 16:35:25 2019 +0300 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface Removed workaround within GeomLib_CheckCurveOnSurface. |
|
Dear Kirill, please rebase the patch and test it. |
|
Branch CR26365_2 has been created by kgv. SHA-1: 91c69af4983d19e5403a33c60984135c38b61ce8 Detailed log of new commits: Author: kgv Date: Thu Jan 10 16:35:25 2019 +0300 0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface Removed workaround within GeomLib_CheckCurveOnSurface. |
|
Rebased patch has been pushed - OCCT: branch CR26365_2. http://jenkins-test-occt/view/CR26365_2-master-KGV/ (de/step_4/G6 is unstable on Jenkins within this week) |
|
Please raise CR26365_2 into occt. |
|
Combination - OCCT branch : IR-2021-05-28 master SHA - 2315a044240803013da63dd2f5209c739ab03727 a87b7ddc8cb44606b91e3f37113847c3f5f50fdc Products branch : IR-2021-05-28 SHA - 2131ac830b9e3c707d427f2aac9c50dcfa5c74db was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 17574.5700000004 / 17867.41000000037 [-1.64%] Products Total CPU difference: 11533.700000000124 / 11535.680000000108 [-0.02%] Windows-64-VC14: OCCT Total CPU difference: 19393.5625 / 19367.75 [+0.13%] Products Total CPU difference: 12891.8125 / 12920.9375 [-0.23%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR26365 has been deleted by mnt. SHA-1: 1984a15e669e7f8567d13956ed65a71966b72809 |
|
Branch CR26365_1 has been deleted by mnt. SHA-1: 35785ecaa27eee8a7e7a9b1cc466bf6fa4132655 |
|
Branch CR26365_2 has been deleted by mnt. SHA-1: 91c69af4983d19e5403a33c60984135c38b61ce8 |
occt: master 3738565a 2019-01-10 13:35:25 Committer: bugmaster Details Diff |
0026365: Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface Removed workaround within GeomLib_CheckCurveOnSurface. |
Affected Issues 0026365 |
|
mod - src/BOPAlgo/BOPAlgo_CheckerSI.cxx | Diff File | ||
mod - src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | Diff File | ||
mod - src/BOPTest/BOPTest_BOPCommands.cxx | Diff File | ||
mod - src/GeomLib/GeomLib_CheckCurveOnSurface.cxx | Diff File | ||
mod - src/IntTools/IntTools_FaceFace.cxx | Diff File | ||
mod - src/IntTools/IntTools_FaceFace.hxx | Diff File | ||
mod - src/IntTools/IntTools_Tools.cxx | Diff File | ||
mod - src/IntTools/IntTools_Tools.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-23 14:28 |
|
New Issue | |
2015-06-23 14:28 |
|
Assigned To | => msv |
2015-06-23 15:41 |
|
Note Added: 0042363 | |
2015-06-23 15:41 |
|
Assigned To | msv => abv |
2015-07-31 16:02 |
|
Relationship added | related to 0026506 |
2016-11-03 17:07 |
|
Target Version | 7.1.0 => 7.2.0 |
2017-04-15 18:10 | kgv | Relationship added | related to 0028657 |
2017-04-15 18:48 | kgv | Relationship deleted | related to 0028657 |
2017-07-20 12:34 | kgv | Relationship added | related to 0028199 |
2017-07-20 12:37 | kgv | Relationship added | related to 0022146 |
2017-07-26 16:41 |
|
Target Version | 7.2.0 => 7.4.0 |
2017-08-11 13:05 |
|
Test case number | => Not required |
2017-08-11 13:07 | oan | Relationship added | related to 0028931 |
2018-07-07 02:32 | kgv | Relationship added | related to 0029935 |
2019-01-10 16:38 | kgv | Summary | Optimization of work of OSD_Parallel class members => Optimization of work of OSD_Parallel class members for GeomLib_CheckCurveOnSurface |
2019-01-10 16:39 | git | Note Added: 0081722 | |
2019-01-10 20:44 | kgv | Note Added: 0081733 | |
2019-01-10 20:44 | kgv | Assigned To | abv => msv |
2019-01-10 20:44 | kgv | Status | new => feedback |
2019-01-11 09:31 |
|
Assigned To | msv => nbv |
2019-01-11 09:32 |
|
Note Added: 0081743 | |
2019-01-11 10:04 |
|
Assigned To | nbv => msv |
2019-01-11 10:11 |
|
Note Added: 0081744 | |
2019-01-11 10:48 |
|
Note Added: 0081749 | |
2019-01-11 10:48 |
|
Note Edited: 0081749 | |
2019-01-11 10:53 |
|
Note Edited: 0081744 | |
2019-01-11 11:10 |
|
Note Added: 0081750 | |
2019-01-11 11:14 |
|
Note Added: 0081752 | |
2019-01-11 11:14 |
|
Assigned To | msv => kgv |
2019-01-11 11:14 |
|
Status | feedback => assigned |
2019-04-02 12:39 | git | Note Added: 0083357 | |
2019-08-13 12:04 | kgv | Target Version | 7.4.0 => 7.5.0 |
2020-09-11 16:13 |
|
Target Version | 7.5.0 => 7.6.0 |
2021-04-21 17:17 |
|
Relationship added | related to 0029059 |
2021-05-25 20:40 |
|
Note Added: 0101367 | |
2021-05-26 15:48 | git | Note Added: 0101395 | |
2021-05-26 17:34 | kgv | Note Added: 0101402 | |
2021-05-26 17:34 | kgv | Assigned To | kgv => msv |
2021-05-26 17:34 | kgv | Status | assigned => resolved |
2021-05-26 17:35 | kgv | Note Edited: 0101402 | |
2021-05-26 18:35 |
|
Note Added: 0101407 | |
2021-05-26 18:35 |
|
Assigned To | msv => bugmaster |
2021-05-26 18:35 |
|
Status | resolved => reviewed |
2021-05-29 12:02 | bugmaster | Note Added: 0101473 | |
2021-05-29 12:02 | bugmaster | Status | reviewed => tested |
2021-05-29 12:12 | bugmaster | Changeset attached | => occt master 3738565a |
2021-05-29 12:12 | bugmaster | Status | tested => verified |
2021-05-29 12:12 | bugmaster | Resolution | open => fixed |
2021-05-29 13:12 | git | Note Added: 0101484 | |
2021-05-29 13:12 | git | Note Added: 0101485 | |
2021-05-29 13:12 | git | Note Added: 0101486 |