Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

Confusion on Summary of Ellapsed Time

KK1
Beginner
437 Views

When I profile my code, the summary had shown the elapsed time value (1283.389) and the subset of CPU Time value is (3685.21).  So, the CPU time should be smaller than the elapsed time.  If not, what is the cpu time included?  

0 Kudos
1 Solution
Peter_W_Intel
Employee
437 Views

Elapsed time is approximated to execution time, a little overhead from VTune.

If your program is serial, Elapsed time = CPU time (single thread).

As I said previous post, if your program is multiple threads, CPU time includes all time spent on different threads (cores) - they are parallel. Is it hard to understand? For example :

                T1        T2        T3        T4

Thread1   1          1          1           1 

Thread2               1          1

Thread3                           1           1

Elapsed time = 4

CPU time = 4+2+2 = 8

View solution in original post

0 Kudos
4 Replies
Peter_W_Intel
Employee
437 Views

CPU time = summary of CPU time on cores/threads.

Please consider parallelism when profiling multithreaded application. 

0 Kudos
KK1
Beginner
437 Views

If I run the code without VTune from the terminal, it takes only ~18 minutes.  This timing is closed to "elapsed time", but it is about ~3 minutes extra, which executing in VTune environment.  I'm still not sure what is "CPU time", the time specifies much more (61 minutes).  

It is a big different comparing 18 minutes vs 61 minutes.

0 Kudos
Peter_W_Intel
Employee
438 Views

Elapsed time is approximated to execution time, a little overhead from VTune.

If your program is serial, Elapsed time = CPU time (single thread).

As I said previous post, if your program is multiple threads, CPU time includes all time spent on different threads (cores) - they are parallel. Is it hard to understand? For example :

                T1        T2        T3        T4

Thread1   1          1          1           1 

Thread2               1          1

Thread3                           1           1

Elapsed time = 4

CPU time = 4+2+2 = 8

0 Kudos
KK1
Beginner
437 Views

Great. It is clear now. Thank you.

0 Kudos
Reply