1 / 10

Problems with M things

Problems with M things. Review: NULL MPI handles. All MPI_*_NULL are handles to invalid MPI objects MPI_REQUEST_NULL is an exception Calling MPI_TEST/MPI_WAIT with REQUEST_NULL results in the “empty” status status.MPI_SOURCE = MPI_ANY_SOURCE s tatus.MPI_TAG = MPI_ANY_TAG

thom
Download Presentation

Problems with M things

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Problems with M things

  2. Review: NULL MPI handles • All MPI_*_NULL are handles to invalid MPI objects • MPI_REQUEST_NULL is an exception • Calling MPI_TEST/MPI_WAIT with REQUEST_NULL results in the “empty” status • status.MPI_SOURCE = MPI_ANY_SOURCE • status.MPI_TAG = MPI_ANY_TAG • status count = zero • …otherwise the ANY/SOME array-based TEST/WAIT functions would be kind of a disaster

  3. Review: PROC_NULL behavior • Call MPI_RECV with MPI_PROC_NULL • Get “PROC_NULL status” • Same as “empty status”, but with MPI_SOURCE=MPI_PROC_NULL • Call MPI_IRECV with MPI_PROC_NULL • Get “PROC_NULL” status • (…as expected)

  4. MPI_MESSAGE_NULL: MRECV • Defining PROC_NULL behavior with MPROBE • MPI-3 allows calling MPI_[I]MRECV with MPI_MESSAGE_NULL • You get “PROC_NULL” status back MPI_MPROBE(MPI_PROC_NULL, …, &msg, …) Get msg=MPI_MESSAGE_NULL MPI_MRECV(…, &msg, &status) Get status=“PROC_NULL” status

  5. MPI_MESSAGE_NULL: MRECV ✔ • Defining PROC_NULL behavior with MPROBE • MPI-3 allows calling MPI_[I]MRECV with MPI_MESSAGE_NULL • You get “PROC_NULL” status back MPI_MPROBE(MPI_PROC_NULL, …, &msg, …) Get msg=MPI_MESSAGE_NULL ✖ MPI_MRECV(…, &msg, &status) We’re calling MPI_MRECV with an invalid message! ✔ Get status=“PROC_NULL” status

  6. MPI_MESSAGE_NULL: IMRECV • Defining PROC_NULL behavior with MPROBE • MPI-3 allows calling MPI_[I]MRECV with MPI_MESSAGE_NULL • You get “PROC_NULL” status back MPI_MPROBE(MPI_PROC_NULL, …, &msg, …) Get msg=MPI_MESSAGE_NULL MPI_IMRECV(…, &msg, &req) MPI_WAIT(&req, &status) Get status=“PROC_NULL” status

  7. MPI_MESSAGE_NULL: IMRECV ✔ • Defining PROC_NULL behavior with MPROBE • MPI-3 allows calling MPI_[I]MRECV with MPI_MESSAGE_NULL • You get “PROC_NULL” status back MPI_MPROBE(MPI_PROC_NULL, …, &msg, …) Get msg=MPI_MESSAGE_NULL ✖ MPI_IMRECV(…, &msg, &req) MPI_WAIT(&req, &status) We’re calling MPI_IMRECV with an invalid message! ✔ Get status=“PROC_NULL” status

  8. The Problem • Overloading MPI_MESSAGE_NULL: • Invalid message, and • MPI_PROC_NULL message • FAIL

  9. Solution: MPI_MESSAGE_NO_PROC • When [I]MPROBE with PROC_NULL • Get msg = MPI_MESSAGE_NO_PROC MPI_MPROBE(MPI_PROC_NULL, …, &msg, …) Get msg=MPI_MESSAGE_NO_PROC MPI_MRECV(…, &msg, &status) Set msg=MPI_MESSAGE_NULL Get status=“PROC_NULL” status

  10. Rationale • Consistency: MPI_*_NULL are invalid handles • Can avoid calling MPI_MRECV (or MPI_IMRECV) if desired • Same solution applies to both MRECV and IMRECV • Alternate names: • MPI_MESSAGE_PROC_NULL (BAD) MPI_MPROBE(MPI_PROC_NULL, …, &msg, …) Get msg=MPI_MESSAGE_NO_PROC MPI_MRECV(…, &msg, &status) Set msg=MPI_MESSAGE_NULL Get status=“PROC_NULL” status

More Related