29.01.2015 Views

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

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

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Non-blocking Communication<br />

100 continue<br />

…….<br />

J = 0<br />

do I = 0, npes<br />

if (I .ne. myrank)<br />

J = J+1<br />

set up data to send<br />

call MPI_ISEND (sdata(I), cnt, dtype, &<br />

I, tag, comm, request(J), ierr)<br />

endif<br />

enddo<br />

call MPI_WAITALL (npes-1, request,<br />

&<br />

………<br />

receive data<br />

………..<br />

Unsafe again<br />

statuses, ierr)<br />

100 continue<br />

………..<br />

J = 0<br />

do I = 0, npes<br />

if (I .ne. myrank)<br />

J = J+1<br />

set up data to send<br />

call MPI_ISEND (sdata(I), cnt, dtype, &<br />

I, tag, comm, request(J), ierr)<br />

endif<br />

enddo<br />

…………<br />

receive data<br />

………….<br />

call MPI_WAITALL (npes-1, request,<br />

&<br />

statuses, ierr)<br />

Safe…….but<br />

<strong>David</strong> <strong>Cronk</strong> 70

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!