How to detect that there is a pending message need to be received?
Issue #99
resolved
Is there a way to detect there will be a pending message need to be received?
For example, I want to receive multiple messages from other cores, but I don`t know the number of messages. How can I do before using ireceive?
Comments (2)
-
-
- changed status to resolved
- Log in to comment
In MPI, you can check just one message at a time using
pending = comm.Iprobe(MPI.ANY_SOURCE)
. You can pass an additionalMPI.Status
object to get back the actual source of the sender formstatus.Get_source()
. This is just the MPI way of doing things.PS: General questions like this one are more appropriate for our mailing list.