Dr. David Cronk Innovative Computing Lab University of ... - It works!

www3.uji.es

Dr. David Cronk Innovative Computing Lab University of ... - It works!

Non-blocking Communication

100 continue

if (err .lt. Delta) goto 200

do some computation

do I = 0, npes

if (I .ne. myrank)

set up data to send

call MPI_SEND (sdata(I), cnt, dtype, &

I, tag, comm, ierr)

endif

enddo

do I = 0, npes

if (I .ne. myrank)

set up data to recv

call MPI_RECV (rdata(I), cnt, dtype, &

I, tag, comm, status, ierr)

endif

enddo

goto 100

Clearly unsafe

100 continue

if (err .lt. Delta) goto 200

do some computation

do I = 0, npes

if (I .ne. myrank)

set up data to send

call MPI_ISEND (sdata(I), cnt, dtype, &

I, tag, comm, request, ierr)

endif

enddo

do I = 0, npes

if (I .ne. myrank)

set up data to recv

call MPI_RECV (rdata(I), cnt, dtype, &

I, tag, comm, status, ierr)

endif

enddo

goto 100

May run out of handles

David Cronk 69

More magazines by this user
Similar magazines