In MPI gather and scatter there is two counts for send and receive. I checked the docs and found out that both should have the same value.
Ex:- In MPI_Gather()
both send_count
and receive_count
should have the size of the send buffer size. https://www.mpich.org/static/docs/v3.1/www3/MPI_Gather.html
Can someone explain what is the purpose of this redundant parameters?
To some extent, you are allowed to use different types - but the total size needs to match.
Or to be more precise, the standard explains:
The type signature of
sendcount
,sendtype
on each process must be equal to the type signature ofrecvcount
,recvtype
at the root. This implies that the amount of data sent must be equal to the amount of data received, pairwise between each process and the root. Distinct type maps between sender and receiver are still allowed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With