uwhpsc-2016 / homework4

Homework #4
0 stars 1 forks source link

Using tags? Using MPI_Waitall? #12

Open natwall27 opened 8 years ago

natwall27 commented 8 years ago

Does it make sense to use tags to make sure data is being sent/received to the appropriate pointers?

Also, could MPI_Wait(all) be useful to distinguish the communications?

quantheory commented 8 years ago

In this case, it shouldn't be necessary to use tags, since any given task, it is only getting one piece of information from the left, and one piece from the right. There shouldn't be any need to distinguish which pointers are being received, since the rank of the other task should be enough.

Tags are usually only necessary when task A is sending two pieces of information to task B, and at least one of them is asynchronous so that they might be sent/received in any order.

natwall27 commented 8 years ago

Of course! I forgot that the sender is declared in the MPI_Recv.