12.07.2015 Views

PGI User's Guide

PGI User's Guide

PGI User's Guide

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

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

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

Chapter 11. Distributing Files - DeploymentPrograms can use <strong>PGI</strong> Unified Binary technology even if all of the object files and libraries are not compiled asunified binaries. Like any other object file, you can use <strong>PGI</strong> Unified Binary object files to create programs orlibraries. No special start up code is needed; support is linked in from the <strong>PGI</strong> libraries.The -Mpfi option disables generation of <strong>PGI</strong> Unified Binary object files. Instead, the default target auto-detectrules for the host are used to select the target processor.<strong>PGI</strong> Unified Binary Command-line SwitchesThe <strong>PGI</strong> Unified Binary command-line switch is an extension of the target processor switch, -tp, which maybe applied to individual files during compilation .The target processor switch, -tp, accepts a comma-separated list of 64-bit targets and generates codeoptimized for each listed target.The following example generates optimized code for three targets:-tp k8-64,p7-64,core2-64A special target switch, -tp x64, is the same as -tp k8-64, p7-64s.<strong>PGI</strong> Unified Binary Directives and Pragmas<strong>PGI</strong> Unified binary directives and pragmas may be applied to functions, subroutines, or whole files. Thedirectives and pragmas cause the compiler to generate <strong>PGI</strong> Unified Binary code optimized for one or moretargets. No special command line options are needed for these pragmas and directives to take effect.The syntax of the Fortran directive is this:pgi$[g|r| ] pgi tp [target]...where the scope is g (global), r (routine) or blank. The default is r, routine.For example, the following syntax indicates that the whole file, represented by g, should be optimized for bothk8_64 and p7_64.pgi$g pgi tp k8_64 p7_64The syntax of the C/C++ pragma is this:#pragma [global|routine|] tp [target]...where the scope is global, routine, or blank. The default is routine.For example, the following syntax indicates that the next function should be optimized for k8_64, p7_64, andcore2_64.#pragma routine tp k8_64 p7_64 core2_64149

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

Saved successfully!

Ooh no, something went wrong!