# This is the default Makefile for Snoopy # WARNING! This file has been automatically generated by configure. # Any changes to it will be overwritten the next time configure is run. ########################################### ## User can activate options, replacing ## ## no by yes. Options not available can't## ## be activated ## ########################################### OPENMP= yes MPI= yes FFTW3_MPI= notconfigured DEBUG= no ########################################### ## Configuration found by ./configure ## ########################################### CLUSTER="x86_64-unknown-linux-gnu" CC=mpicc MPICC=mpicc CFLAGS=-O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math OPENMP_FLAG = -fopenmp LIBS= -lfftw3_threads -lfftw3 -lm LDFLAGS= ifeq ($(DEBUG),yes) CFLAGS=-g -O2 -DDEBUG LDFLAGS= endif ## General compilation variables ############################################################### ifeq ($(OPENMP),yes) CFLAGS+=$(OPENMP_FLAG) LDFLAGS+=$(OPENMP_FLAG) endif ifeq ($(FFTW3_MPI),yes) CFLAGS+=-DFFTW3_MPI_SUPPORT endif ifeq ($(MPI),yes) CFLAGS+=-DMPI_SUPPORT CC=$(MPICC) endif LDFLAGS+=$(LIBS) export CC export CFLAGS export LDFLAGS ############################################################### ## Compilation rules ############################################################### all: data @(cd src && $(MAKE)) cp src/snoopy . @echo "***********************************************************" @echo "Make has compiled for: " $(CLUSTER) ifeq ($(OPENMP),yes) @echo "OpenMP support enabled" else @echo "OpenMP support disabled" endif ifeq ($(MPI),yes) @echo "MPI support enabled" else @echo "MPI support disabled" endif @echo "***********************************************************" data: mkdir data clean: @(cd src && $(MAKE) $@) rm snoopy fullclean: @(cd src && $(MAKE) $@) rm -rf snoopy timevar spectrum.dat data dump.dmp dump_sav.dmp ##################################################################### ## Rules for benchmark and checks ####### ##################################################################### check: bench all exec benchclean @echo "******************************************" @echo "*** Checking results ****" @echo "******************************************" diff timevar src/problem/bench/timevar_bench @echo "******************************************" @echo "*** All Done ! ****" @echo "******************************************" exec: @echo "******************************************" @echo "** Executing Benchmark *******************" @echo "******************************************" ifeq ($(MPI support),yes) mpiexec -n 2 ./snoopy else ./snoopy endif bench: mv snoopy.cfg snoopy.cfg.old cp src/problem/bench/snoopy.cfg . @(cd src && $(MAKE) $@) @echo "***********************************************************" @echo "Initialized BENCHMARK configuration" @echo "Please type make to compile" @echo "or make benchclean to restore the configuration" @echo "***********************************************************" benchclean: rm snoopy.cfg mv snoopy.cfg.old snoopy.cfg @(cd src && $(MAKE) $@) @echo "***********************************************************" @echo "Configuration restored" @echo "***********************************************************"