You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# PETSc macros are long, line length is enforced in pre-receive hook:
35
38
set (COMPILE_FLAGS"${COMPILE_FLAGS} -ffree-line-length-none")
36
-
# PETSc macros are long, line length is enforced in pre-receive hook
37
39
40
+
# assume "implicit none" even if not present in source:
38
41
set (COMPILE_FLAGS"${COMPILE_FLAGS} -fimplicit-none")
39
-
# assume "implicit none" even if not present in source
40
42
41
-
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wall")
42
-
# sets the following Fortran options:
43
+
# set the following Fortran options:
43
44
# -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.
44
45
# -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
45
46
# -Warray-bounds: checks if array reference is out of bounds at compile time. use -fcheck-bounds to also check during runtime
@@ -53,7 +54,7 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wall")
53
54
# -Wtarget-lifetime:
54
55
# -Wreal-q-constant: warn about real-literal-constants with 'q' exponent-letter
55
56
# -Wunused: a number of unused-xxx warnings
56
-
# and sets the general (non-Fortran options) options:
57
+
# and set the general (non-Fortran options) options:
57
58
# -Waddress
58
59
# -Warray-bounds (only with -O2)
59
60
# -Wc++11-compat
@@ -78,12 +79,12 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wall")
78
79
# -Wunused-value
79
80
# -Wunused-variable
80
81
# -Wvolatile-register-var
82
+
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wall")
81
83
82
-
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wextra")
83
-
# sets the following Fortran options:
84
+
# set the following Fortran options:
84
85
# -Wunuses-parameter:
85
86
# -Wcompare-reals:
86
-
# and sets the general (non-Fortran options) options:
87
+
# and set the general (non-Fortran options) options:
87
88
# -Wclobbered
88
89
# -Wempty-body
89
90
# -Wignored-qualifiers
@@ -94,50 +95,60 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wextra")
94
95
# -Wuninitialized
95
96
# -Wunused-but-set-parameter (only with -Wunused or -Wall)
96
97
# -Wno-globals
98
+
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wextra")
97
99
100
+
# warn if character expressions (strings) are truncated:
98
101
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wcharacter-truncation")
99
-
# warn if character expressions (strings) are truncated
100
102
103
+
# produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW
104
+
# during compilation:
101
105
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wunderflow")
102
-
# produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
103
106
104
107
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wsuggest-attribute=pure")
105
108
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wsuggest-attribute=noreturn")
106
109
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wconversion-extra")
107
110
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wimplicit-procedure")
108
111
set (COMPILE_FLAGS"${COMPILE_FLAGS} -Wunused-parameter")
112
+
113
+
# print summary of floating point exeptions (invalid,zero,overflow,underflow,inexact,denormal):
109
114
set (COMPILE_FLAGS"${COMPILE_FLAGS} -ffpe-summary=all")
110
-
# print summary of floating point exeptions (invalid,zero,overflow,underflow,inexact,denormal)
# Generate symbolic debugging information in the object file
69
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
67
70
68
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} -traceback")
69
71
# Generate extra information in the object file to provide source file traceback information when a severe error occurs at run time
72
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} -traceback")
70
73
71
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} -gen-interfaces")
72
74
# Generate an interface block for each routine. http://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again/
75
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} -gen-interfaces")
73
76
74
-
# set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-stack-check") not available on ifx 2025.0.4
75
77
# Generate extra code after every function call to ensure that the floating-point (FP) stack is in the expected state
78
+
# set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-stack-check") not available on ifx 2025.0.4
76
79
77
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-model strict")
78
80
# Trap uninitalized variables
81
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-model strict")
79
82
83
+
# Check at runtime ...
80
84
set (DEBUG_FLAGS "${DEBUG_FLAGS} -check" )
81
-
# Checks at runtime ...
82
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} bounds")
83
85
# ... if an array index is too small (<1) or too large!
84
-
set (DEBUG_FLAGS "${DEBUG_FLAGS},format")
86
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} bounds")
85
87
# ... for the data type of an item being formatted for output.
86
-
set (DEBUG_FLAGS "${DEBUG_FLAGS},output_conversion")
88
+
set (DEBUG_FLAGS "${DEBUG_FLAGS},format")
87
89
# ... for the fit of data items within a designated format descriptor field.
88
-
set (DEBUG_FLAGS "${DEBUG_FLAGS},pointers")
90
+
set (DEBUG_FLAGS "${DEBUG_FLAGS},output_conversion")
89
91
# ... for certain disassociated or uninitialized pointers or unallocated allocatable objects.
90
-
set (DEBUG_FLAGS "${DEBUG_FLAGS},nouninit") # https://fortran-lang.discourse.group/t/issue-with-stdlib-and-intel-oneapi-fortran-compiler-ifx-2024-0/7049/4
92
+
set (DEBUG_FLAGS "${DEBUG_FLAGS},pointers")
91
93
# ... for uninitialized variables.
92
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0 -ftz")
94
+
set (DEBUG_FLAGS "${DEBUG_FLAGS},nouninit") # https://fortran-lang.discourse.group/t/issue-with-stdlib-and-intel-oneapi-fortran-compiler-ifx-2024-0/7049/4
93
95
# ... capture all floating-point exceptions, need to overwrite -no-ftz
96
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0 -ftz")
94
97
98
+
# Initialize logical to false, integer to -huge, float+complex to signaling NaN
95
99
set (DEBUG_FLAGS "${DEBUG_FLAGS} -init=arrays,zero,minus_huge,snan")
96
-
# ... initialize logical to false, integer to -huge, float+complex to signaling NaN
97
100
98
101
# disable due to compiler bug https://community.intel.com/t5/Intel-Fortran-Compiler/false-positive-stand-f18-and-IEEE-SELECTED-REAL-KIND/m-p/1227336
99
-
#set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
100
102
# enables warnings ...
101
-
#set (DEBUG_FLAGS "${DEBUG_FLAGS} errors")
103
+
#set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
102
104
# ... warnings are changed to errors
103
-
#set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
105
+
#set (DEBUG_FLAGS "${DEBUG_FLAGS} errors")
104
106
# ... warnings about Fortran standard violations are changed to errors
107
+
#set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
105
108
106
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
107
109
# generate debug information for parameters
110
+
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
108
111
109
-
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug all")
110
112
# generate complete debugging information
111
-
112
113
# Additional options
113
114
# -heap-arrays: Should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
114
115
# -check: Checks at runtime, where
115
116
# arg_temp_created: will cause a lot of warnings because we create a bunch of temporary arrays (performance?)
0 commit comments