Add timing for file IO

This commit is contained in:
2024-01-15 06:33:42 +01:00
parent f36089a56c
commit aa5c98a436
3 changed files with 19 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ int main(int argc, char** argv)
#endif
printf("Solution took %.2fs\n", timeStop - timeStart);
timeStart = getTimeStamp();
double *pg, *ug, *vg, *wg;
size_t bytesize = (size_t)(s.grid.imax * s.grid.jmax * s.grid.kmax) * sizeof(double);
@@ -126,5 +127,11 @@ int main(int argc, char** argv)
vtkScalar(&opts, "pressure", pg);
vtkVector(&opts, "velocity", (VtkVector) { ug, vg, wg });
vtkClose(&opts);
timeStop = getTimeStamp();
if (commIsMaster(&s.comm)) {
printf("Result output took %.2fs\n", timeStop - timeStart);
}
return EXIT_SUCCESS;
}