title: How to manage a client list in MPI client/server mode
body: <p>I am trying to implement an MPI program which is to have a server node assign task pieces to client node, but I am a freshman and don't know how to mange the client list, can anyone help me?</p>
  
  <p>Let me describe it more specify:</p>
  
  <p>Server node:</p>
  
  <pre><code>MPI_COMM clients[4]; // store client communicators, but I am not sure this is correct or not!
  </code></pre>
  
  <p>Several clients connect to server using <code>mpirun -np 1 ./mpiclient</code> more than one time, not processor greater than 1.</p>
  
  <p>The reason I want to do this is I want to send each client different job to calculate.</p>
  
  <p>Question 2:  How can I get the attributes of the client?</p>
  
  <p>For example: <code>MPI_Comm_accept(portname,MPI_INFO_NULL,0,MPI_COMM_SELF,&amp;client);</code>
  How can I get client name or ip?</p>