Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pghpf_ug PGHPF Compiler User's Guide - 2 PGHPF Compiler Options
Personal tools
Document Actions

PGHPF Compiler User's Guide - 2 PGHPF Compiler Options

<< << " border=0> >> > " border=0> Title Contents Index Home Help

2 PGHPF Compiler Options


This chapter describes the syntax and operation of each PGHPF compiler option. The options are arranged in alphabetical order. On a command line, options need to be preceded by a hyphen (-).

This chapter uses the following notation:

[item]
Square brackets indicate that the enclosed item is optional.
{item | item}
Braces indicate that you must select one and only one of the enclosed items. A vertical bar (|) separates the choices.
...
Horizontal ellipses indicate that zero or more instances of the preceding item are valid.

Many of the compiler options and arguments have default settings. Some option defaults are affected by environment variables and can be set using the .pghpfrc driver configuration file. Refer to Appendix C, Driver Customization, for details on setting and altering defaults with the driver initialization file.

Most Fortran node compiler options are also valid for PGHPF. Refer to the documentation for the Fortran node compiler supplied with your system for a list of valid Fortran command-line options.

The PGHPF compiler uses the options -O1 and -O2 for optimization. If you select these options, varying levels of optimization will be applied to your HPF program.

If the compiler does not recognize an option, it passes the option to the linker.

Table 2-1 lists and briefly describes the PGHPF options. Full descriptions follow the table.

Table 2-1 PGHPF Compiler Options

Option

Description

-Mautopar


Auto-parallelize Fortran DO loops which operate on mapped data.


-M[no]backslash


Determines how the backslash character is treated in quoted strings.


-Mbyteswapio


Swap bytes from big-endian to little-endian or vica versa on input and output of unformatted data.


-Mcmf


Provides limited support for CM Fortran compatibility.


-Mextract


Perform a manual extract phase for procedures within INDEPENDENT DO loops that are to be inlined. See the -Minline option.


-M[no]dclchk


Determines whether all program variables must be declared.


-M[no]depchk


Compiler checks for potential data dependencies.


-M[no]dlines


The compiler treats lines containing "D" in column 1 as executable statements. With nodlines the compiler does not treat lines containing "D" in column 1 as executable statements (does not ignore the "D".)


-Mextend


The compiler accepts 132-column source code; without this option lines are 72 columns.


-Mf90


Perform compilation for a single processor run using Fortran90 semantics.


-Mfree[form]


Process source using Fortran 90 freeform input specifications.


-Mftn


Stop after compiling HPF and keep the intermediate Fortran output.


-Mg


Set the debug option, as well as the -Mkeepftn option, and also set the PGHPF compiler flag that makes debugging the Fortran output easy by suppressing HPF line numbers in the generated Fortran intermediate file.


-Minfo


Instructs the compiler to produce size, time, and other compilation information.


-Minform


Specifies the minimum level of error severity that the compiler displays.


-Minline


Perform procedure inlining within INDEPENDENT DO loops.


-Mipa


Perform Interprocedureal Analysis.


-Mkeepftn


Retain Fortran intermediate files.


-Mkeepstatic


Keeps the intermediate static initialization file that is normally removed by the compiler. This option is used primarily for debugging purposes.


-Mmpi


Link a version of the HPF runtime libraries and startup routines for the mpi environment (valid only on certain platforms).


-Mmpl


Link a version of the HPF runtime libraries and startup routines for the mpl environment (valid only on certain IBM platforms).


-M[no]list


Specifies whether the compiler creates a listing file.


-Mnofree[form]


Use fixed form formatting for file processing.


-Mnohpfc


Skip the HPF compilation step and compile using the Fortran node compiler if a file with a .f or .F extension is supplied.


-Mnoindependent


Do not apply the INDEPENDENT directive to DO loops.


-Mnoprelink


Skip the static initialization phase of the compilation


-Moverlap


Set the size of the overlap area for BLOCK distributed arrays.


-Mpreprocess


Run the preprocessor on the input source file regardless of the filename extension.


-Mprof


Select profiling. Insert calls to profile routines and link profiler libraries.


-Mpvm


Generate code using runtime libraries and startup routines for the PVM environment.


-Mr8


Promote REAL variables and constants to DOUBLE PRECISION and COMPLEX to DOUBLE COMPLEX.


-Mrecursive


Instructs the compiler to produce code that will allow for recursion of the routines within the file. Note: not all routines can be made recursive.


-Mreplicate


The array replicator eliminates calls to pghpf_get_scalar() by replicating distributed arrays that satisfy certain conditions.


-Mrpm


Link a version of the HPF runtime libraries and startup routines for the PGI RPM environment (valid only on certain platforms). When compiling with this option, the execution run should include the two options: -pghpf -heapz n.


-Mrpm1


Link a version of the HPF runtime libraries and startup routines for the PGI RPM single-process environment for debugging (valid only on certain platforms)..


-M[no]sequence


All variables are created as SEQUENCE variables, where sequential storage is assumed. With -Mnosequence, all variables are created as nonsequential variables unless an explicit SEQUENCE directive is supplied or the variable is an assumed size array.


-Msmp


Perform compilation for a shared memory system. When compiling with this option, the execution run should include the two options: -pghpf -heapz n.


-Mstats


Link a version of the runtime libraries for printing runtime communications and message passing statistics.


-Mstandard


Causes the compiler to flag source code that does not conform to the ANSI Fortran 90 standard.


-Mupcase


Allow uppercase letters in identifiers.




Note

The default PGHPF compiler options depend on values set in the .pghpfrc driver configuration file. Depending on the PGI product you purchased, your defaults may differ.


-M pghpf_flag

Selects options for the PGHPF compiler and for code generation.

-Mautopar
[=option [,option,...]]
The compiler generates FORALL statements and calls to reduction intrinsics when parallel DO-loops which operate on distributed arrays are discovered. Loop interchange and distribution may be performed to increase the number of parallel loops. Information about parallelization is displayed with the -Minfo command-line switch. The optional arguments for autopar are as follows:
noassoc | assoc

noassoc prevents recognition of reductions. Programs in which results are sensitive to the order in which operations are performed will require this switch. The argument assoc allows recognition of reductions and is the default.
levels:n

specifies the maximum nesting depth of loops that get auto-parallelized. By default, the maximum nesting depth is 3.
-Mbyteswapio
Swap bytes from big-endian to little-endian or vice-versa on input and output of unformatted data. This could be useful when, for instance, reading data that was created on an SGI system but is being read from an Intel IA32 system.-M[no]backslash
With backslash the compiler treats a backlash in quoted strings as a normal character, and not as an escape character. With nobackslash, the compiler recognizes a backslash as an escape character in quoted strings (in accordance with standard C usage). The default is nobackslash.
-Mcmf
Provides limited support for CM Fortran compatibility. Where there is no chance for ambiguity, PGHPF supports both the CM Fortran and the HPF spellings of common Fortran 90 features. This includes support for the intrinsics DOTPRODUCT, DLBOUND, DUBOUND, and DSHAPE which have calling sequences identical to their Fortran 90 counterparts. It also includes support for the CM Fortran method of using square brackets in the definition of array constructors and the use of the ARRAY keyword in place of the Fortran 90 standard DIMENSION keyword. There are three CM Fortran intrinsics which have names identical to their Fortran 90 counterparts but whose calling sequences differ. These are CSHIFT, EOSHIFT, and RESHAPE. Using -Mcmf these intrinsics will be interpreted using the CM Fortran convention rather than the standard Fortran 90 convention. There are six additional non-standard intrinsics in CM Fortran: PROJECT, LASTLOC, FIRSTLOC, RANK, DIAGONAL, and REPLICATE. These non-standard intrinsics are not currently supported by PGHPF. Other features of CM Fortran that are not supported are the layout directives and the utility routines.
-Mcraft
Supports the HPF_CRAFT environment. The EXTRINSIC keyword HPF_CRAFT or the command line flag -Mcraft each specify this HPF_CRAFT environment. This command line option informs the compiler that the entire file is written in HPF_CRAFT. This is only supported on the Cray T3E and T3D systems sold by Cray/SGI.
-M[no]dclchk
Determines whether all program variables must be declared.
-M[no]depchk
With nodepchk the compiler does not check for potential data dependencies between ambiguous array references. Note, with nodepchk, if data dependencies exist, this option can produce incorrect code.
-M[no]dlines
The compiler treats lines containing "D" in column 1 as executable statements (ignoring the "D"). With nodlines the compiler does not treat lines containing "D" in column 1 as executable statements (does not ignore the "D").
-Mextend
The compiler accepts 132-column source code; without this option lines are 72 columns.
-Mextract
[=name[,name...]] -o dir
This option extracts procedures from the file indicated on the command line and places the output in the directory (extract directory) specified with the -o dir on the command line. If you do not specify a function name the compiler extracts every function in the source text. Note that while the extract phase extracts all possible procedures, the inliner will only inline procedures in an INDEPENDENT DO loop. You must specify an extract output directory dir with the -o option. The name option can be any of the following:
name
instructs the extractor to extract function name from the source file.
-Mf90
Generate code for a program running on a single processor using Fortran90 semantics. Performance should improve considerably using this option when running on a single processor.
-Mfreeform
Instructs the compiler to read source using Fortran 90 free form.
-Mftn
Instructs the compiler stop after compiling HPF and keep resulting Fortran output.
-Mg
Set the debug option, as well as the -Mkeepftn option, and, in addition suppress HPF line numbers in the generated Fortran intermediate file to make debugging of the Fortran output easier
-Mnoindependent
Instructs the compiler to disable parallelization for the INDEPENDENT directive.
-Minfo
[=option [,option,...]]
Instructs the compiler to produce information on standard error, where option is one of the following:
all
instructs the compiler to produce all of the following info information.
autopar

instructs the compiler to produce information on autoparallelization and independent loop parallelization.
inline
instructs the compiler to produce information on function inlining.
loop
instructs the compiler to display information about loops, such as optimizations.
stat | time

instructs the compiler to display compilation statistics.
-Minform=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).
-Minline
{=[lib:dir,][levels:number][name:fun,]}
Without options, this instructs the compiler to perform inlining within DO loops and to use a temporary directory for the extract phase. Note that while the extract phase extracts all possible procedures, the inliner will only inline procedures in DO loops.
name:func

instructs the inliner to inline the function func.
lib:dir

instructs the inliner to inline the functions within the library directory dir. Functions from the specified library are inlined if they are found in the source program.
levels:number

instructs the inliner to perform number levels of inlining. The default number is 1.
-Mipa
=lib
Perform interprocedural analysis.
lib

lib is the name of the IPA library directory to store the files generated and used in IPA program checking. The library directory is used to store information about procedure arguments and other data that is checked across routines. A lib directory must be specified.
-Mkeepftn
Instructs the compiler to keep the Fortran file as compilation continues. Normally the Fortran intermediate file is removed.
-Mkeepstatic
Instructs the compiler to keep the intermediate static initialization file that is normally removed during the compilation process. This option is used primarily for debugging purposes. Refer to the Static Data Initialization section for more information.
-M[no]list
Instructs the compiler to create a listing file. The listing file is filename.lst, where the name of the source file is filename.hpf.
-Mnofree[form]
Instructs the compiler to read source using fixed form formatting.
-Mnohpfc
Skip the HPF compilation step but compile using the Fortran compiler if a file with a .f or .F extension is supplied.
-Mnoprelink
Skip the prelink compilation phase. This phase handles static initialization for data initialized distributed data, and handles namelist groups found in modules. Not using this option disables support for certain HPF/F90 features.
-Mnosequence
All variables are created as nonsequential variables unless an explicit SEQUENCE directive is supplied or the variable is an assumed size array.
-Moverlap
[=size:n]
 
controls the size of the overlap area the compiler generates for certain expressions. The default size is 4. For most programs, the default handling for overlap areas is sufficient. However, in some cases, the default overlap area may result in a runtime memory allocation error such as the following:
 
0: ALLOCATE: xxxx bytes requested; not enough memory
 
In other cases, increasing or decreasing the size of the overlap area may improve a program's performance in cases where PGHPF generates overlap_shift communications. For example in the code:
 
!hpf$ distribute (block) :: a,b
forall(i=1:n) a(i) = b(i+10)
 
Using the default overlap size of 4, PGHPF does not use the overlap shift optimization, since the default size of 4 is too small. By increasing the overlap size to 10, PGHPF generates overlap shifts.
 
The compiler only optimizes overlap shift communications for BLOCK distributed dimensions where an array's shift amount is a compile time constant and is less than the overlap area allowances specified in an array index.
 
Reducing the overlap size may improve performance for some codes. Setting the size to 0 disables overlap shifts. Refer to the SHADOW directive for more information on how to control overlap areas.

-Mpreprocess
Run the preprocessor on the input source file.
-Mprof
=option
Set profile options. Option can be any of the following:
func
perform PGI-style function level profiling.
lines
insert calls to produce a pgprof.out file which contains both function and line level data.
Note that pgprof.out profile data files may often be input by PGPROF on systems other than the system that generated the profile data file. Also note that -p is generally not supported by PGHPF.
-Mpvm
instructs the compiler to produce executable output to run under PVM heterogeneous communications system.
-Mr8
promotes REAL variables and constants to DOUBLE PRECISION and COMPLEX to DOUBLE COMPLEX. Constants specified with an exponent letter E are converted to constants with an exponent letter of type D.
-Mrecursive
instructs the compiler to produce code that will allow for recursion of the routines within the file. Local variables are placed on the stack instead of in static memory. Support for recursion usually depends on the underlying FORTRAN node compiler's support for recursion. Use of this option may adversely affect performance. Note that not all routines can be recursive. For example, routines that modify SAVEd variables or COMMON block variables as well as routines that perform I/O are generally not candidates for recursion. See release notes for information on platforms that support recursion.
-Mreplicate
[=dims:n]
detects common cases where the PGHPF compiler generates calls to pghpf_get_scalar(), a costly communications call. Calls to pghpf_get_scalar() are generated for a distributed array reference within a loop's statement in the following cases:
1) The statement is an assignment to an undistributed array or to a scalar.
2) The array reference is used as the index to another array.
3) The array reference occurs within a conditional expression.
The array replicator eliminates calls to pghpf_get_scalar() by replicating distributed arrays at runtime that satisfy any of the above three conditions. Array replication will reduce available parallelism and will incur the cost of copying distributed arrays to their replicated counterparts.
dims:n
the replicator will not attempt to create replicated arrays for arrays with n or more dimensions.

-Mrpm
instructs the compiler to produce executable output to run under the PGI RPM homogeneous communications system..
-Mrpm1
instructs the compiler to produce executable output to run under the PGI RPM1 communications system.
-Msequence
All variables are created as SEQUENCE variables, where sequential storage is assumed.
-Msmp
instructs the compiler to generate code for a program running on a Shared Memory system. Performance may improve using this option on a shared memory system since the compiler uses a shared memory heap, and this may reduce communications and runtime overheads. When compiling with this option, the execution run should include the two options: -pghpf -heapz n.
-Mstandard
Causes the compiler to flag source code that does not conform to the ANSI standard (note, currently there is no ANSI standard for HPF).
-Mstats
Causes the compiler load the PGHPF runtime libraries that keep track of communications and message statistics for use with the PGHPF runtime -stat msg and -stat msgs options.
-M[no]upcase
The compiler allows uppercase letters in identifiers. With -Mupcase, the identifiers "X" and "x" are different, and keywords must be in lower case. This selection also affects the linking process: if you compile and link the same source code using -Mupcase on one occasion and -Mnoupcase on another, you may get two different executables (depending on whether the source contains uppercase letters). The standard libraries are compiled using the default -Mnoupcase.
   


<< << " border=0> >> > " border=0> Title Contents Index Home Help

Powered by Plone This site conforms to the following standards: