PGF90-S-0038-Symbol, mpi_in_place, has not been declared

I just found that the standard mpich installation that comes with PGI compiler doesn’t support MPI_IN_PLACE. Is it because mpi version is too low to support MPI_IN_PLACE? How to fix it? Thanks in advance~

I used the standard mpich installation that comes with PGI compiler.
PGI compiler version:12.10
[test@ln1 ~ ]$ mpif90 --version
mpif90 for 1.2.7 (release) of : 2005/06/22 16:33:49

pgf90 12.10-0 64-bit target on x86-64 Linux -tp nehalem
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2012, STMicroelectronics, Inc. All Rights Reserved.

The test code is as follows:

program main
  2         implicit none
  3         integer:: my_proc,ncells,ierr
  4         integer:: ncells_in
  5         include 'mpif.h'
  6
  7         call mpi_init(ierr)
  8         call mpi_comm_rank(mpi_comm_world, my_proc, ierr)
  9
 10         ncells   =(my_proc+1)*3
 11         ncells_in=(my_proc+1)*3
 12
 13         print *,'num cells before:', ncells,my_proc
 14         call flush(6)
 15         call mpi_allreduce(mpi_in_place, ncells, 1, mpi_integer, mpi_sum, mpi_comm_world, ierr)
 16
 17
 18         print *,'num cells after:', ncells,my_proc
 19         call flush(6)
 20         call mpi_barrier(mpi_comm_world,ierr)
 21         call mpi_finalize(ierr)
 22         stop
 23       end program

Hi Yang,

I see you are using a fairly old release of PGI - 12.10. This version includes a build of MPI based on MPICH 1.2.7. This version of MPICH is rather old, and does not support the MPI_IN_PLACE variable.

I would suggest upgrading to a more recent version of PGI and MPICH, if possible. PGI 15.x ships with a build of MPI based on MPICH 3.1.3.

If that is not possible, you are welcome to download the latest MPICH source code and try building it yourself with PGI 12.10. We have not tried this here, and cannot guarantee success.

Hope this helps.

Best regards,

+chris

Hi Chris,

Thanks for your suggestion. I tested that MPICH2 1.4.1p1 supports the MPI_IN_PLACE variable.

PGI 12.10 includes the build of MPI based on MPICH1 1.2.7 which is the newest version in MPICH1. Does the variable MPI_IN_PLACE is not supported by MPICH1?
So I want to know the variable MPI_IN_PLACE is supported since which version of MPICH2?

I will try both ways you suggested. Thanks very much~