tag use in MPI (send, receive) -
i'm not sure when have use different numbers tag field in mpi send, receive calls. i've read this, can't understand it.
sometimes there cases when might have send many different types of messages b. instead of b having go through measures differentiate these messages, mpi allows senders , receivers specify message ids message (known tags). when process b requests message tag number, messages different tags buffered network until b ready them.
have use example when have multiple isend (with different tags) process , 1 ireceive in process b?
like msmith81886 says, message tags optional. can use arbitrary integer values them , use whichever semantics , seem useful you. suggested, tags can used differentiate between messages consist of different types (mpi_integer, mpi_real, mpi_byze,...). use tags add information data represents (if have nxn matrix, message send row of matrix consist of n values, message send column of matrix; nevertheless, may want treat row , column data differently).
note receive operation has match tag of message wants receive. not mean have specify same tag, can use wild card mpi_any_tag message tag; receive operation match arbitrary message tags. can find out tag sender used of mpi_probe.
Comments
Post a Comment