ExecutionTime与ClockTime有什么区别与联系?
-
再补充一下,用不同的电脑跑了 damBreak 算例,得到的三个 ExecutionTime 和 ClockTime 。
并不总是 clockTime 大于 ExecutionTime
。@wwzhao但是仔细检查发现,造成右边两个有差异的主要原因是
两个时间的精度问题
,如下所示:ExecutionTime = 1.58 s ClockTime = 1 s ExecutionTime = 1.59 s ClockTime = 1 s ExecutionTime = 1.59 s ClockTime = 1 s ExecutionTime = 1.6 s ClockTime = 1 s ExecutionTime = 1.6 s ClockTime = 1 s ExecutionTime = 1.61 s ClockTime = 1 s ExecutionTime = 1.62 s ClockTime = 1 s ExecutionTime = 1.62 s ClockTime = 1 s ExecutionTime = 1.63 s ClockTime = 1 s ExecutionTime = 1.64 s ClockTime = 1 s ExecutionTime = 1.64 s ClockTime = 2 s ExecutionTime = 1.65 s ClockTime = 2 s ExecutionTime = 1.66 s ClockTime = 2 s ExecutionTime = 1.66 s ClockTime = 2 s ExecutionTime = 1.67 s ClockTime = 2 s ExecutionTime = 1.67 s ClockTime = 2 s ExecutionTime = 1.68 s ClockTime = 2 s
因为是一个很小的单核算例,IO也不大,所以IO基本上没有花时间,导致在保留精度不同的情况下出现了上述差异。
多说两句
:
上图右上角是在WSL2 根目录下的结果,
右下角是在一个 Ubuntu18.0.4 服务器上的结果,
左边的结果是用 WSL2 在 /mnt/h 盘下的结果,可以看到在即使是很小的算例。这个IO耗时也是相当大。这是 WSL2目前的问题,相较于WSL 它在 根目录下确实IO能力有很大提升。但是在 /mnt/* 下 真是果断弃疗。
版本:
OpenFOAM-v7The 'ExecutionTime' is the elapsed CPU time, and the ClockTime is the elapsed wall clock time for the latest time step(approximate!!)