Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

Remote analysis / local GUI view

james_B_8
Beginner
702 Views

I'm trying to design a work flow where my users can do their analysis (using VTune in cl mode) of their code on a remote machine then copy the results back to a local machine and run VTune in GUI mode to view the results.

The structure is this: I have a directory with the code that I compile and then run through VTune. This create a r**** folder in the directory. I then copy this whole directory with code, binary, symbols and results folder to the local machine using rsync.

My problem is that while I can view the results on the local machine I can't view the source code. When I try to view it, VTune tries to search the directory path of the remote machine and there doesn't seem to be a way that I can update this serach path for the local machine.

Moreover I shouldn't have to update the search paths in the GUI everytime I want to view a result - this is tedious. There should be a way of doing it in the command line or setting an environmental variable when I start the GUI so I can script it or whatever.

How do I get this to work?

0 Kudos
6 Replies
Bernard
Valued Contributor I
702 Views
Will this link be helpful to your case ://software.intel.com/en-us/forums/topic/287601
0 Kudos
Peter_W_Intel
Employee
702 Views

Assume that you have a directory name "projectA" (copied to local machines), it includes:

1. r0001hs sub-directory which is VTune result.

2. Binaries, source in other sub-directories 

You can do: (assume current directory is in r0001hs)

"amplxe-cl -finalize -result-dir r0001hs -search-dir all:rp=.." ; specify "ProjectA" (and sub-directories) as search directory

So your vtune result dir will be re-finalized, and you don't need to other extra-works on GUI when displaying result. 

0 Kudos
james_B_8
Beginner
702 Views

Peter Wang (Intel) wrote:

Assume that you have a directory name "projectA" (copied to local machines), it includes:

1. r0001hs sub-directory which is VTune result.

2. Binaries, source in other sub-directories 

You can do: (assume current directory is in r0001hs)

"amplxe-cl -finalize -result-dir r0001hs -search-dir all:rp=.." ; specify "ProjectA" (and sub-directories) as search directory

So your vtune result dir will be re-finalized, and you don't need to other extra-works on GUI when displaying result. 

Thank you for your response.

So that looks like it should work. However it just has no effect. I open up the result and I get the same complaint - 'can't find source file, here's where I'm looking: [remote-src-dir]'

I even searched the results files for the string '[remote-src-dir]' via:

$  find r001lh/ -type f -ls  -exec bash -c "strings {} | grep ''[remote-src-dir]" \;
and found multiple instances of it. I then run the -finalize and changed the remote-src-dir to be something like $HOME/Pictures, to try and deliberately break it, and run the same find command again, but searching for 'Pictures' this time and get no hits! -finalize apparently doesn't do anything.
Very confused.
Cheers, J

0 Kudos
Peter_W_Intel
Employee
702 Views

>>  I open up the result and I get the same complaint - 'can't find source file, here's where I'm looking: [remote-src-dir]'

1. What finalizing did (my last post for command line) is to give report quickly in command line, such as

amplxe-cl -report hotspots -r r001lh

Also you don't need to specify bin/sym/src paths on GUI

2. You still need to locate source file when double-clicking on hot function, bottom-up report, on GUI 

0 Kudos
james_B_8
Beginner
702 Views

Peter Wang (Intel) wrote:

2. You still need to locate source file when double-clicking on hot function, bottom-up report, on GUI 

Thanks for you help anyway. You don't have to locate source files if you open it on the source machine; it knows the path to them. You should be able to just change this path if you, for example, moved the source code or moved the whole thing to another machine and get the same functionality.

Very disappointing that we'll have to manually search for source files everytime we try to drill into the source code on every result collected... Either that or I'll have to write a script to hack the databases and change the paths myself.

Cheers, J

0 Kudos
Peter_W_Intel
Employee
702 Views

I just did experiment, it may help you quickly.

Assume that you have result directory "r001hs", and project directory "project1" which includes you sub-directories of source and binary.

Copy r001hs (result directory) from the target to the host (any place), then copy entire project1 onto r001hs directory - it means, project1 directory is under r0001hs. When you try to open source on VTune report, NEVER pop-up a window to search source - open source view directly. 

0 Kudos
Reply