Menu

#724 Resolve threading issue within random number generators

v1.1.x
fixed
internal (109)
v1.1.4
Bug Fix
2022-09-18
2022-08-08
Erik Hänel
No

The crash might been resolved, but the race condition pervails. Resolve the race condition by generating an array of random number generators based upon the number of available OMP threads (omp_get_max_threads()). Then change the access to the generator to use the generator fitting for the current OMP thread (omp_get_thread_num()).

Analysis:

The description of the issue contains all necessary information to resolve the problem.

Implementation:

  • Implementation: Fixed as proposed by the description.
  • Revision: [r1202]
  • Implementation test: Random numbers were obtained in single- and in multithreading context.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [ ] corresponding language files updated
    • [x] not needed

Tests:

Added an expression to the automatic SW tests, where the access was done via OMP. No deviation detected.

Related

Commit: [r1202]
Tickets: #707
Tickets: #711

Discussion

  • Erik Hänel

    Erik Hänel - 2022-08-12
    • labels: --> internal
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-08-12
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     The crash might been resolved, but the race condition pervails. Resolve the race condition by generating an array of random number generators based upon the number of available OMP threads (`omp_get_max_threads()`). Then change the access to the generator to use the generator fitting for the current OMP thread (`omp_get_thread_num()`).
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2022-08-12
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     The crash might been resolved, but the race condition pervails. Resolve the race condition by generating an array of random number generators based upon the number of available OMP threads (`omp_get_max_threads()`). Then change the access to the generator to use the generator fitting for the current OMP thread (`omp_get_thread_num()`).
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +The description of the issue contains all necessary information to resolve the problem.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2022-08-12
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,20 +4,20 @@
     The description of the issue contains all necessary information to resolve the problem.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Fixed as proposed by the description.
    +* Revision: [r1202]
    +* Implementation test: Random numbers were obtained in single- and in multithreading context.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
         * [ ] corresponding language files updated
    -    * [ ] not needed
    +    * [x] not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r1202]

  • Erik Hänel

    Erik Hänel - 2022-09-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
    
         * [x] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Added an expression to the automatic SW tests, where the access was done via OMP. No deviation detected.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB