program SendArray use mpi implicit none integer ierr, me, nprocs, errcode, sndto,rcvfrom integer status(MPI_STATUS_SIZE) integer,parameter :: ndata = 10000 real :: a(ndata) real :: b(ndata) call MPI_INIT(ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, nprocs, ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, me, ierr) !$ Initialize data a = me !$ Send and Receive data !! sndto = ?? !! rcvfrom = ?? !! use MPI_SENDRECV for sending/receiving print *,'I am proc ',me,' and I have received b(1) = ',b(1) !$ Finalize MPI !! Use MPI_FINALIZE for finalizing environment end program sendarray