From e477a18c5c0cabfc1d333eec5d6980495e12257c Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:46:58 +0900 Subject: [PATCH 01/10] fortran: Add missing `MPI_DUP_FN` subroutine Though the `MPI_DUP_FN` subroutine is depricated, it is not yet removed as of MPI-3.1. (cherry picked from commit open-mpi/ompi@10c11ff5b502be307494ae6a845543d4d43fc8ae) --- ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h b/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h index 3c3b16cf39..d406bbd0c2 100644 --- a/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h +++ b/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h @@ -21,6 +21,15 @@ interface !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + subroutine MPI_DUP_FN( comm, comm_keyval, extra_state, & + attribute_val_in, attribute_val_out, & + flag, ierr ) + implicit none + integer :: comm, comm_keyval, extra_state + integer :: attribute_val_in, attribute_val_out, ierr + logical :: flag + end subroutine MPI_DUP_FN + subroutine MPI_NULL_COPY_FN( comm, comm_keyval, extra_state, & attribute_val_in, attribute_val_out, & flag, ierr ) From 486c6223cefa1bbb1e1ad8e9685033aa06aadbc7 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:46:59 +0900 Subject: [PATCH 02/10] fortran: Change subroutine declaration order Same order for `comm`, `type`, and `win`. No code change. (cherry picked from commit open-mpi/ompi@334c63cf0a7759e5ba0f91532b8eb69bdc7aaf59) --- .../base/attr-fn-int-callback-interfaces.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h b/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h index d406bbd0c2..27c64cc625 100644 --- a/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h +++ b/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h @@ -49,6 +49,17 @@ interface !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + subroutine MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, & + attribute_val_out, flag, ierr ) + implicit none + include 'mpif-config.h' + integer :: oldcomm + integer :: comm_keyval + integer(kind=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out + logical :: flag + integer :: ierr + end subroutine MPI_COMM_DUP_FN + subroutine MPI_COMM_NULL_COPY_FN( comm, comm_keyval, extra_state, & attribute_val_in, attribute_val_out, & flag, ierr ) @@ -71,17 +82,6 @@ interface integer :: ierr end subroutine MPI_COMM_NULL_DELETE_FN - subroutine MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, & - attribute_val_out, flag, ierr ) - implicit none - include 'mpif-config.h' - integer :: oldcomm - integer :: comm_keyval - integer(kind=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out - logical :: flag - integer :: ierr - end subroutine MPI_COMM_DUP_FN - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPI_TYPE_DUP_FN( oldtype, type_keyval, extra_state, & From b7510bb4caaed4f2b8e8f551dc31c24f5d81f761 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:46:59 +0900 Subject: [PATCH 03/10] fortran: Sort declared subroutins in alphabetical order And insert necessary empty lines and remove unnecessary empty lines. No code change. (cherry picked from commit open-mpi/ompi@96e93a9c5f804de6441dedd035b00381fb162a33) --- .../mpi-ignore-tkr-interfaces.h.in | 689 +++++++++--------- 1 file changed, 354 insertions(+), 335 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index a636245f16..239ea1a147 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -163,6 +163,7 @@ end subroutine PMPI_Address end interface + interface MPI_Aint_add function MPI_Aint_add(base, diff) @@ -185,6 +186,7 @@ end function PMPI_Aint_add end interface + interface MPI_Aint_diff function MPI_Aint_diff(addr1, addr2) @@ -207,6 +209,7 @@ end function PMPI_Aint_diff end interface + interface MPI_Allgather subroutine MPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, & @@ -1074,18 +1077,6 @@ end subroutine MPI_Comm_create end interface -interface MPI_Comm_create_group - -subroutine MPI_Comm_create_group(comm, group, tag, newcomm, ierror) - integer, intent(in) :: comm - integer, intent(in) :: group - integer, intent(in) :: tag - integer, intent(out) :: newcomm - integer, intent(out) :: ierror -end subroutine MPI_Comm_create_group - -end interface - interface PMPI_Comm_create subroutine PMPI_Comm_create(comm, group, newcomm, ierror) @@ -1119,6 +1110,19 @@ end subroutine PMPI_Comm_create_errhandler end interface +interface MPI_Comm_create_group + +subroutine MPI_Comm_create_group(comm, group, tag, newcomm, ierror) + integer, intent(in) :: comm + integer, intent(in) :: group + integer, intent(in) :: tag + integer, intent(out) :: newcomm + integer, intent(out) :: ierror +end subroutine MPI_Comm_create_group + +end interface + + interface MPI_Comm_create_keyval subroutine MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierror) @@ -1196,35 +1200,25 @@ end subroutine MPI_Comm_dup end interface -interface MPI_Comm_dup_with_info +interface PMPI_Comm_dup -subroutine MPI_Comm_dup_with_info(comm, info, newcomm, ierror) +subroutine PMPI_Comm_dup(comm, newcomm, ierror) integer, intent(in) :: comm - integer, intent(in) :: info integer, intent(out) :: newcomm integer, intent(out) :: ierror -end subroutine MPI_Comm_dup_with_info +end subroutine PMPI_Comm_dup end interface -interface MPI_Comm_idup - -subroutine MPI_Comm_idup(comm, newcomm, request, ierror) - integer, intent(in) :: comm - integer, intent(out) :: newcomm - integer, intent(out) :: request - integer, intent(out) :: ierror -end subroutine MPI_Comm_idup - -end interface -interface PMPI_Comm_dup +interface MPI_Comm_dup_with_info -subroutine PMPI_Comm_dup(comm, newcomm, ierror) +subroutine MPI_Comm_dup_with_info(comm, info, newcomm, ierror) integer, intent(in) :: comm + integer, intent(in) :: info integer, intent(out) :: newcomm integer, intent(out) :: ierror -end subroutine PMPI_Comm_dup +end subroutine MPI_Comm_dup_with_info end interface @@ -1378,6 +1372,18 @@ end subroutine PMPI_Comm_group end interface +interface MPI_Comm_idup + +subroutine MPI_Comm_idup(comm, newcomm, request, ierror) + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Comm_idup + +end interface + + interface MPI_Comm_join subroutine MPI_Comm_join(fd, intercomm, ierror) @@ -1754,6 +1760,7 @@ end subroutine PMPI_Compare_and_swap end interface + interface MPI_Dims_create subroutine MPI_Dims_create(nnodes, ndims, dims, ierror) @@ -2057,6 +2064,7 @@ end subroutine PMPI_Exscan end interface + interface MPI_Fetch_and_op subroutine MPI_Fetch_and_op(origin_addr, result_addr, datatype, target_rank,& @@ -2095,6 +2103,7 @@ end subroutine PMPI_Fetch_and_op end interface + interface MPI_Finalize subroutine MPI_Finalize(ierror) @@ -2270,6 +2279,7 @@ end subroutine PMPI_Get end interface + interface MPI_Get_accumulate subroutine MPI_Get_accumulate(origin_addr, origin_count, origin_datatype,& @@ -2322,6 +2332,7 @@ end subroutine PMPI_Get_accumulate end interface + interface MPI_Get_address subroutine MPI_Get_address(location, address, ierror) @@ -2397,8 +2408,6 @@ end subroutine PMPI_Get_elements end interface - - interface MPI_Get_library_version subroutine MPI_Get_library_version(version, resultlen, ierror) @@ -3250,74 +3259,74 @@ end subroutine PMPI_Ibcast end interface -interface MPI_Iexscan +interface MPI_Ibsend -subroutine MPI_Iexscan(sendbuf, recvbuf, count, datatype, op, & +subroutine MPI_Ibsend(buf, count, datatype, dest, tag, & comm, request, ierror) - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf integer, intent(in) :: count integer, intent(in) :: datatype - integer, intent(in) :: op + integer, intent(in) :: dest + integer, intent(in) :: tag integer, intent(in) :: comm integer, intent(out) :: request integer, intent(out) :: ierror -end subroutine MPI_Iexscan +end subroutine MPI_Ibsend end interface -interface PMPI_Iexscan +interface PMPI_Ibsend -subroutine PMPI_Iexscan(sendbuf, recvbuf, count, datatype, op, & +subroutine PMPI_Ibsend(buf, count, datatype, dest, tag, & comm, request, ierror) - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf integer, intent(in) :: count integer, intent(in) :: datatype - integer, intent(in) :: op + integer, intent(in) :: dest + integer, intent(in) :: tag integer, intent(in) :: comm integer, intent(out) :: request integer, intent(out) :: ierror -end subroutine PMPI_Iexscan +end subroutine PMPI_Ibsend end interface -interface MPI_Ibsend +interface MPI_Iexscan -subroutine MPI_Ibsend(buf, count, datatype, dest, tag, & +subroutine MPI_Iexscan(sendbuf, recvbuf, count, datatype, op, & comm, request, ierror) - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf integer, intent(in) :: count integer, intent(in) :: datatype - integer, intent(in) :: dest - integer, intent(in) :: tag + integer, intent(in) :: op integer, intent(in) :: comm integer, intent(out) :: request integer, intent(out) :: ierror -end subroutine MPI_Ibsend +end subroutine MPI_Iexscan end interface -interface PMPI_Ibsend +interface PMPI_Iexscan -subroutine PMPI_Ibsend(buf, count, datatype, dest, tag, & +subroutine PMPI_Iexscan(sendbuf, recvbuf, count, datatype, op, & comm, request, ierror) - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf integer, intent(in) :: count integer, intent(in) :: datatype - integer, intent(in) :: dest - integer, intent(in) :: tag + integer, intent(in) :: op integer, intent(in) :: comm integer, intent(out) :: request integer, intent(out) :: ierror -end subroutine PMPI_Ibsend +end subroutine PMPI_Iexscan end interface @@ -4732,6 +4741,7 @@ end subroutine PMPI_Neighbor_alltoallw end interface + interface MPI_Op_commutative subroutine MPI_Op_commutative(op, commute, ierror) @@ -5070,6 +5080,7 @@ end subroutine PMPI_Query_thread end interface + interface MPI_Raccumulate subroutine MPI_Raccumulate(origin_addr, origin_count, origin_datatype,& @@ -5114,212 +5125,75 @@ end subroutine PMPI_Raccumulate end interface -interface MPI_Get -subroutine MPI_Rget(origin_addr, origin_count, origin_datatype, & - target_rank, target_disp, target_count, & - target_datatype, win, request, ierror) +interface MPI_Recv + +subroutine MPI_Recv(buf, count, datatype, source, tag, & + comm, status, ierror) include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: origin_addr - integer, intent(in) :: origin_count - integer, intent(in) :: origin_datatype - integer, intent(in) :: target_rank - integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp - integer, intent(in) :: target_count - integer, intent(in) :: target_datatype - integer, intent(in) :: win - integer, intent(out) :: request + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, dimension(MPI_STATUS_SIZE), intent(out) :: status integer, intent(out) :: ierror -end subroutine MPI_Rget +end subroutine MPI_Recv end interface -interface PMPI_Get +interface PMPI_Recv -subroutine PMPI_Rget(origin_addr, origin_count, origin_datatype, & - target_rank, target_disp, target_count, & - target_datatype, win, request, ierror) +subroutine PMPI_Recv(buf, count, datatype, source, tag, & + comm, status, ierror) include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: origin_addr - integer, intent(in) :: origin_count - integer, intent(in) :: origin_datatype - integer, intent(in) :: target_rank - integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp - integer, intent(in) :: target_count - integer, intent(in) :: target_datatype - integer, intent(in) :: win - integer, intent(out) :: request + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm + integer, dimension(MPI_STATUS_SIZE), intent(out) :: status integer, intent(out) :: ierror -end subroutine PMPI_Rget +end subroutine PMPI_Recv end interface -interface MPI_Rget_accumulate -subroutine MPI_Rget_accumulate(origin_addr, origin_count, origin_datatype,& - result_addr, result_count, result_datatype,& - target_rank, target_disp, target_count, & - target_datatype, op, win, request, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr - integer, intent(in) :: origin_count - integer, intent(in) :: origin_datatype - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr - integer, intent(in) :: result_count - integer, intent(in) :: result_datatype - integer, intent(in) :: target_rank - integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp - integer, intent(in) :: target_count - integer, intent(in) :: target_datatype - integer, intent(in) :: op - integer, intent(in) :: win +interface MPI_Recv_init + +subroutine MPI_Recv_init(buf, count, datatype, source, tag, & + comm, request, ierror) + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm integer, intent(out) :: request integer, intent(out) :: ierror -end subroutine MPI_Rget_accumulate +end subroutine MPI_Recv_init end interface -interface PMPI_Rget_accumulate +interface PMPI_Recv_init -subroutine PMPI_Rget_accumulate(origin_addr, origin_count, origin_datatype,& - result_addr, result_count, result_datatype,& - target_rank, target_disp, target_count, & - target_datatype, op, win, request, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr - integer, intent(in) :: origin_count - integer, intent(in) :: origin_datatype - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr - integer, intent(in) :: result_count - integer, intent(in) :: result_datatype - integer, intent(in) :: target_rank - integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp - integer, intent(in) :: target_count - integer, intent(in) :: target_datatype - integer, intent(in) :: op - integer, intent(in) :: win +subroutine PMPI_Recv_init(buf, count, datatype, source, tag, & + comm, request, ierror) + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(in) :: source + integer, intent(in) :: tag + integer, intent(in) :: comm integer, intent(out) :: request integer, intent(out) :: ierror -end subroutine PMPI_Rget_accumulate - -end interface - -interface MPI_Rput - -subroutine MPI_Rput(origin_addr, origin_count, origin_datatype, & - target_rank, target_disp, target_count, & - target_datatype, win, request, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr - integer, intent(in) :: origin_count - integer, intent(in) :: origin_datatype - integer, intent(in) :: target_rank - integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp - integer, intent(in) :: target_count - integer, intent(in) :: target_datatype - integer, intent(in) :: win - integer, intent(out) :: request - integer, intent(out) :: ierror -end subroutine MPI_Rput - -end interface - -interface PMPI_Rput - -subroutine PMPI_Rput(origin_addr, origin_count, origin_datatype, & - target_rank, target_disp, target_count, & - target_datatype, win, request, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr - integer, intent(in) :: origin_count - integer, intent(in) :: origin_datatype - integer, intent(in) :: target_rank - integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp - integer, intent(in) :: target_count - integer, intent(in) :: target_datatype - integer, intent(in) :: win - integer, intent(out) :: request - integer, intent(out) :: ierror -end subroutine PMPI_Rput - -end interface - -interface MPI_Recv - -subroutine MPI_Recv(buf, count, datatype, source, tag, & - comm, status, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf - integer, intent(in) :: count - integer, intent(in) :: datatype - integer, intent(in) :: source - integer, intent(in) :: tag - integer, intent(in) :: comm - integer, dimension(MPI_STATUS_SIZE), intent(out) :: status - integer, intent(out) :: ierror -end subroutine MPI_Recv - -end interface - -interface PMPI_Recv - -subroutine PMPI_Recv(buf, count, datatype, source, tag, & - comm, status, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf - integer, intent(in) :: count - integer, intent(in) :: datatype - integer, intent(in) :: source - integer, intent(in) :: tag - integer, intent(in) :: comm - integer, dimension(MPI_STATUS_SIZE), intent(out) :: status - integer, intent(out) :: ierror -end subroutine PMPI_Recv - -end interface - - -interface MPI_Recv_init - -subroutine MPI_Recv_init(buf, count, datatype, source, tag, & - comm, request, ierror) - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf - integer, intent(in) :: count - integer, intent(in) :: datatype - integer, intent(in) :: source - integer, intent(in) :: tag - integer, intent(in) :: comm - integer, intent(out) :: request - integer, intent(out) :: ierror -end subroutine MPI_Recv_init - -end interface - -interface PMPI_Recv_init - -subroutine PMPI_Recv_init(buf, count, datatype, source, tag, & - comm, request, ierror) - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf - @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf - integer, intent(in) :: count - integer, intent(in) :: datatype - integer, intent(in) :: source - integer, intent(in) :: tag - integer, intent(in) :: comm - integer, intent(out) :: request - integer, intent(out) :: ierror -end subroutine PMPI_Recv_init +end subroutine PMPI_Recv_init end interface @@ -5539,6 +5413,147 @@ end subroutine PMPI_Request_get_status end interface +interface MPI_Get + +subroutine MPI_Rget(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Rget + +end interface + +interface PMPI_Get + +subroutine PMPI_Rget(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Rget + +end interface + + +interface MPI_Rget_accumulate + +subroutine MPI_Rget_accumulate(origin_addr, origin_count, origin_datatype,& + result_addr, result_count, result_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Rget_accumulate + +end interface + +interface PMPI_Rget_accumulate + +subroutine PMPI_Rget_accumulate(origin_addr, origin_count, origin_datatype,& + result_addr, result_count, result_datatype,& + target_rank, target_disp, target_count, & + target_datatype, op, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ result_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: result_addr + integer, intent(in) :: result_count + integer, intent(in) :: result_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: op + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Rget_accumulate + +end interface + + +interface MPI_Rput + +subroutine MPI_Rput(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_Rput + +end interface + +interface PMPI_Rput + +subroutine PMPI_Rput(origin_addr, origin_count, origin_datatype, & + target_rank, target_disp, target_count, & + target_datatype, win, request, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ origin_addr + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: origin_addr + integer, intent(in) :: origin_count + integer, intent(in) :: origin_datatype + integer, intent(in) :: target_rank + integer(kind=MPI_ADDRESS_KIND), intent(in) :: target_disp + integer, intent(in) :: target_count + integer, intent(in) :: target_datatype + integer, intent(in) :: win + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Rput + +end interface + + interface MPI_Rsend subroutine MPI_Rsend(ibuf, count, datatype, dest, tag, & @@ -6373,93 +6388,93 @@ end subroutine PMPI_Type_create_hindexed end interface -interface MPI_Type_create_hvector +interface MPI_Type_create_hindexed_block -subroutine MPI_Type_create_hvector(count, blocklength, stride, oldtype, newtype& +subroutine MPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype& , ierror) include 'mpif-config.h' integer, intent(in) :: count integer, intent(in) :: blocklength - integer(kind=MPI_ADDRESS_KIND), intent(in) :: stride + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: array_of_displacements integer, intent(in) :: oldtype integer, intent(out) :: newtype integer, intent(out) :: ierror -end subroutine MPI_Type_create_hvector +end subroutine MPI_Type_create_hindexed_block end interface -interface PMPI_Type_create_hvector +interface PMPI_Type_create_hindexed_block -subroutine PMPI_Type_create_hvector(count, blocklength, stride, oldtype, newtype& +subroutine PMPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype& , ierror) include 'mpif-config.h' integer, intent(in) :: count integer, intent(in) :: blocklength - integer(kind=MPI_ADDRESS_KIND), intent(in) :: stride + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: array_of_displacements integer, intent(in) :: oldtype integer, intent(out) :: newtype integer, intent(out) :: ierror -end subroutine PMPI_Type_create_hvector +end subroutine PMPI_Type_create_hindexed_block end interface -interface MPI_Type_create_indexed_block +interface MPI_Type_create_hvector -subroutine MPI_Type_create_indexed_block(count, blocklength, array_of_displacements, oldtype, newtype& +subroutine MPI_Type_create_hvector(count, blocklength, stride, oldtype, newtype& , ierror) + include 'mpif-config.h' integer, intent(in) :: count integer, intent(in) :: blocklength - integer, dimension(*), intent(in) :: array_of_displacements + integer(kind=MPI_ADDRESS_KIND), intent(in) :: stride integer, intent(in) :: oldtype integer, intent(out) :: newtype integer, intent(out) :: ierror -end subroutine MPI_Type_create_indexed_block +end subroutine MPI_Type_create_hvector end interface -interface PMPI_Type_create_indexed_block +interface PMPI_Type_create_hvector -subroutine PMPI_Type_create_indexed_block(count, blocklength, array_of_displacements, oldtype, newtype& +subroutine PMPI_Type_create_hvector(count, blocklength, stride, oldtype, newtype& , ierror) + include 'mpif-config.h' integer, intent(in) :: count integer, intent(in) :: blocklength - integer, dimension(*), intent(in) :: array_of_displacements + integer(kind=MPI_ADDRESS_KIND), intent(in) :: stride integer, intent(in) :: oldtype integer, intent(out) :: newtype integer, intent(out) :: ierror -end subroutine PMPI_Type_create_indexed_block +end subroutine PMPI_Type_create_hvector end interface -interface MPI_Type_create_hindexed_block +interface MPI_Type_create_indexed_block -subroutine MPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype& +subroutine MPI_Type_create_indexed_block(count, blocklength, array_of_displacements, oldtype, newtype& , ierror) - include 'mpif-config.h' integer, intent(in) :: count integer, intent(in) :: blocklength - integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: array_of_displacements + integer, dimension(*), intent(in) :: array_of_displacements integer, intent(in) :: oldtype integer, intent(out) :: newtype integer, intent(out) :: ierror -end subroutine MPI_Type_create_hindexed_block +end subroutine MPI_Type_create_indexed_block end interface -interface PMPI_Type_create_hindexed_block +interface PMPI_Type_create_indexed_block -subroutine PMPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype& +subroutine PMPI_Type_create_indexed_block(count, blocklength, array_of_displacements, oldtype, newtype& , ierror) - include 'mpif-config.h' integer, intent(in) :: count integer, intent(in) :: blocklength - integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: array_of_displacements + integer, dimension(*), intent(in) :: array_of_displacements integer, intent(in) :: oldtype integer, intent(out) :: newtype integer, intent(out) :: ierror -end subroutine PMPI_Type_create_hindexed_block +end subroutine PMPI_Type_create_indexed_block end interface @@ -7329,17 +7344,6 @@ end subroutine PMPI_Waitsome end interface -interface MPI_Win_call_errhandler - -subroutine MPI_Win_call_errhandler(win, errorcode, ierror) - integer, intent(in) :: win - integer, intent(in) :: errorcode - integer, intent(out) :: ierror -end subroutine MPI_Win_call_errhandler - -end interface - - interface MPI_Win_allocate subroutine MPI_Win_allocate(size, disp_unit, info, comm, & @@ -7392,6 +7396,43 @@ end subroutine MPI_Win_allocate_shared_cptr end interface +interface MPI_Win_attach + +subroutine MPI_Win_attach(win, base, size, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_attach + +end interface + +interface PMPI_Win_attach + +subroutine PMPI_Win_attach(win, base, size, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base + integer(kind=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_attach + +end interface + + +interface MPI_Win_call_errhandler + +subroutine MPI_Win_call_errhandler(win, errorcode, ierror) + integer, intent(in) :: win + integer, intent(in) :: errorcode + integer, intent(out) :: ierror +end subroutine MPI_Win_call_errhandler + +end interface + interface PMPI_Win_call_errhandler subroutine PMPI_Win_call_errhandler(win, errorcode, ierror) @@ -7484,58 +7525,6 @@ end subroutine PMPI_Win_create_dynamic end interface -interface MPI_Win_attach - -subroutine MPI_Win_attach(win, base, size, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base - integer(kind=MPI_ADDRESS_KIND), intent(in) :: size - integer, intent(in) :: win - integer, intent(out) :: ierror -end subroutine MPI_Win_attach - -end interface - -interface PMPI_Win_attach - -subroutine PMPI_Win_attach(win, base, size, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base - integer(kind=MPI_ADDRESS_KIND), intent(in) :: size - integer, intent(in) :: win - integer, intent(out) :: ierror -end subroutine PMPI_Win_attach - -end interface - - -interface MPI_Win_detach - -subroutine MPI_Win_detach(win, base, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base - integer, intent(in) :: win - integer, intent(out) :: ierror -end subroutine MPI_Win_detach - -end interface - -interface PMPI_Win_detach - -subroutine PMPI_Win_detach(win, base, ierror) - include 'mpif-config.h' - @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base - @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base - integer, intent(in) :: win - integer, intent(out) :: ierror -end subroutine PMPI_Win_detach - -end interface - - interface MPI_Win_create_errhandler subroutine MPI_Win_create_errhandler(function, errhandler, ierror) @@ -7605,6 +7594,31 @@ end subroutine PMPI_Win_delete_attr end interface +interface MPI_Win_detach + +subroutine MPI_Win_detach(win, base, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_detach + +end interface + +interface PMPI_Win_detach + +subroutine PMPI_Win_detach(win, base, ierror) + include 'mpif-config.h' + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ base + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: base + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_detach + +end interface + + interface MPI_Win_fence subroutine MPI_Win_fence(assert, win, ierror) @@ -7625,6 +7639,7 @@ end subroutine PMPI_Win_fence end interface + interface MPI_Win_flush subroutine MPI_Win_flush(rank, win, ierror) @@ -7645,6 +7660,7 @@ end subroutine PMPI_Win_flush end interface + interface MPI_Win_flush_all subroutine MPI_Win_flush_all(win, ierror) @@ -7663,6 +7679,7 @@ end subroutine PMPI_Win_flush_all end interface + interface MPI_Win_flush_local subroutine MPI_Win_flush_local(rank, win, ierror) @@ -7683,6 +7700,7 @@ end subroutine PMPI_Win_flush_local end interface + interface MPI_Win_flush_local_all subroutine MPI_Win_flush_local_all(win, ierror) @@ -7701,6 +7719,7 @@ end subroutine PMPI_Win_flush_local_all end interface + interface MPI_Win_free subroutine MPI_Win_free(win, ierror) From f7be7c8b4f95dcacc13efaa6937fd6fed0211e76 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:46:59 +0900 Subject: [PATCH 04/10] fortran: Fix an incorrect interface name (cherry picked from commit open-mpi/ompi@b6cb0bc25791577c791fd7c5611993182bd2fe5f) --- .../fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 239ea1a147..95a5cad2cc 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -5413,7 +5413,7 @@ end subroutine PMPI_Request_get_status end interface -interface MPI_Get +interface MPI_Rget subroutine MPI_Rget(origin_addr, origin_count, origin_datatype, & target_rank, target_disp, target_count, & @@ -5434,7 +5434,7 @@ end subroutine MPI_Rget end interface -interface PMPI_Get +interface PMPI_Rget subroutine PMPI_Rget(origin_addr, origin_count, origin_datatype, & target_rank, target_disp, target_count, & From 57cbd7976cbf8bae9dc6b4d8eb0b28928de85743 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:47:00 +0900 Subject: [PATCH 05/10] fortran: Add missing PMPI interfaces (cherry picked from commit open-mpi/ompi@f3b9a49ad1b5f1b1a33313d1e6c76684a3b6072f) --- .../mpi-ignore-tkr-interfaces.h.in | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 95a5cad2cc..3b73631e0b 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -1122,6 +1122,18 @@ end subroutine MPI_Comm_create_group end interface +interface PMPI_Comm_create_group + +subroutine PMPI_Comm_create_group(comm, group, tag, newcomm, ierror) + integer, intent(in) :: comm + integer, intent(in) :: group + integer, intent(in) :: tag + integer, intent(out) :: newcomm + integer, intent(out) :: ierror +end subroutine PMPI_Comm_create_group + +end interface + interface MPI_Comm_create_keyval @@ -1222,6 +1234,17 @@ end subroutine MPI_Comm_dup_with_info end interface +interface PMPI_Comm_dup_with_info + +subroutine PMPI_Comm_dup_with_info(comm, info, newcomm, ierror) + integer, intent(in) :: comm + integer, intent(in) :: info + integer, intent(out) :: newcomm + integer, intent(out) :: ierror +end subroutine PMPI_Comm_dup_with_info + +end interface + interface MPI_Comm_free @@ -1383,6 +1406,17 @@ end subroutine MPI_Comm_idup end interface +interface PMPI_Comm_idup + +subroutine PMPI_Comm_idup(comm, newcomm, request, ierror) + integer, intent(in) :: comm + integer, intent(out) :: newcomm + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_Comm_idup + +end interface + interface MPI_Comm_join @@ -7369,6 +7403,31 @@ end subroutine MPI_Win_allocate_cptr end interface +interface PMPI_Win_allocate + +subroutine PMPI_Win_allocate(size, disp_unit, info, comm, & + baseptr, win, ierror) + include 'mpif-config.h' + integer(KIND=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm + integer(KIND=MPI_ADDRESS_KIND), intent(out) :: baseptr + integer, intent(out) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_allocate + +subroutine PMPI_Win_allocate_cptr(size, disp_unit, info, comm, & + baseptr, win, ierror) + use, intrinsic :: iso_c_binding, only : c_ptr + include 'mpif-config.h' + integer :: disp_unit, info, comm, win, ierror + integer(KIND=MPI_ADDRESS_KIND) :: size + type(C_PTR) :: baseptr +end subroutine PMPI_Win_allocate_cptr + +end interface + interface MPI_Win_allocate_shared @@ -7395,6 +7454,31 @@ end subroutine MPI_Win_allocate_shared_cptr end interface +interface PMPI_Win_allocate_shared + +subroutine PMPI_Win_allocate_shared(size, disp_unit, info, comm, & + baseptr, win, ierror) + include 'mpif-config.h' + integer(KIND=MPI_ADDRESS_KIND), intent(in) :: size + integer, intent(in) :: disp_unit + integer, intent(in) :: info + integer, intent(in) :: comm + integer(KIND=MPI_ADDRESS_KIND), intent(out) :: baseptr + integer, intent(out) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_allocate_shared + +subroutine PMPI_Win_allocate_shared_cptr(size, disp_unit, info, comm, & + baseptr, win, ierror) + use, intrinsic :: iso_c_binding, only : c_ptr + include 'mpif-config.h' + integer :: disp_unit, info, comm, win, ierror + integer(KIND=MPI_ADDRESS_KIND) :: size + type(C_PTR) :: baseptr +end subroutine PMPI_Win_allocate_shared_cptr + +end interface + interface MPI_Win_attach @@ -8038,6 +8122,33 @@ end subroutine MPI_Win_shared_query_cptr end interface +interface PMPI_Win_shared_query + +subroutine PMPI_Win_shared_query(win, rank, size, disp_unit, baseptr,& + ierror) + include 'mpif-config.h' + integer, intent(in) :: win + integer, intent(in) :: rank + integer(KIND=MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + integer(KIND=MPI_ADDRESS_KIND), intent(out) :: baseptr + integer, intent(out) :: ierror +end subroutine PMPI_Win_shared_query + +subroutine PMPI_Win_shared_query_cptr(win, rank, size, disp_unit, baseptr,& + ierror) + use, intrinsic :: iso_c_binding, only : c_ptr + include 'mpif-config.h' + integer, intent(in) :: win + integer, intent(in) :: rank + integer(KIND=MPI_ADDRESS_KIND), intent(out) :: size + integer, intent(out) :: disp_unit + type(C_PTR), intent(out) :: baseptr + integer, intent(out) :: ierror +end subroutine PMPI_Win_shared_query_cptr + +end interface + interface MPI_Win_start From 4811fb0b95a6d44e445f82d003364be984b6163b Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:47:00 +0900 Subject: [PATCH 06/10] fortran: Add missing interfaces (cherry picked from commit open-mpi/ompi@6f09d53e34f4f283a50c12ca18072efb3b6a85d1) --- .../mpi-ignore-tkr-interfaces.h.in | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 3b73631e0b..1f6bbed131 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -1332,6 +1332,27 @@ end subroutine PMPI_Comm_get_errhandler end interface +interface MPI_Comm_get_info + +subroutine MPI_Comm_get_info(comm, info_used, ierror) + integer, intent(in) :: comm + integer, intent(out) :: info_used + integer, intent(out) :: ierror +end subroutine MPI_Comm_get_info + +end interface + +interface PMPI_Comm_get_info + +subroutine PMPI_Comm_get_info(comm, info_used, ierror) + integer, intent(in) :: comm + integer, intent(out) :: info_used + integer, intent(out) :: ierror +end subroutine PMPI_Comm_get_info + +end interface + + interface MPI_Comm_get_name subroutine MPI_Comm_get_name(comm, comm_name, resultlen, ierror) @@ -2099,6 +2120,25 @@ end subroutine PMPI_Exscan end interface +interface MPI_F_sync_reg + +subroutine MPI_F_sync_reg(buf) + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(inout) :: buf +end subroutine MPI_F_sync_reg + +end interface + +interface PMPI_F_sync_reg + +subroutine PMPI_F_sync_reg(buf) + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(inout) :: buf +end subroutine PMPI_F_sync_reg + +end interface + + interface MPI_Fetch_and_op subroutine MPI_Fetch_and_op(origin_addr, result_addr, datatype, target_rank,& @@ -7982,6 +8022,27 @@ end subroutine PMPI_Win_lock end interface +interface MPI_Win_lock_all + +subroutine MPI_Win_lock_all(assert, win, ierror) + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_lock_all + +end interface + +interface PMPI_Win_lock_all + +subroutine PMPI_Win_lock_all(assert, win, ierror) + integer, intent(in) :: assert + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_lock_all + +end interface + + interface MPI_Win_post subroutine MPI_Win_post(group, assert, win, ierror) @@ -8173,6 +8234,25 @@ end subroutine PMPI_Win_start end interface +interface MPI_Win_sync + +subroutine MPI_Win_sync(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_sync + +end interface + +interface PMPI_Win_sync + +subroutine PMPI_Win_sync(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_sync + +end interface + + interface MPI_Win_test subroutine MPI_Win_test(win, flag, ierror) @@ -8215,6 +8295,25 @@ end subroutine PMPI_Win_unlock end interface +interface MPI_Win_unlock_all + +subroutine MPI_Win_unlock_all(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine MPI_Win_unlock_all + +end interface + +interface PMPI_Win_unlock_all + +subroutine PMPI_Win_unlock_all(win, ierror) + integer, intent(in) :: win + integer, intent(out) :: ierror +end subroutine PMPI_Win_unlock_all + +end interface + + interface MPI_Win_wait subroutine MPI_Win_wait(win, ierror) From 26cc674ac1c17e649f7906c538d03e2670dd648d Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:47:01 +0900 Subject: [PATCH 07/10] fortran: Add missing interfaces (part 2) (cherry picked from commit open-mpi/ompi@5d32a601ff76922eb225a4b1a0dee3fb0405df24) --- .../mpi-ignore-tkr-interfaces.h.in | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 1f6bbed131..756ba19d06 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -2482,6 +2482,31 @@ end subroutine PMPI_Get_elements end interface +interface MPI_Get_elements_x + +subroutine MPI_Get_elements_x(status, datatype, count, ierror) + include 'mpif-config.h' + integer, dimension(MPI_STATUS_SIZE), intent(in) :: status + integer, intent(in) :: datatype + integer(kind=MPI_COUNT_KIND), intent(out) :: count + integer, intent(out) :: ierror +end subroutine MPI_Get_elements_x + +end interface + +interface PMPI_Get_elements_x + +subroutine PMPI_Get_elements_x(status, datatype, count, ierror) + include 'mpif-config.h' + integer, dimension(MPI_STATUS_SIZE), intent(in) :: status + integer, intent(in) :: datatype + integer(kind=MPI_COUNT_KIND), intent(out) :: count + integer, intent(out) :: ierror +end subroutine PMPI_Get_elements_x + +end interface + + interface MPI_Get_library_version subroutine MPI_Get_library_version(version, resultlen, ierror) @@ -6125,6 +6150,31 @@ end subroutine PMPI_Status_set_elements end interface +interface MPI_Status_set_elements_x + +subroutine MPI_Status_set_elements_x(status, datatype, count, ierror) + include 'mpif-config.h' + integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status + integer, intent(in) :: datatype + integer(kind=MPI_COUNT_KIND), intent(in) :: count + integer, intent(out) :: ierror +end subroutine MPI_Status_set_elements_x + +end interface + +interface PMPI_Status_set_elements_x + +subroutine PMPI_Status_set_elements_x(status, datatype, count, ierror) + include 'mpif-config.h' + integer, dimension(MPI_STATUS_SIZE), intent(inout) :: status + integer, intent(in) :: datatype + integer(kind=MPI_COUNT_KIND), intent(in) :: count + integer, intent(out) :: ierror +end subroutine PMPI_Status_set_elements_x + +end interface + + interface MPI_Test subroutine MPI_Test(request, flag, status, ierror) @@ -6888,6 +6938,31 @@ end subroutine PMPI_Type_get_extent end interface +interface MPI_Type_get_extent_x + +subroutine MPI_Type_get_extent_x(type, lb, extent, ierror) + include 'mpif-config.h' + integer, intent(in) :: type + integer(kind=MPI_COUNT_KIND), intent(out) :: lb + integer(kind=MPI_COUNT_KIND), intent(out) :: extent + integer, intent(out) :: ierror +end subroutine MPI_Type_get_extent_x + +end interface + +interface PMPI_Type_get_extent_x + +subroutine PMPI_Type_get_extent_x(type, lb, extent, ierror) + include 'mpif-config.h' + integer, intent(in) :: type + integer(kind=MPI_COUNT_KIND), intent(out) :: lb + integer(kind=MPI_COUNT_KIND), intent(out) :: extent + integer, intent(out) :: ierror +end subroutine PMPI_Type_get_extent_x + +end interface + + interface MPI_Type_get_name subroutine MPI_Type_get_name(type, type_name, resultlen, ierror) @@ -6936,6 +7011,31 @@ end subroutine PMPI_Type_get_true_extent end interface +interface MPI_Type_get_true_extent_x + +subroutine MPI_Type_get_true_extent_x(datatype, true_lb, true_extent, ierror) + include 'mpif-config.h' + integer, intent(in) :: datatype + integer(kind=MPI_COUNT_KIND), intent(out) :: true_lb + integer(kind=MPI_COUNT_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror +end subroutine MPI_Type_get_true_extent_x + +end interface + +interface PMPI_Type_get_true_extent_x + +subroutine PMPI_Type_get_true_extent_x(datatype, true_lb, true_extent, ierror) + include 'mpif-config.h' + integer, intent(in) :: datatype + integer(kind=MPI_COUNT_KIND), intent(out) :: true_lb + integer(kind=MPI_COUNT_KIND), intent(out) :: true_extent + integer, intent(out) :: ierror +end subroutine PMPI_Type_get_true_extent_x + +end interface + + interface MPI_Type_hindexed subroutine MPI_Type_hindexed(count, array_of_blocklengths, array_of_displacements, oldtype, newtype& @@ -7134,6 +7234,29 @@ end subroutine PMPI_Type_size end interface +interface MPI_Type_size_x + +subroutine MPI_Type_size_x(type, size, ierror) + include 'mpif-config.h' + integer, intent(in) :: type + integer(kind=MPI_COUNT_KIND), intent(out) :: size + integer, intent(out) :: ierror +end subroutine MPI_Type_size_x + +end interface + +interface PMPI_Type_size_x + +subroutine PMPI_Type_size_x(type, size, ierror) + include 'mpif-config.h' + integer, intent(in) :: type + integer(kind=MPI_COUNT_KIND), intent(out) :: size + integer, intent(out) :: ierror +end subroutine PMPI_Type_size_x + +end interface + + interface MPI_Type_struct subroutine MPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype& From 356a3881f8fff4f41c541e336e14d8b3a3b3802e Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:47:01 +0900 Subject: [PATCH 08/10] fortran: Fix incorrect weak symbol names (cherry picked from commit open-mpi/ompi@d48c8525edbfcfc5e17f180a36d3f021cd07023a) --- ompi/mpi/fortran/mpif-h/win_attach_f.c | 8 ++++---- ompi/mpi/fortran/mpif-h/win_detach_f.c | 8 ++++---- ompi/mpi/fortran/mpif-h/win_get_info_f.c | 8 ++++---- ompi/mpi/fortran/mpif-h/win_set_info_f.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/win_attach_f.c b/ompi/mpi/fortran/mpif-h/win_attach_f.c index 387a05f2ff..29bd044713 100644 --- a/ompi/mpi/fortran/mpif-h/win_attach_f.c +++ b/ompi/mpi/fortran/mpif-h/win_attach_f.c @@ -19,8 +19,8 @@ #pragma weak pmpi_win_attach_ = ompi_win_attach_f #pragma weak pmpi_win_attach__ = ompi_win_attach_f -#pragma weak PMPI_Win_create_f = ompi_win_attach_f -#pragma weak PMPI_Win_create_f08 = ompi_win_attach_f +#pragma weak PMPI_Win_attach_f = ompi_win_attach_f +#pragma weak PMPI_Win_attach_f08 = ompi_win_attach_f #else OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_ATTACH, pmpi_win_attach, @@ -38,8 +38,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_ATTACH, #pragma weak mpi_win_attach_ = ompi_win_attach_f #pragma weak mpi_win_attach__ = ompi_win_attach_f -#pragma weak MPI_Win_create_f = ompi_win_attach_f -#pragma weak MPI_Win_create_f08 = ompi_win_attach_f +#pragma weak MPI_Win_attach_f = ompi_win_attach_f +#pragma weak MPI_Win_attach_f08 = ompi_win_attach_f #else #if ! OMPI_BUILD_MPI_PROFILING OMPI_GENERATE_F77_BINDINGS (MPI_WIN_ATTACH, diff --git a/ompi/mpi/fortran/mpif-h/win_detach_f.c b/ompi/mpi/fortran/mpif-h/win_detach_f.c index 54b552bad5..f50aa308eb 100644 --- a/ompi/mpi/fortran/mpif-h/win_detach_f.c +++ b/ompi/mpi/fortran/mpif-h/win_detach_f.c @@ -19,8 +19,8 @@ #pragma weak pmpi_win_detach_ = ompi_win_detach_f #pragma weak pmpi_win_detach__ = ompi_win_detach_f -#pragma weak PMPI_Win_create_f = ompi_win_detach_f -#pragma weak PMPI_Win_create_f08 = ompi_win_detach_f +#pragma weak PMPI_Win_detach_f = ompi_win_detach_f +#pragma weak PMPI_Win_detach_f08 = ompi_win_detach_f #else OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_DETACH, pmpi_win_detach, @@ -38,8 +38,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_DETACH, #pragma weak mpi_win_detach_ = ompi_win_detach_f #pragma weak mpi_win_detach__ = ompi_win_detach_f -#pragma weak MPI_Win_create_f = ompi_win_detach_f -#pragma weak MPI_Win_create_f08 = ompi_win_detach_f +#pragma weak MPI_Win_detach_f = ompi_win_detach_f +#pragma weak MPI_Win_detach_f08 = ompi_win_detach_f #else #if ! OMPI_BUILD_MPI_PROFILING OMPI_GENERATE_F77_BINDINGS (MPI_WIN_DETACH, diff --git a/ompi/mpi/fortran/mpif-h/win_get_info_f.c b/ompi/mpi/fortran/mpif-h/win_get_info_f.c index 8b9801dae1..dc74ea3f7e 100644 --- a/ompi/mpi/fortran/mpif-h/win_get_info_f.c +++ b/ompi/mpi/fortran/mpif-h/win_get_info_f.c @@ -19,8 +19,8 @@ #pragma weak pmpi_win_get_info_ = ompi_win_get_info_f #pragma weak pmpi_win_get_info__ = ompi_win_get_info_f -#pragma weak PMPI_Win_create_f = ompi_win_get_info_f -#pragma weak PMPI_Win_create_f08 = ompi_win_get_info_f +#pragma weak PMPI_Win_get_info_f = ompi_win_get_info_f +#pragma weak PMPI_Win_get_info_f08 = ompi_win_get_info_f #else OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_GET_INFO, pmpi_win_get_info, @@ -38,8 +38,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_GET_INFO, #pragma weak mpi_win_get_info_ = ompi_win_get_info_f #pragma weak mpi_win_get_info__ = ompi_win_get_info_f -#pragma weak MPI_Win_create_f = ompi_win_get_info_f -#pragma weak MPI_Win_create_f08 = ompi_win_get_info_f +#pragma weak MPI_Win_get_info_f = ompi_win_get_info_f +#pragma weak MPI_Win_get_info_f08 = ompi_win_get_info_f #else #if ! OMPI_BUILD_MPI_PROFILING OMPI_GENERATE_F77_BINDINGS (MPI_WIN_GET_INFO, diff --git a/ompi/mpi/fortran/mpif-h/win_set_info_f.c b/ompi/mpi/fortran/mpif-h/win_set_info_f.c index b957540a1b..65773fb33e 100644 --- a/ompi/mpi/fortran/mpif-h/win_set_info_f.c +++ b/ompi/mpi/fortran/mpif-h/win_set_info_f.c @@ -19,8 +19,8 @@ #pragma weak pmpi_win_set_info_ = ompi_win_set_info_f #pragma weak pmpi_win_set_info__ = ompi_win_set_info_f -#pragma weak PMPI_Win_create_f = ompi_win_set_info_f -#pragma weak PMPI_Win_create_f08 = ompi_win_set_info_f +#pragma weak PMPI_Win_set_info_f = ompi_win_set_info_f +#pragma weak PMPI_Win_set_info_f08 = ompi_win_set_info_f #else OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_SET_INFO, pmpi_win_set_info, @@ -38,8 +38,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_SET_INFO, #pragma weak mpi_win_set_info_ = ompi_win_set_info_f #pragma weak mpi_win_set_info__ = ompi_win_set_info_f -#pragma weak MPI_Win_create_f = ompi_win_set_info_f -#pragma weak MPI_Win_create_f08 = ompi_win_set_info_f +#pragma weak MPI_Win_set_info_f = ompi_win_set_info_f +#pragma weak MPI_Win_set_info_f08 = ompi_win_set_info_f #else #if ! OMPI_BUILD_MPI_PROFILING OMPI_GENERATE_F77_BINDINGS (MPI_WIN_SET_INFO, From a6ab32586509790e004ab79a2ef655ee3b0a26e6 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:47:01 +0900 Subject: [PATCH 09/10] fortran: Add missing `(P)MPI_Alloc_mem_cptr_{f,f08}` symbols This commit adds the following symbols MPI_Alloc_mem_cptr_f MPI_Alloc_mem_cptr_f08 PMPI_Alloc_mem_cptr_f PMPI_Alloc_mem_cptr_f08 These are implemented in the same way as other `_cptr` routines. (cherry picked from commit open-mpi/ompi@17d32acbb6eaad794c06059f735c0558fd6e6536) --- ompi/mpi/fortran/mpif-h/alloc_mem_f.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/alloc_mem_f.c b/ompi/mpi/fortran/mpif-h/alloc_mem_f.c index 5ffb18b9f0..4005b868a5 100644 --- a/ompi/mpi/fortran/mpif-h/alloc_mem_f.c +++ b/ompi/mpi/fortran/mpif-h/alloc_mem_f.c @@ -30,14 +30,16 @@ #pragma weak pmpi_alloc_mem_ = ompi_alloc_mem_f #pragma weak pmpi_alloc_mem__ = ompi_alloc_mem_f -/* Extra pragmas for the _cptr variant from MPI-3.1 */ +#pragma weak PMPI_Alloc_mem_f = ompi_alloc_mem_f +#pragma weak PMPI_Alloc_mem_f08 = ompi_alloc_mem_f + #pragma weak PMPI_ALLOC_MEM_CPTR = ompi_alloc_mem_f #pragma weak pmpi_alloc_mem_cptr = ompi_alloc_mem_f #pragma weak pmpi_alloc_mem_cptr_ = ompi_alloc_mem_f #pragma weak pmpi_alloc_mem_cptr__ = ompi_alloc_mem_f -#pragma weak PMPI_Alloc_mem_f = ompi_alloc_mem_f -#pragma weak PMPI_Alloc_mem_f08 = ompi_alloc_mem_f +#pragma weak PMPI_Alloc_mem_cptr_f = ompi_alloc_mem_f +#pragma weak PMPI_Alloc_mem_cptr_f08 = ompi_alloc_mem_f #else OMPI_GENERATE_F77_BINDINGS (PMPI_ALLOC_MEM, pmpi_alloc_mem, @@ -51,7 +53,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_ALLOC_MEM_CPTR, pmpi_alloc_mem_cptr, pmpi_alloc_mem_cptr_, pmpi_alloc_mem_cptr__, - pompi_alloc_mem_f, + pompi_alloc_mem_cptr_f, (MPI_Aint *size, MPI_Fint *info, char *baseptr, MPI_Fint *ierr), (size, info, baseptr, ierr) ) #endif @@ -63,7 +65,6 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_ALLOC_MEM_CPTR, #pragma weak mpi_alloc_mem_ = ompi_alloc_mem_f #pragma weak mpi_alloc_mem__ = ompi_alloc_mem_f -/* Extra pragmas for the _cptr variant from MPI-3.1 */ #pragma weak MPI_ALLOC_MEM_CPTR = ompi_alloc_mem_f #pragma weak mpi_alloc_mem_cptr = ompi_alloc_mem_f #pragma weak mpi_alloc_mem_cptr_ = ompi_alloc_mem_f @@ -71,6 +72,9 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_ALLOC_MEM_CPTR, #pragma weak MPI_Alloc_mem_f = ompi_alloc_mem_f #pragma weak MPI_Alloc_mem_f08 = ompi_alloc_mem_f + +#pragma weak MPI_Alloc_mem_cptr_f = ompi_alloc_mem_f +#pragma weak MPI_Alloc_mem_cptr_f08 = ompi_alloc_mem_f #else #if ! OMPI_BUILD_MPI_PROFILING OMPI_GENERATE_F77_BINDINGS (MPI_ALLOC_MEM, @@ -85,11 +89,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ALLOC_MEM_CPTR, mpi_alloc_mem_cptr, mpi_alloc_mem_cptr_, mpi_alloc_mem_cptr__, - ompi_alloc_mem_f, + ompi_alloc_mem_cptr_f, (MPI_Aint *size, MPI_Fint *info, char *baseptr, MPI_Fint *ierr), (size, info, baseptr, ierr) ) #else #define ompi_alloc_mem_f pompi_alloc_mem_f +#define ompi_alloc_mem_cptr_f pompi_alloc_mem_cptr_f #endif #endif @@ -102,3 +107,12 @@ void ompi_alloc_mem_f(MPI_Aint *size, MPI_Fint *info, char *baseptr, MPI_Fint *i ierr_c = PMPI_Alloc_mem(*size, c_info, baseptr); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c); } + +/* + * Note that MPI-3 mandates a second form of the + * MPI_Alloc_mem interface -- one that has a "_cptr" suffix. + */ +void ompi_alloc_mem_cptr_f(MPI_Aint *size, MPI_Fint *info, char *baseptr, MPI_Fint *ierr) +{ + ompi_alloc_mem_f(size, info, baseptr, ierr); +} From 670c2eeefc8c2680522ad7118a68e313ec2a58de Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Fri, 15 Apr 2016 19:47:02 +0900 Subject: [PATCH 10/10] fortran: Change the line order of #pragma No code change. These lines were introduced in my recent commit 17d32ac. I had a editing mistake and the order is different from other lines/files. (cherry picked from commit open-mpi/ompi@e85440457022f98cd9450f5e768cf642d071d2c0) --- ompi/mpi/fortran/mpif-h/alloc_mem_f.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mpi/fortran/mpif-h/alloc_mem_f.c b/ompi/mpi/fortran/mpif-h/alloc_mem_f.c index 4005b868a5..7570450813 100644 --- a/ompi/mpi/fortran/mpif-h/alloc_mem_f.c +++ b/ompi/mpi/fortran/mpif-h/alloc_mem_f.c @@ -65,14 +65,14 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_ALLOC_MEM_CPTR, #pragma weak mpi_alloc_mem_ = ompi_alloc_mem_f #pragma weak mpi_alloc_mem__ = ompi_alloc_mem_f +#pragma weak MPI_Alloc_mem_f = ompi_alloc_mem_f +#pragma weak MPI_Alloc_mem_f08 = ompi_alloc_mem_f + #pragma weak MPI_ALLOC_MEM_CPTR = ompi_alloc_mem_f #pragma weak mpi_alloc_mem_cptr = ompi_alloc_mem_f #pragma weak mpi_alloc_mem_cptr_ = ompi_alloc_mem_f #pragma weak mpi_alloc_mem_cptr__ = ompi_alloc_mem_f -#pragma weak MPI_Alloc_mem_f = ompi_alloc_mem_f -#pragma weak MPI_Alloc_mem_f08 = ompi_alloc_mem_f - #pragma weak MPI_Alloc_mem_cptr_f = ompi_alloc_mem_f #pragma weak MPI_Alloc_mem_cptr_f08 = ompi_alloc_mem_f #else