fortran/mpif-h: fix [i]alltoallw bindings
Fix a regression introduced in open-mpi/ompi@cdaed89d04 Fixes CID 1451610, 1451611 and 1451612 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp> (cherry picked from commit open-mpi/ompi@ed703bec1b)
Этот коммит содержится в:
родитель
fbf7d31fd1
Коммит
5ab26e490a
@ -75,7 +75,7 @@ void ompi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype *c_sendtypes, *c_recvtypes;
|
||||
MPI_Datatype *c_sendtypes = NULL, *c_recvtypes;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(sdispls);
|
||||
@ -119,7 +119,7 @@ void ompi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls);
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
if (NULL != c_sendtypes) {
|
||||
free(c_sendtypes);
|
||||
}
|
||||
free(c_recvtypes);
|
||||
|
@ -75,7 +75,7 @@ void ompi_ialltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype *c_sendtypes, *c_recvtypes;
|
||||
MPI_Datatype *c_sendtypes = NULL, *c_recvtypes;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
@ -101,7 +101,6 @@ void ompi_ialltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
for (int i=0; i<size; i++) {
|
||||
c_recvtypes[i] = PMPI_Type_f2c(recvtypes[i]);
|
||||
}
|
||||
c_recvtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
@ -122,7 +121,7 @@ void ompi_ialltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls);
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
if (NULL != c_sendtypes) {
|
||||
free(c_sendtypes);
|
||||
}
|
||||
free(c_recvtypes);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user