# Generic make-include file for all applications
# For inclusion in an application-specific Make_time
# Not intended to be used as a standalone.
# C.D. 8/30/02

# For running benchmarking tests.  Results are put in out.time.${PROJ}

# Instructions...

# 1.  See Make_time in the applications directory for instructions for
#     compiling to turn on timing.  Currently we have timing for
#     the applications "ks_imp_dyn" and "clover_invert"
# 2.  Edit to select the appropriate job launch command below or
#     create one for your platform.
# 3.  Go to the application directory and run "make -f Make_time"

# Provisions for architecture-dependent job launching
# Change to suit...

# Scalar machine
LAUNCH =
LAUNCH2 = 

# SGI Origin
#LAUNCH = mpirun -np 16
#LAUNCH2 = 

# Linux MPICH
#LAUNCH = /uufs/icebox/sys/pkg/mpich/1.2.1/bin/mpirun -np 16 -machinefile $$PBS_NODEFILE
#LAUNCH2 = 

# Linux VMI
#LAUNCH = /usr/local/bin/vmi-launch -ncpus 8 --
#LAUNCH2 = 

# Compaq Alpha cluster (tcsini)
#LAUNCH = prun -N $$RMS_NODES -n $$RMS_PROCS # (tcsini)
#LAUNCH = prun -p test -B 1 -N 1 -n 4  (CHPC sierra cluster - private node sierra1)
#LAUNCH2 =

# SP
#LAUNCH = poe 
#LAUNCH2 = -nodes 1 -tasks_per_node 4 -rmpool 1

# T3E
#LAUNCH = mpprun -n 4
#LAUNCH2 = 

out.time.${PROJ}: ${PROJ} in.time.${PROJ}
	${LAUNCH} ./${PROJ} ${LAUNCH2} < in.time.${PROJ} > out.time.${PROJ}

time:
	for proj in ${PROJS};\
	do\
	     ${MAKE} $$proj "CTIME = -DCGTIME -DFFTIME -DLLTIME -DGFTIME -DREMAP" ;\
	     ${MAKE} -f Make_time "PROJ=$$proj" out.time.$$proj;\
	     /bin/rm -f $$proj;\
	     /bin/rm -f localmake*;\
	done


