c c Wait to receive a result back from any processor; c If more rows to do, send the next one back to that processor. c do i = 1, rows call MPI_RECV ( ans, 1, MPI_DOUBLE_PRECISION, & MPI_ANY_SOURCE, MPI_ANY_TAG, & MPI_COMM_WORLD, status, ierr ) sender = status(MPI_SOURCE) anstype = status(MPI_TAG) b(anstype) = ans if ( numsent .lt. rows ) then numsent = numsent + 1 do j = 1, cols buffer(j) = a(numsent,j) end do call MPI_SEND ( buffer, cols, MPI_DOUBLE_PRECISION, & sender, numsent, MPI_COMM_WORLD, ierr ) else call MPI_SEND ( MPI_BOTTOM, 0, MPI_DOUBLE_PRECISION, & sender, 0, MPI_COMM_WORLD, ierr ) end if end do