Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Bruce_Weaver
Beginner
72 Views

directory confusion

Hi,

My 2016 VTune tries to find the program data files in the system32 directory.  The user program, vector analysis, etc. all use the correct directory as do earlier versions of Vtune.  Needless to say, that Is there some setup parameter that is unique to VTune that would send it off to the wrong directory?

thanks

0 Kudos
16 Replies
Peter_W_Intel
Employee
72 Views

Hope that I understand your environment correctly..my comment is - don't start-up VTune Amplifier from sensitive area, e.g. system32 directory. It should be a problem that current directory will be working directory, user data directory and it doesn't make sense to write *temp* program data / vtune data into. If current working directory is in sensitive area, please use "-app-working-dir", "-user-data-dir" with non-sentative directory, e.g. c:\temp

Bruce_Weaver
Beginner
72 Views

Hi Peter,

I start VTune inside of VS after opening the solution in the solution directory   which is a totally benign directory...not even on the same disk as the Intel programs or windows32.  Note that everyone else, e.g., Inspector work fine and use the current directories.

What happens is that, when running VTune inside a VS in which everything is working fine, it dies trying o find user program files it wants to read in because it is looking for them in sytem32 directory instead of the current directory.  Is there a way to insist that VTune (inside of VS) look in the current directory like everyone else?

--Bruce

Peter_W_Intel
Employee
72 Views

Hi Bruce,

This is an interesting issue that program cannot read data from system32 directory if program was invoked by VTune within VS, but Inspector works fine.

I don't know what your current directory is? Have you tried to put absolute (full path) data file name in system32, as argument?

If your current directory is Intel program or Windows32, I suggest to change current directory under C:\Users\...

If there is any access issue, run "Command Prompt" as administrator,

a) Run devenv.exe to retest VTune.

b) Copy command line from GUI, test it on Command line. Any error message?

Regards, Peter

 

72 Views

Hi Bruce,

Can you please clarify a bit more on this:

Bruce Weaver wrote:

What happens is that, when running VTune inside a VS in which everything is working fine, it dies trying o find user program files it wants to read in because it is looking for them in sytem32 directory instead of the current directory. 

At what exact stage you see VTune looking for files in system32 directory?

  1. collection start
  2. collection run
  3. result finalization
  4. source/asm view
  5. else?

What are the last messages you see in VTune pane?

Do you see crash report dialog?

Regards, Katya

Bruce_Weaver
Beginner
72 Views

Hi,

Very simple.  The code starts to run and it dies because data files it is looking for are not, of course, in system32.  If I skip the first file it tries to read, it dies on the second.  The complaint is also simple: can't find the file.  Again, code runs fine when it is just run normally & the other code analysis tools also work fine (i.e., find the required data files int he correct directory).

 

-- Bruce

72 Views

Hi Bruce,

Can you please check if VTune Amplifier Project properties have option to inherit Visual Studio settings? 

Click the 10F44AB0-F2DE-4E02-AE0F-32F02A97626B-imageId=8E20AAA6-1AE8-48C3-A61B-3010F4E80824.gifConfigure Project button on the toolbar. The Choose Target and Analysis Type window opens with the Analysis Target tab active. Check if "Inherit settings from Visual Studio* project " check box is set?

If the box is checked ON, then there are some issues with the inheriting and we will explore on this further on our side.
 

Please uncheck the box and set the Working Directory property to the path where your program looks for the data file.

If your application expects files in the same directory - check Use application directory as working directory

 

Regards,

Katya

David_A_Intel1
Employee
72 Views

In Visual Studio* 2013, I don't see the button, but you can right-click on the project and select the "Project Properties..." menu item from the VTune Amplifier XE 2016 submenu:

vtune-vs-properties.png

That will open the Choose Target and Analysis Type window where can ensure that the "inherit" check box is checked.

vtune-vs-inherit.PNG

Bruce_Weaver
Beginner
72 Views

Hi,

The Intel 2016 compiler is on a machine that is now in the shop for an unrelated problem so I installed VTune Amplifier 2015 update 4 into Parallel Studio XE composer 2015.5.280 integrated into VS Community,  It displayed the same problem of going to the System32 directory.  The "Inherit settings from Visual Studio* project " check box was set but switching that off and specifying Use application directory as working directory solved the problem.  So it does appear you have an inheritance problem dating to before XE 2016.

thanks for the work-around.

Bruce

72 Views

Glad to hear that the work-around helped you. We will work on a fix in future updates.

Regards, Katya

72 Views

Hi Bruce,

We explored Visual Studio settings inheritance in VTune Amplifier 2016 release and verified that working directory is inherited from Solution Configuration Properties / Debugging / Working Directory.

Can you please double check the settings in your solution? 

Regards, Katya

Bruce_Weaver
Beginner
72 Views

Hi,

I reran things.  I had to get a new license for VS Community & ran into the "LINK : fatal error LNK1104; cannot open file 'ucrtd.lib'" issue and did a reset.  I tried a later version of my code. Same failure returned: died trying to access system32 in VTune but not in a regular run.  I tried the workaround.  It worked after I figured out that I couldn't accept the directory it suggested.

I retried the previous version of the code with exactly same results. 

I thought the problem might have been that VTune assumed "S:\SASi\SASi.2.6.2db073015\SASi.2.6.2\x64\Debug\SASi.2.6.2.exe" for both default launch directories.  The correct launch directory (containing the data files) is "S:\SASi\SASi.2.6.2db073015\SASi.2.6.2\" which was the default place earlier versions of VTune (and currently all non-VTune parts of XE).

In summary, inherit doesn't work no matter what I try.  Actually, this issue has been brewing for awhile.  A slightly earlier version of VTune had started looking in the parent directory (in this example: S:\SASi\SASi.2.6.2db073015\") as the default directory.  Again, all the other components of XE 2015 were looking in the usual directory.  I assumed at the time that y'all would figure this out and fix it in subsequent releases.  Apparently, the problem has gotten worse.

--Bruce

Bruce_Weaver
Beginner
72 Views

Clip1.jpg

Bruce_Weaver
Beginner
72 Views

my first attempt at an image upload.  Anyway, my solutions config page doesn't look as interesting as yours...unless I'm looking in the wrong place.

David_A_Intel1
Employee
72 Views

Hi Bruce:

Try right-clicking on the project in the Solution Explorer and selecting "Properties..."

vs-solution-prop.png

Bruce_Weaver
Beginner
72 Views

aha.  I had no entry in 'working directory'.  By adding $(ProjectDir), everything seems to work.  That seemed to be the problem.

72 Views

Hi Bruce,

Thanks for confirmation!  

Regards, Katya

Reply