disabled multi file optimization when setting OPTIMIZATION=OFF and improved comments on compiler switches
This commit is contained in:
parent
fc40291f38
commit
f2ee67d03d
|
@ -46,7 +46,11 @@ OPENMP ?= ON
|
||||||
OPTIMIZATION ?= DEFENSIVE
|
OPTIMIZATION ?= DEFENSIVE
|
||||||
|
|
||||||
ifeq "$(F90)" "ifort"
|
ifeq "$(F90)" "ifort"
|
||||||
|
ifeq "$(OPTIMIZATION)" "OFF"
|
||||||
|
ARCHIVE_COMMAND :=ar
|
||||||
|
else
|
||||||
ARCHIVE_COMMAND :=xiar
|
ARCHIVE_COMMAND :=xiar
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
ARCHIVE_COMMAND :=ar
|
ARCHIVE_COMMAND :=ar
|
||||||
endif
|
endif
|
||||||
|
@ -192,34 +196,34 @@ COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\
|
||||||
-Wunderflow\
|
-Wunderflow\
|
||||||
-Wswitch\
|
-Wswitch\
|
||||||
-Wstrict-overflow\
|
-Wstrict-overflow\
|
||||||
-Wextra\
|
|
||||||
-Wattributes\
|
-Wattributes\
|
||||||
-Wunsafe-loop-optimizations\
|
-Wunsafe-loop-optimizations\
|
||||||
-Wunused
|
-Wunused\
|
||||||
|
-Wextra
|
||||||
|
|
||||||
#-xf95-cpp-input: preprocessor
|
#-xf95-cpp-input: preprocessor
|
||||||
#-ffree-line-length-132: restrict line length to the standard 132 characters
|
#-ffree-line-length-132: restrict line length to the standard 132 characters
|
||||||
#-fno-range-check: disables checking if result can be represented by variable. Needs to be set to enable DAMASK_NaN
|
#-fno-range-check: disables checking if result can be represented by variable. Needs to be set to enable DAMASK_NaN
|
||||||
#-fimplicit-none: assume "implicit-none" even if not present in source
|
#-fimplicit-none: assume "implicit-none" even if not present in source
|
||||||
#-fall-intrinsics:
|
#-fall-intrinsics:
|
||||||
#-pedantic: more strict on standard, enables some of the warnings below
|
#-pedantic: more strict on standard, enables some of the warnings below
|
||||||
#-Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
|
#-Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
|
||||||
#-Wampersand: checks if a character expression is continued proberly by an ampersand at the end of the line and at the beginning of the new line
|
#-Wampersand: checks if a character expression is continued proberly by an ampersand at the end of the line and at the beginning of the new line
|
||||||
#-Wno-tabs: do not allow tabs in source
|
#-Wno-tabs: do not allow tabs in source
|
||||||
#-Wcharacter-truncation: warn if character expressions (strings) are truncated
|
#-Wcharacter-truncation: warn if character expressions (strings) are truncated
|
||||||
#-Wintrinsic-shadow: warn if a user-defined procedure or module procedure has the same name as an intrinsic
|
#-Wintrinsic-shadow: warn if a user-defined procedure or module procedure has the same name as an intrinsic
|
||||||
#-Waliasing: warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface.
|
#-Waliasing: warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface.
|
||||||
#-Wconversion: warn about implicit conversions between different type
|
#-Wconversion: warn about implicit conversions between different type
|
||||||
#-Wsurprising: warn when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made.
|
#-Wsurprising: warn when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made.
|
||||||
#-Wunused-value:
|
#-Wunderflow: produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
|
||||||
#-Wunused-parameter: find usused variables with "parameter" attribute
|
#-Wswitch: warn whenever a "switch" statement has an index of enumerated type and lacks a "case" for one or more of the named codes of that enumeration. (The presence of a "default" label prevents this warning.) "case" labels outside the enumeration range also provokewarnings when this option is used (even if there is a "default" label)
|
||||||
#-Wunderflow: produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
|
#-Wstrict-overflow:
|
||||||
#-Wswitch: warn whenever a "switch" statement has an index of enumerated type and lacks a "case" for one or more of the named codes of that
|
#-Wattributes: warn about inappropriate attribute usage
|
||||||
# enumeration. (The presence of a "default" label prevents this warning.) "case" labels outside the enumeration range also provoke
|
#-Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
|
||||||
# warnings when this option is used (even if there is a "default" label)
|
#-Wunused:
|
||||||
#-Wstrict-overflow
|
# -value:
|
||||||
#-Wattributes Warn about inappropriate attribute usage
|
# -parameter: find usused variables with "parameter" attribute
|
||||||
# -Wunsafe-loop-optimizations Warn if the loop cannot be optimized due to nontrivial assumptions.
|
#-Wextra:
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
#OPTIONS FOR GFORTRAN 4.6
|
#OPTIONS FOR GFORTRAN 4.6
|
||||||
#-Wsuggest-attribute=const:
|
#-Wsuggest-attribute=const:
|
||||||
|
@ -227,20 +231,20 @@ COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\
|
||||||
#-Wsuggest-attribute=pure:
|
#-Wsuggest-attribute=pure:
|
||||||
#-Wreal-q-constant: Warn about real-literal-constants with 'q' exponent-letter
|
#-Wreal-q-constant: Warn about real-literal-constants with 'q' exponent-letter
|
||||||
#MORE OPTIONS FOR DEBUGGING DURING COMPILING
|
#MORE OPTIONS FOR DEBUGGING DURING COMPILING
|
||||||
#-Wline-truncation: too many warnings because we have comments beyond character 132
|
#-Wline-truncation: too many warnings because we have comments beyond character 132
|
||||||
#-Wintrinsic-std: warnings because of "flush" is not longer in the standard, but still an intrinsic fuction of the compilers:
|
#-Wintrinsic-std: warnings because of "flush" is not longer in the standard, but still an intrinsic fuction of the compilers:
|
||||||
#-Warray-temporarieswarnings:
|
#-Warray-temporarieswarnings:
|
||||||
# because we have many temporary arrays (performance issue?):
|
# because we have many temporary arrays (performance issue?):
|
||||||
#-Wimplicit-interface
|
#-Wimplicit-interface
|
||||||
#-pedantic-errors
|
#-pedantic-errors
|
||||||
#-fmodule-private
|
#-fmodule-private
|
||||||
#
|
#
|
||||||
#OPTIONS FOR DEGUBBING DURING RUNTIME
|
#OPTIONS FOR DEGUBBING DURING RUNTIME
|
||||||
#-fcheck-bounds: check if an array index is too small (<1) or too large!
|
#-fcheck-bounds: check if an array index is too small (<1) or too large!
|
||||||
#
|
#
|
||||||
#OPTIONS FOR TYPE DEBUGGING
|
#OPTIONS FOR TYPE DEBUGGING
|
||||||
#-fdefault-real-8: set precision to 8 bytes for standard real (=8 for pReal). Will set size of double to 16 bytes as long as -fdefault-double-8 is not set
|
#-fdefault-real-8: set precision to 8 bytes for standard real (=8 for pReal). Will set size of double to 16 bytes as long as -fdefault-double-8 is not set
|
||||||
#-fdefault-integer-8: set precision to 8 bytes for standard integer (=4 for pInt)
|
#-fdefault-integer-8: set precision to 8 bytes for standard integer (=4 for pInt)
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
COMPILE =$(OPENMP_FLAG_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(OPTI)_$(F90)) -c
|
COMPILE =$(OPENMP_FLAG_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(OPTI)_$(F90)) -c
|
||||||
|
|
Loading…
Reference in New Issue