PTU + Vista + Array Visualizer

PTU + Vista + Array Visualizer

Hello,

I am experiencing a problem with PTU, hopefully this is a configuration problem.

I have been using PTU successfully on a Windows XP (32-bit) with Visual Studio 2005 and Intel Visual Fortran. Works great.

The problem is, I have just installed a Vista x64 system (Core 2 Q6600) for compatibility testing. I installed the service packs for Vista, installed Visual Studio 2005 and service packs, installed Intel Visual Fortran. Other than having to re-enter solution/project files (grrrrr), my main Fortran application compiles, runs and can be debugged on Vista x64.

Installed VTune and Thread Profiler (evaluation versions). VTune works with application (haven't tried thread profiler). Installed PTU, PTU works on simple applications.

The problem I have is my main application uses the Array Visualizer from IVF to display runtime charts of a simulation program. Under normal conditions, the Array Visualizer is launched as a separate process in the system. Thisupon an AV library initialization call which returns a handle to AV and the handle is used for inter-process communication (cleverly hidden by the AVFRT run-time library). AV launches properly from:

Debug session runinside Visual Studio 2005
and
Tuning run launched from Visual Studio (VTune tool bar buttons)

But not from Eclipse running PTU (on Vista x64).
But will run from Eclipse running PTU (on Windows XP x32)

I am running Eclipse with "Run as administrator". For some reason AV won't launch from app (run from Eclipse) on Vista x64. Smells like a Vista security feature is hosing me. Any hints?

Jim Dempsey

www.quickthreadprogramming.com
publicaciones de 9 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Hi Jim,

To analyze the issue and give a concrete advice we need more technical details. Please answer the following questions:

- please confirm that you are using the right PTU package; on Vista x64 you should use ptu30_004_win_intel64.zip instead of ptu30_004_win_ia32.zip you used on XP x32.

- what is the application architecture? is it 64-bit app? how about AV?

- what collectors do you use? is the problemobserved with all kinds of collection or with some concrete collector(s)?

Inthe productrelease notesit isstated that "For Microsoft* Windows Vista*, you need to be an administrator to work with the Intel Performance Tuning Utility."

Unfortunately I am not a Vista expert and do not have AV experience as well but still I would advise the following:

- check the system security log; it may help you tounderstand the issue in case it is security related

- try to do the same from the "administrator" account

- if hints above do not help try the following workaround - run the command to collect information manullaly - out of GUI;

  • after unsuccessful run from GUI take the latest launched commandfrom the end of %TEMP%/ptu-log-%USERNAME%/history.txt (it should use some tool named vt*run.exe)
  • correct the 1-st application argument so you point a different experiment dir
  • run the command in cmd
  • if you pointed an experiment dir in the scope of the current Eclipse workspace you can press "Refresh" (F5) in the Tuning Navigator and open the experiment otherwise you should use the "import experiment" feature (File->Import...)

Kind regards,

Konstantin Lupach

Konstantin,

I am using the 64-bit version of PTU. PTU works on my Vista Ultamate x64 platform for most applications excepting for one of my applications. These applications are x64. And I run as Administrator

Issuing the lastcommand (from a batch file) produced copious amounts of output to stdout. My application ab-ended.

In the (former) Intel Array Visualizer for Intel Visual Fortran there is a C++ library interface titled AvCRT

In AvCRT is a source file titled RootObj.cpp

In RootObj.cpp there is a constructor for CRootObj

CRootObj::CRootObj()
{
HRESULT hr = OleInitialize(NULL);
// ATLASSERT(SUCCEEDED(hr));
// Create the root group
hr = CoCreateInstance( CLSID_AvGroup,NULL,
CLSCTX_INPROC_SERVER, IID_IAvGroup, (void**) &m_pIRoot );
ATLASSERT(SUCCEEDED(hr));
hr = m_pIRoot->put_Name(L"Root");
ATLASSERT(SUCCEEDED(hr));
m_pIFileLoader = NULL;
m_pFileLoaderImpl = NULL;
m_szErrorMessage[0] = '';
}

 
The second ATLASSERT triggers (the one attempting to create "Root").
I am not too familiar with ATL, if you are, could you instruct me as to
what diagnostic to insert into the code
hr = m_pIRoot->put_Name(L"Root");
if(!SUCCEEDED(hr)))
{
???
}
ATLASSERT(SUCCEEDED(hr));

As stated in earlier message, VTune can successfully launch this application.

Thanks in advance
Jim
www.quickthreadprogramming.com

Konstantin,

Oops - egg on face.

Ran wrong program immage. Dam VS is not consistent regarding using $(Platform) between building on x32 and building on x64 (build on x32 has no $(Platform)x32)

When I copied solution folders to new system the old $(Configuration) folders were present and I mistakenly selected the .exe out of the Release folder from the build on x32 configuration.

my fault...

Thanks for your efforts

Jim

www.quickthreadprogramming.com

Jim,

Thank you very much for reporting the issue you found.

Can you please confirm if BOTH Intel PTU GUI and Intel PTU CLI work for you when collecting the information for this application after you corrected the things according to what you discovered?

Just in case here is another workaround that works in case ofone run sampling:

  • create a PTU project without application to launch and with appropriate duration
  • launch sampling collection
  • launch application and wait until it finishes
  • stop collection manually by the "stop" button

In case either GUI or CLI still does not work it would be great to continue the investigation.

I cannot run the CLI right now as I am making a simulation run (may take days to complete). However, the former instructions you gave were incorrect to run the CLI. The 1st argument was a folder name to not only place the results data but also it contains the .TB5 config file. Simply changing the folder name results in not finding the .TB5 file. If I reuse one of the other folders (from failed run) the problem app should run. Although I cannot confirm this at this time due to the app getting a share error on an output file (which is in use by the running simulation).

The alternate method listed in your last email makes sense as this would be no different than sampling data for everything else on the system - then drilling down into the other application's source code.

The "issue" here was operator failure.

Jim

www.quickthreadprogramming.com

One additional comment on your last suggestion.

The technique you mentioned (i.e. a sample run with no application to launch) may seem silly to a new user at first, but when you think about it (and the documentation should reflect this) if your application has some user input to perform _prior_ to getting into the heavy run portion of the application, then you would use this technique (sample run with no application to launch) and run the PTU sampling immediately after entering the last of the user input to the application.

Considering how useful this (the above) is, and maybe this is in PTU already, think about starting a sample run with specifying application to run, but also specifying sampling is suspended until either hot key pressed or click on start sampling button (user specifies hot key). You can then extend this to include a hot key to suspend sampling too.

Then, consider extending this further where you can permit the user to usedebugger break points to specify where in the application to turn on/off sampling.

Jim Dempsey

www.quickthreadprogramming.com

Hi Jim,

The following is available now in both CLIand GUI:

vtsarun --start

vtsarun --stop

The following is available only in CLI but not available in GUI:

vtsarun --pause

vtsarun --resume

For application driven start/stop and pause/resume capabilities you can use a special API that is provided as a part of both Intel PTU and Intel VTune Performance Analyzer.

/include/sampling.h

/lib/sampling.lib

In VTune analyzer this API is generalized for all collectors, well documentedand has the VTuneAPI name. However I believe that just the header file + import lib provided with Intel PTU are enough to understand what to do with it.

/analyzer/include/vtuneapi.h

/analyzer/lib/vtuneapi.lib

or

/analyzer/lib32e/vtuneapi64.lib

if you use VTune analyzer on a Windows machine with Intel 64.

Hope this helps.

Yes, thanks.

Jim

www.quickthreadprogramming.com

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya