12.07.2015 Views

PGI User's Guide

PGI User's Guide

PGI User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Getting Started with PerformanceGetting Started with PerformanceOne of the top priorities of most users is performance and optimization. This section provides a quickoverview of a few of the command-line options that are useful in improving performance.Using –fast and –fastsse Options<strong>PGI</strong> compilers implement a wide range of options that allow users a fine degree of control on eachoptimization phase. When it comes to optimization of code, the quickest way to start is to use the options–fast and –fastsse. These options create a generally optimal set of flags for targets that support SSE/SSE2 capability. They incorporate optimization options to enable use of vector streaming SIMD (SSE/SSE2)instructions for 64-bit targets. They enable vectorization with SSE instructions, cache alignment, and SSEarithmetic to flush to zero mode.NoteThe contents of the –fast and –fastsse options are host-dependent. Further, you should use theseoptions on both compile and link command lines.• –fast and –fastsse typically include these options:–O2 Specifies a code optimization level of 2.–Munroll=c:1–Mnoframe–Mlre–MpreUnrolls loops, executing multiple instances of the loop during eachiteration.Indicates to not generate code to set up a stack frame.Indicates loop-carried redundancy elimination.Indicates partial redundancy elimination.• These additional options are also typically available when using –fast for 64-bit targets or –fastsse forboth 32- and 64-bit targets:–Mvect=sse–Mscalarsse–Mcache_align–Mflushz–M[no]vectGenerates SSE instructions.Generates scalar SSE code with xmm registers; implies –Mflushz.Aligns long objects on cache-line boundaries.Sets SSE to flush-to-zero mode.Controls automatic vector pipelining.NoteFor best performance on processors that support SSE instructions, use the PGFORTRAN compiler,even for FORTRAN 77 code, and the –fast option.To see the specific behavior of –fast for your target, use the following command:$ pgfortran -help -fast20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!