mpicc -o hello hello.c
Now we are ready to run in 4 processors:
mpirun -np 4 hello
Printing ranks and the number of processors
The routine MPI_FINALIZE must be called by each process before it exits. The call cleans up all MPI state. Once MPI_FINALIZE has been called, no routine might be called except for MPI_GET_VERSION, MPI_INITIALIZED and MPI_FINALIZED. MPI_FINALIZE guarantees nothing about pending communications that have not been completed.