int MPI_Comm_size(MPI_Comm comm, int *size) int MPI_Comm_rank(MPI_Comm comm, int *rank)
MPI_Comm_size(MPI_COMM_WORLD, &size)will return in size the number of processors used by the program.
MPI_Comm_rank(MPI_COMM_WORLD, &rank)that takes two arguments:
Cem Ozdogan 2010-10-25