Blocking send and receive

 

Blocking send and Receive

 

 



1. Write a program that sends an integer value isbuf of process 0 to irbuf of process 1

You may want to use these MPI routines in your solution:


2.Complete the arguments of the two blocking send/receive calls
      PROGRAM SEND
      INCLUDE 'mpif.h'
      INTEGER istatus(MPI_STATUS_SIZE)

      CALL MPI_INIT(IERR)
      CALL MPI_COMM_SIZE(MPI_COMM_WORLD, mprocs, ierr)
      CALL MPI_COMM_RANK(mpi_COMM_WORLD, myrank, ierr)

      itag = 1
      IF (myrank == 0) THEN
        isbuf =9
        CALL MPI_SEND( )
      ELSEIF (myrank == 1) THEN
        CALL MPI_RECV( )
        PRINT*, ' I RECEIVED irbuf =', irbuf
      ENDIF

      CALL MPI_FINALIZE(ierr)

      END