Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sg
Beginner
241 Views

Example for attaching to a running process on Linux

Hi, I have gone through the roofline example.  It is simple code. I  have a number  of processes running on Ubuntu.  Some of these processes are C/C+ code with Python wrapper.   I have tries setting the target  to a PID.  On running Survey Target the  GUI   shows a  spinning  circle indefinitely  -  does not stop even after hours.     What is the  correct way ?  Thanks.

0 Kudos
2 Replies
Zakhar_M_Intel1
Employee
241 Views

Hi, sg

If you attach the tool to the process (which runs infinitely), then the tool will run infinitely as well. To finish profiling you have to either detach from process or to stop the process itself. To "detach" the process in GUI - you could use "stop" button on Advisor Workflow, see attached screenshot with explanation.

Note also that if you use attach-to-process mode, then you have to use Survey+TripCounts profiling steps as opposed to simply "Run Roofline" button/command. Those methods to run Roofline anlaysis are described at : https://software.intel.com/en-us/articles/intel-advisor-roofline

And so if using GUI you'll have to (1) attach for Survey, (2) Stop for Survey, (3) attach to for TripCounts/FLOPS step, (4) Stop TripCounts/Flops and you should ideally make sure that Survey and Tripcounts were running against the same execution phase of your code.

If you can use "launch application" mode, then it is simpler - you just do "Run Roofline" and that's it.

 

 

Dixon__David
Beginner
241 Views

It would be great to see an example of how to do this with the command line interface.

Reply