# Makefile for MPI-Spin model of Example 4.15 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=3 -buf=0 -req=4
PARAMS1 = -np=3 -buf=2 -req=4

all: allgather_01 allgather_02

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

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

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