Compilation error with MPI_get_address

Hi everyone,
I am trying to compile a code using the PGI compiler and I get the following error on the MPI_get_address call: “PGF90-S-0155-Could not resolve generic procedure mpi_get_address”.
A MWE that can be used to reproduce the error is reported here below.
The compilation instruction I use is:

mpifort -O3 -lm -ldl test.f90 -o exec

I am trying to compile using pgi/19.4 and mpi/pgi_openmpi/19.4 (currently using the modules provided on bridges.psc.edu).
I have no clue why this is happening; in the complete code (not reported here) other calls to MPI subroutines/functions work just fine (MPI module is included correctly and works), the only error is on the MPI_get_address.

program test

use mpi

integer :: n,m
integer :: ierr
integer :: iadd

double precision, allocatable, asynchronous :: bufs(:,:)

n=10
m=30
allocate(bufs(n,m))

if(.not.mpi_async_protects_nonblocking) call mpi_get_address(bufs,iadd,ierr)

deallocate(bufs)

end program test

Hi giovannip,

From the OpenMPI man page (MPI_Get_address(3) man page (version 3.0.6)), it looks like “iadd” needs to have a kind of “MPI_ADDRESS_KIND”.

% cat mpi_get_address.f90
program test

use mpi

integer :: n,m
integer :: ierr
integer(KIND=MPI_ADDRESS_KIND) :: iadd

double precision, allocatable, asynchronous :: bufs(:,:)

n=10
m=30
allocate(bufs(n,m))

if(.not.mpi_async_protects_nonblocking) call mpi_get_address(bufs,iadd,ierr)

deallocate(bufs)

end program test
% mpif90 mpi_get_address.f90
%

Hope this helps,
Mat

Thanks Mat! That definitely solved it. I usually use MPICH and its guide, so I did not think about checking types when porting to PGI and OpenMPI.