X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/364eee0fc6ab77fddc5437ac273527bd27711724..6d004c352f7b26fba38486001f874e65466b5bee:/src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp diff --git a/src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp b/src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp index bb5edb4fab..e4dc8a0c75 100644 --- a/src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp +++ b/src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. +/* Copyright (c) 2013-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ namespace simgrid{ namespace smpi{ int Coll_alltoall_mvapich2_scatter_dest::alltoall( - void *sendbuf, + const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, @@ -57,8 +57,6 @@ int Coll_alltoall_mvapich2_scatter_dest::alltoall( MPI_Aint sendtype_extent = 0, recvtype_extent = 0; int mpi_errno=MPI_SUCCESS; int dst, rank; - MPI_Request *reqarray; - MPI_Status *starray; if (recvcount == 0) return MPI_SUCCESS; @@ -93,9 +91,9 @@ int Coll_alltoall_mvapich2_scatter_dest::alltoall( /* FIXME: This should use the memory macros (there are storage leaks here if there is an error, for example) */ - reqarray= (MPI_Request*)xbt_malloc(2*bblock*sizeof(MPI_Request)); + MPI_Request* reqarray = new MPI_Request[2 * bblock]; - starray=(MPI_Status *)xbt_malloc(2*bblock*sizeof(MPI_Status)); + MPI_Status* starray = new MPI_Status[2 * bblock]; for (ii=0; ii