- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have the following code:
#include <stdio.h>
int main() {
for (size_t i = 0; i < 100000; i++)
{
printf("%d ", i);
if(i == 10)
getchar();
}
}
When this app is built and profiled in Windows with Visual Studio IDE integration, clicking on the start button within VTune opens a console window where I am able to see the printing of the numbers including waiting for user input from the getchar(); command.
I am unable to get this similar functionality in Ubuntu. I open VTune profiler via running the following script in Ubuntu:
source "/opt/intel/oneapi/vtune/latest/env/vars.sh" && vtune-gui --project-path "/home/TryerGit/GoogleDrive/research_programming/debugtesting/VTune/vtune" --app-path "/home/TryerGit/GoogleDrive/research_programming/debugtesting/VTune/.vscode/dist/Release/GNU-Linux/linux"
After this, VTune app opens up but when the Start profiling button is pressed, where exactly can one interact with the executable? Where, for e.g., would the printf statements go and where can one press a character in response to getchar();?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Good day to you.
Thanks for posting in Intel Communities.
We were able to replicate the issue that you mentioned from our side. We are checking with the internal team to find a solution to this. Intel VTune used to print the output of the program directly to the terminal window from which GUI is loaded while profiling an application. This seems to be bug and we are working to get a possible fix. Thanks for reporting the same.
Alternatively as a workaround solution, we recommend using the VTune CLI to perform analysis of interactive applications rather than using the GUI for Linux. The results can later be opened inside VTune to view them. The steps to get the corresponding CLI command for any GUI equivalent configuration is given below:
- Open VTune GUI from the Linux terminal window by running the below commands:
source /opt/intel/oneapi/setvars.sh vtune-gui
- Configure the analysis like you typically do in the WHERE, WHAT and HOW sections.
- Once all analysis configurations are selected, instead of starting the analysis, click on the Command Line button (Refer attached screenshot) at the bottom of the GUI to get the equivalent CLI command. Copy the command by clicking the Copy button from the dialog box.
- Close Intel VTune Profiler GUI and run the copied command in the terminal window. The output of the application is printed directly to the terminal window and can accept user inputs and display output during the run.
- Once the analysis is done, the results will be generated.
- Then open VTune GUI again by running the vtune-gui command.
- Click the Open Results button (Refer attached screenshot) to navigate to the directory where the analysis results were generated and choose the *.vtune present in that directory to view the corresponding results in VTune GUI
Sorry for the inconvenience caused. We will get back to you with an update fix soon.
Do get back to us if you face any issues.
Thanks and Regards,
Jyothis V James
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Good day to you.
Thanks for posting in Intel Communities.
We were able to replicate the issue that you mentioned from our side. We are checking with the internal team to find a solution to this. Intel VTune used to print the output of the program directly to the terminal window from which GUI is loaded while profiling an application. This seems to be bug and we are working to get a possible fix. Thanks for reporting the same.
Alternatively as a workaround solution, we recommend using the VTune CLI to perform analysis of interactive applications rather than using the GUI for Linux. The results can later be opened inside VTune to view them. The steps to get the corresponding CLI command for any GUI equivalent configuration is given below:
- Open VTune GUI from the Linux terminal window by running the below commands:
source /opt/intel/oneapi/setvars.sh vtune-gui
- Configure the analysis like you typically do in the WHERE, WHAT and HOW sections.
- Once all analysis configurations are selected, instead of starting the analysis, click on the Command Line button (Refer attached screenshot) at the bottom of the GUI to get the equivalent CLI command. Copy the command by clicking the Copy button from the dialog box.
- Close Intel VTune Profiler GUI and run the copied command in the terminal window. The output of the application is printed directly to the terminal window and can accept user inputs and display output during the run.
- Once the analysis is done, the results will be generated.
- Then open VTune GUI again by running the vtune-gui command.
- Click the Open Results button (Refer attached screenshot) to navigate to the directory where the analysis results were generated and choose the *.vtune present in that directory to view the corresponding results in VTune GUI
Sorry for the inconvenience caused. We will get back to you with an update fix soon.
Do get back to us if you face any issues.
Thanks and Regards,
Jyothis V James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. Your suggestion works. Please do push a bug fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Good day to you.
Thanks for confirming the same.
We have escalated this issue to the development team, and they are working on a fix shortly. We will get back to you when it is fixed.
Thanks and Regards,
Jyothis V James

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page