Community
cancel
Showing results for 
Search instead for 
Did you mean: 
chiari__mario
Beginner
206 Views

How do I pass data on my app within VTune

Jump to solution

Hi

I have developed a simple piece of code, and launch it by

>>  cat input.txt | ./code

Question is: how do I simulate that within vTune?
(to pass input.txt within the Application Parameters  field does not seem to work)

thanks, mario

 

0 Kudos
1 Solution
Jeffrey_R_Intel1
Employee
206 Views

Hi Mario,

The cleanest solution to your configuration would be to modify your program to read input from a file rather than stdin, since you are already re-directing input from the file.

If your program must read from stdin, you can configure VTune(TM) Amplifier to specify the full path to your program as the Application value and the less than sign (<) followed by the full path to your input file.
Then, in the Choose Analysis Type tab, after you select the desired analysis type (e.g., Basic Hotspots), click the "Command Line" button in the lower right hand corner and click the Copy button in the pop-up dialog window. [Do not click the Start button.]
In a terminal window,
* first source the amplxe-vars.sh file [for example, "source /opt/intel/system_studio_2018/vtune_amplifier/amplxe-var.sh" or "source /opt/intel/vtune_amplifier/amplxe-vars.sh"]
* then cd into the directory where you want the results to be saved
* then paste the buffer from the VTune Amplifier command line pop-up dialog window.
After the data collection completes, you can open the results from the VTune Amplifier GUI. [If the VTune Amplifier GUI is not running, you can start it from the terminal window with a command similar to the following: "amplxe-gui r000hs/r000hs.amplxe"]

View solution in original post

1 Reply
Jeffrey_R_Intel1
Employee
207 Views

Hi Mario,

The cleanest solution to your configuration would be to modify your program to read input from a file rather than stdin, since you are already re-directing input from the file.

If your program must read from stdin, you can configure VTune(TM) Amplifier to specify the full path to your program as the Application value and the less than sign (<) followed by the full path to your input file.
Then, in the Choose Analysis Type tab, after you select the desired analysis type (e.g., Basic Hotspots), click the "Command Line" button in the lower right hand corner and click the Copy button in the pop-up dialog window. [Do not click the Start button.]
In a terminal window,
* first source the amplxe-vars.sh file [for example, "source /opt/intel/system_studio_2018/vtune_amplifier/amplxe-var.sh" or "source /opt/intel/vtune_amplifier/amplxe-vars.sh"]
* then cd into the directory where you want the results to be saved
* then paste the buffer from the VTune Amplifier command line pop-up dialog window.
After the data collection completes, you can open the results from the VTune Amplifier GUI. [If the VTune Amplifier GUI is not running, you can start it from the terminal window with a command similar to the following: "amplxe-gui r000hs/r000hs.amplxe"]

View solution in original post

Reply