NAME
pgCC - The Portland Group C++ compiler
SYNOPSIS
pgCC [ --pch ] [ -# ] [ -### ] [ -A ] [ -b ] [ -b3 ] [ -C ]
[ -c ] [ [ -cougar ] -Dname[=def] ] [ -dryrun ] [ -e ] [
-flags ] [ -g ]
[ -help ] [ -Idirectory ] [ -Kflag ] [ -Ldirectory ]
[ -llibrary ] [ -M ] [ -Mpgflag ] [ [ -m ] [ -O[level] ]
[ -o file ] [ -P ] [ [ -p ] [ +p ] [ -Q ] -q[c | l | p ] ]
[ -r ] [ -rc ] [ -S ] [ -s ] [ -show ] [ -t ] [ -time ]
[ -Uname ] [ -uname ] [ -V ] [ -v ]
[ -Wpass,option[,option...] ] [ -w ] [ -X ] [ -Xm ] [ -xh ]
[ -Ypass,directory ] sourcefile...
DESCRIPTION
pgCC is the interface to The Portland Group C++ compiler for
the x86 processor. It invokes the C++ compiler, assembler,
and linker with options derived from its command-line
arguments.
pgCC bases its processing on the suffixes of the files it is
passed. Files whose names end with .cc, .c, or .C, are
considered to be C++ source files. They are preprocessed,
compiled and assembled. The resulting object file is placed
in the current directory. Files whose names end with .s are
considered to be x86 assembly language files. They are
assembled and the resulting object file is placed in the
current directory. Files whose names end with .o are taken
as object files, and are passed directly to the linker if
linking is requested. Files whose names end with .a are
taken as ar libraries. No action is performed on .a files
unless linking is requested.
Files not ending in .cc, .C, .c, .o, .s, or .a are taken as
object files and passed to the linker (if linking is
requested) with a warning message.
If a single C++ program is compiled and linked with one pgCC
command, then the intermediate object and assembly files are
deleted.
OPTIONS
When debug or profile source files are compiled using any of
the -g, -p, or -q options, the same option(s) should be used
when using pgCC to link the objects.
--pch
Automatically use and/or create a precompiled
header file. If --use_pch or --create_pch (manual
PCH mode) appears on the command line following
this option, its effect is erased.
--create_pch file-name
If other conditions are satisfied create a
precompiled header file with the specified name.
If --pch (automatic PCH mode) appears on the
command line following this option, its effect is
erased.
--use_pch file-name
Use a precompiled header file of the specified
name as part of the current compilation. If --pch
(automatic PCH mode) appears on the command line
following this option, its effect is erased.
--pch_dir directory-name
The directory in which to search for and/or create
a precompiled header file. This option may be
used with automatic PCH mode (--pch) or manual PCH
mode (--create_pch or --use_pch).
--pch_messages
Enable or disable the display of a message
indicating that a precompiled header file was
created or used in the current compilation.
--no_pch_messages
Enable or disable the display of a message
indicating that a precompiled header file was
created or used in the current compilation.
-# Display the invocations of the compiler,
assembler, and linker. These invocations are the
command lines created by pgCC.
-### Display invocations of the compiler, assembler and
linker, but do not execute them.
-A With this option, pgCC accepts code closely
conforming to the proposed ANSI standard for C++.
-b Enable compilation of C++ with cfront 2.1
compatibility. This causes the compiler to accept
language constructs that while not part of the C++
language definition, are accepted by the AT&T C++
language system (cfront release 2.1). This option
also enables acceptance of anachronisms.
-b3 Enable compilation of C++ with cfront 2.1/3.0
compatibility. This causes the compiler to accept
language constructs that while not part of the C++
language definition, are accepted by the AT&T C++
language system (cfront releases 2.1 and 3.0).
This option also enables acceptance of
anachronisms.
-C Preserve comments in preprocessed C source files.
-c Skip the link step; compile and assemble only.
-cougar Use libraries and include directories to build
executables to run on the PUMA OS nodes.
-Dname[=def]
Define name to be def in the preprocessor. If def
is missing, it is assumed to be empty. If the =
sign is missing, then name is defined to be the
string 1.
-dryrun Use this option to display the invocations of the
compiler, assembler, and linker but do not execute
them.
-E Preprocess each input source file, .cc file, and
send the result to standard output. No
compilation, assembly, or linking is performed.
-e [ number ]
Set the C++ front end error limit to the specified
number. The C++ compiler will abandon compilation
after the specified number of errors.
-flags Displays driver options on the standard output.
-g Generate symbolic debug information. This also
sets the optimization level to zero, unless a -O
switch is present on the command line. Symbolic
debugging may give confusing results if an
optimization level other than zero is selected.
-O0 code will be significantly slower than code
generated at other optimization levels.
-help Displays options recognized by the driver on the
standard output.
-Idirectory
Add directory to the compiler's search path for
include files. For include files surrounded by <
>, each -I directory is searched followed by the
standard area. For include files surrounded by "
", the directory containing the file containing
the #include directive is searched, followed by
the -I directories, followed by the standard area.
-Kflag Request special compilation semantics from the
compiler. The permitted options are:
ieee Perform float and double divides in
conformance with the IEEE 754 standard.
This is done by replacing the usual in-
line divide algorithm with a subroutine
call, at the expense of performance.
The default algorithm produces results
that differ from the correctly rounded
result by no more than 3 units in the
last place. Also, on some systems, a
more accurate math library may be linked
if -Kieee is used during the link step.
-Ldirectory
Change the default directory in which the linker
searches for libraries to directory . If the
linker supports this option, then the option is
passed to the linker; otherwise, the driver
replaces the default library area with directory
and uses it when constructing library path names.
Note that a library search path can be established
using this option only if the linker supports such
functionality.
-llibrary Load the library liblibrary.a from the standard
library directory. If the linker supports this
option; then the option is passed to the linker;
otherwise the library name is constructed and the
full library path is passed to the linker. See
the -L option below.
-Mpgflag See the description for the -M pgflag options on
the following pages.
-m Generate a link map.
-O[level] Set the optimization level. If -O is not
specified, then the default level is 1 if -g is
not specified, and 0 if -g is specified. If a
number is not supplied with -O then the
optimization level is set to 2 . The optimization
levels and their meanings are as follows:
0 A basic block is generated for each C
statement. No scheduling is done
between statements. No global
optimizations are performed.
1 Scheduling within extended basic blocks
is performed. Some register allocation
is performed. No global optimizations
are performed.
2 All level 1 optimizations are performed.
In addition, traditional scalar
optimizations such as induction
recognition and loop invariant motion
are performed by the global optimizer.
-o file If -c is specified, names the object file,
otherwise, use file as the name of the executable
program, rather then the default a.out.
-P Preprocess each file and leave the output in a
file named file.i for each file named file.cc.
-p Generate code for function-level profiling.
Equivalent to -qp. This generates information
compatible with prof .
+p Disallow all anachronistic constructs. Ordinarily
the C++ front end warns about anachronistic
constructs; using the +p option the compiler will
not compile code containing anachronistic
constructs.
-Q Selects variations for compilation. There are four
uses for the -Q option.
-Qdir,directory specifies the directory where the
C++ compiler is located.
-Qoption,prog,opt supplies the option opt to the
program prog which is one of the phases of the
compilation process (pgcpp1, pgcpp2, as, or ld).
-Qpath,pathname this option lets you supply an
additional pathname to the search path for the .o
files.
-q[ c | p ]
Generate code for path coverage or function level
profiling, respectively.
-r Passed to the linker; generate a re-linkable
object file.
-rc rcfile
Specifies the name of a driver startup
configuration file. If rcfile is a full pathname,
then use the specified file. If rcfile is a
relative pathname, use the file name as found in
in the $DRIVER directory.
-S Skip the assembly and link steps. Leave the
output from the compile step in a file named
file.s for each file named file.c or file.f.
-s Passed to the linker; strip symbol table
information.
-show Produce driver help information describing the
current driver configuration.
-targ Control instantiation of template functions. The
argument arg can be one of all, none, local, or
used.
all specifies that all template functions
are instantiated whether or not they are
used.
none specifies that no template functions are
instantiated.
local specifies that only the functions that
are used in the compilation are
instantiated, and they are forced to be
local. Note: this may cause multiple
copies of local static variables. If
this occurs, the program may not execute
correctly.
used specifies that only the functions that
are used in the compilation are
instantiated.
-time Print execution times for the various compilation
steps.
-Uname Remove any initial definition of name in the
preprocessor. The only names predefined by the
preprocessor itself are the standard ANSI C
predefined macros. The driver may predefine other
names (see the -Mnostddef option above). Since
all -D options are processed before all -U
options, the -U option can be used to override the
-D option. NOTE: ANSI C predefined macros can be
defined and undefined on the command line, but not
with #define and #undefine directives in the
source.
-uname Passed to the linker; generate undefined
reference.
-V Display version messages and other information.
-v Verbose mode. Print out the command line for each
tool before it is executed.
-Wpass,option[,option...]
Pass the options to the specified pass. Each
comma-delimited option is passed as a separate
argument. The passes are: c for the C++ front
end, 0 for the C++ back end, a for the assembler,
and l for the linker.
-w Do not print warning messages.
-Xxfile Generate cross reference information and place
output in the specified file.
-Xm Allow $ in names.
-xh Enable exception handling. With exception
handling enabled, programs may run somewhat
slower. By default exception handling is turned
off.
-Ypass,directory
Look in directory for pass pass, rather then in
the standard area. The passes are:
c Search for the C++ front end executable
in directory.
0 Search for the C++ back end executable
in directory.
a Search for the assembler executable in
directory.
l Search for the linker executable in
directory.
S Search for the startup object files in
directory.
L If the linker supports the -YL option,
then pass the option -YL,directory to
the linker. Otherwise, use directory as
the standard library location.
U If the linker supports the -YU option,
then pass the option -YU,directory to
the linker. Otherwise this option is
ignored.
I Set the compiler's standard include
directory to directory. The standard
include directory is set to a default
value by the driver and can be
overridden by this option.
-Mpgflag Request PGI-specific actions from the compiler.
Many of pgflags optionally begin with no (e.g.
[no]list). If the default of such an option is
the no variant, this is indicated by no appearing
in bold italics as in [nnoo]list. The permitted
pgflags are:
8-byte boundaries. -Mnodalign may lead
to data alignment exceptions.
[no]depchk
(Don't) assume that potential data
dependencies exists. -Mnodepchk may
result in incorrect code; the -Msafeptr
switch provides a less dangerous way to
accomplish the same thing.
[no]fptrap
-Mnofptrap performs the semantics of
-Knoieee (use in-line divide, link in
non-IEEE libraries if available, and
disable underflow traps) and disables
floating point traps.
[no]frame (Don't) generate frame setup code.
Disabling frame pointers may make
programs run faster but prevents
function traceback from working properly
when using a debugger.
info[=option[,option,...]]
Emit useful information to stderr. The
options are:
time | stat
Emit compilation statistics.
loop Emit information about loops.
This includes information
about loop unrolling,
vectorization and software
pipelining.
inline Emit information about
functions extracted and
inlined.
inform,level
instructs the compiler to display error
messages at the specified and higher
levels, where level is one of the
following:
fatal instructs the compiler to
display fatal error messages.
severe instructs the compiler to
display severe and fatal error
messages.
warn instructs the compiler to
display warning, severe and
fatal error messages.
inform instructs the compiler to
display all error messages
(inform, warn, severe and
fatal).
inline[=option[,option,...]]
Pass options to the function inliner.
The options are:
levels:number
number of levels of inlining
are performed. The default is
1.
keepasm Keep the assembly file for each C source
file, but continue to assemble and link
the program. This is mainly for use in
compiler performance analysis and
debugging.
nostdinc Do not search in the standard location
for include files when those files are
not found elsewhere.
nostdlib Do not link in the standard libraries
when linking a program.
nostddef Do not predefine any macros to the
preprocessor when compiling a C program.
The normal predefined macros are: -Dx86
and -Dunix.
nostartup Do not link in the usual startup
routine. This routine contains the
entry point for the program.
prof[=option[,option,...]]
Set profile options. Normally, the -q
or -p switches are used for this;
however, on some systems, it is
desirable to override the default method
of profiling. See the PGI profiler
manual, or the system profiler manual,
for further information.
func Perform PGI-style function
level profiling.
line Perform PGI-style line level
profiling.
tcov Perform test coverage
analysis.
safeptr[=option[,option,...]]
Override data dependence between C
pointers and arrays. This option must
be used with care since the potential
exists for code to be generated that
will result in unexpected or incorrect
results as is defined by ANSI C.
However, when used properly, this option
has the potential to greatly enhance the
performance of code, especially floating
point oriented loops. Combinations of
the options may be used and interact
appropriately.
dummy | arg
C dummy arguments (pointers
and arrays) are treated with
the same copyin/copyout
semantics as Fortran dummy
arguments.
auto C local or auto variables
(pointers and arrays) are
assumed not to overlap or
conflict with other data
objects and are independent.
static C static variables (pointers
and arrays) are assumed not to
overlap or conflict with other
data objects and are
independent.
global C global or extern variables
(pointers and arrays) are
assumed not to overlap or
conflict with other data
objects and are independent.
schar Specify signed char characters. Also
see the -Muchar option.
[nnoo]signextend
(Don't) sign extend when a narrowing
conversion overflows. For example, if
-Msignextend is in effect and an integer
containing the value 65535 is converted
to a short, the value of the short will
be -1. This option is provided for
compatibility with other compilers, even
though ANSI C specifies that the result
of such conversions are undefined.
-Msignextend will decrease performance.
[nnoo]single
(Don't) suppress the ANSI-specified
conversion of float to double when
passing arguments to a function with no
prototype in scope. -Msingle may result
in faster code when single precision is
used a lot, but is non-ANSI compliant.
uchar Treat plain char declarations as
unsigned char declarations. Also see
the -Mschar option..
unroll [=option [,option...]]
invokes the loop unroller. This also
sets the optimization level to 2 if the
level is set to less than 2. The option
is one of the following:
c:m instructs the compiler to
completely unroll loops with a
constant loop count less than
or equal to m, a supplied
constant. If this value is not
supplied, the m count is set
to 4.
n:u instructs the compiler to
unroll u times, a loop which
is not completely unrolled, or
has a non-constant loop count.
If u is not supplied, the
unroller computes the number
of times a candidate loop is
unrolled.
vect[=option[,option,...]]
Pass options to the internal vectorizer.
If no option list is specified, then the
following vvector optimizations are
used:
altcode,assoc,nosmallvect,transform
The vect options are:
altcode[:n]
Instructs the vectorizer to
generate alternate scalar code
for vectorized loops. If
altcode is specified without
arguments, the vectorizer
determines an appropriate
cutoff length and generates
scalar code to be executed
whenever the loop count is
less than or equal to that
length. If altcode:n is
specified, the scalar altcode
is executed whenever the loop
count is less than or equal to
n.
noaltcode If noaltcode is specified, the
vectorized version of the loop
is always executed regardless
of the loop count.
assoc Instructs the vectorizer to
enable certain associativity
conversions that can change
the results of a computation
due to roundoff error. A
typical optimization is to
change an arithmetic operation
to an arithmetic operation
that is mathematically
correct, but can be
computationally different, due
to round-off error.
noassoc Instructs the vectorizer to
disable associativity
conversions.
smallvect:number
This option allows the
vectorizer to assume that the
maximum vector length is no
greater than number . In
doubly-nested, non-perfectly
nested loops this option can
allow invariant vector motion
that would not otherwise have
been possible. Incorrect code
will result if this option is
used and a vector takes on a
length greater than specified.
transform Instructs the vectorizer to
enable certain high-level
vector transformations. These
currently include loop
interchange, loop
distribution, and node-
splitting.
notransform
Instructs the vectorizer to
disable certain high-level
vector transformations.
ENVIRONMENT
pgCC runs in two distinct environments. The first is a
cross environment, where the compiler runs on one host and
generates code for a different host. The second is a native
environment, where the compiler and the generated code both
run on the same machine.
Each of these environments use different directories for the
executables, different libraries, and different default
options. In addition, there may be custom installations
that define their own default parameters to the compilers.
The remainder of this section describes the standard PGI
implementation for two standard environments, cross-
compilation and SysV Release 4 native.
FILES
a.out Default executable output
file.
file.a Library of object files.
file.C C++ source file.
file.cc C++ source file.
file.cpp C++ source file.
file.i C++ source file after
preprocessing.
file.o Object file.
file.s Assembler source file.
The TFLOPS compilers are supported in a native and a cross-
development environment. Depending on where they are
installed, environment variables can be set that establish
the directory structure. In the native environment, the
variable $PGI is set. In the cross-development environment,
the variable $TFLOPS_XDEV is set.
The native environment for the compilers resides within the
following directories:
$PGI/osf86/bin Where the compiler executables
reside.
$PGI/osf86/lib Where the compiler associated
libraries reside.
$PGI/osf86/include Where the the compiler include
files reside.
The cross development environment for the compilers resides
within the following directories:
$TFLOPS_XDEV/tflops/bin.<arch>
Where the compiler executables
reside, along with the other
cross development to ols.
<arch> will be one of the
following: solaris for a
sparc based solaris system;
sun4 for a sparc based sunos
system; solaris86 for a
Pentium or Pentium Pro based
solaris system.
$TFLOPS_XDEV/tflops/lib Where the compiler associated
libraries reside. In addition,
all the necessary t flops os
system libraries needed to
build user executables reside
here.
$TFLOPS_XDEV/tflops/include Where the the compiler include
files reside. In addition, all
the necessary incl ude files
needed to build user
executables reside here.
$TFLOPS_XDEV/tflops/cougar/lib
Where the necessary cougar os
system libraries needed to
build user executables reside.
$TFLOPS_XDEV/tflops/cougar/include
Where the necessary cougar os
system include files needed to
build user executab les
reside. This include directory
is put ahead in the path of
the $TFLOPS_XDEV/
tflops/include directory.
The following files are located in $PGI/osf86/bin (or
$TFLOPS_XDEV/tflops/bin.<arch>):
.pgCCrc C++ startup configuration
file.
.pgirc Default driver startup
configuration file.
osf86rc Native compiler driver
configuration file.
pgCC C++ compilation driver.
pgCCrc C++ configuation file.
pgcomprc Default driver configuration
file.
pgcpp1 C++ preprocessor 1.
pgcpp2 C++ preprocessor 2.
pgcpp2ex C++ extractor.
pgmunch C++ post processor 2.
pgprelnk C++ post processor 1.
sharedrc Default driver startup
configuration file
The following files are located in $PGI/osf86/lib (or
$TFLOPS_XDEV/tflops/lib):
libC.a C++ library.
libcmplx.a Complex number math library.
libpgc.a Low-level compiler support
library.
libpgmp.a Parallel support library.
libstrm.a C++ stream library.
libvect.a Vector math library.
pgfi8st.o 64-bit integer support
library.
subchk.o Routine for array bounds
checking.
DIAGNOSTICS
The compiler produces information and error messages as it
translates the input program. The linker and assembler may
issue their own error messages.
NAME
pgcc - Portland Group C compiler
SYNOPSIS
pgcc [ -# ] [ -### ] [ -B ] [ -C ] [ -c ] [ -cougar ]
[ -Dname[=def] ] [ -dryrun ] [ -E ]
[ -flags ] [ -g ] [ -help ] [ -Idirectory ] [ -i ] [ -Kflag
] [ -Ldirectory ] [ -l library ] [ -Mpgflag ]
[ -m ] [ -o file ] [ -P ] [ -p ] [ -pc ] [ -pg ]
[ -Q[dir | path | produce | option ] ]
[ -q[c | p ] ] [ -r ] [ -rc file ] [ -S ] [ -s ]
[ -show ] [ -time ] [ -Uname ] [ -uname ] [ -V ] [ -v ]
[ -Wpass,option[,option...] ] [ -w ] [ -Xlevel ] [ -x ] [
-Ypass,directory ] [ -y ] sourcefile...
DESCRIPTION
pgcc is the interface to the Portland Group C compiler for
the x86 processor. It invokes the C compiler, assembler,
and linker with options derived from its command line
arguments.
pgcc bases its processing on the suffixes of the files it is
passed. Files whose names end with .c are considered to be C
source files. They are preprocessed, compiled and assembled.
The resulting object file is placed in the current
directory. Files whose names end with .s are considered to
be x86 assembly language files. They are assembled and the
resulting object file is placed in the current directory.
Files whose names end with .o are taken as object files, and
are passed directly to the linker if linking is requested.
Files whose names end with .a are taken as ar libraries. No
action is performed on .a files unless linking is requested.
Files whose names end with .f or .F are considered to be
Fortran source files and are compiled by the Fortran
compiler.
Files not ending in .o, .s, .i, .c, .f, .F, or .a are taken
as object files and passed to the linker (if linking is
requested) with a warning message.
If a single C program is compiled and linked with one pgcc
command, then the intermediate object and assembly files are
deleted.
The compiler is targeted to x86 processors.
OPTIONS
When debug or profile source files are compiled using any of
the -g, -p, or -q options, the same option(s) should be used
when using pgcc to link the objects.
-# Display the invocations of the compiler,
assembler, and linker. These invocations are the
command lines created by pgcc.
-### Display invocations of the compiler, assembler and
linker, but do not execute them.
-B Allow C++-style comments in source code; these
begin with the characters '//' and continue to
the end of the current line. Such comments are
stripped unless you specify the -C option.
-C Preserve comments in preprocessed C source files.
-c Skip the link step; compile and assemble only.
-cougar Use libraries and include directories to build
executables to run on the PUMA OS nodes.
-Dname[=def]
Define name to be def in the preprocessor. If def
is missing, it is assumed to be empty. If the =
sign is missing, then name is defined to be the
string 1.
-dryrun Use this option to display the invocations of the
compiler, assembler, and linker but do not execute
them.
-E Preprocess each .c file and send the result to
standard output. No compilation, assembly, or
linking is performed.
-flags Display valid driver options and additional driver
help information.
-g Generate symbolic debug information. This also
sets the optimization level to zero, unless a -O
switch is present on the command line. Symbolic
debugging may give confusing results if an
optimization level other than zero is selected.
Using -O0 the generated code will be slower than
code generated at other optimization levels.
-help Displays options recognized by the driver on the
standard output.
-Idirectory
Add directory to the compiler's search path for
include files. For include files surrounded by <
>, each -I directory is searched followed by the
standard area. For include files surrounded by "
", the directory containing the file containing
the #include directive is searched, followed by
the -I directories, followed by the standard area.
-Kieee Request special compilation semantics from the
compiler. Perform float and double divides in
conformance with the IEEE 754 standard. This is
done by replacing the usual in-line divide
algorithm with a subroutine call, at the expense
of performance. The default algorithm produces
results that differ from the correctly rounded
result by no more than 3 units in the last place.
Also, on some systems, a more accurate math
library may be linked if -Kieee is used during the
link step.
-Ldirectory
Change the default directory in which the linker
searches for libraries to directory. If the
linker supports this option, then the option is
passed to the linker; otherwise, the driver
replaces the default library area with directory
and uses it when constructing library path names.
Note that a library search path can be established
using this option only if the linker supports such
functionality.
-llibrary Load the library liblibrary.a from the standard
library directory. If the linker supports this
option; then the option is passed to the linker.
The library name is constructed and the full
library path is passed to the linker. See the -L
option above.
-Mpgflag See the description for the -Mpgflag options on
the following pages.
-m Display a link map on the standard output.
-O[level] Set the optimization level. If -O is not
specified, then the default level is 1 if -g is
not specified, and 0 if -g is specified. If a
number is not supplied with -O then the
optimization level is set to 2 . The optimization
levels and their meanings are as follows:
0 A basic block is generated for each C
statement. No scheduling is done
between statements. No global
optimizations are performed.
1 Scheduling within extended basic blocks
is performed. Some register allocation
is performed. No global optimizations
are performed.
2 All level 1 optimizations are performed.
In addition, traditional scalar
optimizations such as induction
recognition and loop invariant motion
are performed by the global optimizer.
-o file Use file as the name of the executable program,
rather then the default a.out.
-P Preprocess each file and leave the output in a
file named file.i for each file named file.c.
-p Generate code for function-level profiling.
Equivalent to -qp.
-pc The x86 architecture implements a floating-point
stack using 8 80-bit registers. Each register uses
bits 0-63 as the significand, bits 64-78 for the
exponent, and bit 79 is the sign bit. This 80-bit
real format is the default format (called the
extended format). When values are loaded into the
floating point stack they are automatically
converted into extended real format. The
precision of the floating point stack can be
controlled, however, by setting the precision
control bits (bits 8 and 9) of the floating
control word appropriately. In this way, the
programmer can explicitly set the precision to
standard IEEE double using 64 bits, or to single
precision using 32 bits. The default precision
setting is system dependent. If you use -pc to
alter the precision setting for a routine, the
main program must be compiled with the same value
for -pc. The command line option -pc val lets the
programmer set the compiler's precision
preference. Valid values for val are:
32 single precision
64 double precision
80 extended precision
Operations performed exclusively on the floating
point stack using extended precision, without
storing into or loading from memory, can cause
problems with accumulated values within the extra
16 bits of extended precision values. This can
lead to answers, when rounded, that do not match
expected results.
-pg Generate additional profiling information.
-q[ c | p ]
Generate code for path coverage or function level
profiling, respectively.
-r Passed to the linker; generate a re-linkable
object file.
-rc rcfile
Specifies the name of a driver startup
configuration file. If rcfile is a full pathname,
then use the specified file. If rcfile is a
relative pathname, use the file name as found in
in the $DRIVER directory.
-S Skip the assembly and link steps. Leave the
output from the compile step in a file named
file.s for each file named file.c or file.f.
-s Passed to the linker; strip symbol table
information.
-show Produce driver help information describing the
current driver configuration.
-time Print execution times for the various compilation
steps.
-Uname Remove any initial definition of name in the
preprocessor. The only names predefined by the
preprocessor itself are the standard ANSI C
predefined macros. The driver may predefine other
names (see the following description for the
-Mnostddef option). Since all -D options are
processed before all -U options, the -U option
override -D options. NOTE: ANSI C predefined
macros can be defined and undefined on the command
line, but not with #define and #undefine
directives in the source.
-uname Passed to the linker; generate undefined
reference.
-V Display version messages and other information.
-v Verbose mode. Print out the command line for each
tool before it is executed.
-Wpass,option[,option...]
Pass the options to the specified pass. Each
comma-delimited option is passed as a separate
argument. The passes are: 0 for the compiler, a
for the assembler, and l for the linker.
-w Do not print warning messages.
-Xlevel Specify the degree of ANSI C conformance. The
level argument can be either a or c { a | c }.
a Use ANSI mode. The compiled language conforms
to all new ANSI features.
c Use the conformance mode. The compiled
language conforms to ANSI C, but warnings may
be produced about some extensions.
s The compiled language conforms to K&R C.
t The compiled language conforms to K&R C. The
compiler may produce warnings for semantics
where ANSI C and K&R C conflict.
-Ypass,directory
Look in directory for pass pass, rather then in
the standard area. The passes are:
0 Search for the pgc executable in
directory.
a Search for the assembler executable in
directory.
l Search for the linker executable in
directory.
S Search for the startup object files in
directory.
L If the linker supports the -YL option,
then pass the option -YL,directory to
the linker. Otherwise, use directory as
the standard library location.
U If the linker supports the -YU option,
then pass the option -YU,directory to
the linker. Otherwise this option is
ignored.
I Set the compiler's standard include
directory to directory. The standard
include directory is set to a default
value by the driver and can be
overridden by this option.
-y Arguments are passed to the linker.
-Mpgflag Request PGI-specific actions from the compiler.
Many of pgflags optionally begin with no (e.g.
[no]list). If the default of such an option is
the no variant, this is indicated by no appearing
in bold italics as in [nnoo]list. The permitted
pgflags are:
anno Produce annotated assembly files, where
source code is intermixed with assembly
language. -Mkeepasm or -S must be used
as well.
[nnoo]asmkeyword
(Don't) allow the asm keyword in C
source code. The format is:
asm("<text>")
[no]bounds
Enable (disable) array bounds checking.
Bounds checking is not applied to a
subscripting pointer.
concur Instructs the compiler to enable auto-
concurrentization of loops.
If -Mconcur is specified, multiple
processors will be used to execute loops
which the compiler determines to be
parallelizable. This option applies
only on shared memory systems with
multiple processors.
[no]dalign
(Don't) align doubles or long longs in
structures on 8-byte boundaries.
-Mnodalign may lead to data alignment
exceptions.
[no]depchk
(Don't) assume that potential data
dependencies exist. -Mnodepchk may
result in incorrect code; the -Msafeptr
switch provides a less dangerous way to
accomplish the same thing.
dollar,char
Set the character used to replace dollar
signs in names to be char. Default is
an underscore (_).
extract[=option[,option,...]]
Pass options to the function extractor.
The -o filename option must be used with
this switch to name a library.
[name:]function
A non-numeric option not
containing a period is assumed
to be a function name. The
named function is extracted.
If name: is specified, what
follows is always the name of
a function.
[size:]number
A numeric option is assumed to
be a size. Functions
containing number or less
statements are extracted. If
both number and function are
specified, then functions
matching the given name(s) or
meeting the size requirements,
are extracted.
fcon Treat non-suffixed floating point
constants as float, rather than double.
This may improve the performance of
single-precision code.
info[=option[,option,...]]
Emit useful information to stderr. The
options are:
time | stat
Emit compilation statistics.
loop Emit information about loops.
This includes information
about vectorization and loop
unrolling.
inline Emit information about
functions extracted and
inlined.
sym Emit symbol names as comments
in assembly file.
all All of the above.
inform,level
Specify the minimum level of error
severity that the compiler displays
during compilation.
fatal instructs the compiler to
display fatal error messages.
severe instructs the compiler to
display severe and fatal error
messages.
warn instructs the compiler to
display warning, severe and
fatal error messages.
inform instructs the compiler to
display all error messages
(inform, warn, severe and
fatal).
inline[=option[,option,...]]
Pass options to the function inliner.
The options are:
[lib:]filename.ext
An option containing a period
is assumed to be an inline
library created by a previous
-Mextract option. If lib: is
specified, no period is
necessary. Functions from the
specified library are inlined.
If no library is specified,
functions are extracted from a
temporary library created
during an extract prepass.
[name:]function
A non-numeric option not
containing a period is assumed
to be a function name. If
name: is specified, what
follows is always the name of
a function.
[size:]number
A numeric option is assumed to
be a size. Functions
containing number or less
statements are inlined. If
both number and function are
specified, then functions
matching the given name(s) or
meeting the size requirements,
are inlined.
levels:number
number of levels of inlining
are performed. The default is
1.
keepasm Keep the assembly file for each C source
file, but continue to assemble and link
the program. This is mainly for use in
compiler performance analysis and
debugging.
[nnoo]list (Don't) create a listing file.
nollalign Align long longs on 4-byte boudaries
instead of 8-byte boundaries (which
happens as a result of dalign).
nostddef Do not predefine any macros to the
preprocessor when compiling a C program.
The normal predefined macro is: -Dunix.
nostdinc Do not search in the standard location
for include files when those files are
not found elsewhere.
nostdlib Do not link in the standard libraries
when linking a program.
nostartup Do not link in the usual startup
routine. This routine contains the
entry point for the program.
prof[=option[,option,...]]
Set profile options. Normally, the -q or
-p switches are used for this; however,
on some systems, it is desirable to
override the default method of
profiling. See the PGI profiler manual,
or the system profiler manual, for
further information.
func Perform PGI-style function
level profiling.
line Perform PGI-style line level
profiling.
mcount Perform function level
profiling.
safe_lastval
In the case where a scalar is used after
a loop, but is not defined on every
iteration of the loop, the compiler does
not by default parallelize the loop.
However, this option tells the compiler
it safe to parallelize the loop.
safeptr[=option[,option,...]]
Override data dependence between C
pointers and arrays. This option must
be used with care since the potential
exists for code to be generated that
will result in unexpected or incorrect
results as is defined by ANSI C.
However, when used properly, this option
has the potential to greatly enhance the
performance of code, especially floating
point oriented loops. Combinations of
the options may be used and interact
appropriately.
dummy | arg
C dummy arguments (pointers
and arrays) are treated with
the same copyin/copyout
semantics as Fortran dummy
arguments.
auto C local or auto variables
(pointers and arrays) are
assumed not to overlap or
conflict with other data
objects and are independent.
static C static variables (pointers
and arrays) are assumed not to
overlap or conflict with other
data objects and are
independent.
global C global or extern variables
(pointers and arrays) are
assumed not to overlap or
conflict with other data
objects and are independent.
schar Specify signed char characters. Also
see the -Muchar option.
[nnoo]single
(Don't) suppress the ANSI-specified
conversion of float to double when
passing arguments to a function with no
prototype in scope. -Msingle may result
in faster code when single precision is
used a lot, but is non-ANSI compliant.
[nnoo]signextend
(Don't) sign extend when a narrowing
conversion overflows. For example, when
-Msignextend is in effect and an integer
containing the value 65535 is converted
to a short, the value of the short will
be -1. This option is provided for
compatibility with other compilers, even
though ANSI C specifies that the result
of such conversions are undefined.
-Msignextend is the default.
uchar Treat plain char declarations as
unsigned char declarations. Also see
the -Mschar option.
unroll[=option [,option...]]
Invokes the loop unroller. This also
sets the optimization level to 2 if the
level is set to less than 2. The option
is one of the following:
c:m Instructs the compiler to
completely unroll loops with a
constant loop count less than
or equal to m, a supplied
constant. If this value is not
supplied, the m count is set
to 4.
n:u instructs the compiler to
unroll u times, a loop which
is not completely unrolled, or
has a non-constant loop count.
If u is not supplied, the
unroller computes the number
of times a candidate loop is
unrolled.
nounroll Instructs the compiler not to unroll
loops.
vect[=option[,option,...]]
Pass options to the internal vectorizer.
If no option list is specified, then the
following vvector optimizations are
used:
altcode,assoc,nosmallvect,transform
The vect options are:
altcode[:n]
Instructs the vectorizer to
generate alternate scalar code
for vectorized loops. If
altcode is specified without
arguments, the vectorizer
determines an appropriate
cutoff length and generates
scalar code to be executed
whenever the loop count is
less than or equal to that
length. If altcode:n is
specified, the scalar altcode
is executed whenever the loop
count is less than or equal to
n.
noaltcode If noaltcode is specified, the
vectorized version of the loop
is always executed regardless
of the loop count.
assoc Instructs the vectorizer to
enable certain associativity
conversions that can change
the results of a computation
due to roundoff error. A
typical optimization is to
change an arithmetic operation
to an arithmetic operation
that is mathematically
correct, but can be
computationally different, due
to round-off error.
noassoc Instructs the vectorizer to
disable associativity
conversions.
smallvect:number
This option allows the
vectorizer to assume that the
maximum vector length is no
greater than number . In
doubly-nested, non-perfectly
nested loops this option can
allow invariant vector motion
that would not otherwise have
been possible. Incorrect code
will result if this option is
used and a vector takes on a
length greater than specified.
transform Instructs the vectorizer to
enable certain high-level
vector transformations. These
currently include loop
interchange, loop
distribution, and node-
splitting.
notransform
Instructs the vectorizer to
disable certain high-level
vector transformations.
FILES
a.out Executable output file.
file.a Library of object files.
file.c cc language source file.
file.C C++ language source file.
file.F f77 source language file with
preprocessor statements.
file.f f77 language source file.
file.o Object file.
file.s Assembler language source
file.
The TFLOPS compilers are supported in a native and a cross-
development environment. Depending on where they are
installed, environment variables can be set that establish
the directory structure. In the native environment, the
variable $PGI is set. In the cross-development environment,
the variable $TFLOPS_XDEV is set.
The native environment for the compilers resides within the
following directories:
$PGI/osf86/bin Where the compiler executables
reside.
$PGI/osf86/lib Where the compiler associated
libraries reside.
$PGI/osf86/include Where the the compiler include
files reside.
The cross development environment for the compilers resides
within the following directories:
$TFLOPS_XDEV/tflops/bin.<arch>
Where the compiler executables
reside, along with the other
cross development to ols.
<arch> will be one of the
following: solaris for a
sparc based solaris system;
sun4 for a sparc based sunos
system; solaris86 for a
Pentium or Pentium Pro based
solaris system.
$TFLOPS_XDEV/tflops/lib Where the compiler associated
libraries reside. In addition,
all the necessary t flops os
system libraries needed to
build user executables reside
here.
$TFLOPS_XDEV/tflops/include Where the the compiler include
files reside. In addition, all
the necessary incl ude files
needed to build user
executables reside here.
$TFLOPS_XDEV/tflops/cougar/lib
Where the necessary cougar os
system libraries needed to
build user executables reside.
$TFLOPS_XDEV/tflops/cougar/include
Where the necessary cougar os
system include files needed to
build user executab les
reside. This include directory
is put ahead in the path of
the $TFLOPS_XDEV/
tflops/include directory.
The following files are located in $PGI/osf86/bin (or
$TFLOPS_XDEV/tflops/bin.<arch>):
.pgccrc cc startup configuration
file.
.pgirc Default driver startup
configuration file.
osf86rc Native compiler driver
configuration file.
pgc cc compiler.
pgc_ex cc extractor.
pgcc cc compilation driver.
pgcomprc Default driver configuration
file.
sharedrc Default driver startup
configuration file.
The following files are located in $PGI/osf86/lib (or
$TFLOPS_XDEV/tflops/lib):
libcmplx.a Complex number math library.
libpgc.a Low-level compiler support
library.
libpgmp.a Parallel support library.
libvect.a Vector math library.
pgfi8st.o 64-bit integer support
library.
subchk.o Routine for array bounds
checking.
SEE ALSO
pgf77.
DIAGNOSTICS
The compiler produces information and error messages as it
translates the input program. The linker and assembler may
issue their own error messages.
Acknowledgement and Disclaimer