Collecting Result Data from the Command Line
Getting Started with Analysis on the Command Line
- Set up your command line environment. See the following Process Example section for details.
- Invoke thecommand with theinspxe-clcollectaction, specifying one of the lower-level memory error analysis types to inspect your application for memory issues.
- Next, use thecollectaction with one of the threading error analysis types to inspect your application for threading issues.
- After each analysis, you can read the Summary report, and then open your result for viewing in the GUI, or use thereportaction to generate a report from the analysis result.
- Collections that use lower-level analysis types take less time to complete than collections that use higher-level analysis types, and provide more of an overview, which are two reasons why you generally want to begin testing with the lowest-level analysis types.
- To duplicate an analysis performed in theIntel InspectorGUI: Use theCommand Linebutton on theAnalysis Typewindow panes to copy the exact command to the clipboard.
How the Collection Process Works
- Performs the specified type of analysis.
- Collects data and writes it to a result file in a result directory.
- Finalizes the result and generates a summary of all detected problems, writes the Summary tostdoutand also saves it to an XML file in the result directory.
- Creates a log for troubleshooting purposes, and saves it in the result directory.
- Returns an exit code.
How to Perform Analysis on the Command Line
- You can open a command prompt window and use the following command to run the script that establishesIntel Inspectorenvironment settings:<install-dir>\inspxe-vars.bat.ForIntel® oneAPI HPC ToolkitorIntel® oneAPI IoT Toolkitinstallations, the script is namedrather than inspxe-vars.env\vars
- To inspect themyAppapplication for memory leak problems, use thecollectaction with themi1(Detect Leaks) analysis type, and specify the search directory where all the source, binary and symbol files are stored.-collect mi1 -search-dir all=inspxe-clC:\myProject-- myAppBy default, the result is written to a result directory under the default current working directory. Assuming this is the first result directory, it will be namedr000mi1. A Summary is sent tostdout, and saved in the result directory asinspxe-cl.xml.If you do not supply an absolute pathname for the application, system path environment settings are used to locate it.
- Next, inspect themyAppapplication for deadlock and data races, using thecollectaction with theti2(Detect Deadlocks and Data Races) analysis type, and specify the same search directories that you used for the memory analysis.inspxe-cl-collect ti2 -search-dir all=C:\myProject-- myAppBy default, the result is written to a result directory under the current working directory. Assuming this is the first result directory, it will be namedr000ti2. The summary is sent tostdout, and saved in ther000ti2result directory asinspxe-cl.xml.
- Review the Summary of detected problems in each of theinspxe-cl.xmlfiles.
- If one of the summaries contains anything other than 0 new problems, you can enterinspxe-guito launch the result in the standalone GUI so you can view details and have easy access to your code editor and other tools. You can also use thereportaction to generate a report.