      PROGRAM gather
      INCLUDE 'mpif.h'
      INTEGER err, rank, size
      real param(8),mine
      integer sndcnt,rcvcnt
      CALL MPI_INIT(err)
      CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank, err)
      CALL MPI_COMM_SIZE(MPI_COMM_WORLD, size, err)
      
      sndcnt=1
      mine=23.0+rank
      if(rank.eq.7) then 
         rcvcnt=1
      end if
      call MPI_GATHER(mine,sndcnt,MPI_REAL,param,rcvcnt,MPI_REAL,
     &     7,MPI_COMM_WORLD,err)
      if(rank.eq.7) then
         do i=1,8
            print *,'PE:',rank,' param(',i,') is ',param(i)   
         end do
      end if
c      
      CALL MPI_FINALIZE(err)
      END
