# Makefile for MPI-Spin model of Example 4.02 from
# "MPI: The Complete Reference, vol. 1", 2nd ed.

# We check the assertions for various parameters.
# There should be no violations.

# Author: Pujan Kafle <kafle@cis.udel.edu>
# Last modified: 30-oct-2007

PREP        = rm -f pan* *trail mpi-spin-init.c
MS          = $(PREP); ms -notest -nocancel -noprobe

PARAMS0 = -np=5 -buf=0 -req=5
PARAMS1 = -np=5 -buf=2 -req=5

all: gather_01 gather_02

gather_01: gather.prom
	$(MS) $(PARAMS0) gather.prom
	mscc -DVECTORSZ=2048
	./pan -n

gather_02: gather.prom
	$(MS) $(PARAMS1) gather.prom
	mscc -DVECTORSZ=2048
	./pan -n

clean:
	-rm -f pan* *.trail *.out mpi-spin-init.c *.err *~
