Fix MPI_IN_PLACE handling for Fortran collectives
This commit was SVN r8526.
Этот коммит содержится в:
родитель
fa097c9874
Коммит
2bae18fd91
2
NEWS
2
NEWS
@ -29,6 +29,8 @@ version 1.0.
|
||||
1.0.2
|
||||
-----
|
||||
|
||||
- Added missing MPI::Intercomm collectives.
|
||||
- Fixed MPI_IN_PLACE handling for Fortran collectives.
|
||||
- Fixed some more C++ const_cast<> issues. Thanks for Martin Audet
|
||||
(again) for bringing this to our attention.
|
||||
- Updated ROMIO with the version from MPICH 1.2.7p1, marked as version
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_ALLGATHER = mpi_allgather_f
|
||||
@ -68,6 +69,10 @@ void mpi_allgather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Allgather(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_ALLGATHERV = mpi_allgatherv_f
|
||||
@ -75,6 +76,10 @@ void mpi_allgatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Allgatherv(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_ALLREDUCE = mpi_allreduce_f
|
||||
@ -69,6 +70,11 @@ void mpi_allreduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
printf("converted to inplace\n");
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Allreduce(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op, c_comm));
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_GATHER = mpi_gather_f
|
||||
@ -68,6 +69,10 @@ void mpi_gather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Gather(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_GATHERV = mpi_gatherv_f
|
||||
@ -76,6 +77,10 @@ void mpi_gatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Gatherv(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_REDUCE = mpi_reduce_f
|
||||
@ -69,6 +70,10 @@ void mpi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op,
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_REDUCE_SCATTER = mpi_reduce_scatter_f
|
||||
@ -73,6 +74,10 @@ void mpi_reduce_scatter_f(char *sendbuf, char *recvbuf,
|
||||
|
||||
MPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce_scatter(sendbuf, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_SCAN = mpi_scan_f
|
||||
@ -69,6 +70,10 @@ void mpi_scan_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scan(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op,
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_SCATTER = mpi_scatter_f
|
||||
@ -68,6 +69,10 @@ void mpi_scatter_f(char *sendbuf, MPI_Fint *sendcount,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scatter(sendbuf,OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_SCATTERV = mpi_scatterv_f
|
||||
@ -77,6 +78,10 @@ void mpi_scatterv_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
if (OMPI_IS_FORTRAN_IN_PLACE(sendbuf)) {
|
||||
sendbuf = MPI_IN_PLACE;
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scatterv(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user