Download PGI Compiler User`s Guide

Transcript
TABLE OF CONTENTS
Preface.................................................................................................................................................................................. xii
Audience Description.........................................................................................................................................................xii
Compatibility and Conformance to Standards.................................................................................................................. xii
Organization...................................................................................................................................................................... xiii
Hardware and Software Constraints................................................................................................................................ xiv
Conventions...................................................................................................................................................................... xiv
Terms................................................................................................................................................................................. xv
Related Publications......................................................................................................................................................... xvi
Chapter 1. Getting Started....................................................................................................................................................1
1.1. Overview...................................................................................................................................................................... 1
1.2. Creating an Example...................................................................................................................................................2
1.3. Invoking the Command-level PGI Compilers.............................................................................................................. 2
1.3.1. Command-line Syntax..........................................................................................................................................2
1.3.2. Command-line Options........................................................................................................................................ 3
1.3.3. Fortran Directives and C/C++ Pragmas.............................................................................................................. 3
1.4. Filename Conventions................................................................................................................................................. 3
1.4.1. Input Files............................................................................................................................................................ 4
1.4.2. Output Files..........................................................................................................................................................6
1.5. Fortran, C, and C++ Data Types................................................................................................................................ 7
1.6. Parallel Programming Using the PGI Compilers.........................................................................................................7
1.6.1. Run SMP Parallel Programs............................................................................................................................... 8
1.7. Platform-specific considerations.................................................................................................................................. 8
1.7.1. Using the PGI Compilers on Linux......................................................................................................................9
1.7.2. Using the PGI Compilers on Windows................................................................................................................9
1.7.3. PGI on the Windows Desktop........................................................................................................................... 11
1.7.4. Using the PGI Compilers on OS X................................................................................................................... 12
1.8. Site-Specific Customization of the Compilers........................................................................................................... 14
1.8.1. Use siterc Files.................................................................................................................................................. 14
1.8.2. Using User rc Files............................................................................................................................................14
1.9. Common Development Tasks................................................................................................................................... 15
Chapter 2. Use Command Line Options...........................................................................................................................17
2.1. Command Line Option Overview.............................................................................................................................. 17
2.1.1. Command-line Options Syntax.......................................................................................................................... 17
2.1.2. Command-line Suboptions.................................................................................................................................18
2.1.3. Command-line Conflicting Options.................................................................................................................... 18
2.2. Help with Command-line Options..............................................................................................................................18
2.3. Getting Started with Performance............................................................................................................................. 20
2.3.1. Using –fast and –fastsse Options..................................................................................................................... 20
2.3.2. Other Performance-Related Options................................................................................................................. 21
2.4. Targeting Multiple Systems — Using the –tp Option................................................................................................ 21
PGI Compiler User's Guide
ii