Following this course from EPCC, University of Edinburgh.
On Mac, first install MPI locally
brew install open-mpi
compile C file and run the program using the following commands
mpicc -o program ./program.c
mpirun -np [NUMBER_OF_PROCESSORS] ./program