1
1

Fix the !MPI_[I]Neighbor_* mpi_f08 interfaces.

Use the same trick for send/recvtypes as we did in r29298 for
![I]Alltoallw.  Also, add all prototypes for all the back-end
ompi_neighbor_*_f functions.

Refs trac:3802

This commit was SVN r29299.

The following SVN revision numbers were found above:
  r29298 --> open-mpi/ompi@0acebc0a1f

The following Trac tickets were found above:
  Ticket 3802 --> https://svn.open-mpi.org/trac/ompi/ticket/3802
Этот коммит содержится в:
Jeff Squyres 2013-09-30 17:54:12 +00:00
родитель 0acebc0a1f
Коммит 66eb7ff610
3 изменённых файлов: 153 добавлений и 12 удалений

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -12,18 +12,19 @@ subroutine MPI_Ineighbor_alltoallw_f08(sendbuf,sendcounts,sdispls,sendtypes,&
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_ineighbor_alltoallw_f
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf, recvbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcounts(*), recvcounts(*)
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: sdispls(*), rdispls(*)
TYPE(MPI_Datatype), INTENT(IN) :: sendtypes
TYPE(MPI_Datatype), INTENT(IN) :: recvtypes
TYPE(MPI_Datatype), INTENT(IN) :: sendtypes(*)
TYPE(MPI_Datatype), INTENT(IN) :: recvtypes(*)
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Request), INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_ineighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes%MPI_VAL,&
recvbuf,recvcounts,rdispls,recvtypes%MPI_VAL,&
call ompi_ineighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes(1)%MPI_VAL,&
recvbuf,recvcounts,rdispls,recvtypes(1)%MPI_VAL,&
comm%MPI_VAL,request%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror

Просмотреть файл

@ -3149,4 +3149,143 @@ subroutine ompi_mrecv_f(buf,count,datatype,message,status,ierror) &
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_mrecv_f
subroutine ompi_neighbor_allgather_f(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, &
comm,ierror) &
BIND(C, name="ompi_neighbor_allgather_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcount, recvcount
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_neighbor_allgather_f
subroutine ompi_ineighbor_allgather_f(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, &
comm,request,ierror) &
BIND(C, name="ompi_ineighbor_allgather_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcount, recvcount
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_ineighbor_allgather_f
subroutine ompi_neighbor_allgatherv_f(sendbuf,sendcount,sendtype,recvbuf,recvcounts,displs, &
recvtype,comm,ierror) &
BIND(C, name="ompi_neighbor_allgatherv_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcount
INTEGER, INTENT(IN) :: recvcounts(*), displs(*)
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_neighbor_allgatherv_f
subroutine ompi_ineighbor_allgatherv_f(sendbuf,sendcount,sendtype,recvbuf,recvcounts,displs, &
recvtype,comm,request,ierror) &
BIND(C, name="ompi_ineighbor_allgatherv_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcount
INTEGER, INTENT(IN) :: recvcounts(*), displs(*)
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_ineighbor_allgatherv_f
subroutine ompi_neighbor_alltoall_f(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, &
comm,ierror) &
BIND(C, name="ompi_neighbor_alltoall_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcount, recvcount
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_neighbor_alltoall_f
subroutine ompi_ineighbor_alltoall_f(sendbuf,sendcount,sendtype,recvbuf,recvcount,recvtype, &
comm,request,ierror) &
BIND(C, name="ompi_ineighbor_alltoall_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcount, recvcount
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_ineighbor_alltoall_f
subroutine ompi_neighbor_alltoallv_f(sendbuf,sendcounts,sdispls,sendtype,recvbuf,recvcounts, &
rdispls,recvtype,comm,ierror) &
BIND(C, name="ompi_neighbor_alltoallv_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcounts(*), sdispls(*), recvcounts(*), rdispls(*)
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_neighbor_alltoallv_f
subroutine ompi_ineighbor_alltoallv_f(sendbuf,sendcounts,sdispls,sendtype,recvbuf,recvcounts, &
rdispls,recvtype,comm,request,ierror) &
BIND(C, name="ompi_ineighbor_alltoallv_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcounts(*), sdispls(*), recvcounts(*), rdispls(*)
INTEGER, INTENT(IN) :: sendtype, recvtype
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_ineighbor_alltoallv_f
subroutine ompi_neighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes,recvbuf,recvcounts, &
rdispls,recvtypes,comm,ierror) &
BIND(C, name="ompi_neighbor_alltoallw_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Aint, MPI_ADDRESS_KIND
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcounts(*), recvcounts(*)
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: sdispls(*), rdispls(*)
INTEGER, INTENT(IN) :: sendtypes, recvtypes
INTEGER, INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_neighbor_alltoallw_f
subroutine ompi_ineighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes,recvbuf,recvcounts, &
rdispls,recvtypes,comm,request,ierror) &
BIND(C, name="ompi_ineighbor_alltoallw_f")
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_Request, MPI_ADDRESS_KIND
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcounts(*), recvcounts(*)
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: sdispls(*), rdispls(*)
INTEGER, INTENT(IN) :: sendtypes, recvtypes
INTEGER, INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: request
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine ompi_ineighbor_alltoallw_f
end interface

Просмотреть файл

@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Los Alamos National Security, LLC.
! All rights reserved.
! $COPYRIGHT$
@ -12,17 +12,18 @@ subroutine MPI_Neighbor_alltoallw_f08(sendbuf,sendcounts,sdispls,sendtypes,&
use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm, MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_neighbor_alltoallw_f
implicit none
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf, recvbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: sendbuf
OMPI_FORTRAN_IGNORE_TKR_TYPE :: recvbuf
INTEGER, INTENT(IN) :: sendcounts(*), recvcounts(*)
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: sdispls(*), rdispls(*)
TYPE(MPI_Datatype), INTENT(IN) :: sendtypes
TYPE(MPI_Datatype), INTENT(IN) :: recvtypes
TYPE(MPI_Datatype), INTENT(IN) :: sendtypes(*)
TYPE(MPI_Datatype), INTENT(IN) :: recvtypes(*)
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror
call ompi_neighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes%MPI_VAL,&
recvbuf,recvcounts,rdispls,recvtypes%MPI_VAL,&
call ompi_neighbor_alltoallw_f(sendbuf,sendcounts,sdispls,sendtypes(1)%MPI_VAL,&
recvbuf,recvcounts,rdispls,recvtypes(1)%MPI_VAL,&
comm%MPI_VAL,c_ierror)
if (present(ierror)) ierror = c_ierror