CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Difference between "ExecutionTime" and "ClockTime" (http://www.cfd-online.com/Forums/openfoam-solving/67695-difference-between-executiontime-clocktime.html)

lakeat August 24, 2009 06:44

Difference between "ExecutionTime" and "ClockTime"
 
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.?

Thanks in advance for any reply.

sandy August 24, 2009 06:56

Look at hani:
http://www.tfd.chalmers.se/~hani/kur...tyTutorial.pdf
in page 43.

Simon Lapointe August 24, 2009 21:19

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

lakeat August 24, 2009 21:58

Quote:

Originally Posted by Simon Lapointe (Post 227360)
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

:D:D
I noticed this is your first two posts on the forum, and they are so helpful, thank you.

mathslw September 1, 2014 10:53

Quote:

Originally Posted by lakeat (Post 227263)
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:

  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.?

Thanks in advance for any reply.

Hi Daniel,

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

Wei


All times are GMT -4. The time now is 15:22.