X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/61427a88a76a2c2ef25d0d5b8132995c6f550e5c..bcb5cde966bef9e174da1c93cdb2158c0880a613:/src/smpi/smpi_pmpi.cpp diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index 528bcaac99..c48bdcf59e 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -3,6 +3,8 @@ /* 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. */ +#include + #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" #include "src/smpi/private.h" @@ -2125,8 +2127,7 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype } extra->datatype1 = encode_datatype(sendtmptype, &known); - int dt_size_send = 1; - dt_size_send = sendtmptype->size(); + int dt_size_send = sendtmptype->size(); for (i = 0; i < size; i++) { // copy data to avoid bad free extra->send_size += sendtmpcounts[i] * dt_size_send; @@ -2152,8 +2153,8 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype int PMPI_Get_processor_name(char *name, int *resultlen) { - strncpy(name, SIMIX_host_self()->cname(), strlen(SIMIX_host_self()->cname()) < MPI_MAX_PROCESSOR_NAME - 1 - ? strlen(SIMIX_host_self()->cname()) + 1 + strncpy(name, sg_host_self()->getCname(), strlen(sg_host_self()->getCname()) < MPI_MAX_PROCESSOR_NAME - 1 + ? strlen(sg_host_self()->getCname()) + 1 : MPI_MAX_PROCESSOR_NAME - 1); *resultlen = strlen(name) > MPI_MAX_PROCESSOR_NAME ? MPI_MAX_PROCESSOR_NAME : strlen(name);