2019-04-27 11:26:52 +05:30
|
|
|
|
###################################################################################################
|
|
|
|
|
# PGI Compiler
|
|
|
|
|
###################################################################################################
|
|
|
|
|
|
2020-01-04 07:18:05 +05:30
|
|
|
|
if (OPENMP)
|
|
|
|
|
set (OPENMP_FLAGS "-mp")
|
|
|
|
|
else ()
|
|
|
|
|
set (OPENMP_FLAGS "-nomp")
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
2019-12-21 12:29:09 +05:30
|
|
|
|
if (OPTIMIZATION STREQUAL "OFF")
|
|
|
|
|
set (OPTIMIZATION_FLAGS "-O0" )
|
|
|
|
|
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
2020-01-04 07:18:05 +05:30
|
|
|
|
set (OPTIMIZATION_FLAGS "-O2 -fast")
|
2019-12-21 12:29:09 +05:30
|
|
|
|
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
2020-01-04 07:18:05 +05:30
|
|
|
|
set (OPTIMIZATION_FLAGS "-O4 -fast -Mvect=sse")
|
2019-12-21 12:29:09 +05:30
|
|
|
|
endif ()
|
2019-04-27 11:26:52 +05:30
|
|
|
|
|
2020-01-04 07:18:05 +05:30
|
|
|
|
set (STANDARD_CHECK "-Mallocatable=03 -Mstandard")
|
2019-04-27 11:26:52 +05:30
|
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------------------------------
|
|
|
|
|
# Fine tuning compilation options
|
2019-12-21 12:29:09 +05:30
|
|
|
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Mpreprocess")
|
|
|
|
|
# preprocessor
|
2019-04-27 11:26:52 +05:30
|
|
|
|
|
2020-01-04 07:18:05 +05:30
|
|
|
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Minfo=all")
|
|
|
|
|
# instructs the compiler to produce information on standard error
|
2019-04-27 11:26:52 +05:30
|
|
|
|
|
2020-01-04 07:18:05 +05:30
|
|
|
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Minform=warn")
|
|
|
|
|
# instructs the compiler to display error messages at the specified and higher levels
|
|
|
|
|
|
2020-01-04 20:45:11 +05:30
|
|
|
|
set (COMPILE_FLAGS "${COMPILE_FLAGS} -Mdclchk")
|
|
|
|
|
# instructs the compiler to require that all program variables be declared
|
|
|
|
|
|
2020-01-04 07:18:05 +05:30
|
|
|
|
#------------------------------------------------------------------------------------------------O
|
2019-04-27 11:26:52 +05:30
|
|
|
|
# Runtime debugging
|
2019-12-21 12:29:09 +05:30
|
|
|
|
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
|
2020-01-04 07:18:05 +05:30
|
|
|
|
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
|