--- title: 'Intel Inspector' taxonomy: category: - docs external_links: process: true no_follow: true target: _blank mode: active --- [toc] ## Environment Settings{#enviroment} ### Software Version and System Requirements{#version} Version | System A | System B | System C ------------------------------------- | -------- | -------- | -------- Inspector XE 2021 (default) | ― | + | + Inspector XE 2020 | ― | + | + Inspector XE 2019 | ― | + | + Inspector XE 2018 | ― | + | + Key: + = Available for use, ― = Not available for use. ### Setting Up System{#modules} Version | Modulefile Name ------------------------- | ---------------- 2021 | iutils/xe2021 2020 | iutils/xe2020 2019 | iutils/xe2019 2018 | iutils/xe2018 In the [Intel compiler](/compilers/intel) environment, execute the module command as shown below. ```nohighlight $ module load iutils ``` For details on the module command, see [Modules](/config/modules). ## How to Use Intel Inspector{#usage} ### Intel Inspector Commands{#command} Commands | Purpose ------------ | ---------------------------------------------------------- inspxe-gui | Activates Intel Inspector GUI. inspxe-cl | Activates Intel Inspector command-line version. ### Options{#option} #### Options of the inspxe-cl command Options | Purpose -------------------------- | ----------------------------------------------------- -collect=_string_ | Specifies the analysis type. -app-working-dir=_string_ | Specifies the working directory. -r, -result-dir=_string_ | Specifies the directory in which to save the result. #### Specifiable Types of the -collect option of the inspxe-cl command. Types | Purpose ------ | ----------------------------------------------------------------- mi1 | Detects memory leaks. mi2 | Detects memory leaks and other memory problems. mi3 | Detects the location of memory leaks and other memory problems. ti1 | Detects deadlocks. ti2 | Detects deadlocks and data races. ti3 | Detects the location of deadlocks and data races. ## Examples{#sample} ### How to Use in GUI{#sample_gui} #### 1.Compiling When using Intel Inspector, compile with the debugging option **-g**. For details on compile options, please also refer to the webpage [here](http://software.intel.com/en-us/articles/compiler-settings-for-memory-error-analysis-in-intel-inspector-xe/) and [here](http://software.intel.com/en-us/articles/compiler-settings-for-threading-error-analysis-in-intel-inspector-xe/). ```nohighlight $ icc -g test.c ``` #### 2. Activating Intel Inspector In the [Exceed onDemand](/login/eod) , Intel Inspector is activated when executing the **inspxe-gui** command. For details of **xrun** , see [Interactive Processing](/run/interactive). ```nohighlight $ xrun inspxe-gui ``` ![](inspecrot01.png) #### 3. Creating projects. Select **File** > **New** > **Project**, the window below appears. Enter the appropriate **Project name**, then click **Create Project**. ![](inspector02.png) #### 4.Setting projects. The **Project Properties** window appears, specify the target program in the **Application** text box, then click **OK**. If an argument is required, specify it here. ![](inspector03.png) #### 5.Starting to inspect. The **Configure Analysis Type** window appears, select the target and then click **Start**. ![](inspecrot04.png) #### 6.Checking the inspection results. The inspection results are displayed. The example below indicates that one memory leak is detected. ![](inspecrot05.png) #### 7.Checking the result details. To view the result details like below, double-click the problem detected by inspection. ![](inspector06.png) ### How to Use in CUI{#sample_cui} #### 1.Compiling When using Intel Inspector, compile with the debugging option **-g**. For details on compile options, please also refer to the webpage [here](http://software.intel.com/en-us/articles/compiler-settings-for-memory-error-analysis-in-intel-inspector-xe/) and [here](http://software.intel.com/en-us/articles/compiler-settings-for-threading-error-analysis-in-intel-inspector-xe/). ```nohighlight $ icc -g test.c ``` #### 2.Starting to inspect. To use Intel Inspector CUI, use the **inspxe-cl** command. In this example, a working directory and a directory for outputting the results are specified before starting to inspect the location of memory leaks and other memory problems. For details of **tssrun** , see [Interactive Processing](/run/interactive). ```nohighlight $ tssrun inspxe-cl -collect=mi3 -app-working-dir=./work -r=./result $PWD/a.out Used suppression file(s): [] 1 new problem(s) found   1 Memory leak problem(s) detected ``` #### 3. Checking the results. If problems are detected, execute the **inspxe-gui** command to view the problem details with Intel Inspector GUI in the X-Windows(GUI) environment(e.g., [Exceed onDemand](/login/eod)). For details of **xrun** , see [Interactive Processing](/run/interactive). ```nohighlight $ xrun inspxe-gui ./result/result.inspxe ``` ![](inspector07.png) ## Manuals{#manual} <!-- * [IntelR Inspector XE 2011 Documentation](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Inspector_XE_2011/en/documentation_inspector_xe.htm) * [IntelR Inspector XE 2013 Documentation](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Inspector_XE_2013/en/documentation_inspector.htm) --> * [Intel Inspector XE 2016 Documentation](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Inspector_XE_2016/en/documentation_inspector.htm) * [Intel Inspector XE 2018 Help](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Inspector_XE_2018/index.htm) * [Intel Inspector XE 2019 User Guide](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/intel_parallel_studio_xe_2019_3/en/inspector/inspector_user_guide_linux_index.htm)