From 9bf93810d7d5ec35dea8de94a0037bf8629817fc Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Thu, 29 Oct 2015 20:55:54 +0900 Subject: [PATCH 1/5] fortran: Fix: array dimension of `MPI_ARGVS_NULL`. `MPI_ARGVS_NULL` should be a two-dimensional array. Without this modification, gfortran throw the following error if `MPI_ARGVS_NULL` is used for `MPI_COMM_SPAWN_MULTIPLE`. Error: There is no specific subroutine for the generic 'mpi_comm_spawn_multiple' at (1) --- ompi/include/mpif-sentinels.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/include/mpif-sentinels.h b/ompi/include/mpif-sentinels.h index 59de52e941..4ae7934f6e 100644 --- a/ompi/include/mpif-sentinels.h +++ b/ompi/include/mpif-sentinels.h @@ -41,7 +41,7 @@ ! don't need another interface for MPI_COMM_SPAWN. character MPI_ARGV_NULL(1) ! Ditto for MPI_ARGVS_NULL / MPI_COMM_SPAWN_MULTIPLE. - character MPI_ARGVS_NULL(1) + character MPI_ARGVS_NULL(1, 1) ! MPI_ERRCODES_IGNORE has similar rationale to MPI_ARGV_NULL. The ! F77 functions are all smart enough to check that the errcodes ! parameter is not ERRCODES_IGNORE before assigning values into it From d5e1f40a1eff18385274718238851da398cfdfa5 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Thu, 29 Oct 2015 20:56:31 +0900 Subject: [PATCH 2/5] fortran: Fix: `info` should be an integer parameter. --- ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h b/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h index 64218aa21a..a57a3b47e0 100644 --- a/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h +++ b/ompi/mpi/fortran/use-mpi-tkr/mpi-f90-interfaces.h @@ -3379,7 +3379,7 @@ subroutine MPI_Dist_graph_create(comm_old, n, sources, degrees, destinations, & integer, dimension(n), intent(in) :: degrees integer, dimension(n), intent(in) :: destinations integer, dimension(n), intent(in) :: weights - logical, intent(in) :: info + integer, intent(in) :: info logical, intent(in) :: reorder integer, intent(out) :: comm_dist_graph integer, intent(out) :: ierror @@ -3400,7 +3400,7 @@ subroutine MPI_Dist_graph_create_adjacent(comm_old, indegree, sources, sourcewei integer, intent(in) :: outdegree integer, dimension(outdegree), intent(in) :: destinations integer, dimension(outdegree), intent(in) :: destweights - logical, intent(in) :: info + integer, intent(in) :: info logical, intent(in) :: reorder integer, intent(out) :: comm_dist_graph integer, intent(out) :: ierror From 107c0073dd11fb90d18122c521686f692a32cdd8 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Thu, 29 Oct 2015 20:57:03 +0900 Subject: [PATCH 3/5] fortran: Fix: `MPI_UNWEIGHTED` and `MPI_WEIGHTS_EMPTY` should be arrays. Without this modification, gfortran throw the following error if these variables are used for `MPI_DIST_GRAPH_CREATE_ADJACENT` or `MPI_DIST_GRAPH_CREATE_ADJACENT`. Error: There is no specific subroutine for the generic 'mpi_dist_graph_create_adjacent' at (1) --- ompi/include/mpif-sentinels.h | 6 ++++-- ompi/mpi/fortran/base/gen-mpi-mangling.pl | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ompi/include/mpif-sentinels.h b/ompi/include/mpif-sentinels.h index 4ae7934f6e..6e7c0e7fe4 100644 --- a/ompi/include/mpif-sentinels.h +++ b/ompi/include/mpif-sentinels.h @@ -53,8 +53,10 @@ integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE) ! Ditto for MPI_STATUSES_IGNORE integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1) - integer MPI_UNWEIGHTED - integer MPI_WEIGHTS_EMPTY +! Ditto for MPI_UNWEIGHTED + integer MPI_UNWEIGHTED(1) +! Ditto for MPI_WEIGHTS_EMPTY + integer MPI_WEIGHTS_EMPTY(1) common/mpi_fortran_bottom/MPI_BOTTOM common/mpi_fortran_in_place/MPI_IN_PLACE diff --git a/ompi/mpi/fortran/base/gen-mpi-mangling.pl b/ompi/mpi/fortran/base/gen-mpi-mangling.pl index d061eed89d..96294f9fa9 100755 --- a/ompi/mpi/fortran/base/gen-mpi-mangling.pl +++ b/ompi/mpi/fortran/base/gen-mpi-mangling.pl @@ -62,13 +62,13 @@ $fortran->{in_place} = { f_name => "MPI_IN_PLACE", }; $fortran->{unweighted} = { - c_type => "int", + c_type => "int *", c_name => "mpi_fortran_unweighted", f_type => "integer", f_name => "MPI_UNWEIGHTED", }; $fortran->{weights_empty} = { - c_type => "int", + c_type => "int *", c_name => "mpi_fortran_weights_empty", f_type => "integer", f_name => "MPI_WEIGHTS_EMPTY", From 1092eabfab143671668f13beb10a16ca5ac297f6 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Thu, 29 Oct 2015 21:05:37 +0900 Subject: [PATCH 4/5] fortran: Update comment. The structure was changed in commit 9c77c6b. --- ompi/include/mpif-sentinels.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ompi/include/mpif-sentinels.h b/ompi/include/mpif-sentinels.h index 6e7c0e7fe4..082154cdbb 100644 --- a/ompi/include/mpif-sentinels.h +++ b/ompi/include/mpif-sentinels.h @@ -26,8 +26,7 @@ ! ! - the "mpi" module bindings ! - the "mpi_f08" module bindings -! - ompi/mpi/fortran/base/constants.h -! - ompi/mpi/runtime/ompi_init.c +! - ompi/mpi/fortran/base/gen-mpi-mangling.pl ! ! MPI_BOTTOM is only used where choice buffers can be used (meaning From 384f4b51d1c950b731b198095cc7dce2fe6d05c0 Mon Sep 17 00:00:00 2001 From: KAWASHIMA Takahiro Date: Mon, 2 Nov 2015 14:21:52 +0900 Subject: [PATCH 5/5] fortran: Fix: missing `dimension(*)` in `(I)NEIGHBOR_ALLTOALLW`. --- .../mpi-ignore-tkr-interfaces.h.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 c9fe16e5bf..a636245f16 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 @@ -3636,12 +3636,12 @@ subroutine MPI_Ineighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recv @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf integer, dimension(*), intent(in) :: sendcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: sdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: sdispls integer, dimension(*), intent(in) :: sendtypes @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf integer, dimension(*), intent(in) :: recvcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: rdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: rdispls integer, dimension(*), intent(in) :: recvtypes integer, intent(in) :: comm integer, intent(out) :: request @@ -3658,12 +3658,12 @@ subroutine PMPI_Ineighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, rec @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf integer, dimension(*), intent(in) :: sendcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: sdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: sdispls integer, dimension(*), intent(in) :: sendtypes @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf integer, dimension(*), intent(in) :: recvcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: rdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: rdispls integer, dimension(*), intent(in) :: recvtypes integer, intent(in) :: comm integer, intent(out) :: request @@ -4698,12 +4698,12 @@ subroutine MPI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recvb @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf integer, dimension(*), intent(in) :: sendcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: sdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: sdispls integer, dimension(*), intent(in) :: sendtypes @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf integer, dimension(*), intent(in) :: recvcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: rdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: rdispls integer, dimension(*), intent(in) :: recvtypes integer, intent(in) :: comm integer, intent(out) :: ierror @@ -4719,12 +4719,12 @@ subroutine PMPI_Neighbor_alltoallw(sendbuf, sendcounts, sdispls, sendtypes, recv @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ sendbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: sendbuf integer, dimension(*), intent(in) :: sendcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: sdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: sdispls integer, dimension(*), intent(in) :: sendtypes @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ recvbuf @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: recvbuf integer, dimension(*), intent(in) :: recvcounts - integer(kind=MPI_ADDRESS_KIND), intent(in) :: rdispls + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: rdispls integer, dimension(*), intent(in) :: recvtypes integer, intent(in) :: comm integer, intent(out) :: ierror