indentation was not corrected after split per compiler
This commit is contained in:
parent
19a45d9c2b
commit
e8e3af000a
|
@ -2,129 +2,129 @@
|
||||||
# GNU Compiler
|
# GNU Compiler
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|
||||||
if (OPENMP)
|
if (OPENMP)
|
||||||
set (OPENMP_FLAGS "-fopenmp")
|
set (OPENMP_FLAGS "-fopenmp")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (OPTIMIZATION STREQUAL "OFF")
|
if (OPTIMIZATION STREQUAL "OFF")
|
||||||
set (OPTIMIZATION_FLAGS "-O0" )
|
set (OPTIMIZATION_FLAGS "-O0" )
|
||||||
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
||||||
set (OPTIMIZATION_FLAGS "-O2")
|
set (OPTIMIZATION_FLAGS "-O2")
|
||||||
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
||||||
set (OPTIMIZATION_FLAGS "-O3 -ffast-math -funroll-loops -ftree-vectorize")
|
set (OPTIMIZATION_FLAGS "-O3 -ffast-math -funroll-loops -ftree-vectorize")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set (STANDARD_CHECK "-std=f2008ts -pedantic-errors" )
|
set (STANDARD_CHECK "-std=f2008ts -pedantic-errors" )
|
||||||
set (LINKER_FLAGS "${LINKER_FLAGS} -Wl")
|
set (LINKER_FLAGS "${LINKER_FLAGS} -Wl")
|
||||||
# options parsed directly to the linker
|
# options parsed directly to the linker
|
||||||
set (LINKER_FLAGS "${LINKER_FLAGS},-undefined,dynamic_lookup" )
|
set (LINKER_FLAGS "${LINKER_FLAGS},-undefined,dynamic_lookup" )
|
||||||
# ensure to link against dynamic libraries
|
# ensure to link against dynamic libraries
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# Fine tuning compilation options
|
# Fine tuning compilation options
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -xf95-cpp-input")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -xf95-cpp-input")
|
||||||
# preprocessor
|
# preprocessor
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffree-line-length-132")
|
||||||
# restrict line length to the standard 132 characters (lattice.f90 require more characters)
|
# restrict line length to the standard 132 characters (lattice.f90 require more characters)
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fimplicit-none")
|
||||||
# assume "implicit none" even if not present in source
|
# assume "implicit none" even if not present in source
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wall")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wall")
|
||||||
# sets the following Fortran options:
|
# sets the following Fortran options:
|
||||||
# -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.
|
||||||
# -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
|
||||||
# -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
|
||||||
# -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.
|
||||||
# -Wc-binding-type:
|
# -Wc-binding-type:
|
||||||
# -Wintrinsics-std: only standard intrisics are available, e.g. "call flush(6)" will cause an error
|
# -Wintrinsics-std: only standard intrisics are available, e.g. "call flush(6)" will cause an error
|
||||||
# -Wno-tabs: do not allow tabs in source
|
# -Wno-tabs: do not allow tabs in source
|
||||||
# -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
|
||||||
# -Wline-truncation:
|
# -Wline-truncation:
|
||||||
# -Wtarget-lifetime:
|
# -Wtarget-lifetime:
|
||||||
# -Wreal-q-constant: warn about real-literal-constants with 'q' exponent-letter
|
# -Wreal-q-constant: warn about real-literal-constants with 'q' exponent-letter
|
||||||
# -Wunused: a number of unused-xxx warnings
|
# -Wunused: a number of unused-xxx warnings
|
||||||
# and sets the general (non-Fortran options) options:
|
# and sets the general (non-Fortran options) options:
|
||||||
# -Waddress
|
# -Waddress
|
||||||
# -Warray-bounds (only with -O2)
|
# -Warray-bounds (only with -O2)
|
||||||
# -Wc++11-compat
|
# -Wc++11-compat
|
||||||
# -Wchar-subscripts
|
# -Wchar-subscripts
|
||||||
# -Wcomment
|
# -Wcomment
|
||||||
# -Wformat
|
# -Wformat
|
||||||
# -Wmaybe-uninitialized
|
# -Wmaybe-uninitialized
|
||||||
# -Wnonnull
|
# -Wnonnull
|
||||||
# -Wparentheses
|
# -Wparentheses
|
||||||
# -Wpointer-sign
|
# -Wpointer-sign
|
||||||
# -Wreorder
|
# -Wreorder
|
||||||
# -Wreturn-type
|
# -Wreturn-type
|
||||||
# -Wsequence-point
|
# -Wsequence-point
|
||||||
# -Wstrict-aliasing
|
# -Wstrict-aliasing
|
||||||
# -Wstrict-overflow=1
|
# -Wstrict-overflow=1
|
||||||
# -Wswitch
|
# -Wswitch
|
||||||
# -Wtrigraphs
|
# -Wtrigraphs
|
||||||
# -Wuninitialized
|
# -Wuninitialized
|
||||||
# -Wunknown-pragmas
|
# -Wunknown-pragmas
|
||||||
# -Wunused-function
|
# -Wunused-function
|
||||||
# -Wunused-label
|
# -Wunused-label
|
||||||
# -Wunused-value
|
# -Wunused-value
|
||||||
# -Wunused-variable
|
# -Wunused-variable
|
||||||
# -Wvolatile-register-var
|
# -Wvolatile-register-var
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wextra")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wextra")
|
||||||
# sets the following Fortran options:
|
# sets the following Fortran options:
|
||||||
# -Wunuses-parameter:
|
# -Wunuses-parameter:
|
||||||
# -Wcompare-reals:
|
# -Wcompare-reals:
|
||||||
# and sets the general (non-Fortran options) options:
|
# and sets the general (non-Fortran options) options:
|
||||||
# -Wclobbered
|
# -Wclobbered
|
||||||
# -Wempty-body
|
# -Wempty-body
|
||||||
# -Wignored-qualifiers
|
# -Wignored-qualifiers
|
||||||
# -Wmissing-field-initializers
|
# -Wmissing-field-initializers
|
||||||
# -Woverride-init
|
# -Woverride-init
|
||||||
# -Wsign-compare
|
# -Wsign-compare
|
||||||
# -Wtype-limits
|
# -Wtype-limits
|
||||||
# -Wuninitialized
|
# -Wuninitialized
|
||||||
# -Wunused-but-set-parameter (only with -Wunused or -Wall)
|
# -Wunused-but-set-parameter (only with -Wunused or -Wall)
|
||||||
# -Wno-globals
|
# -Wno-globals
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wcharacter-truncation")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wcharacter-truncation")
|
||||||
# warn if character expressions (strings) are truncated
|
# warn if character expressions (strings) are truncated
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wunderflow")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wunderflow")
|
||||||
# produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
|
# produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wsuggest-attribute=pure")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wsuggest-attribute=pure")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wsuggest-attribute=noreturn")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wsuggest-attribute=noreturn")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wconversion-extra")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wconversion-extra")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wimplicit-procedure")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wimplicit-procedure")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-unused-parameter")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-unused-parameter")
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffpe-summary=all")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffpe-summary=all")
|
||||||
# print summary of floating point exeptions (invalid,zero,overflow,underflow,inexact,denormal)
|
# print summary of floating point exeptions (invalid,zero,overflow,underflow,inexact,denormal)
|
||||||
|
|
||||||
# Additional options
|
# Additional options
|
||||||
# -Warray-temporarieswarnings: because we have many temporary arrays (performance issue?):
|
# -Warray-temporarieswarnings: because we have many temporary arrays (performance issue?):
|
||||||
# -Wimplicit-interface: no interfaces for lapack/MPI routines
|
# -Wimplicit-interface: no interfaces for lapack/MPI routines
|
||||||
# -Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
|
# -Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# Runtime debugging
|
# Runtime debugging
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ffpe-trap=invalid,zero,overflow")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ffpe-trap=invalid,zero,overflow")
|
||||||
# stop execution if floating point exception is detected (NaN is silent)
|
# stop execution if floating point exception is detected (NaN is silent)
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
||||||
# Generate symbolic debugging information in the object file
|
# Generate symbolic debugging information in the object file
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fbacktrace")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fbacktrace")
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fdump-core")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fdump-core")
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all")
|
||||||
# checks for (array-temps,bounds,do,mem,pointer,recursion)
|
# checks for (array-temps,bounds,do,mem,pointer,recursion)
|
||||||
|
|
||||||
# Additional options
|
# Additional options
|
||||||
# -ffpe-trap=precision,denormal,underflow
|
# -ffpe-trap=precision,denormal,underflow
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# precision settings
|
# precision settings
|
||||||
set (PRECISION_FLAGS "${PRECISION_FLAGS} -fdefault-real-8")
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -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
|
# 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
|
||||||
set (PRECISION_FLAGS "${PRECISION_FLAGS} -fdefault-double-8")
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -fdefault-double-8")
|
||||||
# set precision to 8 bytes for double real, would be 16 bytes if -fdefault-real-8 is used
|
# set precision to 8 bytes for double real, would be 16 bytes if -fdefault-real-8 is used
|
||||||
|
|
|
@ -1,116 +1,116 @@
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
# Intel Compiler
|
# Intel Compiler
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
if (OPENMP)
|
if (OPENMP)
|
||||||
set (OPENMP_FLAGS "-qopenmp -parallel")
|
set (OPENMP_FLAGS "-qopenmp -parallel")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (OPTIMIZATION STREQUAL "OFF")
|
if (OPTIMIZATION STREQUAL "OFF")
|
||||||
set (OPTIMIZATION_FLAGS "-O0 -no-ip")
|
set (OPTIMIZATION_FLAGS "-O0 -no-ip")
|
||||||
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
||||||
set (OPTIMIZATION_FLAGS "-O2")
|
set (OPTIMIZATION_FLAGS "-O2")
|
||||||
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
||||||
set (OPTIMIZATION_FLAGS "-ipo -O3 -no-prec-div -fp-model fast=2 -xHost")
|
set (OPTIMIZATION_FLAGS "-ipo -O3 -no-prec-div -fp-model fast=2 -xHost")
|
||||||
# -fast = -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost"
|
# -fast = -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost"
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# -assume std_mod_proc_name (included in -standard-semantics) causes problems if other modules
|
# -assume std_mod_proc_name (included in -standard-semantics) causes problems if other modules
|
||||||
# (PETSc, HDF5) are not compiled with this option (https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/62172)
|
# (PETSc, HDF5) are not compiled with this option (https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/62172)
|
||||||
set (STANDARD_CHECK "-stand f15 -standard-semantics -assume nostd_mod_proc_name")
|
set (STANDARD_CHECK "-stand f15 -standard-semantics -assume nostd_mod_proc_name")
|
||||||
set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
|
set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
|
||||||
# Link against shared Intel libraries instead of static ones
|
# Link against shared Intel libraries instead of static ones
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# Fine tuning compilation options
|
# Fine tuning compilation options
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
|
||||||
# preprocessor
|
# preprocessor
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ftz")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ftz")
|
||||||
# flush underflow to zero, automatically set if -O[1,2,3]
|
# flush underflow to zero, automatically set if -O[1,2,3]
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
||||||
# disables warnings ...
|
# disables warnings ...
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
||||||
# ... the text exceeds right hand column allowed on the line (we have only comments there)
|
# ... the text exceeds right hand column allowed on the line (we have only comments there)
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
||||||
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
||||||
|
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -warn")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -warn")
|
||||||
# enables warnings ...
|
# enables warnings ...
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} declarations")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} declarations")
|
||||||
# ... any undeclared names (alternative name: -implicitnone)
|
# ... any undeclared names (alternative name: -implicitnone)
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},general")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},general")
|
||||||
# ... warning messages and informational messages are issued by the compiler
|
# ... warning messages and informational messages are issued by the compiler
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},usage")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},usage")
|
||||||
# ... questionable programming practices
|
# ... questionable programming practices
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},interfaces")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},interfaces")
|
||||||
# ... checks the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against an external set of interface blocks
|
# ... checks the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against an external set of interface blocks
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},ignore_loc")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},ignore_loc")
|
||||||
# ... %LOC is stripped from an actual argument
|
# ... %LOC is stripped from an actual argument
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},alignments")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},alignments")
|
||||||
# ... data that is not naturally aligned
|
# ... data that is not naturally aligned
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},unused")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS},unused")
|
||||||
# ... declared variables that are never used
|
# ... declared variables that are never used
|
||||||
|
|
||||||
# Additional options
|
# Additional options
|
||||||
# -warn: enables warnings, where
|
# -warn: enables warnings, where
|
||||||
# truncated_source: Determines whether warnings occur when source exceeds the maximum column width in fixed-format files.
|
# truncated_source: Determines whether warnings occur when source exceeds the maximum column width in fixed-format files.
|
||||||
# (too many warnings because we have comments beyond character 132)
|
# (too many warnings because we have comments beyond character 132)
|
||||||
# uncalled: Determines whether warnings occur when a statement function is never called
|
# uncalled: Determines whether warnings occur when a statement function is never called
|
||||||
# all:
|
# all:
|
||||||
# -name as_is: case sensitive Fortran!
|
# -name as_is: case sensitive Fortran!
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# Runtime debugging
|
# Runtime debugging
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
||||||
# Generate symbolic debugging information in the object file
|
# Generate symbolic debugging information in the object file
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -traceback")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -traceback")
|
||||||
# Generate extra information in the object file to provide source file traceback information when a severe error occurs at run time
|
# Generate extra information in the object file to provide source file traceback information when a severe error occurs at run time
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -gen-interfaces")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -gen-interfaces")
|
||||||
# Generate an interface block for each routine. http://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again/
|
# Generate an interface block for each routine. http://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again/
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-stack-check")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-stack-check")
|
||||||
# Generate extra code after every function call to ensure that the floating-point (FP) stack is in the expected state
|
# Generate extra code after every function call to ensure that the floating-point (FP) stack is in the expected state
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-model strict")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-model strict")
|
||||||
# Trap uninitalized variables
|
# Trap uninitalized variables
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -check" )
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -check" )
|
||||||
# Checks at runtime ...
|
# Checks at runtime ...
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} bounds")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} bounds")
|
||||||
# ... if an array index is too small (<1) or too large!
|
# ... if an array index is too small (<1) or too large!
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},format")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},format")
|
||||||
# ... for the data type of an item being formatted for output.
|
# ... for the data type of an item being formatted for output.
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},output_conversion")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},output_conversion")
|
||||||
# ... for the fit of data items within a designated format descriptor field.
|
# ... for the fit of data items within a designated format descriptor field.
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},pointers")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},pointers")
|
||||||
# ... for certain disassociated or uninitialized pointers or unallocated allocatable objects.
|
# ... for certain disassociated or uninitialized pointers or unallocated allocatable objects.
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},uninit")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},uninit")
|
||||||
# ... for uninitialized variables.
|
# ... for uninitialized variables.
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
|
||||||
# ... initializes stack local variables to an unusual value to aid error detection
|
# ... initializes stack local variables to an unusual value to aid error detection
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
|
||||||
# ... capture all floating-point exceptions, sets -ftz automatically
|
# ... capture all floating-point exceptions, sets -ftz automatically
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
|
||||||
# enables warnings ...
|
# enables warnings ...
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} errors")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} errors")
|
||||||
# ... warnings are changed to errors
|
# ... warnings are changed to errors
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
|
||||||
# ... warnings about Fortran standard violations are changed to errors
|
# ... warnings about Fortran standard violations are changed to errors
|
||||||
|
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
|
||||||
# generate debug information for parameters
|
# generate debug information for parameters
|
||||||
|
|
||||||
# Additional options
|
# Additional options
|
||||||
# -heap-arrays: Should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
|
# -heap-arrays: Should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
|
||||||
# -check: Checks at runtime, where
|
# -check: Checks at runtime, where
|
||||||
# arg_temp_created: will cause a lot of warnings because we create a bunch of temporary arrays (performance?)
|
# arg_temp_created: will cause a lot of warnings because we create a bunch of temporary arrays (performance?)
|
||||||
# stack:
|
# stack:
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# precision settings
|
# precision settings
|
||||||
set (PRECISION_FLAGS "${PRECISION_FLAGS} -real-size 64")
|
set (PRECISION_FLAGS "${PRECISION_FLAGS} -real-size 64")
|
||||||
# set precision for standard real to 32 | 64 | 128 (= 4 | 8 | 16 bytes, type pReal is always 8 bytes)
|
# set precision for standard real to 32 | 64 | 128 (= 4 | 8 | 16 bytes, type pReal is always 8 bytes)
|
||||||
|
|
|
@ -2,23 +2,23 @@
|
||||||
# PGI Compiler
|
# PGI Compiler
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|
||||||
if (OPTIMIZATION STREQUAL "OFF")
|
if (OPTIMIZATION STREQUAL "OFF")
|
||||||
set (OPTIMIZATION_FLAGS "-O0" )
|
set (OPTIMIZATION_FLAGS "-O0" )
|
||||||
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
||||||
set (OPTIMIZATION_FLAGS "-O2")
|
set (OPTIMIZATION_FLAGS "-O2")
|
||||||
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
||||||
set (OPTIMIZATION_FLAGS "-O3")
|
set (OPTIMIZATION_FLAGS "-O3")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# Fine tuning compilation options
|
# Fine tuning compilation options
|
||||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Mpreprocess")
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Mpreprocess")
|
||||||
# preprocessor
|
# preprocessor
|
||||||
|
|
||||||
set (STANDARD_CHECK "-Mallocatable=03")
|
set (STANDARD_CHECK "-Mallocatable=03")
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
# Runtime debugging
|
# Runtime debugging
|
||||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
||||||
# Includes debugging information in the object module; sets the optimization level to zero unless a -O option is present on the command line
|
# Includes debugging information in the object module; sets the optimization level to zero unless a -O option is present on the command line
|
||||||
|
|
Loading…
Reference in New Issue