From f66b03538603b975b274cf3be2f9e32540b03223 Mon Sep 17 00:00:00 2001 From: Antoine Hoffmann <antoine.hoffmann@epfl.ch> Date: Thu, 22 Dec 2022 18:25:55 +0100 Subject: [PATCH] added "make alpha" to make an alpha executable version --- Makefile | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 6d06e56e..50ca993b 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ include local/dirs.inc include local/make.inc - -EXEC = $(BINDIR)/gyacomo -EFST = $(BINDIR)/gyacomo_fst -EDBG = $(BINDIR)/gyacomo_dbg +#Different namings depending on the make input +EXEC = $(BINDIR)/gyacomo #all +EFST = $(BINDIR)/gyacomo_fast #fast +EDBG = $(BINDIR)/gyacomo_debug #debug +EALP = $(BINDIR)/gyacomo_alpha #alpha # F90 = mpiifort F90 = mpif90 @@ -17,18 +18,22 @@ F90 = mpif90 # # Add lapack # EXTLIBS += -L$(LAPACKDIR)/lib # EXTINC += -I$(LAPACKDIR)/mod - +# Standard version with optimized compilation all: dirs src/srcinfo.h all: F90FLAGS = -O3 -xHOST all: $(EXEC) - +# Fast compilation fast: dirs src/srcinfo.h fast: F90FLAGS = -fast fast: $(EFST) - -dbg: dirs src/srcinfo.h -dbg: F90FLAGS = -g -traceback -CB -ftrapuv -warn all -debug all -dbg: $(EDBG) +# Debug version with all flags +debug: dirs src/srcinfo.h +debug: F90FLAGS = -g -traceback -CB -ftrapuv -warn all -debug all +debug: $(EDBG) +# Alpha version, optimized as all but creates another binary +alpha: dirs src/srcinfo.h +alpha: F90FLAGS = -O3 -xHOST +alpha: $(EALP) install: dirs src/srcinfo.h $(EXEC) mvmod @@ -85,6 +90,10 @@ $(OBJDIR)/time_integration_mod.o $(OBJDIR)/utility_mod.o $(EDBG): $(FOBJ) $(F90) $(LDFLAGS) $(OBJDIR)/*.o $(EXTMOD) $(EXTINC) $(EXTLIBS) -o $@ + $(EALP): $(FOBJ) + $(F90) $(LDFLAGS) $(OBJDIR)/*.o $(EXTMOD) $(EXTINC) $(EXTLIBS) -o $@ + + $(OBJDIR)/advance_field.o : src/advance_field.F90 \ $(OBJDIR)/grid_mod.o $(OBJDIR)/array_mod.o $(OBJDIR)/initial_par_mod.o \ $(OBJDIR)/prec_const_mod.o $(OBJDIR)/time_integration_mod.o $(OBJDIR)/basic_mod.o \ -- GitLab