Changes

Jump to: navigation, search

GPU621/Code

1,474 bytes added, 00:26, 28 November 2018
Intel® Advisor
[[File:No_lock.png|900px]]
 
 
'''1 -''' It displays the selected loop or function for Annotation and tells us the number of errors it contains.
 
'''2 -''' Here is a very important window since it tells us in detail all the errors that needs to be fixed.
 
'''3 -''' In this case I selected the P6 error and it tells me in which function it is in and the specific variable affected.
 
 
==='''Fixing the problem'''===
We have Identified that there are several problems from the Check Dependencies report lets try to fix one of them.
 
From the "Dependecies Report - Problem and Messages" Window. right-click any data row and choose Edit Source to open the source file. It will bring you directly to the code of the selected problem.
 
In my case I selected the previously selected error P6 and the error is because multiple tasks may try and increment nrOfSolutions at the same time. So by adding Lock into it can avoid the multiple access to the variable making it one by one with the following way.
 
 
[[File:Lock.png|300px]]
 
 
After adding the lock, we build the solution again and re run the 2 analysis following the previous steps. This time we can notice that our Check Dependencies Report has changed
 
 
[[File:Refined.png|800px]]
 
 
The previous error has disappeared. Notice that previously there were 2 errors in RAW and now there is just one. We can also verify from the "Dependecies Report - Problem and Messages" Window that the previous problem is not there anymore which means it has been fixed.
24
edits

Navigation menu