Update reported line
This commit is contained in:
parent
3aab096ef9
commit
2861c43f05
@ -25,26 +25,21 @@ int main(int argc, char **argv)
|
|||||||
double start = getTime();
|
double start = getTime();
|
||||||
double residual = solve(&conf, rows, cols, conf.timesteps, NULL);
|
double residual = solve(&conf, rows, cols, conf.timesteps, NULL);
|
||||||
double end = getTime();
|
double end = getTime();
|
||||||
|
double delta_time = end - start;
|
||||||
|
|
||||||
int64_t totalElements = conf.rows*conf.cols;
|
long niter = conf.convergenceTimesteps;
|
||||||
double throughput = (totalElements*conf.timesteps)/(end-start);
|
long iter_elem = conf.rows * conf.cols;
|
||||||
|
long total_elem = iter_elem * niter;
|
||||||
|
double throughput = total_elem / delta_time;
|
||||||
|
|
||||||
#ifdef _OMPSS_2
|
fprintf(stderr, "%14s %14s %14s %8s %8s %8s %8s %8s\n",
|
||||||
int threads = sysconf(_SC_NPROCESSORS_ONLN);
|
"time", "updates/s", "rel. error",
|
||||||
#else
|
|
||||||
int threads = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fprintf(stderr, "%14s %14s %14s %8s %8s %8s %8s %8s %8s\n",
|
|
||||||
"time", "updates/s", "error",
|
|
||||||
"rows", "cols",
|
"rows", "cols",
|
||||||
"rbs", "cbs", "threads",
|
"rbs", "cbs", "iters");
|
||||||
"steps");
|
fprintf(stdout, "%14e %14e %14e %8ld %8ld %8d %8d %8ld\n",
|
||||||
fprintf(stdout, "%14e %14e %14e %8ld %8ld %8d %8d %8d %8d\n",
|
delta_time, throughput, residual,
|
||||||
end-start, throughput, residual,
|
|
||||||
conf.rows, conf.cols,
|
conf.rows, conf.cols,
|
||||||
conf.rbs, conf.cbs, threads,
|
conf.rbs, conf.cbs, niter);
|
||||||
conf.convergenceTimesteps);
|
|
||||||
|
|
||||||
if (conf.generateImage)
|
if (conf.generateImage)
|
||||||
writeImage(conf.imageFileName, conf.matrix, rows, cols);
|
writeImage(conf.imageFileName, conf.matrix, rows, cols);
|
||||||
|
Loading…
Reference in New Issue
Block a user