# Makefile for MPI program

# Source file
SRC = prefix_sum.cpp

# number of process
NP = 4

# Compiler
CXX = mpic++

# Executable name
EXE = ./output

all: $(EXE)

$(EXE): $(SRC)
	$(CXX) -o $(EXE) $(SRC)

clean:
	rm -f $(EXE)

run:
	mpirun -np $(NP) -f hosts $(EXE)