Community
cancel
Showing results for 
Search instead for 
Did you mean: 
tulgas
Beginner
53 Views

Incorrect times

Hi there,
I'm new to VTune and I assume I must be doing something wrong. I'm running a Hotspots analysis on my code and the times I'm getting are half what they should be (elapsed time, CPU time, etc...) I used a chronometer to measure the execution time and it takes about 26 seconds but the elapsed time I'm getting back in VTune is just over 13 seconds.
In case it helps, it's a MFC application executing calls to a DLL. The execution of the DLL functions are what I'm actually trying to profile. There is no multi-threading and I'm using an Intel i5-based computer.
Any ideas?
Tulgas
0 Kudos
6 Replies
Peter_W_Intel
Employee
53 Views

Was it possible that the program went different paths for Hotspots and chronometer?

Did youcompare outpus of program for these two sessions?

It's hard image that the elapsed time of running application withHotspots is half of the original.

Can you please provide a simple test case to reproduce this issue? Or submit a ticket tohttps://premier.intel.com

Regards, Peter

tulgas
Beginner
53 Views

Hi Peter,
Thanks for replying. It's actually more bizarre than that:
When I run de softwrae without the Hotspot analysis (just executing the .exe) and when I run the software while performing the Hotspots analysis, the actual elapsed time is the roughly same (let's say 26 seconds) but the "elapsed time" as returned by VTune is about 13 seconds (it actually takes 26 seconds to run).
I tried to modify the software parameters to change the processing time and the elapsed times returned by VTune seem to be always about half the actual elapsed time... Actually, all the times (CPU time, etc...) are also half what they sould be...
I'm using the trial version of the Intel Parallel Studio XE 2011and I really want to buy the suite but I need to sort this out before...
I cannot post the source code I'm trying to profile due to company's policy but I going to develop a simple test program to check whether this issue is realted to the software being profiled or if it's not dependant on the software being analysed... I'll post the results later on...
Tulgas
Peter_W_Intel
Employee
53 Views

Hello Tulgas,

Thanks for your explanations.

Wereyou using Parallel Studio 2011 XE SP1? We investigate/track the issue in latest version, since some old bugs already has been fixed.

If you found elapsed time was incorrect - half (Summary report),did you verify it in timeline of Bottom-up report?

Yes.We need to know if this is program specific issue, or a general problem?

Thanks, Peter
tulgas
Beginner
53 Views

Hi,

Here is the new (and weirdest) chapter on my VTune experience

Yesterday I developed a very simple Win32 Console application that executed a loop 100 times. Within the loop I loaded a JPG image using OpenCVs highgui and then called several image processing functions on that image to finally save the resultant image to disk. The total execution time was about 12 seconds.

I run the software using the VTune Hotspots analysis and everything went well. It took about 12 seconds to run and the elapsed time as shown in the Summary window was about 12 seconds. Great!

I also tried some of the sample programs included with the suite and everything went fine. After that I spent the rest of the day doing something else (recompiling the OpenCV dlls so they can use IPP 7.0).

Well, here is when things get really weird:

This morning I tried again my MFC application that executes calls to my dll (this dll also uses OpenCV functions).

Yesterday the 26 seconds test execution was producing an elapsed time of 13 seconds in the Summary window of VTune. All the times in the bottom-up analysis were consistent with the 13 seconds total elapsed time (this means that they were also about half what they really are).

Well, this morning the same test with the same MFC application and the same DLL is giving me the correct results (about 26 seconds elapsed time for a 26 seconds execution, and so on) I restored the previous OpenCV dlls (the ones that dont use IPP) just in case this was making a difference, but still getting the correct results.

I know how this sounds but I swear to all the gods that yesterday I was getting different times. I dont know if anybody ever encountered this kind of thing before. It looks like the typical joke about fixing problems by switching off and on the computer ;-)

Anyway, Ill keep an eye open in case I find out anything else and Ill post here about any other poltergeist that I might encounter.

Tulgas

Peter_W_Intel
Employee
53 Views

Maybe the reason is simple -
Just set Inherit setting from Visual Studio* project ON in Project Properties. Note that this switch is OFF by default on Update 5-6, but it was ON by default on Update 2. That is why you have to pay attention about its state.

Regards, Peter
SKost
Valued Contributor II
53 Views

Hi,

Couldyoutry thatTest-case?

...
void main( void )
{
::Sleep( 26000 );
}
...

It doesn't use anyOpenCV functions...

Best regards,
Sergey