I have a question about cascading MPI_Bcast calls, I want to know if there is anything to keep in mind when you want to distribute different blocks of data from changing send streams to all other streams immediately after each other.
Imagine the following:
double buff=12345;
for (i=0; i<nthreads; i++) {
MPI_BCast(&buff, 1, MPI_DOUBLE, i, MPI_COMM_WORLD);
if (threadid > i) {
}
}
I hope this sample code explains the situation. Basically, there is a for loop for all threads, and a different send thread is used at each iteration. A possible problem is that each thread takes a different amount of time to switch to MPI_Bcast again. Is it possible to have an allready sending stream there while some receiving streams might still be receiving from the last sender? Do I need MPI_Barrier here or can I cascade as many Bcasts as I want, since it is clear that each call is reached by each thread once?
edit: , , - , send ?
- , , id i, Bcasts ?