if ( my_id == master ) numsent = 0 c c BROADCAST X to all the workers. c call MPI_BCAST ( x, cols, MPI_DOUBLE_PRECISION, master, & MPI_COMM_WORLD, ierr ) c c SEND row I to worker process I; tag the message with the row number. c do i = 1, min ( num_procs-1, rows ) do j = 1, cols buffer(j) = a(i,j) end do call MPI_SEND ( buffer, cols, MPI_DOUBLE_PRECISION, i, & i, MPI_COMM_WORLD, ierr ) numsent = numsent + 1 end do