X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d51e11eeca324570cf038a3bf6a5d05109903633..fb47f988141dcfef528d6dc68219d9857b4e054c:/examples/smpi/MM/Summa.c diff --git a/examples/smpi/MM/Summa.c b/examples/smpi/MM/Summa.c index 9edf3c8a78..12c2370626 100644 --- a/examples/smpi/MM/Summa.c +++ b/examples/smpi/MM/Summa.c @@ -125,7 +125,7 @@ inline double Summa( XBT_DEBUG("position of B_b: %zu \n", pos_b); } end_time_intern = MPI_Wtime(); - communication_time += start_time_intern - end_time_intern; + communication_time += end_time_intern - start_time_intern; MPI_Barrier(row_comm); MPI_Barrier(col_comm); @@ -142,16 +142,16 @@ inline double Summa( c[i*ldc+j] += B_a[i*lda_local+k]*B_b[k*ldb_local+j]; end_time_intern = MPI_Wtime(); - computation_time += start_time_intern - end_time_intern; + computation_time += end_time_intern - start_time_intern; } MPI_Barrier(row_comm); MPI_Barrier(col_comm); end_time = MPI_Wtime(); - time = start_time - end_time; - printf("communication time: %le nanoseconds, " - "computation time: %le nanoseconds\n", + time = end_time - start_time ; + printf("communication time: %le seconds, " + "computation time: %le seconds\n", communication_time, computation_time);