# Difference between "ExecutionTime" and "ClockTime"

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

August 24, 2009, 06:44
Difference between "ExecutionTime" and "ClockTime"
#1
Senior Member

Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13
Dear all,

A small question, what is the difference between "ExecutionTime" and "ClockTime"?

I can get these lins from icoFoam.C,
Code:
```Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;```
someone said:
Quote:
 elapsedCPUTime() is the elapsed CPU time. elapsedClockTime() is the elapsed wall clock time.
1. Could anyone explain this in detail?
2. If ClockTime means something, why then that we have to care about ExecutionTime?
3. Is there any meaning concerning the ratio of ClockTime over ExecutionTime? Latency, or what?
4. How can I change the writing format of these time, eg. show four decimal places in second.?

__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email

 August 24, 2009, 06:56 #2 Senior Member   Sandy Lee Join Date: Mar 2009 Posts: 213 Rep Power: 10 Look at hani: http://www.tfd.chalmers.se/~hani/kur...tyTutorial.pdf in page 43.

 August 24, 2009, 21:19 #3 Member   Simon Lapointe Join Date: May 2009 Location: Québec, Qc, Canada Posts: 33 Rep Power: 9 Hi, I'm not an expert but here's what I think, 1) There isn't much to add there, the ExecutionTime is the time spent by the processor and the ClockTime is the wall clock time or "real" time if you prefer. 2 & 3) There is an interest because a significative difference between the ExecutionTime and the ClockTime is a sign of a slow calculation. The difference can be explained by the time when a file is being written or when there is communication between processors in a parallel run. Using a computer with a slow interconnect or not enough cells per processor can cause a difference in cpu and clock time. Hope that helps sharonyue, chengyu and Martin Einarsve like this.

August 24, 2009, 21:58
#4
Senior Member

Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 13
Quote:
 Originally Posted by Simon Lapointe Hi, I'm not an expert but here's what I think, 1) There isn't much to add there, the ExecutionTime is the time spent by the processor and the ClockTime is the wall clock time or "real" time if you prefer. 2 & 3) There is an interest because a significative difference between the ExecutionTime and the ClockTime is a sign of a slow calculation. The difference can be explained by the time when a file is being written or when there is communication between processors in a parallel run. Using a computer with a slow interconnect or not enough cells per processor can cause a difference in cpu and clock time. Hope that helps

I noticed this is your first two posts on the forum, and they are so helpful, thank you.
__________________
~
Daniel WEI
-------------
Boeing Research & Technology - China
Beijing, China
Email

September 1, 2014, 10:53
#5
New Member

Wei Liu
Join Date: Apr 2011
Location: West Lafayette, IN
Posts: 28
Rep Power: 7
Quote:
 Originally Posted by lakeat Dear all, A small question, what is the difference between "ExecutionTime" and "ClockTime"? I can get these lins from icoFoam.C, Code: ```Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl;``` someone said: Could anyone explain this in detail? If ClockTime means something, why then that we have to care about ExecutionTime? Is there any meaning concerning the ratio of ClockTime over ExecutionTime? Latency, or what? How can I change the writing format of these time, eg. show four decimal places in second.? Thanks in advance for any reply.
Hi Daniel,

Have you found the answer to your 4th question? Thanks!

Wei

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT -4. The time now is 11:43.

 Contact Us - CFD Online - Top