      PROGRAM scatter
      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)
      
      rcvcnt=1
      if(rank.eq.3) then
         do i=1,8
            param(i)=23.0+i
         end do
         sndcnt=1
      end if 
      call MPI_SCATTER(param,sndcnt,MPI_REAL,mine,rcvcnt,MPI_REAL,
     &     3,MPI_COMM_WORLD,err)
      print *,'P:',rank,' mine is ',mine

      CALL MPI_FINALIZE(err)
      END

