Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PKM
Beginner
105 Views

Cannot profile MIC devices using latest version

Hi 

I haven't used MIC profiling for a while and now that I need it again it won't start on the latest verison. I am using Parallel studio 2015 update 4 with Visual studio 2012 on Windows server 2008 R2 running on the administrator account. I am trying to profile an offload application using the settings shown in screenshot 1. When I start the profiling seesion the command line window pops up, but it just hangs there and nothing happens until the max disk space limit is met (screen shot 2). If i change "target type" to "launch application" my program starts correctly, but it stops very quickly with an error that the process could not be started on the device (screenshot 3).

Any suggestions on how to get this working?

C

 

 

 

 

 

0 Kudos
7 Replies
Dmitry_P_Intel1
Employee
105 Views

Hello CK,

For "profile system" mode you might try to point resonable collection duration through "Automatically stops collection after" knob.

But I would look thoroughly on why the launch mode does not work. Are you able to launch the offload application w/o VTune on the same machine on device 0 (card 0)?

Might this be the case that you have more than 1 card and VTune is set up on the second card meanwhile you point the first card as a device to run?

Thanks & Regards, Dmitry

 

Peter_W_Intel
Employee
105 Views

@ CK

What Dmitry suggested are in command line, see below. It's better that you can provides outputs with VTune's result directories.

1. Launch application with VTune, for example:

amplxe-cl -r \tmp\mic-offload -c advanced-hotspots --target-system=mic-host-launch[:n] --search-dir=app-bin-dir -duration n -- ./test_offload

2. Launch application without VTune then do system profiling, for example:

a. Run test_offload program (hopefully it is not short run)

b. amplxe-cl -r \tmp\mic-sys -c advanced-hotspots --target-system=mic-native[:n] --search-dir=app-bin-dir -duration n

PKM
Beginner
105 Views

Thanks Peter

I followed your suggestion of turning to the command line and that did shed some light on the problem ...

I copied the command line generated by VTune from inside visual studio and ran it in the standard windows command prompt. The program started and behaved exactly as when run from inside visual studio - it started and terminated as soon as it hit the first offload region. I then tried opening up the Intel 64 visual studio 2012 command prompt and running the command line from there - and that worked just fine ...

It seems to me some enviroment variable is not setup correctly - perhaps something related to the location of the mic runtime or similar. Do you have any suggestions for what I should look for?

C

 

 

 

 

Peter_W_Intel
Employee
105 Views

In order to inherit all environment variables - usually run (Visual Studio) command prompt, and ensure your program can work without VTune, then : 1) Run VTune command line, Or 2) Run devenv to work VTune with integration mode; Or 3) Run VTune standalone application.

That is, to distinguish if the problem was caused by VTune or NOT.

PKM
Beginner
105 Views

Hi again Peter

I think the problem is environment variables not being set when running from inside VTune - could be the path to the MIC runtime, how do I check this?

(1) Works from the visual studio command prompt - not the standard cmd.

(2) Doesn't work. This is the case I described in my original post.

(3) Same as (2)

C

 

 

 

 

Peter_W_Intel
Employee
105 Views

>perhaps something related to the location of the mic runtime or similar.

I realize that VTune or VTune integrated with VS from VS command prompt ONLY inherits all environment variables for Host, not for MIC (target).

For now, case 1) works - because you can set the path for command line. How about you can write a script for MIC, which set right environment variables and run application (native?)? So VTune (case 2 & case 3) will invoke this script on MIC.

Dmitry_P_Intel1
Employee
105 Views

VTune should inherit VS environemint since by default we have "Inherit setting from Visual Studio" knob ON.

One way is to wrap the application to the script that has

1) "set" command

2) the app launch

and compare enviroments under successful run and then under VTune.

Thanks & Regards, Dmitry