Skip to content

Commit 107c007

Browse files
committed
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)
1 parent d5e1f40 commit 107c007

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ompi/include/mpif-sentinels.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@
5353
integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
5454
! Ditto for MPI_STATUSES_IGNORE
5555
integer MPI_STATUSES_IGNORE(MPI_STATUS_SIZE, 1)
56-
integer MPI_UNWEIGHTED
57-
integer MPI_WEIGHTS_EMPTY
56+
! Ditto for MPI_UNWEIGHTED
57+
integer MPI_UNWEIGHTED(1)
58+
! Ditto for MPI_WEIGHTS_EMPTY
59+
integer MPI_WEIGHTS_EMPTY(1)
5860

5961
common/mpi_fortran_bottom/MPI_BOTTOM
6062
common/mpi_fortran_in_place/MPI_IN_PLACE

ompi/mpi/fortran/base/gen-mpi-mangling.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
f_name => "MPI_IN_PLACE",
6363
};
6464
$fortran->{unweighted} = {
65-
c_type => "int",
65+
c_type => "int *",
6666
c_name => "mpi_fortran_unweighted",
6767
f_type => "integer",
6868
f_name => "MPI_UNWEIGHTED",
6969
};
7070
$fortran->{weights_empty} = {
71-
c_type => "int",
71+
c_type => "int *",
7272
c_name => "mpi_fortran_weights_empty",
7373
f_type => "integer",
7474
f_name => "MPI_WEIGHTS_EMPTY",

0 commit comments

Comments
 (0)