PROGRAM async
  INCLUDE 'mpif.h'
  INTEGER ierr, myid, nproc
  INTEGER status(MPI_STATUS_SIZE),req
  INTEGER, PARAMETER :: ncount=20000
  REAL A(ncount), B(ncount)
  CALL MPI_INIT(ierr)
  CALL MPI_COMM_SIZE(MPI_COMM_WORLD, nproc, ierr)
  CALL MPI_COMM_RANK(MPI_COMM_WORLD, myid, ierr)
! 

  IF( myid .EQ. 0 ) THEN
    a(1) = 2.0
    a(2) = 4.0
    CALL MPI_ISEND(a, ncount, MPI_REAL, 1, 10, MPI_COMM_WORLD,req, ierr)
  ELSE IF( myid .EQ. 1 ) THEN
    CALL MPI_IRECV(b, ncount, MPI_REAL, 0, 10, MPI_COMM_WORLD, req, ierr)
  END IF
!   CALL MPI_WAIT(req, status, ierr)
  IF( myid .EQ. 1 ) THEN
    WRITE(6,*) myid, ': b(1)=', b(1), ' b(2)=', b(2)
  ENDIF
  a(1) = 0.0
  a(2) = 0.0
  CALL MPI_FINALIZE(ierr)
END