PGI Visual Fortran User's Guide - PGI Compilers And Tools

Transcription

PGI VISUAL FORTRAN USER'S GUIDEVersion 2017

TABLE OF CONTENTSPreface. xiiAudience Description. xiiCompatibility and Conformance to Standards.xiiOrganization. xiiiHardware and Software Constraints.xivConventions. xivTerms. xvRelated Publications.xviChapter 1. Getting Started with PVF. 11.1. PVF on the Start Screen and Start Menu. 11.1.1. Shortcuts to Launch PVF. 21.1.2. Commands Submenu. 21.1.3. Profiler Submenu. 21.1.4. Documentation Menu. 21.1.5. Licensing Submenu. 31.2. Introduction to PVF. 31.2.1. Visual Studio Settings.31.2.2. Solutions and Projects. 31.3. Creating a Hello World Project.41.4. Using PVF Help. 61.5. PVF Sample Projects. 61.6. Compatibility. 71.6.1. Win32 API Support (dfwin).71.6.2. Unix/Linux Portability Interfaces (dflib, dfport). 81.6.3. Windows Applications and Graphical User Interfaces. 8Chapter 2. Build with PVF. 102.1. Creating a PVF Project. 102.1.1. PVF Project Types.102.1.2. Creating a New Project. 102.2. PVF Solution Explorer. 112.3. Adding Files to a PVF Project.112.3.1. Add a New File.112.3.2. Add an Existing File. 122.4. Adding a New Project to a Solution. 122.5. Project Dependencies and Build Order. 132.6. Configurations.132.7. Platforms.132.8. Setting Global User Options. 132.9. Setting Configuration Options using Property Pages. 142.10. Property Pages.14PGI Visual Fortran User's GuideVersion 2017 ii

2.11. Setting File Properties Using the Properties Window. 192.12. Setting Fixed Format. 202.13. Building a Project with PVF.202.13.1. Order of PVF Build Operations. 212.14. Build Events and Custom Build Steps.212.14.1. Build Events. 212.14.2. Custom Build Steps.222.15. PVF Build Macros.222.16. Static and Dynamic Linking. 222.17. VC# Interoperability. 232.18. VC Interoperability.232.19. Linking PVF and VC Projects. 232.20. Common Link-time Errors. 242.21. Migrating an Existing Application to PVF. 242.22. Fortran Editing Features.25Chapter 3. Debug with PVF. 263.1. Windows Used in Debugging.263.1.1. Autos Window.263.1.2. Breakpoints Window. 263.1.3. Call Stack Window. 273.1.4. Disassembly Window.273.1.5. Immediate Window. 273.1.6. Locals Window.283.1.7. Memory Window.283.1.8. Modules Window. 283.1.9. Output Window. 283.1.10. Processes Window. 283.1.11. Registers Window. 293.1.12. Threads Window. 293.1.13. Watch Window. 293.2. Variable Rollover. 293.2.1. Scalar Variables. 303.2.2. Array Variables. 303.2.3. User-Defined Type Variables. 303.3. Debugging an MPI Application in PVF. 313.4. Attaching the PVF Debugger to a Running Application.313.4.1. Attach to a Native Windows Application.313.5. Using PVF to Debug a Standalone Executable. 323.5.1. Launch PGI Visual Fortran from a Native Windows Command Prompt.323.5.2. Using PGI Visual Fortran After a Command Line Launch. 333.5.3. Tips on Launching PVF from the Command Line.34Chapter 4. Using MPI in PVF. 354.1. MPI Overview.35PGI Visual Fortran User's GuideVersion 2017 iii

4.2. System and Software Requirements.354.3. Compile using MS-MPI. 364.4. Enable MPI Execution.364.4.1. MPI Debugging Property Options. 364.5. Launch an MPI Application.364.6. Debug an MPI Application.36Chapter 5. Getting Started with The Command Line Compilers. 385.1. Overview. 385.2. Creating an Example.395.3. Invoking the Command-level PGI Compilers. 395.3.1. Command-line Syntax. 405.3.2. Command-line Options. 405.3.3. Fortran Directives.405.4. Filename Conventions. 415.4.1. Input Files. 415.4.2. Output Files.425.5. Fortran Data Types.435.6. Parallel Programming Using the PGI Compilers.445.6.1. Run SMP Parallel Programs. 445.7. Site-Specific Customization of the Compilers. 455.7.1. Use siterc Files. 455.7.2. Using User rc Files.455.8. Common Development Tasks. 45Chapter 6. Use Command-line Options. 476.1. Command-line Option Overview. 476.1.1. Command-line Options Syntax. 476.1.2. Command-line Suboptions. 486.1.3. Command-line Conflicting Options. 486.2. Help with Command-line Options. 486.3. Getting Started with Performance. 506.3.1. Using -fast.506.4. Targeting Multiple Systems—Using the -tp Option. 516.5. Frequently-used Options. 51Chapter 7. Optimizing and Parallelizing. 537.1. Overview of Optimization.547.1.1. Local Optimization.547.1.2. Global Optimization. 547.1.3. Loop Optimization: Unrolling, Vectorization and Parallelization. 557.1.4. Interprocedural Analysis (IPA) and Optimization.557.1.5. Function Inlining. 557.1.6. Profile-Feedback Optimization (PFO). 557.2. Getting Started with Optimization. 567.2.1. -help.56PGI Visual Fortran User's GuideVersion 2017 iv

7.2.2. -Minfo. 577.2.3. -Mneginfo.

PGI Visual Fortran User's Guide Version 2017 vii 11.4. Prefetch Directives and Pragmas.123 11.4.1. Prefetch Directive Syntax in Fortran.123 11.4.2. Prefetch Directive Format Requirements.124