How do you identify different processes?
C:
int MPI_Comm_rank(MPI_Comm comm, int *rank);
Fortran:
subroutine MPI_Comm_rank(comm, rank, ierror) integer comm, rank, ierror