Browse Source

mpi/examples/matrix_decomposition: properly return timing and gflops information

Nathalie Furmento 12 years ago
parent
commit
009057a06b
1 changed files with 2 additions and 5 deletions
  1. 2 5
      mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c

+ 2 - 5
mpi/examples/matrix_decomposition/mpi_cholesky_codelets.c

@@ -171,11 +171,8 @@ void dw_cholesky(float ***matA, unsigned size, unsigned ld, unsigned nblocks, in
 
 	if (rank == 0)
 	{
-		double timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
-		fprintf(stdout, "Computation time (in ms): %2.2f\n", timing/1000);
-
-		double flop = (1.0f*size*size*size)/3.0f;
-		fprintf(stdout, "Synthetic GFlops : %2.2f\n", (flop/timing/1000.0f));
+		*timing = (double)((end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
+		*flops = (1.0f*size*size*size)/3.0f;
 	}
 }