# On Euler, we will benchmark your DGEMM's performance against the performance # of the default vendor-tuned DGEMM. This is done in benchmark-blas. # CC = gcc OPT = -O3 CFLAGS = -Wall -std=gnu99 -march=haswell -ffast-math $(OPT) LDFLAGS = -Wall # librt is needed for clock_gettime LDLIBS = -lrt -Wl,--no-as-needed -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm -ldl -m64 -I${MKLROOT}/include targets = benchmark-naive benchmark-blocked benchmark-blas objects = benchmark.o dgemm-naive.o dgemm-blocked.o dgemm-blas.o .PHONY : default default : all .PHONY : all all : clean $(targets) benchmark-naive : benchmark.o dgemm-naive.o $(CC) -o $@ $^ $(LDLIBS) benchmark-blocked : benchmark.o dgemm-blocked.o $(CC) -o $@ $^ $(LDLIBS) benchmark-blas : benchmark.o dgemm-blas.o $(CC) -o $@ $^ $(LDLIBS) %.o : %.c $(CC) -c $(CFLAGS) $< .PHONY : clean clean: rm -f $(targets) $(objects)