      program sample4
      include 'mpif.h'
      integer nprocs,myrank
      integer status(MPI_STATUS_SIZE)
      real work(10)
      call MPI_INIT(ierr)
      call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ierr)
      call MPI_COMM_SIZE(MPI_COMM_WORLD,nprocs,ierr)
      itag=1
      work=0.0
      if(myrank.eq.0) then
        do i=1,10
          work(i)=float(i)
        enddo
        call MPI_SEND(work(4),3,MPI_REAL,1,itag,MPI_COMM_WORLD,ierr)
      else if(myrank.eq.1) then
        call MPI_RECV(work(4),3,MPI_REAL,0,itag,MPI_COMM_WORLD,
     +                status,ierr)
        write(6,*) work
      endif
      call MPI_FINALIZE(ierr)
      stop
      end
