# Makefile for bluegrit cluster LIBX= -L/usr/X11R6/lib -lXext -lXm -lXt -lXi -lX11 -lm INCLUDE = -I/usr/cluster/mpich-1.2.7/include LIB = -L/usr/cluster/mpich-1.2.7/lib CFLAGS = $(INCLUDE) CC = gcc all: cpi sum roll_call.out bcast.out xtest scat.out schedule.out cpi: cpi.c $(CC) $(CFLAGS) -o cpi cpi.c $(LIB) -lmpe -lmpich mpirun -v -np 4 cpi sum: sum.c mpicc -o sum sum.c roll_call.out: roll_call.c mpicc -o roll_call roll_call.c mpirun -np 16 -machinefile nodes roll_call > roll_call.out bcast.out: bcast.c mpicc -o bcast bcast.c mpirun -np 4 -machinefile nodes bcast > bcast.out scat.out: scat.c mpicc -o scat scat.c mpirun -np 4 -machinefile nodes scat > scat.out schedule.out: schedule.c mpicc -O3 -o schedule schedule.c mpirun -np 32 -machinefile nodes -nolocal schedule > schedule.out xtest: xtest.c mpicc -v -o xtest xtest.c $(LIBX)