Hello, Two questions from an old MPI user who's still learning.
Let's assume mpirun's spawned N copies of program A and M (/=N) copies of program B. This execution option leads A and B processes to belong to the same MPI_COMM_WORLD and ranks are ordered consequently from 0 to N-1 for A and from N to (N+M)-1 for B. Now, since A and B are two independent programs, let's consider that MPI_COMM_WORLD has to be splitted into two communicator groups using MPI_Comm_split. Then, as we know, the color argument must be set so that its value is different for A and B. Q1: A part from setting it as a constant in A and B or reading it from a file, is there a more elegant way to set it automatically so that color(A) is always different from color(B)? Furthermore, let's consider that MPI_COMM_WORLD has been splitted into A and B groups anyway. We want to create an inter-communicator between them using MPI_Intercomm_create. Group B can always set the peer_leader rank process of A as 0. Q2: Is there a MPI-1 solution that can return to A any peer_leader (or first) rank of the remote group B? Both questions Q1 and Q2 can be bypassed using MPI_Comm_spawn or server/client base processing or a combination of both. But this is not my aim since the constraint is to stick to a MPI-1 implementation to execute such MPMD applications on some special architecture like BlueGene machine. Thanks a lot for your help. Regards, Jalel -- *------------------------------------------------------------------------* Jalel CHERGUI, LIMSI-CNRS, Bât. 508 - BP 133, 91403 Orsay cedex, FRANCE Tél : (33 1) 69 85 81 27 ; Télécopie : (33 1) 69 85 80 88 Mél : jalel.cher...@limsi.fr ; Référence : http://perso.limsi.fr/chergui *------------------------------------------------------------------------*