<< >> Title Contents Index Home Help

Preface

This guide describes how to use The Portland Group Compiler Technology (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:

Organization

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.

Conventions

This User's Guide uses the following conventions:

italic
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
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

Compiler

Language

Command

PGF77


FORTRAN 77


pgf77


PGF90


Fortran 90


pgf90


PGHPF


High Performance Fortran


pghpf


PGCC C


ANSI and K&R C


pgcc


PGCC C++


ANSI C++ with cfront features


pgCC


PGDBG


Source code debugger


pgdbg


PGPROF


Performance profiler


pgprof



In general, the designation PGF90 is used to refer to The Portland Group Compiler Technology'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 Compiler Technology.

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.

The STLPort software is covered by the following notice/license (Apr 15, 2002):

License Agreement: Boris Fomitchev grants Licensee a non-exclusive, non-transferable, royalty-free license to use STLport and its documentation without fee. By downloading, using, or copying STLport or any portion thereof, Licensee agrees to abide by the intellectual property laws and all other applicable laws of the United States of America, and to all of the terms and conditions of this Agreement. Licensee shall maintain the following copyright and permission notices on STLport sources and its documentation unchanged :

Copyright 1999,2000 Boris Fomitchev

This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk. Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice. The Licensee may distribute binaries compiled with STLport (whether original or modified) without any royalties or restrictions. The Licensee may distribute original or modified STLport sources, provided that the conditions indicated in the above permission notice are met. The following copyright notices are retained when present, and conditions provided in accompanying permission notices are met :

Copyright 1994 Hewlett-Packard Company

Copyright 1996,97 Silicon Graphics Computer Systems, Inc.

Copyright 1997 Moscow Center for SPARC Technology.

Copyright 2003 STMicroelectronics, Inc.

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Moscow Center for SPARC Technology makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.


1 Getting Started


<< >> Title Contents Index Home Help