LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Chad Wingrave (cwingrav_at_[hidden])
Date: 2003-10-14 15:48:13


I'm having some problems with created communicators from dynamic
processes. First, I am using MPI_Comm_join to add a new
process to an intercommunicator group. Great, works fine. The next
problem I am having is putting that new communicator into a group with
other communicators. So basically, I want a server to wait for new
processes that will join the current process group and add them to the
communicator to listen for MPI message on.

The pseudo code is as follows:

MPI_Comm comm;
while(1)
{
  fd = <get accepted socket>
  MPI_Comm_join(fd,&comm);
  close(fd);

  <do sends and receives>

  MPI_Comm_size(comm, &size);
  printf("comm: size %d\n",size);
}

comm remains to be size 1 no matter how many times it loops. Do I need to
dump comm into another MPI_Comm? If so, how. I can communicate to the
process via comm just fine.

-- 
        -Chad Wingrave (cwingrav_at_[hidden])
         Virginia Tech, Graduate Student
         http://csgrad.cs.vt.edu/~cwingrav