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

Finding out about the environment

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.

2006-10-06