      call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr)
      call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
      prev = rank - 1
      next = rank + 1
      if(rank .eq. 0) prev = size - 1
      if(rank .eq. size - 1) next = 0
      call MPI_RECV_INIT(rbuf(1), 1, MPI_REAL, prev, 5,
     &                   MPI_COMM_WORLD, reqs(1), ierr)
      call MPI_RECV_INIT(rbuf(2), 1, MPI_REAL, next, 6,
     &                   MPI_COMM_WORLD, reqs(2), ierr)
      call MPI_SEND_INIT(sbuf(1), 1, MPI_REAL, prev, 6,
     &                   MPI_COMM_WORLD, reqs(3), ierr)
      call MPI_SEND_INIT(sbuf(2), 1, MPI_REAL, next, 5,
     &                   MPI_COMM_WORLD, reqs(4), ierr)
      do i=...
         sbuf(1)=...
         sbuf(2)=...
         call MPI_STARTALL(4, reqs, ierr)
         ...
         call MPI_WAITALL(4, reqs, stats, ierr);
         ...
      end do
      call MPI_REQUEST_FREE(reqs(1), ierr)
      call MPI_REQUEST_FREE(reqs(2), ierr)
      call MPI_REQUEST_FREE(reqs(3), ierr)
      call MPI_REQUEST_FREE(reqs(4), ierr)
