Changes

Jump to: navigation, search

GPU621/Intel Parallel Studio Inspector.

47 bytes added, 00:10, 9 December 2021
no edit summary
= Project Overview =
 
 
This project was created to provide detailed documentation on Intel Parallel Studio Inspector, how it works, and demonstrate key features that will help reduce write parallel
= '''Intel Parallel Studio Inspector''' =
 
Intel Parallel Studio Inspector is a dynamic tool that helps users detect memory and threading errors in their serial and multithreaded applications. Intel Inspector is available on Windows and Linux operating systems and works with C, C++, C#, and Fortran programming languages. For this project, we will be using Visual Studio 2019 with Inspector.
 
[[File:WorkFlow.png|500px]]
[https://hpc.llnl.gov/software/development-environment-software/intel-inspector Intel Inspector Work Flow]
 
Visit this site for more information on how to install Intel Inspector: https://www.intel.com/content/www/us/en/developer/tools/oneapi/inspector.html#gs.i68l9p
Tools > Intel Inspector > New Analysis
 
[[File:New_Analysis.jpg|950px]]
An Intel Inspector window will pop up, with different features. At the top, Intel Inspector lists 3 different types of analysis levels that can be selected.
 
[[File:Analyszation_Levels.jpg|950px]]
 ==='''Detect Leaks'''<br>=== 
The least thorough and intensive analysis. This setting reduces the stress on the system and cuts the resources and time to perform the analysis. As a result, this will produce a much faster analysis but will find a limited set of errors and provide fewer details
==='''Detect Memory Problems'''<br>=== 
This setting indicates a medium-scope memory error analysis. It will increase time, resources, and load on the system when performing the analysis. This is a deeper level of analysis to find memory issues but is slightly slower.
==='''Locate Memory Problems'''<br>=== 
This maximizes the scope of the memory analysis. Using this setting will also maximize the time, resources, and load on the system to perform the analysis. This will detect an extensive range of memory issues, display the context of the problem and the highest degree of information available.
== Memory Analysis Options == 
Below are explanations of some important memory analysis options that a user may consider selecting:
 
'''Detect resource leaks''' – detect if a GDI object is not deleted, or a kernel object is not closed. Useful for Windows GUI Applications
To start a memory analysis, the left-field must be set as “Memory Error Analysis”. After the desired options are checked, the user can click the “start” button located on the right-hand side to begin the analysis.
 
[[File:Start_Analysis.jpg|950px]]
Intel Parallel Studio can help users detect a variety of threading errors such as data race conditions, deadlocks, lock hierarchy violations, and cross-thread stack access errors. These threading errors are usually non-deterministic and can be hard to reproduce.
==='''Race Condition'''===
Intel Inspector can be used to detect race conditions in programs. The following code is an example of race conditions occurring. In it, 5 threads are created to increment the value of an object several times. A race condition occurs when the threads race for the same data, therefore the value will be inconsistent and output different results. Normally in a data race, it becomes hard to locate data manually but with the help of Intel Inspector, it is much faster.
 
[[File:RaceConditions.jpg|400px]]
Using Intel Inspector we can see where the race condition occurs in the code
 
[[File:RaceCondition_Inspector.jpg|800px]]
''Indicating where the data race occurs''
 ==='''Deadlock'''===
Deadlocks can potentially happen when dealing with multi-threads. When 2 threads or more are stuck waiting for each other and trying to access the recourse but are being locked by the previous threads. In case of a deadlock, the program may run fine on the first try but the lock will eventually come up and crash the program. The following program will demonstrate deadlock occurring. The code involves resources protected by mutex locks. Their orders are m1->m2 or m2->m1. In some cases, 2 threads may cause a deadlock when they are waiting for a mutex owned by the other.
 
[[File:Deadlock_Code.jpg|600px]]
Using Intel Inspector, we can also detect deadlocks in the program
 
[[File:Deadlock_Inspector.jpg|750px]]
61
edits

Navigation menu