The following tables show the compiler options available in the XL Fortran compiler that you can enter in the configuration file, on the command line, or in the Fortran source code by using the @PROCESS compiler directive.
You can enter compiler options that start with -q, suboptions, and @PROCESS directives in either uppercase or lowercase. However, note that if you specify the -qmixed option, procedure names that you specify for the -qextern option are case-sensitive.
In general, this document uses the convention of lowercase for -q compiler options and suboptions and uppercase for @PROCESS directives. However, in the "Syntax" sections of this section and in the "Command-Line Option" column of the summary tables, we use uppercase letters in the names of -q options, suboptions, and @PROCESS directives to represent the minimum abbreviation for the keyword. For example, valid abbreviations for -qOPTimize are -qopt, -qopti, and so on.
Understanding the significance of the options you use and knowing the alternatives available can save you considerable time and effort in making your programs work correctly and efficiently.
The following options affect the compiler input at a high level. They determine which source files are processed and select case sensitivity, column sensitivity, and other global format issues.
Many of the options in Options for compatibility change the permitted input format slightly.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-Idir | Adds a directory to the search path for
include files and .mod files.
If XL Fortran calls cpp, this option adds a directory to the search
path for #include files. Before checking the default directories for include and .mod
files, the compiler checks each directory in the search path. For include files, this path is only used
if the file name in an INCLUDE line is not provided with an absolute path.
For #include files, refer to the cpp documentation for the details of the -I option.
Default: The following directories are searched, in the following order:
Also, /opt/ibmcmp/xlf/10.1/include is searched; include and .mod files that are shipped with the compiler are located here. |
-I option | |
-qci=numbers | CI(numbers) | Activates the specified INCLUDE lines.
Default:
No default value. |
-qci option |
-qcr -qnocr |
Allows you to control how the compiler interprets
the CR (carriage return) character. This allows you to compile code written
using a Mac OS or DOS/Windows editor.
Default:
-qcr |
-qcr option | |
-qdirective [=directive_list] -qnodirective [=directive_list] |
DIRECTIVE [(directive_list)] NODIRECTIVE [(directive_list)] |
Specifies sequences of characters, known as
trigger constants, that
identify comment
lines as compiler comment directives.
Default:
Comment lines beginning with IBM* are considered directives. If you specify -qsmp=omp, only $OMP is considered
to be a directive trigger. All other directive triggers are turned off unless
you explicitly turn them back on. If you specify -qsmp=noomp (noomp
is the default for -qsmp), IBMP, $OMP and SMP$ are
considered directive triggers, along with any other directive triggers that
are turned on (such as IBM* and IBMT). If you have also
specified -qthreaded, comment lines beginning with IBMT are
also considered directives. |
-qdirective option |
-qenum= value | Specifies the range of the enumerator constant and enables storage size to be determined. | -qenum option | |
-qfixed [=right_margin] |
FIXED [(right_margin)] |
Indicates that the input source program is
in fixed source form and optionally specifies the maximum line length.
Default:
-qfree=f90 for the f90, xlf90, xlf90_r, f95, xlf95,
and xlf95_r commands and -qfixed=72 for the xlf, xlf_r, and f77/fort77 commands. |
-qfixed option |
-qfree[={f90|ibm}] -k |
FREE[({F90| IBM})] |
Indicates that the source code is in free
form. The ibm and f90 suboptions specify compatibility with the free source
form defined for VS FORTRAN and Fortran 90/Fortran 95, respectively. -k and -qfree
are short forms for -qfree=f90.
Default:
-qfree=f90 for the f90, f95, xlf90, xlf90_r, xlf95,
and xlf95_r commands and -qfixed=72 for the xlf, xlf_r, and f77/fort77 commands. |
-qfree option |
-qmbcs -qnombcs |
MBCS NOMBCS |
Indicates to the compiler whether character literal
constants, Hollerith constants, H edit descriptors, and
character string edit descriptors can contain Multibyte
Character Set (MBCS) or Unicode characters.
Default:
-qnombcs |
-qmbcs option |
-U -qmixed -qnomixed |
MIXED NOMIXED |
Makes the compiler sensitive to the case
of letters in names.
Default:
-qnomixed |
-U option |
-qsuffix= {suboptions} | Specifies the source-file suffix on the command line. | -qsuffix option |
The following options specify names or directories where the compiler stores output files.
In the table, an * indicates that the option is processed by the ld command, rather than by the XL Fortran compiler; you can find more information about these options in the Linux information for the ld command.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-d | Leaves preprocessed source files produced
by cpp, instead of deleting them.
Default:
Temporary files produced by cpp are deleted. |
-d option | |
-o name* | Specifies a name for the output object, executable,
or assembler source file.
Default:
-o a.out |
-o option | |
-qmoddir=directory | Specifies the location for any module (.mod) files that the compiler writes.
Default:
.mod files are placed in the current directory. |
-qmoddir option |
The following options can help you to speed up the execution of your XL Fortran programs or to find areas of poor performance that can then be tuned. The most important such option is -O. In general, the other performance-related options work much better in combination with -O; some have no effect at all without -O.
Some of the options in Options for floating-point processing can also improve performance, but you must use them with care to avoid error conditions and incorrect results.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-O[level] -qoptimize[=level] -qnooptimize |
OPTimize[(level)] NOOPTimize |
Specifies whether code is optimized during
compilation and, if so, at which level (0, 2, 3, 4, or 5).
Default:
-qnooptimize |
-O option |
-p -pg |
Sets up the object file for profiling.
Default:
No profiling. |
-p option | |
-Q -Q! -Q+names -Q-names |
Specifies whether procedures are inlined and/or
particular procedures that should or should not be inlined.
names is a list of procedure names separated by colons.
Default:
No inlining. |
-Q option | |
-qalias= {[no]aryovrlp | [no]intptr| [no]pteovrlp| [no]std}...] |
ALIAS( {[NO]ARYOVRLP |[NO]INTPTR |[NO]PTEOVRLP |[NO]STD}... ) |
Indicates whether a program contains certain categories of aliasing.
The compiler limits the scope of some optimizations when
there is a possibility that different names are aliases for the
same storage locations.
Default:
-qalias=aryovrlp:nointptr:pteovrlp:std for the xlf95, xlf95_r, f90, and f95 commands; -qalias= aryovrlp:intptr:pteovrlp:std for
the xlf, xlf_r, f77, and fort77, commands. |
-qalias option |
-qalign={[no]4k| struct {=subopt}| bindc {=subopt}} |
ALIGN( {[NO]4K| STRUCT{(subopt)}| BINDC{(subopt)}}) | Specifies the alignment of data objects in storage, which avoids performance
problems with misaligned data. The [no]4k, bindc, and struct options can be
specified and are not mutually exclusive. The [no]4k option
is useful primarily in combination with logical volume I/O and disk striping.
Default:
-qalign=no4k:struct=natural:bindc=linuxppc |
-qalign option |
-qarch= architecture | Controls which instructions the compiler can generate. Changing
the default can improve performance but might produce code that can only be
run on specific machines.
The choices are
com, ppc, ppcgr, ppc64, ppc64gr, ppc64grsq, rs64b, rs64c, pwr3, pwr4, pwr5, pwr5x, ppc64v, and ppc970.
Default:
-qarch=ppc64grsq |
-qarch option | |
-qassert={deps | nodeps | itercnt=n} |
ASSERT(DEPS | NODEPS | ITERCNT(N)) |
Provides information about the characteristics
of the files that can help to fine-tune optimizations.
Default:
-qassert=deps:itercnt=1024 |
-qassert option |
-qcache={ auto | assoc=number | cost=cycles | level=level | line=bytes | size=Kbytes | type={C|c|D|d| I|i}}[:...] |
Specifies the cache configuration for a specific execution machine.
The compiler uses this information to tune program performance, especially
for loop operations that can be structured (or blocked) to process
only the amount of data that can fit into the data cache.
Default:
The compiler uses typical values based on the -qtune setting, the -qarch setting, or both settings. |
-qcache option | |
-qcompact -qnocompact |
COMPACT NOCOMPACT |
Reduces optimizations that increase code
size.
Default:
-qnocompact |
-qcompact option |
-qdirectstorage -qnodirectstorage |
Informs the compiler that a given compilation unit may reference write-through-enabled
or cache-inhibited storage. Use this option with discretion. It is intended
for programmers who know how the memory and cache blocks work, and how to
tune their applications for optimal performance.
Default:
-qnodirectstorage |
-qdirectstorage option | |
-qenablevmx -qnoenablevmx |
Enables the generation of Vector Multimedia eXtension (VMX) instructions.
Default:
-qenablevmx |
-qenablevmx option | |
-qessl |
Allows the use of Engineering and Scientific Subroutine Library (ESSL) routines in place of Fortran 90 Intrinsic Procedures. Use the ESSL Serial Library when linking with -lessl. Use the ESSL SMP Library when linking with -lesslsmp. Default:
-qnoessl |
-qessl Option | |
-qhot[=suboptions] -qnohot |
HOT[=suboptions] NOHOT |
Instructs the compiler to perform high-order loop analysis and transformations during
optimization.
Default:
-qnohot |
-qhot option |
-qinlglue | -qnoinlglue | This option inlines glue code that optimizes
external function calls in your application, when compiling at -q64 and -O2 and higher.
Default:
-qnoinlglue |
-qinlglue option | |
-qipa[=suboptions] | -qnoipa | Enhances -O optimization by doing
detailed analysis across procedures (interprocedural analysis or IPA).
Default:
-O analyzes each subprogram separately,
ruling out certain optimizations that apply across subprogram boundaries.
Note that specifying -O5 is equivalent to specifying -O4 and -qipa=level=2. |
-qipa option | |
-qkeepparm -qnokeepparm |
Ensures that incoming procedure parameters are stored on the stack
even when optimizing.
Default:
-qnokeepparm |
-qkeepparm option | |
-qmaxmem= Kbytes |
MAXMEM (Kbytes) |
Limits the amount of memory that the compiler
allocates while performing specific, memory-intensive
optimizations to the specified number of kilobytes.
A value of -1 allows optimization to take as much
memory as it needs without checking for limits.
Default:
-qmaxmem=8192; At -O3, -O4, and -O5, -qmaxmem=-1. |
-qmaxmem option |
-qpdf{1|2} | Tunes optimizations through profile-directed feedback (PDF), where
results from sample program execution are used to improve
optimization near conditional branches and in frequently executed
code sections.
Default:
Optimizations use fixed assumptions about branch frequency and other statistics. |
-qpdf option | |
-qprefetch | -qnoprefetch | Indicates whether or not the prefetch instructions
should be inserted automatically by the compiler.
Default:
-qprefetch |
-qprefetch option | |
-qshowpdf -qnoshowpdf |
Adds additional call and block count profiling information to an executable. This option is used together with the -qpdf1 option. Default:
-qnoshowpdf |
-qshowpdf option | |
-qsmallstack[= dynlenonheap | nodynlenonheap] -qnosmallstack |
Specifies that the compiler will minimize stack usage where possible. Default:
-qnosmallstack |
-qsmallstack option | |
-qsmp[=suboptions] -qnosmp |
When used with xlf_r, xlf90_r, or xlf95_r, controls automatic
parallelization of loops, user-directed parallelization of loops and other
items, and the choice of chunking algorithm.
Default:
-qnosmp |
-qsmp option | |
-NSbytes -qSPILLsize= bytes |
SPILLsize (bytes) |
Specifies the size of the register spill space.
Default:
-NS512 |
-NS option |
-qstacktemp={ 0 | -1 | positive_integer} |
STACKTEMP={ 0 | -1 | positive_integer} |
Determines where to allocate applicable XL Fortran compiler temporaries at run time. Default:
0 The compiler allocates applicable temporaries on the heap
or the stack at its discretion. |
-qstacktemp option |
-qstrict -qnostrict |
STRICT NOSTRICT |
Ensures that optimizations done by the -O3, -O4, and -O5 options do not alter the semantics of
a program.
Default:
With -O3 and higher levels of optimization in effect, code may be rearranged
so that results or exceptions are different from those in unoptimized programs. For -O2, the default is -qstrict. This option
is ignored for -qnoopt. |
-qstrict option |
-qstrict_induction -qnostrict_induction |
Prevents the compiler from performing induction (loop counter) variable optimizations. These optimizations may be unsafe (may alter the semantics of your program) when there are integer overflow operations involving the induction variables. Default:
-qnostrict_induction |
-qstrict_induction option | |
-qthreaded | Specifies that the compiler should generate thread-safe code. This is turned on by default for the xlf_r, xlf90_r, and xlf95_r commands. | -qthreaded option | |
-qtune= implementation |
Tunes instruction selection, scheduling,
and other implementation-dependent performance enhancements for a specific
implementation of a hardware architecture.
The following settings are valid: auto, rs64b, rs64c, pwr3, pwr4, pwr5, or ppc970.
Default:
-qtune=pwr4 |
-qtune option | |
-qunroll[=auto | yes] -qnounroll |
Specifies whether the compiler is allowed
to automatically unroll DO loops.
Default:
-qunroll=auto |
-qunroll option | |
-qunwind -qnounwind |
UNWIND NOUNWIND |
Specifies that the compiler
will preserve the default behavior for saves and restores to volatile registers
during a procedure call.
Default:
-qunwind |
-qunwind option |
-qzerosize -qnozerosize |
ZEROSIZE NOZEROSIZE |
Improves performance of FORTRAN 77 and some Fortran 90 and
Fortran 95 programs by preventing checking for zero-sized character strings
and arrays.
Default:
-qzerosize for
the xlf90, xlf90_r, xlf95, xlf95_r, f90, and f95 commands
and -qnozerosize for the xlf, xlf_r, f77, and fort77 commands (meaning these commands cannot be
used for programs that contain zero-sized objects). |
-qzerosize option |
The following options help you avoid, detect, and correct problems in your XL Fortran programs and can save you having to refer as frequently to Problem determination and debugging.
In particular, -qlanglvl helps detect portability problems early in the compilation process by warning of potential violations of the Fortran standards. These can be due to extensions in the program or due to compiler options that allow such extensions.
Other options, such as -C and -qflttrap, detect and/or prevent run-time errors in calculations, which could otherwise produce incorrect output.
Because these options require additional checking at compile time and some of them introduce run-time error checking that slows execution, you may need to experiment to find the right balance between extra checking and slower compilation and execution performance.
Using these options can help to minimize the amount of problem determination and debugging you have to do. Other options you may find useful while debugging include:
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-C -qcheck -qnocheck |
CHECK NOCHECK |
Checks each reference to an array element,
array section, or character substring for correctness. Out-of-bounds references
are reported as severe errors if found at compile time and generate SIGTRAP signals at run time.
Default:
-qnocheck |
-C option |
-D -qdlines -qnodlines |
DLINES NODLINES |
Specifies whether fixed source form lines
with a D in column 1 are compiled or treated as comments.
Default:
-qnodlines |
-D option |
-g -qdbg -qnodbg |
DBG NODBG |
Generates debug information for use by a
symbolic debugger.
Default:
-qnodbg |
-g option |
-qflttrap [=suboptions] -qnoflttrap |
FLTTRAP [(suboptions)] NOFLTTRAP |
Determines what types of floating-point exception conditions to detect at
run time. The program receives a SIGFPE signal when the corresponding
exception occurs.
Default:
-qnoflttrap |
-qflttrap option |
-qfullpath -qnofullpath |
Records the full, or absolute, path names
of source and include files in object files compiled with debugging information
(-g option).
Default:
The relative path names
of source files are recorded in the object files. |
-qfullpath option | |
-qhalt=sev | HALT(sev) | Stops before producing any object, executable,
or assembler source files if the maximum severity of compile-time messages
equals or exceeds the specified severity. severity is one of i, l,
w, e, s, u, or q, meaning informational, language, warning, error, severe
error, unrecoverable error, or a severity indicating "don't stop".
Default:
-qhalt=S |
-qhalt option |
-qinitauto[=hex_value] -qnoinitauto |
Initializes each byte or word (4 bytes) of
storage for automatic variables to a specific value, depending on the length
of the hex_value. This helps you to locate variables that are referenced
before being defined. For example, by using both the -qinitauto option
to initialize REAL variables with a signaling NAN value and the -qflttrap option,
it is possible to identify references to uninitialized REAL variables
at run time.
Default:
-qnoinitauto.
If you specify -qinitauto without a hex_value, the compiler
initializes the value of each byte of automatic storage to zero. |
-qinitauto option | |
-qlanglvl={ 77std | 90std | 90pure | 95std | 95pure | 2003std | 2003pure | extended} |
LANGLVL({ 77STD | 90STD | 90PURE | 95STD | 95PURE | 2003STD | 2003PURE | EXTENDED}) |
Determines which language standard (or superset, or subset of
a standard) to consult for nonconformance. It identifies nonconforming source
code and also options that allow such nonconformances.
Default:
-qlanglvl=extended |
-qlanglvl option |
-qlinedebug -qnolinedebug |
LINEDEBUG NOLINEDEBUG |
Generates line number and source file name information for the debugger.
Default:
-qnolinedebug |
-qlinedebug option |
-qOBJect -qNOOBJect |
OBJect NOOBJect |
Specifies whether to produce an object file
or to stop immediately after checking the syntax of the source files.
Default:
-qobject |
-qobject option |
-qsaa -qnosaa |
SAA NOSAA |
Checks for conformance to the SAA FORTRAN language definition.
It identifies nonconforming source code and also options that
allow such nonconformances.
Default:
-qnosaa |
-qsaa option |
-qsaveopt -qnosaveopt |
Saves the command-line options used for compiling
a source file in the corresponding object file.
Default:
-qnosaveopt |
-qsaveopt option | |
-qsigtrap[= trap_handler] |
Installs xl__trce or a predefined
or user-written trap handler in a main program.
Default:
No trap handler installed; program core dumps when a trap instruction
is executed. |
-qsigtrap option | |
-qtbtable={none | small | full} |
Only applies
to the 64-bit environment. Limits the amount of debugging traceback information
in object files, to reduce the size of the program.
Default:
Full traceback information in the object file when compiling non-optimized
(without -O) or for debugging (with -g). Otherwise, a small
amount of traceback information in the object file. |
-qtbtable option | |
-qwarn64 -qnowarn64 |
Detects the truncation of an 8-byte integer
pointer to 4 bytes. Identifies, through informational messsages, statements
that might cause problems during 32-bit to 64-bit migration.
Default:
-qnowarn64 |
-qwarn64 option | |
-qxflag=dvz |
Specifying -qxflag=dvz causes the compiler to generate
code to detect floating-point divide-by-zero operations.
Default:
No code is generated to detect floating-point divide-by-zero operations. |
-qxflag=dvz option | |
-qxlines -qnoxlines |
XLINES NOXLINES |
Specifies whether fixed source form lines
with a X in column 1 are treated as source code and compiled, or treated instead
as comments.
Default:
-qnoxlines |
-qxlines option |
The following options determine whether the compiler produces a listing (.lst file), what kinds of information go into the listing, and what the compiler does about any error conditions it detects.
Some of the options in Options for error checking and debugging can also produce compiler messages.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-# | Generates information on the progress of
the compilation without actually running the individual components.
Default:
No progress messages are produced. |
-# option | |
-qattr[=full] -qnoattr |
ATTR[(FULL)] NOATTR |
Specifies whether to produce the attribute
component of the attribute and cross-reference section of the listing.
Default:
-qnoattr |
-qattr option |
-qflag= listing_severity: terminal_severity -w |
FLAG (listing_severity, terminal_severity) |
Limits the diagnostic messages to those of
a specified level or higher. Only messages with severity listing_severity or higher are written to the listing file. Only messages with severity terminal_severity or higher are written to the terminal. -w is a short
form for -qflag=e:e.
Default:
-qflag=i:i |
-qflag option |
-qlist[={[no]offset}] -qnolist |
LIST[([NO]OFFSET)] NOLIST |
Specifies whether to produce the object section
of the listing.
Default:
-qnolist |
-qlist option |
-qlistopt -qnolistopt |
LISTOPT NOLISTOPT |
Determines whether to show the setting of every compiler
option in the listing file or only selected options. These selected options include those
specified on the command line or directives plus some that
are always put in the listing.
Default:
-qnolistopt |
-qlistopt option |
-qnoprint | Prevents the listing file from being created,
regardless of the settings of other listing options.
Default:
A listing is produced if you specify
any of -qattr, -qlist, -qlistopt, -qphsinfo, -qreport, -qsource, or -qxref. |
-qnoprint option | |
-qphsinfo -qnophsinfo |
PHSINFO NOPHSINFO |
Determines whether timing information is
displayed on the terminal for each compiler phase.
Default:
-qnophsinfo |
-qphsinfo option |
-qreport[={smplist | hotlist}...] -qnoreport |
REPORT [({SMPLIST | HOTLIST}...)] NOREPORT |
Determines whether to produce transformation reports showing how the program is parallelized and how loops
are optimized.
Default:
-qnoreport |
-qreport option |
-qsource -qnosource |
SOURCE NOSOURCE |
Determines whether to produce the source
section of the listing.
Default:
-qnosource |
-qsource option |
-qsuppress [= nnnn-mmm[:nnnn-mmm...] | cmpmsg] | -qnosuppress |
Specifies which messages to suppress from the output stream. | -qsuppress option | |
-qversion -qnoversion |
Displays the version and
release of the compiler being invoked.
Default:
-qnoversion |
-qversion option | |
-qxref -qnoxref -qxref=full |
XREF NOXREF XREF(FULL) |
Determines whether to produce the cross-reference
component of the attribute and cross-reference section of the listing.
Default:
-qnoxref |
-qxref option |
-S | Produces one or more .s files showing
equivalent assembler source for each Fortran source file.
Default:
No equivalent assembler source is produced. |
-S option | |
-v | Traces the progress of the compilation by
displaying the name and parameters of each compiler component that is executed
by the invocation command.
Default:
No progress
messages are produced. |
-v option | |
-V | Traces the progress of the compilation by
displaying the name and parameters of each compiler component that is executed
by the invocation command. These are displayed in a shell-executable format.
Default:
No progress messages are produced. |
-V option |
The following options help you maintain compatibility between your XL Fortran source code on past, current, and future hardware platforms or help you port programs to XL Fortran with a minimum of changes.
The -qfree=ibm form of the -qfree option also provides compatibility with VS FORTRAN free source form.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-qautodbl=setting | AUTODBL(setting) | Provides an automatic means of converting single-precision
floating-point calculations to double-precision and of
converting double-precision calculations to extended-precision.
Use one of the following settings:
none, dbl, dbl4, dbl8, dblpad, dblpad4, or dblpad8.
Default:
-qautodbl=none |
-qautodbl option |
-qbigdata -qnobigdata |
In 32-bit mode, use this option for programs
that exceed 16MB of initialized data (a gcc limitation) and call routines
in shared libraries (like open, close, printf and so on).
Default:
-qnobigdata |
-qminimaltoc option | |
-qcclines -qnocclines |
CCLINES NOCCLINES |
Determines whether the compiler recognizes
conditional compilation lines.
Default:
-qcclines if you have specified the -qsmp=omp option;
otherwise, -qnocclines. |
-qcclines option |
-qctyplss [=([no]arg)] -qnoctyplss |
CTYPLSS [([NO]ARG)] NOCTYPLSS |
Specifies whether character constant expressions
are allowed wherever typeless constants may be used. This language extension
might be needed when you are porting programs from other platforms. Suboption arg specifies that Hollerith constants used as actual arguments will
be treated as integer actual arguments.
Default:
-qnoctyplss |
-qctyplss option |
-qddim -qnoddim |
DDIM NODDIM |
Specifies that the bounds of pointee arrays are re-evaluated each
time the arrays are referenced and removes some restrictions on
the bounds expressions for pointee arrays.
Default:
-qnoddim |
-qddim option |
-qdpc -qdpc=e -qnodpc |
DPC DPC(E) NODPC |
Increases the precision of real constants, for maximum accuracy when assigning
real constants to DOUBLE PRECISION variables.
This language extension might be needed when you are porting
programs from other platforms.
Default:
-qnodpc |
-qdpc option |
-qescape -qnoescape |
ESCAPE NOESCAPE |
Specifies how the backslash is treated in character
strings, Hollerith constants, H edit descriptors, and
character string edit descriptors.
It can be treated as an escape character or as a backslash
character.
This language extension might be needed when you are porting
programs from other platforms.
Default:
-qescape |
-qescape option |
-qextern=names | Allows user-written procedures to be called instead of XL Fortran intrinsics. names is a list of procedure names separated by colons. The procedure
names are treated as if they appear in an EXTERNAL statement
in each compilation unit being compiled. If any of your procedure names conflict
with XL Fortran intrinsic procedures, use this option to call the procedures
in the source code instead of the intrinsic ones.
Default:
Names of intrinsic procedures override user-written procedure names when they
are the same. |
-qextern option | |
-qextname[=name:name...] -qnoextname |
EXTNAME[(name:name...)] NOEXTNAME |
Adds an underscore to the names of all global
entities, which helps in porting programs from systems where this is a convention
for mixed-language programs.
Default:
-qnoextname |
-qextname option |
-qinit=f90ptr | INIT(f90ptr) | Makes the initial association status of pointers
disassociated.
Default:
The default association
status of pointers is undefined. |
-qinit option |
-qintlog -qnointlog |
INTLOG NOINTLOG |
Specifies that you can mix integer and logical
values in expressions and statements.
Default:
-qnointlog |
-qintlog option |
-qintsize=bytes | INTSIZE(bytes) | Sets the size of default INTEGER and LOGICAL values.
Default:
-qintsize=4 |
-qintsize option |
-qlog4 -qnolog4 |
LOG4 NOLOG4 |
Specifies whether the result of a logical operation
with logical operands is a LOGICAL(4) or is
a LOGICAL with the maximum length of the operands.
Default:
-qnolog4 |
-qlog4 option |
-qminimaltoc -qnominimaltoc |
Ensures that the compiler creates only one
TOC entry for each compilation unit. By default, the compiler will allocate
at least one TOC entry for each unique non-automatic variable reference in
your program. Only 8192 TOC entries are available, and duplicate entries
are not discarded. This can cause errors when linking large programs in 64-bit
mode if your program exceeds 8192 TOC entries.
Default:
-qnominimaltoc |
-qminimaltoc option | |
-qmodule=mangle81 |
Specifies that the compiler should use the XL Fortran Version
8.1 naming convention for non-intrinsic module files.
Default:
The compiler uses the current naming convention for non-intrinsic module names. This convention is not compatible with that used by previous
versions of the compiler. |
-qmodule option | |
-qnullterm -qnonullterm |
NULLTERM NONULLTERM |
Appends a null character to each character constant expression
that is passed as a dummy argument, to make it more convenient
to pass strings to C functions.
Default:
-qnonullterm |
-qnullterm option |
-1 -qonetrip -qnoonetrip |
ONETRIP NOONETRIP |
Executes each DO loop
in the compiled program at least once if its DO
statement is executed, even if the iteration count is 0.
Default:
-qnoonetrip |
-1 option |
-qport [=suboptions] -qnoport |
PORT [(suboptions)] NOPORT |
Increases flexibility when porting programs to XL Fortran by
providing a number of options to accommodate other Fortran language extensions.
Default:
-qnoport |
-qport option |
-qposition= {appendold | appendunknown} |
POSITION( {APPENDOLD | APPENDUNKNOWN}) |
Positions the file pointer at the end of the file
when data is written after an
OPEN statement with no POSITION= specifier
and the corresponding STATUS= value
(OLD or UNKNOWN) is specified.
Default:
Depends on the I/O specifiers in the OPEN statement and on the compiler
invocation command: -qposition=appendold for the xlf, xlf_r, and f77/fort77 commands and the defined Fortran 90 and
Fortran 95 behaviors for the xlf90, xlf90_r, xlf95, xlf95_r, f90, and f95 commands. |
-qposition option |
-qqcount -qnoqcount |
QCOUNT NOQCOUNT |
Accepts the Q character-count edit
descriptor (Q) as well as the extended-precision Q edit
descriptor (Qw.d). With -qnoqcount, all Q edit descriptors are interpreted as the extended-precision Q edit
descriptor.
Default:
-qnoqcount |
-qqcount option |
-qoldmod=compat | This option specifies that object files containing module data compiled with versions of XL Fortran earlier than V9.1.1 either do not contain uninitialized module data or were ported using the convert_syms script. | -qoldmod option | |
-qrealsize=bytes | REALSIZE(bytes) | Sets the default size of REAL,
DOUBLE PRECISION, COMPLEX, and
DOUBLE COMPLEX values.
Default:
-qrealsize=4 |
-qrealsize option |
-qsave[={all | defaultinit}] -qnosave |
SAVE{(ALL | DEFAULTINIT)} NOSAVE |
Specifies the default storage class for local
variables. -qsave, -qsave=all, or -qsave=defaultinit sets the default storage class to STATIC, while -qnosave sets it to AUTOMATIC.
Default:
-qnosave
-qsave is turned on by default for xlf, xlf_r, f77, or fort77 to duplicate the behavior of FORTRAN77 commands. |
-qsave option |
-qsclk=[centi | micro ] | Specifies that when returning a value using the SYSTEM_CLOCK intrinsic procedure, the compiler will use centisecond resolution.
You can specify a microsecond resolution by using -qsclk=micro.
Default: -qsclk=centi |
-qsclk option | |
-qswapomp -qnoswapomp |
SWAPOMP NOSWAPOMP |
Specifies that the compiler should recognize and substitute
OpenMP routines in XL Fortran programs.
Default:
-qswapomp |
-qswapomp option |
-u -qundef -qnoundef |
UNDEF NOUNDEF |
Specifies whether implicit typing of variable
names is permitted. -u and -qundef have the same effect as the IMPLICIT
NONE statement that appears in each scope that allows implicit statements.
Default:
-qnoundef |
-u option |
-qxflag=oldtab | XFLAG(OLDTAB) | Interprets a tab in columns 1 to 5 as a single character (for fixed source form
programs).
Default:
Tab is interpreted as one or more characters. |
-qxflag=oldtab option |
-qxlf77=settings | XLF77(settings) | Provides compatibility with FORTRAN 77 aspects of language semantics and I/O data format that have changed.
Most of these changes are required by the Fortran 90 standard.
Default:
Default suboptions are blankpad, nogedit77, nointarg, nointxor, leadzero,
nooldboz, nopersistent, and nosofteof for the xlf90, xlf90_r, xlf95, xlf95_r, f90, and f95 commands and are the exact opposite for the xlf, xlf_r, and f77/fort77 commands. |
-qxlf77 option |
-qxlf90= {[no]signedzero | [no]autodealloc} |
XLF90( {[no]signedzero | [no]autodealloc}) |
Determines whether the compiler provides
the Fortran 90 or the Fortran 95 level of support for certain aspects of the
language.
Default:
The default suboptions are signedzero and autodealloc for the xlf95, xlf95_r, and f95 invocation
commands. For all other invocation commands, the default suboptions are nosignedzero and noautodealloc. |
-qxlf90 option |
To take maximum advantage of the system floating-point performance and precision, you may need to specify details of how the compiler and XLF-compiled programs perform floating-point calculations.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-qfloat=options | FLOAT(options) | Determines how the compiler generates or
optimizes code to handle particular types of floating-point calculations.
Default:
Default suboptions are nocomplexgcc, nofltint, fold, nohsflt, maf, nonans, norrm, norsqrt, and nostrictnmaf; some of these settings are different with -O3 optimization
turned on or with -qarch=ppc. |
-qfloat option |
-qieee={ Near | Minus | Plus | Zero} -y{n|m|p|z} |
IEEE({Near | Minus | Plus | Zero}) |
Specifies the rounding mode for the compiler to use
when evaluating constant
floating-point expressions at compile time.
Default:
-qieee=near |
-qieee option |
-qstrictieeemod -qnostrictieeemod |
STRICTIEEE- MOD NOSTRICTIEEE- MOD |
Specifies whether the compiler will adhere to the Fortran 2003 IEEE arithmetic rules for the ieee_arithmetic and ieee_exceptions intrinsic modules.
Default:
-qstrictieeemod |
-qstrictieeemod option |
The following options control the way the ld command processes object files during compilation. Some of these options are passed on to ld and are not processed by the compiler at all.
You can actually include ld options on the compiler command line, because the compiler passes unrecognized options on to the linker.
In the table, an * indicates that the option is processed by the ld command, rather than the XL Fortran compiler; you can find more information about these options in the man pages for the ld command.
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-c | Produces an object file instead of an executable
file.
Default:
Compile and link-edit, producing
an executable file. |
-c option | |
-Ldir* | Looks in the specified directory for libraries
specified by the -l option.
Default:
/usr/lib |
-L option | |
-lkey* | Searches the specified library file, where key selects the file libkey.so or libkey.a.
Default:
Libraries listed in xlf.cfg. |
-l option | |
-qpic -qnopic |
Generates Position Independent Code (PIC)
that can be used in shared libraries.
Default:
-qnopic in 32-bit mode; -qpic=small in
64-bit mode. |
-qpic option |
These options can help to do the following:
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-Bprefix | Determines a substitute path name for executable
files used during compilation, such as the compiler or linker. It can be
used in combination with the -t option, which determines which of
these components are affected by -B.
Default:
Paths for these components are defined in the configuration file,
the $PATH environment variable, or both. |
-B option | |
-Fconfig_file -Fconfig_file: stanza -F:stanza |
Specifies an alternative configuration file,
the stanza to use within the configuration file, or both.
Default:
The configuration file is /etc/opt/ibmcmp/xlf/10.1/xlf.cfg, and the stanza depends on the name
of the command that executes the compiler. |
-F option | |
-q32 | Sets the bit mode and instruction set for a 32-bit target architecture. | -q32 option | |
-q64 | Sets the bit mode and instruction set for a 64-bit target architecture. | -q64 option | |
-tcomponents | Applies the prefix specified by the -B option
to the designated components. components can be one or more of F, c, d, I, a, h, b, z, or l, with no separators, corresponding to the C preprocessor, the compiler, the -S disassembler, the interprocedural analysis (IPA)
tool, the assembler, the loop optimizer, the code generator, the binder, and the linker, respectively.
Default:
-B prefix, if any, applies to all components. |
-t option | |
-Wcomponent,options | Passes the listed options to a component
that is executed during compilation. component is F, c, d, I, a, z, or l, corresponding to the C preprocessor, the compiler, the -S disassembler, the interprocedural analysis (IPA) tool, the assembler,
the binder, and the linker, respectively.
Default:
The options passed to these programs are as follows:
|
-W option |
The following options are obsolete for either or both of the following reasons:
Command-Line Option | @PROCESS Directive | Description | See Topic |
---|---|---|---|
-qcharlen= length |
CHARLEN (length) |
Obsolete. It is still accepted, but it has no effect. The maximum length for character constants and subobjects of constants is 32 767 bytes (32 KB). The maximum length for character variables is 268 435 456 bytes (256 MB) in 32-bit mode. The maximum length for character variables is 2**40 bytes in 64-bit mode. These limits are always in effect and are intended to be high enough to avoid portability problems with programs that contain long strings. | |
-qrecur -qnorecur |
RECUR NORECUR |
Not recommended. Specifies whether external
subprograms may be called recursively.
For new programs, use the RECURSIVE keyword, which provides a standard-conforming way of using recursive procedures. If you specify the -qrecur option, the compiler must assume that any procedure could be recursive. Code generation for recursive procedures may be less efficient. Using the RECURSIVE keyword allows you to specify exactly which procedures are recursive. |
-qrecur option |