I have absolutely no experience in using makefile for MPI program with OpenMP. I usually run on the command prompt as
mpicc main.c -fopenmp -o Out
mpirun -np 4 Out
So now I need to utilise the makefile and my understanding is that we use makefile to run the commands in a more convenient way so logically we should type the same commands in the makefile right? So my makefile now looks like this
all:
mpicc main.c -fopenmp -o Out
mpirun -np 4 Out
Is there a step by step guide on how to create a makefile for absolute beginner?