Compilation error with MPI_get_address

Questions on using the PGI Compilers and Tools
Post Reply
giovannip
Posts: 2
Joined: Jul 11 2019

Compilation error with MPI_get_address

Post by giovannip » Thu Jul 11, 2019 5:38 am

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:

Code: Select all

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.

Code: Select all

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

mkcolg
Posts: 8066
Joined: Jun 30 2004

Re: Compilation error with MPI_get_address

Post by mkcolg » Thu Jul 11, 2019 7:41 am

Hi giovannip,

From the OpenMPI man page (https://www.open-mpi.org/doc/v3.0/man3/ ... ress.3.php), it looks like "iadd" needs to have a kind of "MPI_ADDRESS_KIND".

Code: Select all

% 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

giovannip
Posts: 2
Joined: Jul 11 2019

Re: Compilation error with MPI_get_address

Post by giovannip » Thu Jul 11, 2019 3:17 pm

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.

Post Reply