Download presentation
Presentation is loading. Please wait.
Published byLeonard Slye Modified over 10 years ago
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) Get status=PROC_NULL status Were calling MPI_MRECV with an invalid message!
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) Get status=PROC_NULL status MPI_WAIT(&req, &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) Get status=PROC_NULL status MPI_WAIT(&req, &status) Were calling MPI_IMRECV with an invalid message!
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) Get status=PROC_NULL status Set msg=MPI_MESSAGE_NULL
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) Get status=PROC_NULL status Set msg=MPI_MESSAGE_NULL
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.