Commit f1f3145f authored by mohamadbashar.disoki's avatar mohamadbashar.disoki

Add Makefile

parent 6dd972cd
# Makefile for MPI program
# Source file
SRC = hello_world.c
# number of process
NP = 2
# Compiler
CC = mpicc
# Executable name
EXE = ./out
all: $(EXE)
$(EXE): $(SRC)
$(CC) -o $(EXE) $(SRC)
clean:
rm -f $(EXE)
run:
mpirun -np $(NP) -f mpi_hosts $(EXE)
\ No newline at end of file
......@@ -43,6 +43,8 @@ Or specify the same in a hostfile (add user=mpiuser for slave1, slave2 hosts)
mpirun -np 3 -f mpi_hosts ./mpi_sampl
```
Use Makefile
To compile the program type "make" which compiles the program with "mpicc".
*Useful Links*
* [MPI Tutorial](https://mpitutorial.com/tutorials/)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment