Won't Stop Sampling

Won't Stop Sampling

I've installed Vtune on my PC this afternoon. I'm not having much success getting it to work. I've been attempting to run the Vtunedemo under "Help/ShowMe Demos/Sampling Configuration" and it seems to work fine up to a point. It performs the sampling and recalibration, running the Vtunedemo app twice. But once the app is done Vtune doesn't seem to recognize that it is done. It just stays in the "Sampling" mode and never, ever stops sampling. I click on the "Stop" button and it doesn't stop. I can pause sampling and restart sampling so the interface isn't locked. It just won't stop and let me see the results. After about 20 minutes of "sampling" I selected "Activity/Cancel Activity" and the interface locked (Not Responding). I've tried different apps and different sampling modes but they all end up the same way - unable to Stop. I'm running as admin on a WinXP machine. Any suggestions?

16 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

What you talked about running Vtunedemo under "Help/ShowMe Demos/Sampling Configure" is a flash demo, not a real sampling data collection.

Please use "File\New Project\Sampling Wizard" tofigure outa sampling data collection then run.

Regards, Peter

Peter,

Thanks for the quick response! I was duplicating the steps outlined in the demo in Vtune, trying to get an app to work. I've tried running Vtune on my own C++ app several times, always with the same result - it starts sampling but doesn't ever respond to the Stop Sampling command or the Cancel Sampling command. I've also set Vtune up to run for 20 seconds and then automatically stop sampling, but it doesn't stop.

When I start Vtune, the "Easy Start" dialog comes up. I select "Quick Performance Analysis Wizard". On the next dialog, I click "No Application to Launch". "Collect Sampling Data" is checked. I then click "Go". After a few seconds VTProject1/Activity1 (Sampling) appears in the Tuning Browser window and several lines appear in the Output window:

Mon Jan 25 21:42:19 2010 ENAUS00060712 (Run 1) Setting Sampling CPU mask to 0-1

Mon Jan 25 21:42:19 2010 ENAUS00060712 (Run 1) The processor PMU configuration file: pmm.xml

Mon Jan 25 21:42:25 2010 ENAUS00060712 (Run 1) Collection for the following event(s) is being performed:

Mon Jan 25 21:42:25 2010 ENAUS00060712 (Run 1) CPU_CLK_UNHALTED.CORE, INST_RETIRED.ANY.

I let it run for 15 seconds and then click on the red square on the toobar. After 20 or 30 seconds a dialog appears that states: "Failed to create sampling data base. Probably .tb5 files are corrupted or don't exist." Clicking OK brings up a following dialog that states: "An error occurred during this operation." The following line is added to the Output window: "The Sampling Collector failed to collect data for an unknown reason." There is a progress bar displayed at the bottom of the screen that shows "Reading Database 40%".

If I close Vtune and restart I can follow the above steps, but select my app instead of selecting "No Application to Launch." I let it run for 15 seconds after my app opens and then click the stop button. In this scenario there are no error dialogs, just no response to the stop button. I can pause, and resume, but it doesn't stop.

When you didn't specify application, seemed that sampling collector can start butfailed to save result- "Failed to create sampling data base. Probably .tb5 files are corrupted or don't exist."

Is it possible that you have no write-permission under default C:\Documents and Settings\$user\Application Data\VTune\Projects? Or that directory is network mapped driver. Please try to new a project and save the project in local drive. Also please use Sampling Wizard instead of First Use Wizard.

You also can try sampling data collector in command prompt,to verify -

vtl activity -d 20 -c sampling [-app your-app] run

Regards, Peter

Peter,

Thanks again for your responses. I had wondered about permissions as well. I have tried changing the default directories to locations on the C: drive that I routinely write to without any change in Vtune's behavior. I ran the following from a command prompt:

C:\Program Files\Intel\VTune\Shared\Bin>vtl activity -d 20 -c sampling -app c:\winnt\notepad.exe run

Tue Jan 26 00:38:29 2010 WARNING: An error occurred while attempting to add the Merge command.

E:\vttbuild\workspaces\vtune_linux_0\source\anprodinfo-1.2.15-48280\src\windows\ProductInfoClient.cpp: failed to load resource file.

One or more components did not load correctly. You may need to reinstall the product.

VTune Performance Environment

Copyright (C) 2000-2005 Intel Corporation. All rights reserved.

The CPU architecture can't be identified properly; data collection is not available.

I looked in my environment variables and found the following:

NUMBER_OF_PROCESSORS=2

PROCESSOR_ARCHITECTURE=x86

PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel

PROCESSOR_LEVEL=6

PROCESSOR_REVISION=0f0b

I've uninstalled/reinstalled Vtune twice without any errors. Any suggestions?

Hi Stephen,

I doubt message about "The CPU architecture can't be identified properly; data collection is not available", even you uninstalled/reinstalled the product...

You can verify data collector by using - "vtl query -lc", so you can know which data collector you can use.

I suggest to verify supported processors of System Requirements, by viewing http://software.intel.com/sites/products/documentation/hpc/vtune/windows/release_notes.htm

Thanks, Peter

Peter,

Rebooting seems to have resolved the odd error messages I was getting yesterday. However, the same fail-to-stop behavior remains.

I downloaded the Intel Processor Identification Utility and it reports that my laptop has an Intel Core 2 Duo T7500 which appears to be on the "approved" processor list for Vtune.

I ran "vtl query -lc" and it reported:

List of data collectors available:

Sampling

Intel Thread Profiler Instrumentation

callgraph

Intel Thread Profiler OpenMP*-specific

Each time I run "vtl activity -d 20 -c sampling -app c:\winnt\notepad.exe run" I can see a new directory in C:\Documents and Settings\elcz471\Application Data\VTune\Projects\Sampling. The latest run created the directory "ar12" which contains the following files:

01/26/2010 03:47 PM 293,039 rawsamp.ub3

01/26/2010 03:47 PM 691,095 segst.sg3

01/26/2010 03:47 PM 5,632 tbs13.tb5

So it appears that I have write permission for the data directories.

I also verified that my user account has Profile System Performance user rights.

Thanks!

Stephen

Stephen,

I am glad to know that you can collect sampling data successfully.

It seemed that vtune driver "abnormal" state are recovered after you rebooted the machine. Usually vtune driver get unstable if theuser quickly clicked (switched) "pause", "resume", "stop"...so Isuggestto use "Duration" or "Stopcollection when application terminates..." instead manual operations.

If you have to collect performance data in interest of code, please refer KB -

http://software.intel.com/en-us/articles/use-vtuneapi-in-your-code-to-profile-without-launching-vtunetm-analyzer/

Regards, Peter

Peter,

I was able to compile and link a simple app with your KB code. It displays an unhandled exception when calling VTStopSampling(1). The exception message is:

Unhandled exception at 0x157bd57e in grad25.exe: 0xC00000005: Access violation writing location 0x0000000.

The call stack is:

sampling_utils.dll!157bd57e()

[Frames below may be incorrect and/or missing, no symbols loaded for sampling_utils.dll]

tbs32nx.dll!15f39a5f()

tbs32nx.dll!15f39ae2()

run_handler.dll!15563396()

sampling_collector.dll!157a1ce2()

sep_adapter.dll!157f1c29()

sep_adapter_entry.dll!1580146e()

sampling.dll!15571d21()

VtuneApi.dll!16ae27e1()

>grad25.exe!main(int argc=2, char * * argv=0x0036a750) Line 72 + 0xa bytes C++

grad25.exe!__tmainCRTStartup() Line 586 + 0x19 bytes C

grad25.exe!mainCRTStartup() Line 403 C

kernel32.dll!7c817077()

I'm assuming this error is related to my inability to get vtl or Vtune to work. Does this information provide any clues?

Experiment code can work on my side (Intel Core 2 Duo processor, you have to change event names if works on different processors...). I just ask to verify -

1. Before running this tiny app, please check vtl can work first, ensure vtune driver is workable (otherwise, restart the system)

2. TB5 file name is reasonable, path is correct or written in current directory.

3. All retun values are correct before doing VTStopSampling(1)?

Regards, Peter

1) vtl seems to work fine as long as I don't do a sampling run. "vtl show" displays the six activities I've run.

2) I've run my program both ways, with a file written to the current directory and a file written to a specific directory. Both cases crash.

3) The return from VTStartSampling(&params) is zero.

The return of VTStartSampling($params) is zero, means sampling can start. You failed at VTStopSampling(1) - the return value should be zero as well.Ifthe return valueis non-zero, please check Err code by viewing vt_errors.hthen know why.

Last time, you said that you cando sampling run after rebooting the machine withouterror message "One or more components did not load correctly. You may need to reinstall the product.", I suggest you uninstall/reinstall the product under administrator user. Also ensure you long on the user which is in administrator group then run VTune Analyzer.

In general pleaseusesampling session with vtl first, to knowvtune driver workable, then useVTuneAPI.

Regards, Peter

BTW, whatis you operation system? what is VTune Analyzer version you are using?

Peter,

I apologize for not being clearer in my posts. At one time I was getting the "One or more..." error messages. Uninstalling/Reinstalling/Rebooting as administrator resolved that problem. I no longer get the "One or more..." error messages.

However, vtl has never, not once, successfully completed a sampling run. It "hangs" and does not write a complete tb5 file. Since vtl hangs and does not complete its run, I do not get any error messages. I let my last vtl session run over night for 8 hours and it never completed. The command line that I was running was:

vtl activity -d 20 -c sampling -app c:\winnt\notepad.exe run

This is the output:

Intel VTune Performance Analyzer 9.1 build 385

Copyright (C) 2000-2009 Intel Corporation. All rights reserved.

Fri Feb 05 10:00:18 2010 WARNING: The Intel VTune Performance Analyzer product is using an evaluation license.

Please visit http://www.intel.com/software/products for more information on purchasing this product.

The Activity has been successfully created.

The Activity is running.

Fri Feb 05 10:00:26 2010 ENAUS00060712 (Run 1) Setting Sampling CPU mask to 0-1

Fri Feb 05 10:00:26 2010 ENAUS00060712 (Run 1) The processor PMU configuration file: pmm.xml

Fri Feb 05 10:00:31 2010 ENAUS00060712 (Run 1) Collection for the following event(s) is being performed:

Fri Feb 05 10:00:31 2010 ENAUS00060712 (Run 1) CPU_CLK_UNHALTED.CORE, INST_RETIRED.ANY.

As this vtl run proceeds, Notepad opens as expected. I open a file in Notepad and then exit from Notepad. Notepad closes. The vtl run never responds. If I understand the command line parameters correctly, the -d parameter should limit the run to 20 seconds. However, it never returns to a command prompt. I've let this run as long as 8 hours without vtl returning to a command line prompt. I always have to hit "break" to make it stop.

My simple C++ application does not run to completion either. It crashes when the VTStopSampling call is made. I never get a return value from VTStopSampling because the program fails. If I run my app in Visual Studio then I can see where the crash is happening.

I'm running Windows XP Professional, Version 2002, Service Pack 3 on a Compaq 8710w, Intel Core2 Duo CPU T7500 @ 2.20GHz, 3.00 GB of RAM

Thanks for clarify.

I use same v9.1 U7andmy environment is similar as you have, no problem to stop sampling!

You can try to stop sampling by using ActivityController, my new post- http://software.intel.com/en-us/articles/using-activitycontroller-to-selectively-profile-your-big-program/. However I doubt itwill crash again. I guess some componentsare wrong after you installed the product, even no error message.

SoI suggest you to unintsall the product again, then delete Vtune directory in local drive, and delete key (and its contents) underHKEY_LOCAL_MACHINE\SOFTWARE\Intel Corporation\VTune Performance Environment,finally install the productagain - Ensure all VTune Analyzer's components are created by the installer.

This issue is so weird, did you install other SWwhich interfered of installing/using VTune Analyzer? Do you have other machine to verify this problem, if possible.

Regards, Peter

Peter,

Apparently there was something wrong with one of the files on my computer. I had my laptop reimaged and now Vtune works. However, my license has expired. Would it be possible to get another 30 day license so I can see how Vtune works with my software?

Sincerely,

Steve Henry

Hi Steven,

Please go to http://software.intel.com/en-us/forums/intel-software-development-products-download-registration-licensing/for helps on Intel Software Products' downloading, registering and license issues.

Regards, Peter

Leave a Comment

Please sign in to add a comment. Not a member? Join today