c c Workers receive X, then compute dot products until c done message received c else call MPI_BCAST ( x, cols, MPI_DOUBLE_PRECISION, master, & MPI_COMM_WORLD, ierr ) 90 continue call MPI_RECV ( buffer, cols, MPI_DOUBLE_PRECISION, master, & MPI_ANY_TAG, MPI_COMM_WORLD, status, ierr ) if ( status(MPI_TAG) .eq. 0 ) then go to 200 end if row = status(MPI_TAG) ans = 0.0 do i = 1, cols ans = ans + buffer(i) * x(i) end do call MPI_SEND ( ans, 1, MPI_DOUBLE_PRECISION, master, & row, MPI_COMM_WORLD, ierr ) go to 90 200 continue end if