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?
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
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?
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?
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?
- collection start
- collection run
- result finalization
- source/asm view
What are the last messages you see in VTune pane?
Do you see crash report dialog?
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).
Can you please check if VTune Amplifier Project properties have option to inherit Visual Studio settings?
Click the Configure 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?
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:
That will open the Choose Target and Analysis Type window where can ensure that the "inherit" check box is checked.
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.
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.