Limitation on broadcasting

I wonder is there any size limitations for the date when you broadcast it from one processor to another?
Say I have solution mesh size depending on


and corresponding solution


For n up to around 140 the code works fine. But as soon as I increase n>140 code is doing nothing(terminal does not write anything). That issue happens only during parallelization.
In case of ordinary one it works fine, that’s why I am suspicious about broadcasting operator.
I broadcast via:

processor(1-mpirank) << u1;
processor(1-mpirank) >> u2;


I think, I is due to buffer in mpi , if the size of u1 is too big the send is spliced in more than one communication and so you get a dead lock.

the only way is to male asynchronous form of send and receive.

of change the size of the buffer in mpi
I will add the interface to

MPI_COMM_ATTACH_BUFFER(comm, buffer, size)

you can read the mpi doc

  1. 31 Buffering is done by the sender.

A portable program using standard mode send operations should not rely on message buffering for the program to complete without deadlock. All sends in such a portable program can be replaced with synchronous mode sends and the program will still run correctly. The buffered send mode can be used for programs that require buffering.

Nonblocking message-passing operations, as described in Section 3.7, can be used to avoid the need for buffering outgoing messages. This can prevent unintentional serialization or deadlock due to lack of buffer space, and improves performance, by allowing overlap of communication with other communication or with computation, and avoiding the overheads of allocating buffers and copying messages into buffers. (End of advice to users.)

Dear Dr.Hecht,

I appreciate your quick response!
I tried asynchronous irecv and isend, but it did not work.

Could you please elaborate a bit more about how I should increase the size of buffer?
MPI_COMM_ATTACH_BUFFER is not recognized via FreeFem compiler.