26.11.2012 Views

Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...

Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...

Compiler Usage Guidelines for 64-Bit Operating Systems on AMD64 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

32035 Rev. 3.22 November 2007<br />

<str<strong>on</strong>g>Compiler</str<strong>on</strong>g> <str<strong>on</strong>g>Usage</str<strong>on</strong>g> <str<strong>on</strong>g>Guidelines</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> AMD<str<strong>on</strong>g>64</str<strong>on</strong>g> Plat<str<strong>on</strong>g>for</str<strong>on</strong>g>ms<br />

Chapter 3 Per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance-Centric <str<strong>on</strong>g>Compiler</str<strong>on</strong>g><br />

Switches<br />

This chapter describes the various switches that can be useful <str<strong>on</strong>g>for</str<strong>on</strong>g> individual compilers. For each<br />

compiler, a list of generally recommended per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance switches is provided. This list is further<br />

augmented by other switches that could prove beneficial <str<strong>on</strong>g>for</str<strong>on</strong>g> certain code bases.<br />

3.1 PGI <str<strong>on</strong>g>Compiler</str<strong>on</strong>g>s (32- and <str<strong>on</strong>g>64</str<strong>on</strong>g>-<str<strong>on</strong>g>Bit</str<strong>on</strong>g>) <str<strong>on</strong>g>for</str<strong>on</strong>g> Linux ® and<br />

Microsoft ® Windows ®<br />

The Portland Group (PGI) high per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance C, C++, and Fortran compilers (PGCC, PGC++,<br />

PGHPF, PGF95, PGF77) and program development tools (PGDBG debugger and PGPROF profiler)<br />

optimize code <str<strong>on</strong>g>for</str<strong>on</strong>g> 32-bit and <str<strong>on</strong>g>64</str<strong>on</strong>g>-bit AMD<str<strong>on</strong>g>64</str<strong>on</strong>g> and EM<str<strong>on</strong>g>64</str<strong>on</strong>g>T processor-based Linux ® and Microsoft ®<br />

Windows ® plat<str<strong>on</strong>g>for</str<strong>on</strong>g>ms. PGI Editi<strong>on</strong> 7 provides local and global optimizati<strong>on</strong>s, loop optimizati<strong>on</strong><br />

(unrolling, vectorizati<strong>on</strong>, and parallelizati<strong>on</strong>), inter-procedural analysis and optimizati<strong>on</strong>, and<br />

functi<strong>on</strong> inlining <strong>on</strong> AMD<str<strong>on</strong>g>64</str<strong>on</strong>g> single-, dual- and quad-core systems. PGI Tools support parallel<br />

programming features like auto-parallelizati<strong>on</strong>, OS native multithreading, OpenMP multithreading<br />

models, and MPI programming <str<strong>on</strong>g>for</str<strong>on</strong>g> AMD<str<strong>on</strong>g>64</str<strong>on</strong>g> architecture-based multicore shared-memory and<br />

distributed-memory cluster-based systems. The current versi<strong>on</strong> (as of September 2007) is PGI<br />

Release 7.1. All the opti<strong>on</strong>s described in this secti<strong>on</strong> apply to PGI Release 7.1.<br />

3.1.1 Invocati<strong>on</strong> Commands<br />

The following commands invoke specific compilers and tools:<br />

pgcc invokes the PGI C compiler.<br />

pgcpp (pgCC) invokes the PGI C++ compiler.<br />

pgf77 invokes the PGI Fortran 77 compiler.<br />

pgf95 invokes the PGI Fortran 90/95 compiler.<br />

Pghpf invokes the PGI High-per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance Fortran <str<strong>on</strong>g>Compiler</str<strong>on</strong>g><br />

pgdbg invokes the PGDBG source code debugger<br />

pgfrof invokes the PGPROF per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance profiler<br />

Note: Invoking PGI compilers within BASH <strong>on</strong> Windows plat<str<strong>on</strong>g>for</str<strong>on</strong>g>ms is case insensitive, there<str<strong>on</strong>g>for</str<strong>on</strong>g>e<br />

using pgCC will invoke the PGI C compiler (i.e. pgCC is equivalent to pgcc).<br />

Chapter 3 Per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance-Centric <str<strong>on</strong>g>Compiler</str<strong>on</strong>g> Switches 19

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

Saved successfully!

Ooh no, something went wrong!