NAME
pgf77 - Portland Group Fortran compiler
SYNOPSIS
pgf77 [ -# ] [ -### ] [ -c ] [ -cougar ] [ -Dname[=def]
[ -dryrun ] [ -E ] [ -F ] [ -f ] [ -flags ]
[ -g ] [ -help ]
[ -Idirectory ] [ -i ] [ -i2 ] [ -i4 ] [ -i8 ]
[ -Kflag ] [ -Ldirectory ] [ -llibrary ] [ -Mpgflag ] [ -m ]
[ -O[level] ]
[ -o file ] [ -p ] [ -pc ] [ -pg ] [ -Q ]
[ -q[c | p ] ] [ -r ] [ -r4 ] [ -r8 ]
[ -rc file ] [ -S ] [ -s ] [ -show ] [ -silent ] [ -time ] [
-Uname ]
[ -uname ] [ -V ] [ -v ] [ -Wpass,option[,option...] ]
[ -w ] [ -X ] [ -x ]
[ -Ypass,directory ] [ -y ] sourcefile...
DESCRIPTION
pgf77 is the interface to the Portland Group Fortran
compiler for the x86 processor. It invokes the Fortran
compiler, assembler, and linker with options derived from
its command line arguments.
pgf77 bases its processing on the suffixes of the files it
is passed. Files whose names end with .f are considered to
be Fortran source files. They are compiled and assembled.
The resulting object file is placed in the current
directory. Files whose names end with .F are also
considered to be Fortran source files, but they are first
preprocessed by the C preprocessor. 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. File whose names end with .c
are considered to be C source files and are compiled by the
C compiler.
Files not ending in .o, .s, .f, .c, .F, or .a are taken as
object files and passed to the linker (if linking is
requested) with a warning message.
If a single Fortran program is compiled and linked with one
pgf77 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 pgf77 to link the objects.
-# Display the invocations of the compiler,
assembler, and linker. These invocations are the
command lines created by pgf77.
-### Display invocations of the compiler, assembler and
linker, but do not execute them.
-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 file and send the result to
standard output. No compilation, assembly, or
linking is performed.
-F Preprocess each file and leave the output in a
file named file.f for each file named file.F. No
compilation, assembly, or linking is performed.
-f This option is provided for compatibility with
other Fortran compilers. It is ignored.
-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.
-O0 code will be significantly slower than code
generated at other optimization levels.
-help Display valid driver options and additional driver
help information.
-Idirectory
Add directory to the compiler's search path for
include files.
-i Passed to the liker.
-i2 Treat INTEGER variables as two bytes.
-i4 Treat INTEGER variables as four bytes.
-i8 Treat INTEGER variables as eight bytes. For
operations involving integers, use 64-bits for
computations.
-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.
-Knoieee Use the inline divide algorithm link with
(probably faster) non-IEEE libraries, and disable
underflow traps.
-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 above.
-Mpgflag Specify a -Mpgflag option. See the pgflag
specifications 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
Fortran 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 Generate code for function-level profiling.
Currently ignored.
-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. The command line option -pc val
lets the programmer set the compiler's precision
preference. If you alter the precision setting for
a routine using -pc, the main program must be
compiled using the same precision setting. 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.
Currently ignored.
-Q arg Selects variations for compiler steps.
-q[ c | p ]
Generate code for path coverage or function level
profiling, respectively.
-r Passed to the linker; generate a re-linkable
object file.
-r4 Interpret DOUBLE PRECISION variables as REAL.
-r8 Interpret REAL variables as DOUBLE PRECISION.
-rc arg Specifies the name of the driver's startup file.
-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 Display the driver's configuration.
-silent Do not print warning messages.
-time Print execution times for the various compilation
steps.
-Uname Remove any initial definition of name in the
preprocessor.
-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.
-X Specifies degree of ANSI conformance.
-x arg Specifies compiler variations.
-Ypass,directory
Look in directory for pass pass, rather then in
the standard area. The passes are:
0 Search for the pgftn 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 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]backslash
(Don't) inhibit the treatment of
backslash as an escape character in
strings. -Mnobackslash causes the
standard C backslash escape sequences to
be recognized in quoted strings;
-Mbackslash causes the backslash to be
treated like any other character.
[no]bounds
Enable (disable) array bound checking.
concur Instructs the compiler to enable auto-
concurrentization of loops. If concur
is specified, multiple processors will
be used to execute loops which the
compiler determines to be
parallelizable. Use of this option
requres that you are using a shared
memory multiple processor system.
Currently ignored.
cray[=option[,option,...]]
Force Cray Fortran (CF77 compatibility
with respect to the listed options.
Possible options include:
pointer for purposes of optimization,
it is assumed that pointer-
based variables do not overlay
the storage of any other
variable.
[no]dalign
(Don't) align real*8, integer*8, or
complex in structures or common blocks
on 8-byte boundaries. -Mnodalign may
lead to data alignment exceptions.
[nnoo]dclchk
(Don't) require that all variables be
declared.
[nnoo]defaultunit
(Don't) treat '*' as stdout/stdin
regardless of the status of units 6/5.
-Mnodefaultunit causes * to be a synonym
for 5 on input and 6 on output;
-Mdefaultunit causes * to be a synonym
for stdin on input and stdout on output.
[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.
[nnoo]dlines
(Don't) treat lines beginning with D in
column 1 as executable statements,
ignoring the D.
dollar,char
Set the character used to replace dollar
signs in names to be char . Default is
an underscore (_).
extend Allow 132-column source lines.
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.
[no]i4 (Don't) treat INTEGER as INTEGER*4.
-noi4 treats INTEGER as INTEGER*2.
[nnoo]iomutex
(Don't) generate critical section calls
around Fortran I/O statements.
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.
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 Fortran
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 integer*8 data on 4-byte
boundaries instead of 8-byte (dalign)
alignment. Does not affect 8-byte
floating point alignment.
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.
[nnoo]onetrip
(Don't) force each DO loop to be
iterated at least once.
prof=[option[,option,...]]
Currently ignored. 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.
func Perform PGI-style function
level profiling.
line Perform PGI-style line level
profiling.
mcount Perform function level
profiling.
[nnoo]r8 (Don't) treat REAL as DOUBLE PRECISION
and real constants as double precision
constants.
[nnoo]r8intrinsics
(Don't) treat the intrinsics CMPLX as
DCMPLX and REAL as DBLE.
[nnoo]recursive
(Don't) allocate local variables on the
stack, thus allowing recursion. SAVEd,
data-initialized, or namelist members
are always allocated statically,
regardless of the setting of this
switch.
[nnoo]reentrant
(Don't) enable optimizations that may
result in code that is not reentrant.
Even with -reentrant , the code may
still not be reentrant if it is
improperly written (e.g., SAVEd
variables).
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's safe to parallelize the loop. For a
given loop the last value computed for
all scalars make it safe to parallelize
the loop.
[nnoo]save (Don't) assume that all local variables
are subject to the SAVE statement.
-Msave may allow many older Fortran
programs to run but can greatly reduce
performance.
[nnoo]signextend
(Don't) sign extend the result of a
conversion of a signed integer to a
smaller signed type. For example, when
-Msignextend is in effect and an
INTEGER*4 containing the value 65535 is
converted to an INTEGER*2, the value of
the INTEGER*2 will be -1. The default
is -Msignextend.
standard Flag non-ANSI-Fortran 77 usage.
[nnoo]unixlogical
When -Munixlogical is in effect, a
logical is considered to be .TRUE. if
its value is non-zero and .FALSE.
otherwise. When -Mnounixlogical is in
effect (the default), a logical
considered to be .TRUE. if its value is
odd and .FALSE. if its value is even.
[nnoo]upcase
(Don't) preserve case in names.
-Mnoupcase causes all names to be
converted to lower case. Note that, if
-Mupcase is used, then variable name 'X'
is different than variable name 'x', and
keywords must be in lower case.
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 vector optimizations are used:
altcode,assoc,concur,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 tools.
<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 tflops 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 include 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 executables 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>):
.pgf77rc f77 startup configuration
file.
.pgirc Default driver startup
configuration file.
osf86rc Native compiler driver
configuration file.
pgcomprc Default driver configuration
file.
pgf77 f77 compilation driver.
pgftn f77 compiler.
pgftn_ex f77 extractor.
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.
libpgftnrtl.a f77 runtime library (linked to
libf.a).
libpgmp.a Parallel support library.
libvect.a Vector math library.
pgfalt.o f77 -Munixlogical support
routines.
pgfi8st.o 64-bit integer support
library.
pgfmain.o Fortran startup routine.
subchk.o Routine for array bounds
checking.
SEE ALSO
pgcc
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