View Issue Details

IDProjectCategoryView StatusLast Update
0031763Open CASCADEOCCT:Foundation Classespublic2020-12-02 17:13
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031763: Foundation Classes - reporting of progress within parallel algorithms
DescriptionCurrent version of progress indicator tools supporting parallel algorithms developed within 0025748 cannot report properly progress within the scope which is executed by paralleled algorithm (and more generally - in the situation when range is not advanced immediately at the call of the method Next()).

The problem is that method Message_ProgressScope::Value() returns field myValue which is incremented when Next() is called. If actual progress advancement is deferred, this does not match actual state of the progress.

In parallel scenario scope gets fully discharged by instantiating array of Range objects before actual execution of the algorithm, so its method Value() will return Max(), which is incorrect.

Note that this problem was corrected in intermediate variant of the fix for 0025748 (see CR25748_4), but lost with changes conected with introduction of the Range class.
Steps To ReproduceSee log of test perf fclasses progr_par:

Draw[]> test perf fclasses progr_par -echo
...
Progress: 0%
Progress: 1% Parallel processing: 10000 / 10000
Progress: 2% Parallel processing: 10000 / 10000
...
Progress: 100% Parallel processing: 10000 / 10000
TagsNo tags attached.
Test case numberNot required

Relationships

child of 0025748 closedabv Foundation Classes - Parallel version of progress indicator 

Activities

git

2020-09-13 19:46

administrator   ~0094686

Branch CR31763 has been created by abv.

SHA-1: 97d29f31d7f0b5e277b96fb64600336777f31dc4


Detailed log of new commits:

Author: abv
Date: Sun Sep 13 19:48:30 2020 +0300

    0031763: Foundation Classes - reporting of progress within parallel algorithms
    
    Classes Message_ProgressRange and Message_ProgressScope are improved to store start point of the range.
    Method Message_ProgressScope::Value() is improved to compute the value in the current scope from the actual current value of the global progress.
    Description of Message_ProgressScope class is improved.

abv

2020-09-13 22:02

manager   ~0094688

The fix is provided in branch CR31763 and tested, see Jenkins job CR31763-abv. Please review

git

2020-09-14 07:55

administrator   ~0094690

Branch CR31763 has been updated forcibly by abv.

SHA-1: 3068e63eb1de640eda2b019bc70d53ef6b6237fa

git

2020-09-14 08:22

administrator   ~0094692

Branch CR31763 has been updated forcibly by abv.

SHA-1: 2989179d598c4d4d66c45e3dd639a796eb16478d

git

2020-09-14 11:17

administrator   ~0094702

Branch CR31763 has been updated forcibly by abv.

SHA-1: d7abc02ced510742486df8df27e40db28dc78cac

abv

2020-09-14 11:20

manager   ~0094704

The last variant of the commit (force-pushed) contain corrections in comments only

msv

2020-09-14 12:42

developer   ~0094712

+previous design (leading implementation mistakes).

leading to implementation mistakes

+Note however, that multi-threaded algorithm should pre-allocate per-thread
+progress ranges in advance to ensure thread-safety -

per-task progress ranges

+method More() of Message_ProgressScope should be used to know if the cancel event has come.

methods More() and UserBreak() of Message_ProgressScope or Message_ProgressRange should be used to know if the cancel event has come.

+ Message_ProgressRange (const Message_ProgressScope& theParent, Standard_Real theStart, Standard_Real theDelta)

wrap the line

+//! process (theTask.Data, aPS);

aPS.Next()

git

2020-09-14 13:20

administrator   ~0094715

Branch CR31763 has been updated forcibly by abv.

SHA-1: d29a46b0edec57f85d5ff6efee6a40913edcbf84

abv

2020-09-14 13:23

manager   ~0094716

The corrections are force-pushed in the same branch, please review

msv

2020-09-14 16:08

developer   ~0094748

Test results http://jenkins-test-12.nnov.opencascade.com/view/CR31763-abv/view/COMPARE/

msv

2020-09-14 16:09

developer   ~0094749

For integration:
occt - CR31763

bugmaster

2020-09-19 17:19

administrator   ~0095062

Combination -
OCCT branch : IR-2020-09-18
master SHA - b0b766826118f74b9857a932b8cec8c52a25c492
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-18 SHA - a6486d839da1ba1383ef6cc1a1a446a172f494c7
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: 17528.97000000011 / 17378.390000000145 [+0.87%]
Products
Total CPU difference: 12127.32000000009 / 12079.540000000095 [+0.40%]
Windows-64-VC14:
OCCT
Total CPU difference: 18862.703125 / 18898.921875 [-0.19%]
Products
Total CPU difference: 13314.828125 / 13329.21875 [-0.11%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-20 11:14

administrator   ~0095128

Branch CR31763 has been deleted by inv.

SHA-1: d29a46b0edec57f85d5ff6efee6a40913edcbf84

Related Changesets

occt: master 7a3e8aad

2020-09-13 16:48:30

abv


Committer: bugmaster Details Diff
0031763: Foundation Classes - reporting of progress within parallel algorithms

Classes Message_ProgressRange and Message_ProgressScope are improved to store start point of the range.
Method Message_ProgressScope::Value() is improved to compute the value in the current scope from the actual current value of the global progress.
Description of Message_ProgressScope class is improved.

Off-topic:
- method Message_ProgressScope::Relieve() is renamed to Close() for semantic consistency
- article in Upgrade Guide is revised and corrected
Affected Issues
0031763
mod - dox/dev_guides/upgrade/upgrade.md Diff File
mod - src/Draw/Draw_ProgressIndicator.cxx Diff File
mod - src/Message/Message_ProgressIndicator.hxx Diff File
mod - src/Message/Message_ProgressRange.hxx Diff File
mod - src/Message/Message_ProgressScope.hxx Diff File
mod - src/Message/Message_ProgressSentry.hxx Diff File
mod - src/QABugs/QABugs_11.cxx Diff File

Issue History

Date Modified Username Field Change
2020-09-13 08:46 abv New Issue
2020-09-13 08:46 abv Assigned To => abv
2020-09-13 08:46 abv Relationship added child of 0025748
2020-09-13 08:50 abv Description Updated
2020-09-13 19:46 git Note Added: 0094686
2020-09-13 22:02 abv Note Added: 0094688
2020-09-13 22:02 abv Assigned To abv => msv
2020-09-13 22:02 abv Status new => resolved
2020-09-14 07:55 git Note Added: 0094690
2020-09-14 08:22 git Note Added: 0094692
2020-09-14 11:17 git Note Added: 0094702
2020-09-14 11:20 abv Note Added: 0094704
2020-09-14 12:42 msv Note Added: 0094712
2020-09-14 12:43 msv Assigned To msv => abv
2020-09-14 12:43 msv Status resolved => assigned
2020-09-14 13:20 git Note Added: 0094715
2020-09-14 13:23 abv Note Added: 0094716
2020-09-14 13:23 abv Status assigned => resolved
2020-09-14 13:23 abv Assigned To abv => msv
2020-09-14 16:08 msv Note Added: 0094748
2020-09-14 16:09 msv Note Added: 0094749
2020-09-14 16:09 msv Assigned To msv => bugmaster
2020-09-14 16:09 msv Status resolved => reviewed
2020-09-19 15:38 bugmaster Test case number => Not required
2020-09-19 17:19 bugmaster Note Added: 0095062
2020-09-19 17:19 bugmaster Status reviewed => tested
2020-09-20 10:55 bugmaster Changeset attached => occt master 7a3e8aad
2020-09-20 10:55 bugmaster Status tested => verified
2020-09-20 10:55 bugmaster Resolution open => fixed
2020-09-20 11:14 git Note Added: 0095128
2020-12-02 16:43 emo Fixed in Version => 7.5.0
2020-12-02 17:13 emo Status verified => closed