Finding out about the environment


Up: Getting started Next: A simple program Previous: Running MPI programs

Two of the first questions asked in a parallel program are: How many processes are there? and Who am I?

How many is answered with MPI_Comm_size and who am I is answered with MPI_Comm_rank.

The rank is a number between zero and size-1.



Up: Getting started Next: A simple program Previous: Running MPI programs