First page Back Continue Last page Overview Graphics
Finding Out About the Environment
Two important questions that arise early in a parallel program are:
- How many processes are participating in this computation?
- Which one am I?
MPI provides functions to answer these questions:
- MPI_Comm_size reports the number of processes.
- MPI_Comm_rank reports the rank, a number between 0 and size-1, identifying the calling process
Notes: