some debug options for PGI

This commit is contained in:
Martin Diehl 2020-01-04 02:48:05 +01:00
parent d2a9946f83
commit 3d32ad47db
2 changed files with 32 additions and 6 deletions

View File

@ -103,9 +103,9 @@ set (COMPILE_FLAGS "${COMPILE_FLAGS} -ffpe-summary=all")
# print summary of floating point exeptions (invalid,zero,overflow,underflow,inexact,denormal)
# 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
# -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
@ -122,6 +122,7 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS} -fcheck=all")
# Additional options
# -ffpe-trap=precision,denormal,underflow
#------------------------------------------------------------------------------------------------
# precision settings
set (PRECISION_FLAGS "${PRECISION_FLAGS} -fdefault-real-8")

View File

@ -2,23 +2,48 @@
# PGI Compiler
###################################################################################################
if (OPENMP)
set (OPENMP_FLAGS "-mp")
else ()
set (OPENMP_FLAGS "-nomp")
endif ()
if (OPTIMIZATION STREQUAL "OFF")
set (OPTIMIZATION_FLAGS "-O0" )
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
set (OPTIMIZATION_FLAGS "-O2")
set (OPTIMIZATION_FLAGS "-O2 -fast")
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
set (OPTIMIZATION_FLAGS "-O3")
set (OPTIMIZATION_FLAGS "-O4 -fast -Mvect=sse")
endif ()
set (STANDARD_CHECK "-Mallocatable=03 -Mstandard")
#------------------------------------------------------------------------------------------------
# Fine tuning compilation options
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Mpreprocess")
# preprocessor
set (STANDARD_CHECK "-Mallocatable=03")
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Minfo=all")
# instructs the compiler to produce information on standard error
#------------------------------------------------------------------------------------------------
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Minform=warn")
# instructs the compiler to display error messages at the specified and higher levels
#------------------------------------------------------------------------------------------------O
# Runtime debugging
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
set (DEBUG_FLAGS "${DEBUG_FLAGS} -C")
# Generates code to check array bounds
set (DEBUG_FLAGS "${DEBUG_FLAGS} -Mchkptr")
# Check for NULL pointers (pgf95, pgfortran only)
set (DEBUG_FLAGS "${DEBUG_FLAGS} -Mchkstk")
# Check the stack for available space upon entry to and before the start of a parallel region. Useful when many private variables are declared
set (DEBUG_FLAGS "${DEBUG_FLAGS} -Mbounds")
# Specifies whether array bounds checking is enabled or disabled
#------------------------------------------------------------------------------------------------
# precision settings
set (PRECISION_FLAGS "${PRECISION_FLAGS} -r8")
# Determines whether the compiler promotes REAL variables and constants to DOUBLE PRECISION