X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1ba7f6b1ee9d622c2922456975c080242d052eae..9dcbaf12eae0cdee463970e9c8716a6bf70dd1e0:/src/smpi/smpi_mpi_dt.c diff --git a/src/smpi/smpi_mpi_dt.c b/src/smpi/smpi_mpi_dt.c index 29471e963e..59512b6edd 100644 --- a/src/smpi/smpi_mpi_dt.c +++ b/src/smpi/smpi_mpi_dt.c @@ -177,13 +177,12 @@ int smpi_datatype_copy(void *sendbuf, int sendcount, MPI_Datatype sendtype, }else{ s_smpi_subtype_t *subtype = sendtype->substruct; - s_smpi_mpi_vector_t* type_c = (s_smpi_mpi_vector_t*)sendtype; - void * buf_tmp = xbt_malloc(count * type_c->size_oldtype); + void * buf_tmp = xbt_malloc(count); subtype->serialize( sendbuf, buf_tmp,1, subtype); subtype = recvtype->substruct; - subtype->unserialize(recvbuf, buf_tmp,1, subtype); + subtype->unserialize( buf_tmp, recvbuf,1, subtype); free(buf_tmp); }