I'd like to dynamically create a group of processes communicating via
MPI. Those processes need to be run without mpirun and create
intracommunicator after the startup. Any ideas how to do this
I came up with a solution in which the processes are connecting one by
one using MPI_Comm_connect, but unfortunately all the processes that
are already in the group need to call MPI_Comm_accept. This means that
when the n-th process wants to connect I need to collect all the n-1
processes on the MPI_Comm_accept call. After I run about 40 processes
every subsequent call takes more and more time, which I'd like to
Another problem in this solution is that when I try to connect 66-th
process the root of the existing group segfaults on MPI_Comm_accept.
Maybe it's my bug, but it's weird as everything works fine for at most
65 processes. Is there any limitation I don't know about?
My last question is about MPI_COMM_WORLD. When I run my processes
without mpirun their MPI_COMM_WORLD is the same as MPI_COMM_SELF. Is
there any way to change MPI_COMM_WORLD and set it to the
intracommunicator that I've created?