<< >> Title Contents Index Home Help


This guide describes how to use The Portland Group, Inc. (PGI) Fortran, C, and C++ compilers and program development tools. In particular, these include the PGF77, PGF90, PGHPF, PGCC C++, and PGCC ANSI C compilers, the PGPROF profiler, and the PGDBG debugger. These compilers and tools work in conjunction with an Intel Architecture 32-bit (IA-32) assembler and linker. You can use the PGI compilers and tools to compile, debug, optimize and profile serial (uni-processor) and parallel (multi-processor) applications for IA-32 processor-based systems.

This PGI User's Guide provides operating instructions for the command-level compilation environment and general information about PGI's implementation of the Fortran, C, and C++ languages. This guide does not teach the Fortran, C, or C++ programming languages.

Audience Description

This guide is intended for scientists and engineers using the PGI compilers. To use these compilers, you should be aware of the role of high-level languages (e.g. Fortran, C, C++) and assembly-language in the software development process and should have some level of understanding of programming. The PGI compilers are available on a variety of IA-32 hardware platforms and operating systems. You need to be familiar with the basic commands available on your system.

Finally, your system needs to be running a properly installed and configured version of the compilers. For information on installing PGI compilers and tools, refer to the installation instructions.

Compatibility and Conformance to Standards

The PGI compilers run on a variety of systems and produce code that conforms to the ANSI standards for FORTRAN 77, Fortran 90, C, and C++ and includes extensions from MIL-STD-1753, VAX/VMS Fortran, IBM/VS Fortran, SGI Fortran, Cray Fortran, and K&R C. PGF77 , PGF90 and PGCC ANSI C and C++ support parallelization extensions based on the OpenMP defacto standard, and PGHPF supports data parallel extensions based on the High Performance Fortran (HPF) defacto standard. The PGI Fortran reference manuals describe Fortran statements and extensions as implemented in the PGI Fortran compilers. For further information refer to the following:


This manual is divided into the following chapters and appendices:

Chapter 1
Getting Started, provides an introduction to the PGI compilers and describes their use and overall features.
Chapter 2
Optimization, describes standard optimization techniques that, with little effort, allow users to significantly improve the performance of programs.
Chapter 3
Optimization Features, describes advanced optimization features.
Chapter 4
Function Inlining, describes how to use function inlining and shows how to create an inline library.
Chapter 5
Fortran, C and C++ Data Types, describes the data types that are supported by the PGI Fortran, C, and C++ compilers.
Chapter 6
Inter-Language Calling, provides examples showing how to place C Language calls in a Fortran program and Fortran Language calls in a C program.
Chapter 7
Command-line Options, provides a detailed description of each command-line option.
Chapter 8
Libraries, discusses PGI support libraries and shared object files.
Chapter 9
Optimization Directives and Pragmas, provides a description of each Fortran optimization directive and C/C++ optimization pragma, and shows examples of their use.
Chapter 10
Fortran Parallelization Directives, provides a description of the OpenMP Fortran parallelization directives and shows examples of their use.
Chapter 11
OpenMP Parallelization Pragmas for C and C++, provides a description of the OpenMP C and C++ parallelization pragmas and shows examples of their use.
Chapter 12
C++ Template Instantiation, describes the options available for template instantiation.
Chapter 13
C++ Name Mangling, describes the name mangling facility and explains the transformations of names of entities to names that include information on aspects of the entity's type and a fully qualified name.
Chapter 14
The PGPROF Profiler, gives an overview of the PGPROF profiler, how to profile programs, and how to use the X-Windows graphical user interface on UNIX systems.
Chapter 15
The PGDBG Debugger, gives an overview of the PGDBG debugger, the command-level interface, and how to use the X-Windows graphical user interface on UNIX systems.
Appendix A
Run-time Environment, describes the assembly language calling conventions and examples of assembly language calls.
Appendix B
Error and Warning Messages, provides a list of compiler error messages.
Appendix C
C++ Dialect Supported, lists more details of the version of the C++ language that PGCC C++ supports.

Hardware and Software Constraints

This guide describes versions of the PGI compilers that produce assembly code for IA-32 processor-based systems. Details concerning environment-specific values and defaults and system-specific features or limitations are presented in the release notes sent with the PGI compilers.


This User's Guide uses the following conventions:

is used for commands, filenames, directories, arguments, options and for emphasis.
Constant Width
is used in examples and for language statements in the text, including assembly language statements.
[ item1 ]
square brackets indicate optional items. In this case item1 is optional.
{ item2 | item 3}
braces indicate that a selection is required. In this case, you must select either item2 or item3.
filename ...
ellipsis indicate a repetition. Zero or more of the preceding item may occur. In this example, multiple filenames are allowed.
Fortran language statements are shown in the text of this guide using upper-case characters and a reduced point size.

The following table lists the PGI compilers and tools and their corresponding commands:

Table P-1 PGI Compilers and Commands








Fortran 90



High Performance Fortran



ANSI and K&R C



ANSI C++ with cfront features



Source code debugger



Performance profiler


In general, the designation PGF90 is used to refer to the Portland Group's Fortran 90 compiler, and pgf90 is used to refer to the command which invokes the compiler. A similar convention is used for each of the PGI compilers and tools.

For simplicity, examples of command-line invocation of the compilers generally reference the pgf90 command and most source code examples are written in Fortran. Usage of the PGF77 compiler, whose features are a subset of PGF90, is similar. Usage of PGHPF, PGCC C++, and PGCC ANSI C is consistent with PGF90 and PGF77, but there are command-line options and features of these compilers which do not apply to PGF90 and PGF77 (and vice versa).

Related Publications

The following documents contain additional information related to the IA-32 architecture and the compilers and tools available from The Portland Group.

PGF77 Reference Manual, describes the FORTRAN 77 statements, data types, input/output format specifiers, and additional reference material.

PGHPF Reference Manual, describes the HPF statements, data types, input/output format specifiers, and additional reference material.

System V Application Binary Interface Processor Supplement by AT&T UNIX System Laboratories, Inc. (Prentice Hall, Inc.).

FORTRAN 90 HANDBOOK, Complete ANSI/ISO Reference (McGraw-Hill, 1992).

Programming in VAX Fortran, Version 4.0, Digital Equipment Corporation (September, 1984).

IBM VS Fortran, IBM Corporation, Rev. GC26-4119.

The C Programming Language by Kernighan and Ritchie (Prentice Hall).

C: A Reference Manual by Samuel P. Harbison and Guy L. Steele Jr. (Prentice Hall, 1987).

The Annotated C++ Reference Manual by Margaret Ellis and Bjarne Stroustrup, AT&T Bell Laboratories, Inc. (Addison-Wesley Publishing Co., 1990).

The current release notes sent with your software contain late-breaking and host-specific information.

<< >> Title Contents Index Home Help