I am trying to set up a server client pair that establishes a connection (after being launched independently) using mpi_comm_accept and connect. I successfully have the server wait for a connection request using MPI_Comm_accept. The client successfully connects to using MPI_Comm_connect. Both the server and the client return without any error but the a negative handle is returned in 'newcomm' to both the server and the client. I launch both using mpiexec and have mpd running.
I cannot figure out what is wrong and it is probably something simple. Any ideas?
write(contape,*) 'Gang Master port = ' // trim(portA)
… server writes the name to a file
call MPI_COMM_ACCEPT(portA,MPI_INFO_NULL,0,MPI_COMM_SELF,rt_gang_comm, ierr)
if (ierr) then
stop ‘serever problem’
write(contape,*) 'MPI_COMM_WORLD = ',MPI_COMM_WORLD,' rt_gang_com = ',rt_gang_comm
call MPI_Bcast(i_rec,n_i_s,MPI_INTEGER4,id_mpi_rank,rt_gang_comm, ierr)
Gang Master port = tag#0$rdma_port0#5124$rdma_host0#2:0:0:192:168:11:220:0:0:0:
MPI_COMM_WORLD = 1140850688 rt_gang_com = -2080374784
… client reads port name from the server written file
write(contape,*)'Opening port', trim(portA)
call MPI_COMM_CONNECT(portA, MPI_INFO_NULL, 0, MPI_COMM_WORLD, intercomm, ierr)
if (ierr) then
stop ‘client problem’
Opening port tag#0$rdma_port0#5124$rdma_host0#2:0:0:192:168:11:220:0:0:0:0:0:0:0:0$
MPI_COMM_WORLD= 1140850688 intercomm= -2080374783
A subsequent broadcasr hangs. They are trying to communicate over a communicator that differs by one.
I cannot find anything around that can seem to help so I would appreciate even ideas to try.