From: Arnaud Giersch Date: Sat, 27 Apr 2019 12:53:01 +0000 (+0200) Subject: MPI_Address gets const too. X-Git-Tag: v3.22.2~27 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6c052ec4bb4d096f997896b0995f768c73920d49 MPI_Address gets const too. --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 06c2cabde9..e55d9c1187 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -417,7 +417,7 @@ MPI_CALL(XBT_PUBLIC int, MPI_Free_mem, (void* base)); MPI_CALL(XBT_PUBLIC double, MPI_Wtime, (void)); MPI_CALL(XBT_PUBLIC double, MPI_Wtick, (void)); -MPI_CALL(XBT_PUBLIC int, MPI_Address, (void* location, MPI_Aint* address)); +MPI_CALL(XBT_PUBLIC int, MPI_Address, (const void* location, MPI_Aint* address)); MPI_CALL(XBT_PUBLIC int, MPI_Get_address, (const void* location, MPI_Aint* address)); MPI_CALL(XBT_PUBLIC int, MPI_Error_class, (int errorcode, int* errorclass)); diff --git a/src/smpi/bindings/smpi_mpi.cpp b/src/smpi/bindings/smpi_mpi.cpp index d5c632cba5..d0081a6285 100644 --- a/src/smpi/bindings/smpi_mpi.cpp +++ b/src/smpi/bindings/smpi_mpi.cpp @@ -73,7 +73,7 @@ WRAPPED_PMPI_CALL_NORETURN(double, MPI_Wtick,(void),()) WRAPPED_PMPI_CALL_NORETURN(double, MPI_Wtime,(void),()) WRAPPED_PMPI_CALL(int,MPI_Abort,(MPI_Comm comm, int errorcode),(comm, errorcode)) WRAPPED_PMPI_CALL(int,MPI_Accumulate,(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win),( origin_addr,origin_count, origin_datatype,target_rank,target_disp, target_count,target_datatype,op, win)) -WRAPPED_PMPI_CALL(int,MPI_Address,(void *location, MPI_Aint * address),(location, address)) +WRAPPED_PMPI_CALL(int, MPI_Address, (const void* location, MPI_Aint* address), (location, address)) WRAPPED_PMPI_CALL(int,MPI_Allgather,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm)) WRAPPED_PMPI_CALL(int,MPI_Allgatherv,(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs,MPI_Datatype recvtype, MPI_Comm comm),(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm)) WRAPPED_PMPI_CALL(int,MPI_Alloc_mem,(MPI_Aint size, MPI_Info info, void *baseptr),(size, info, baseptr)) diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index cbddb4d588..b4a47ddb8b 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -142,7 +142,7 @@ double PMPI_Wtick() return sg_maxmin_precision; } -int PMPI_Address(void *location, MPI_Aint * address) +int PMPI_Address(const void* location, MPI_Aint* address) { if (address==nullptr) { return MPI_ERR_ARG; @@ -154,7 +154,7 @@ int PMPI_Address(void *location, MPI_Aint * address) int PMPI_Get_address(const void *location, MPI_Aint * address) { - return PMPI_Address(const_cast(location), address); + return PMPI_Address(location, address); } int PMPI_Get_processor_name(char *name, int *resultlen)