X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e68ca10e951fb61e944c99c7774b1e415ae9f6d..ffe8ce65fd9a8e18a0469f26f067c3ea6d5d60d4:/examples/smpi/MM/Summa.c diff --git a/examples/smpi/MM/Summa.c b/examples/smpi/MM/Summa.c index 07ac234ffb..cb51445097 100644 --- a/examples/smpi/MM/Summa.c +++ b/examples/smpi/MM/Summa.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2012-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + /*! * Classical Block Matrix Multiplication example * @@ -6,19 +12,20 @@ #include "Matrix_init.h" #include "Summa.h" #include "xbt/log.h" +#include + XBT_LOG_NEW_DEFAULT_CATEGORY(MM_Summa, "Messages specific for this msg example"); -inline double Summa( - double *a, double *b, double *c, - size_t lda, size_t ldb, size_t ldc, - size_t m, size_t k_a, size_t k_b, size_t n, - size_t Block_size, size_t start, size_t end, - size_t row, size_t col, size_t size_row, size_t size_col, - double *a_local, double *b_local, - MPI_Datatype Block_a, MPI_Datatype Block_a_local, - MPI_Datatype Block_b, - MPI_Comm row_comm, MPI_Comm col_comm, int subs) +double Summa(double *a, double *b, double *c, + size_t lda, size_t ldb, size_t ldc, + size_t m, size_t k_a, size_t k_b, size_t n, + size_t Block_size, size_t start, size_t end, + size_t row, size_t col, size_t size_row, size_t size_col, + double *a_local, double *b_local, + MPI_Datatype Block_a, MPI_Datatype Block_a_local, + MPI_Datatype Block_b, + MPI_Comm row_comm, MPI_Comm col_comm, int subs) { double *B_a , *B_b ; //matrix blocks size_t err; @@ -150,8 +157,8 @@ inline double Summa( end_time = MPI_Wtime(); time = end_time - start_time ; - printf("communication time: %le seconds, " - "computation time: %le seconds\n", + printf("communication time: %e seconds, " + "computation time: %e seconds\n", communication_time, computation_time);