# Knuts home directory (contains some libs/includes) KHOME = /home/parallab/nersc/knutali #Compiler -- F90 CF90 = /usr/bin/xlf95_r #Compiler -- F77 CF77 = $(CF90) # Compiler -- C CC=xlc #Linker LD = $(CF90) #Paralellization opts PARO = #-qsmp=omp #Size defaults SIZEO = -b64 -q64 -qrealsize=8 #SIZEO = -qrealsize=8 -qintsize=4 #Arch opts # -qarch=pwr4 -qtune=pwr4 -qcache=auto ARCHO= -qarch=auto -qtune=auto -qcache=auto #Optimalization opts OPTO= -O3 -qstrict OPTO= #Inlining opts #INLO= -qipa=inline=auto INLO= # Diverse options DIVO= -qmaxmem=-1 -qnosave # Flags for debugging. Remove optimization (OPTO above) to use debugging properly # # -g -- turns on debugging ... # -qflttrap -- Floating point operation traps # -qextchk -- Checks if subroutine args are consistent + common block checks # -C -- Checks array bounds # qinitauto=FF initializes all vars to NaN -- So that uninitialized vars can be detected # # No debugging DEBUG_FLAGS = # Debugging With underflow #DEBUG_FLAGS = -C -qflttrap=underflow:overflow:zerodivide:invalid:enable \ # -qextchk -qinitauto=FF -g -qfullpath -qsigtrap # Debugging Without underflow (zeroin routine sends segfault on underflow ) #DEBUG_FLAGS = -C -qflttrap=overflow:zerodivide:invalid:enable \ # -qextchk -qinitauto=FF -g -qfullpath -qsigtrap #"Imprecise" debugging. The routine handles errors, but gives only an approximate location #of the error... Upside: Code runs faster ! #DEBUG_FLAGS = -C -qflttrap=underflow:overflow:zerodivide:invalid:enable:imprecise \ # -qextchk -qinitauto=FF -g -qfullpath -qsigtrap #"Imprecise" debugging. The routine handles errors, but gives only an approximate location #of the error... Upside: Code runs faster ! #DEBUG_FLAGS = -C -qflttrap=overflow:zerodivide:invalid:enable:imprecise \ # -qextchk -qinitauto=FF -g -qfullpath -qsigtrap #Profiling -- Not exactly debugging ... used for xprofiler #DEBUG_FLAGS = -pg -g -qfullpath CFLAGS = -q64 F77FLG = -qfixed F90FLG = -qsuffix=f=f90 -qfree=f90 CPPARCH = -DAIX LIBS = -lessl -L$(KHOME)/lib -lnetcdf64 INCLUDEDIR= -I$(KHOME)/include/ CPP = /usr/lib/cpp FFLAGS = $(SIZEO) $(OPTO) $(ARCHO) $(PARO) $(INLO) $(DIVO) $(DEBUG_FLAGS) FFLAGS_NODEBUG = $(SIZEO) $(OPTO) $(ARCHO) $(PARO) $(INLO) $(DIVO) LINKFLAGS = $(SIZEO) $(OPTO) $(PARO) $(INLO) $(DIVO) $(DEBUG_FLAGS) -bloadmap:map.load