# Purpose # ------- # Makefile macros for burnet.hpsc.csiro.au # # Usage # ----- # The values of the following variables must be set: # # CPP Preprocessor # CPPFLAGS Options to pass to the preprocessor # # FC Fortran compiler # F90 Fortran 90 compiler # FFLAGS Options to pass to the Fortran compiler # F90FLAGS Options to pass to the Fortran 90 compiler # FIXEDFLAGS Options to pass to the Fortran 90 compiler for fixed-format # source files # # CABLEFLAGS Options to pass to the Fortran 90 compiler for CABLE # # AUTO Auto-parallelising compiler (if available) # AUTOFLAGS Options to pass to the auto-parallelising compiler # # INC The directory containing the netCDF header file # LIB The directories containing the netCDF and FFTW libraries # (note that Mk3L is only compatible with FFTW 2.x) # # History # ------- # 2008 Dec 11 Steven Phipps Original version # 2009 Aug 11 Steven Phipps Added compile information for CABLE # 2009 Sep 22 Bernard Pak Modified from the XE macros CPP = fpp CPPFLAGS = FC = ifort F90 = $(FC) # debug mode #FFLAGS = -g -O0 -traceback -fpe0 -debug all -check all -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O0 -traceback -fpe0 -openmp -debug all -check all # debug mode 2 (prefer) #FFLAGS = -g -O0 -traceback -fpe0 -debug all -openmp -fp-model precise -ftz -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O0 -traceback -fpe0 -openmp -debug all -fp-model precise -ftz #FFLAGS = -g -O0 -traceback -fpe0 -debug all -openmp -fp-model precise -ftz -align dcommons -r8 -warn nouncalled -check all #CABLEFLAGS = -g -O0 -traceback -fpe0 -openmp -debug all -fp-model precise -ftz -check all # debug mode 3 #FFLAGS = -g -O0 -traceback -fpe0 -debug all -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O0 -traceback -fpe0 -openmp -debug all # debug mode with optimization 1 #FFLAGS = -g -traceback -fpe0 -debug all -check all -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -traceback -fpe0 -openmp -debug all -check all # debug mode with optimization 2 #FFLAGS = -g -O2 -traceback -fpe0 -debug all -check all -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -traceback -fpe0 -openmp -debug all -check all # debug mode with optimization 3 #FFLAGS = -g -O2 -traceback -fpe0 -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -traceback -fpe0 -openmp # debug mode with optimization 4 #FFLAGS = -g -O2 -heap-arrays -traceback -fpe0 -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -heap-arrays -traceback -fpe0 -openmp # debug mode with optimization 5 #FFLAGS = -g -O2 -traceback -fpe0 -debug all -openmp -fp-model precise -ftz -override-limits -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -traceback -fpe0 -openmp -fp-model precise -ftz -debug all # debug mode with optimization 6 #FFLAGS = -g -O2 -traceback -fpe0 -debug all -override-limits -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -traceback -fpe0 -openmp -debug all -override-limits # debug mode with optimization 7 #FFLAGS = -g -O2 -traceback -fpe0 -debug all -override-limits -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -g -O1 -traceback -fpe0 -openmp -debug all # normal mode without optimization #FFLAGS = -O0 -fpe0 -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -O0 -fpe0 -openmp # normal optimized mode #FFLAGS = -fpe0 -openmp -align dcommons -r8 -warn nouncalled #CABLEFLAGS = -O1 -fpe0 -openmp # normal optimized mode + model precise (preferred) FFLAGS = -fpe0 -openmp -fp-model precise -ftz -align dcommons -r8 -warn nouncalled CABLEFLAGS = -O1 -fpe0 -openmp -fp-model precise -ftz F90FLAGS = $(FFLAGS) FIXEDFLAGS = $(FFLAGS) -fixed AUTO = $(FC) AUTOFLAGS = $(FFLAGS) INC = -I/apps/netcdf/4.1.2/include -I/home/mat236/opt/include LIB = -L/apps/netcdf/4.1.2/lib -L/home/mat236/opt/lib # LIB for debugging #LIB = -L/apps/netcdf/4.1.2/lib -L/apps/fftw/2.1.5/lib -L/apps/toolworks/totalview.8.9.1-0/linux-x86-64/lib