Basic HTML version of Foils prepared 10 Oct 1995

Foil 12 MPI_Comm_rank -- Environment Inquiry

From Fox Presentation Fall 1995 CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. by Geoffrey C. Fox


This allows you to identify each processor by a unique integer called the rank which runs from 0 to N-1 where there are N processors
If we divide the region 0 to 1 by domain decomposition into N parts, the processor with rank r controls
  • region: r/N to (r+1)/N
for C:int MPI_Comm_rank(MPI_Comm comm, int *rank)
  • comm is an MPI communicator of type MPI_Comm
for FORTRAN: call MPI_COMM_RANK (comm,rank,mpierr)



© on Tue Oct 7 1997