Miscellaneous Controls. STMicroelectronics PGI
Advertisement
Advertisement
–M Options by Category smallvect[:n]
Instructs the vectorizer to assume that the maximum vector length is less than or equal to n. The vectorizer uses this information to eliminate generation of the stripmine loop for vectorized loops wherever possible. If the size n is omitted, the default is 100.
Note
No space is allowed on either side of the colon (:).
[no]sse
Instructs the vectorizer to search for vectorizable loops and, wherever possible, make use of SSE,
SSE2, and prefetch instructions. The default is nosse.
[no]uniform
Instructs the vectorizer to perform the same optimizations in the vectorized and residual loops.
Note
This option may affect the performance of the residual loop.
–M novect instructs the compiler not to perform vectorization; can be used to override a previous instance of
–
Mvect
on the command-line, in particular for cases in which
–Mvect
is included in an aggregate option such as
–fastsse
.
–M vect
=[
option
] instructs the compiler to enable loop vectorization, where option is one of the following: partial
Instructs the vectorizer to enable partial loop vectorization through innemost loop distribution.
[no]short
Enable [disable] short vector operations. Enables [disables] generation of packed SSE instructions for short vector operations that arise from scalar code outside of loops or within the body of a loop iteration.
–M novintr instructs the compiler not to perform idiom recognition or introduce calls to hand-optimized vector functions.
Miscellaneous Controls
Default:
For arguments that you do not specify, the default miscellaneous options are as follows: inform nobounds nolist warn
Usage:
In the following example, the compiler includes Fortran source code with the assembly code.
$ pgf95 -Manno -S myprog.f
In the following example, the assembler does not delete the assembly file myprog.s
after the assembly pass.
$ pgf95 -Mkeepasm myprog.f
280
Chapter 16. Command-Line Options Reference
In the following example, the compiler displays information about inlined functions with fewer than approximately 20 source lines in the source file myprog.f
.
$ pgf95 -Minfo=inline -Minline=20 myprog.f
In the following example, the compiler creates the listing file myprog.lst
.
$ pgf95 -Mlist myprog.f
In the following example, array bounds checking is enabled.
$ pgf95 -Mbounds myprog.f
Related options:
–m, –S, –V, –v
The following list provides the syntax for each miscellaneous –M<pgflag> option. Each option has a description and, if appropriate, a list of any related options.
–M anno annotate the generated assembly code with source code. Implies
–Mkeepasm
.
–M bounds enables array bounds checking. If an array is an assumed size array, the bounds checking only applies to the lower bound. If an array bounds violation occurs during execution, an error message describing the error is printed and the program terminates. The text of the error message includes the name of the array, the location where the error occurred (the source file and the line number in the source), and information about the out of bounds subscript (its value, its lower and upper bounds, and its dimension).
The following is a sample error message:
PGFTN-F-Subscript out of range for array a (a.f: 2) subscript=3, lower bound=1, upper bound=2, dimension=2
–M nobounds disables array bounds checking.
–M byteswapio swap byte-order from big-endian to little-endian or vice versa upon input/output of Fortran unformatted data files.
–M chkfpstk
(32-bit only) instructs the compiler to check for internal consistency of the x87 floating-point stack in the prologue of a function and after returning from a function or subroutine call. Floating-point stack corruption may occur in many ways, one of which is Fortran code calling floating-point functions as subroutines (i.e., with the CALL statement). If the
PGI_CONTINUE
environment variable is set upon execution of a program compiled with
–Mchkfpstk
, the stack will be automatically cleaned up and execution will continue.
There is a performance penalty associated with the stack cleanup. If
PGI_CONTINUE
is set to verbose, the stack will be automatically cleaned up and execution will continue after printing the warning message.
Note
This switch is only valid for 32-bit. On 64-bit it is ignored.
–M chkptr instructs the compiler to check for pointers that are dereferenced while initialized to NULL (pgf95 and pghpf only).
281
–M Options by Category
282
–M chkstk instructs the compiler to check the stack for available space in the prologue of a function and before the start of a parallel region. Prints a warning message and aborts the program gracefully if stack space is insufficient. Useful when many local and private variables are declared in an OpenMP program.
If the user also sets the
PGI_STACK_USAGE
environment variable to any value, then the program displays the stack space allocated and used after the program exits. For example, you might see something similar to the following message: thread 0 stack: max 8180KB, used 48KB
This message indicates that the program used 48KB of a 8180KB allocated stack. For more information on the
PGI_STACK_USAGE
, refer to “PGI_STACK_USAGE,” on page 139 .
This information is useful when you want to explicitly set a reserved and committed stack size for your programs, such as using the
–stack
option on Windows.
–M cpp
[=option [,option,...]] run the PGI cpp-like preprocessor without execution of any subsequent compilation steps. This option is useful for generating dependence information to be included in makefiles.
Note
Only one of the m, md, mm or mmd options can be present; if multiple of these options are listed, the last one listed is accepted and the others are ignored.
The option is one or more of the following: m print makefile dependencies to stdout.
md print makefile dependencies to filename.d
, where filename is the root name of the input file being processed.
mm print makefile dependencies to stdout, ignoring system include files.
mmd print makefile dependencies to filename.d
, where filename is the root name of the input file being processed, ignoring system include files.
[no]comment
(don’t) retain comments in output.
[suffix:]<suff> use <suff> as the suffix of the output file containing makefile dependencies.
–M dll
This Windows-only flag has been deprecated. Refer to
–Bdynamic
. This flag was used to link with the
DLL versions of the runtime libraries, and it was required when linking with any DLL built by any of The
Portland Group compilers. This option implied –D_DLL, which defines the preprocessor symbol _DLL.
Chapter 16. Command-Line Options Reference
–M gccbug[s] match the behavior of certain gcc bugs.
–M iface[=option] adjusts the calling conventions for Fortran, where option is one of the following: unix
(Win32 only) uses UNIX calling conventions, no trailing underscores.
cref uses CREF calling conventions, no trailing underscores.
mixed_str_len_arg places the lengths of character arguments immediately after their corresponding argument. Has affect only with the CREF calling convention.
nomixed_str_len_arg places the lengths of character arguments at the end of the argument list. Has affect only with the CREF calling convention.
–M info[=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 available
–Minfo
information. Implies a number of suboptions:
–Mneginfo=accel,inline,ipa,loop,lre,mp,opt,par,vect accel instructs the compiler to enable accelerator information.
ccff instructs the compiler to append common compiler feedback format information, such as optimization information, to the object file.
ftn instructs the compiler to enable Fortran-specific information.
hpf instructs the compiler to enable HPF-specific information.
inline instructs the compiler to display information about extracted or inlined functions. This option is not useful without either the
–Mextract
or
–Minline
option.
intensity instructs the compiler to provide informational messages about the intensity of the loop. Specify <n> to get messages on nested loops.
• For floating point loops, intensity is defined as the number of floating point operations divided by the number of floating point loads and stores.
• For integer loops, the loop intensity is defined as the total number of integer arithmetic operations, which may include updates of loop counts and addresses, divided by the total number of integer loads and stores.
283
–M Options by Category
284
• By default, the messages just apply to innermost loops.
ipa instructs the compiler to display information about interprocedural optimizations.
loop instructs the compiler to display information about loops, such as information on vectorization.
lre instructs the compiler to enable LRE, loop-carried redundancy elimination, information.
mp instructs the compiler to display information about parallelization.
opt instructs the compiler to display information about optimization.
par instructs the compiler to enable parallelizer information.
pfo instructs the compiler to enable profile feedback information.
time instructs the compiler to display compilation statistics.
unroll instructs the compiler to display information about loop unrolling.
vect instructs the compiler to enable vectorizer information.
–M 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.
[no]file instructs the compiler to print or not print source file names as they are compiled. The default is to print the names:
–Minform=file
.
inform instructs the compiler to display all error messages (inform, warn, severe and fatal).
severe instructs the compiler to display severe and fatal error messages.
warn instructs the compiler to display warning, severe and fatal error messages.
–M instrumentation=option specifies the level of instrumentation calls generated. This option implies
-Minfo=ccff
,
-Mframe.
Chapter 16. Command-Line Options Reference option
is one of the following: level specifies the level of instrumentation calls generated.
function (default) generates instrumentation calls for entry and exit to functions.
Just after function entry and just before function exit, the following profiling functions are called with the address of the current function and its call site. (linux86-64 only).
void __cyg_profile_func_enter (void *this_fn, void *call_site); void __cyg_profile_func_exit (void *this_fn, void *call_site);
In these calls, the first argument is the address of the start of the current function.
–M keepasm instructs the compiler to keep the assembly file as compilation continues. Normally, the assembler deletes this file when it is finished. The assembly file has the same filename as the source file, but with a .s
extension.
–M list instructs the compiler to create a listing file. The listing file is filename.lst
, where the name of the source file is filename.f
.
–M makedll
(Windows only) generate a dynamic link library (DLL).
–M makeimplib
(Windows only) generate an import library for a DLL without creating the DLL. When used without def:deffile, passes the switch
-def
to the librarian without a deffile.
–M names=lowercase|uppercase specifies the case for the names of Fortran externals .
• lowercase - Use lowercase for Fortran externals.
• uppercase - Use uppercase for Fortran externals.
–M neginfo[=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 available information on why various optimizations are not performed.
accel instructs the compiler to enable accelerator information.
ccff instructs the compiler to append information, such as optimization information, to the object file.
concur instructs the compiler to produce all available information on why loops are not automatically parallelized. In particular, if a loop is not parallelized due to potential data dependence, the
285
–M Options by Category
286 variable(s) that cause the potential dependence are listed in the messages that you see when using the option
–Mneginfo
.
ftn instructs the compiler to enable Fortran-specific information.
hpf instructs the compiler to enable HPF-specific information.
inline instructs the compiler to display information about extracted or inlined functions. This option is not useful without either the
–Mextract
or
–Minline
option.
ipa instructs the compiler to display information about interprocedural optimizations.
loop instructs the compiler to display information about loops, such as information on vectorization.
lre instructs the compiler to enable LRE, loop-carried redundancy elimination, information.
mp instructs the compiler to display information about parallelization.
opt instructs the compiler to display information about optimization.
par instructs the compiler to enable parallelizer information.
pfo instructs the compiler to enable profile feedback information.
vect instructs the compiler to enable vectorizer information.
–M nolist the compiler does not create a listing file. This is the default.
–M noopenmp when used in combination with the
–mp
option, the compiler ignores OpenMP parallelization directives or pragmas, but still processes SGI-style parallelization directives or pragmas.
–M nosgimp when used in combination with the
–mp
option, the compiler ignores SGI-style parallelization directives or pragmas, but still processes OpenMP parallelization directives or pragmas.
–M nopgdllmain
(Windows only) do not link the module containing the default DllMain() into the DLL. This flag applies to building DLLs with the PGF95 and PGHPF compilers. If you want to replace the default DllMain() routine with a custom DllMain(), use this flag and add the object containing the custom DllMain() to the link line.
The latest version of the default DllMain() used by PGF95 and PGHPF is included in the Release Notes for
Chapter 16. Command-Line Options Reference each release; the PGF95- and PGHPF-specific code in this routine must be incorporated into the custom version of DllMain() to ensure the appropriate function of your DLL.
–M norpath
( Linux only) Do not add –rpath to the link line.
–M preprocess perform cpp-like preprocessing on assembly and Fortran input source files.
–M writable_strings stores string constants in the writable data segment.
Note
Options
–Xs and
–Xst
include –Mwritable_strings.
287
288
Download
Advertisement