- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CPU time = summary of CPU time on cores/threads.
Please consider parallelism when profiling multithreaded application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great. It is clear now. Thank you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page