Add timing for file IO
This commit is contained in:
parent
f36089a56c
commit
aa5c98a436
@ -73,11 +73,17 @@ int main(int argc, char** argv)
|
||||
printf("Solution took %.2fs\n", timeStop - timeStart);
|
||||
}
|
||||
|
||||
timeStart = getTimeStamp();
|
||||
VtkOptions opts = { .grid = s.grid, .comm = s.comm };
|
||||
vtkOpen(&opts, s.problem);
|
||||
vtkScalar(&opts, "pressure", s.p);
|
||||
vtkVector(&opts, "velocity", (VtkVector) { s.u, s.v, s.w });
|
||||
vtkClose(&opts);
|
||||
timeStop = getTimeStamp();
|
||||
|
||||
if (commIsMaster(&s.comm)) {
|
||||
printf("Result output took %.2fs\n", timeStop - timeStart);
|
||||
}
|
||||
|
||||
commFinalize(&s.comm);
|
||||
return EXIT_SUCCESS;
|
||||
|
@ -73,6 +73,7 @@ int main(int argc, char** argv)
|
||||
printf("Solution took %.2fs\n", timeStop - timeStart);
|
||||
}
|
||||
|
||||
timeStart = getTimeStamp();
|
||||
double *pg, *ug, *vg, *wg;
|
||||
|
||||
if (commIsMaster(&s.comm)) {
|
||||
@ -104,6 +105,11 @@ int main(int argc, char** argv)
|
||||
vtkVector(&opts, "velocity", (VtkVector) { ug, vg, wg });
|
||||
vtkClose(&opts);
|
||||
}
|
||||
timeStop = getTimeStamp();
|
||||
|
||||
if (commIsMaster(&s.comm)) {
|
||||
printf("Result output took %.2fs\n", timeStop - timeStart);
|
||||
}
|
||||
|
||||
commFinalize(&s.comm);
|
||||
return EXIT_SUCCESS;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user