After obtaining the value of from the user, the master broadcasts it to other processes. Afterwards we select a random number server. This process, as I have remarked before, should not be the same as the master process:
server = (host_rank == pool_size - 1)? pool_size - 2 : pool_size - 1; if (my_rank == server) i_am_the_server = B_TRUE;
Once the server process is selected, we have to create a new communicator, which does not contain that process.