Code: Select all
# Intels ifort, default in optimized mode
F90 = ifort
comp = -c -O -module ${Mdir} -I${InDir}
LFlagsB = -O
# Intels ifort, debug modus
ifeq (${F90},ifortg)
F90 = ifort
comp = -c -g -module ${Mdir} -I${InDir}
LFlagsB = -g
endif
# gfortran
ifeq (${F90},gfortran)
comp = -c -O -J${Mdir} -I${InDir}
LFlagsB = -O
endif
# g95
ifeq (${F90},g95)
comp = -c -O -fmod=${Mdir} -I${InDir}
LFlagsB = -O
endif
# Lahey F95 compiler
ifeq (${F90},lf95)
comp = -c -O -M ${Mdir} -I${InDir}
LFlagsB = -O
endif
# NAG f95/2003
ifeq (${F90},nagfor)
comp = -c -O -DONLYDOUBLE -mdir ${Mdir} -I${InDir}
LFlagsB = -O
endif
Code: Select all
# Default Compiler
F90=gfortran
comp= -c -O -module ${Mdir} -I${InDir}
LFlagsB= -O
# Intels ifort,debug modus
ifeq (${F90},ifortg)
F90=ifort
comp= -c -g -module ${Mdir} -I${InDir}
LFlagsB= -g
endif
# gfortran
ifeq (${F90},gfortran)
comp= -c -g -ffree-line-length-none -J${Mdir} -I${InDir}
LFlagsB= -g
endif
# g95
ifeq (${F90},g95)
comp= -c -O -fmod=${Mdir} -I${InDir}
LFlagsB= -O
endif
# Lahey F95 compiler
ifeq (${F90},lf95)
comp=-c -O -M ${Mdir} -I${InDir}
LFlagsB=-O
endif
# NAG f95/2003
ifeq (${F90},nagfor)
comp= -c -O -mdir ${Mdir} -I${InDir}
LFlagsB= -O -DONLYDOUBLE -mdir ${MDir} -I${InDir}
endif
1.) Why is the default compiler for SARAH gfortran while it is ifort for SPHENO? Maybe this is just a typo? It doesn’t seem to make much sense to set the default compiler settings for gfortran at the top of the file and to overwrite them later and not to have any settings for ifort in optimized mode.
2.) Why are the compiler settings for gfortran different, especially why does SARAH use debug mode while SPheno uses optimized mode?
3.) I would be grateful if both Makefiles would allow to set the F90 variable to the full path of the compiler, not only its "type".
Unfortunately this would require to change the mechanism how the compiler flags are determined. Just as an idea, a pragmatic approach could be to test if the F90 variable *contains* a certain string which identifies the compiler type instead of requiring the F90 variable to be *equal* to that string.
This could for example be achieved by replacing the lines which look like
Code: Select all
"ifeq (${F90},${COMPILER})"
Code: Select all
"ifneq (,$(findstring ${COMPILER},${F90}))"