- -132
- Increase the length of each fixed source form input line from 72 characters to
132 characters.
This has no effect on free source form input.
- -abi=abi
- (Linux x86-64 only)
Specify the ABI to compile for, either 32 (the 32-bit ABI),
or one of the 64-bit ABIs: 64c or 64t.
The differences between the two 64-bit ABIs are as follows:
ABI | Object size represented in | Character length represented in |
-abi=64t | 64 bits | 32 bits |
-abi=64c | 64 bits | 64 bits |
Programs compiled with -abi=32 will run on any x86 Linux system;
those compiled with any 64-bit ABI will only run on a 64-bit kernel.
The default is -abi=64t.
The -abi=64c option is compatible with the ABI used by Intel
Fortran.
- -abi=abi
- (Windows only)
Specify the ABI to compile for, either 32 (the 32-bit ABI)
or 64 (the 64-bit ABI).
The default is -abi=64 on Windows x64;
on 32-bit Windows the default is -abi=32 and the
-abi=64 option is not available.
- -align=alignment
- (MacOS only)
Specify the alignment of variables and components, which must be one of:
natural |
(natural alignment for best performance;
this can alter the interpretation of COMMON block or SEQUENCE
type layout in a non-standard-conforming manner), or
|
standard |
(use standard-conforming alignment;
this is the default).
|
The whole program should be compiled with the same alignment option.
- -Bbinding
- Specify static or dynamic binding.
This only has effect if specified during the link phase.
The default is dynamic binding.
On SPARC and SG/Irix, these options are positional and can be used to
selectively bind some libraries statically and some dynamically.
This option is not available on IBM z9 Open Edition.
- -c
- Compile only (produce .o file for each source file), do not link the .o files
to produce an executable file.
This option is equivalent to -otype=obj.
- -C
- Compile with all but the most expensive runtime checks; this omits the
-C=alias, -C=dangling, -C=intovf
and -C=undefined options.
- -C=check
- Compile checking code according to the value of check,
which must be one of:
alias | (check for assignments to aliased dummy arguments), |
all | (perform all checks except for -C=undefined), |
array | (check array bounds), |
bits | (check bit intrinsic arguments), |
calls | (check procedure references), |
dangling | (check for dangling pointers), |
do | (check DO loops for zero step values and |
| illicit modification of the index variable via host association), |
intovf | (check for integer overflow), |
none | (do no checking: this is the default), |
present | (check OPTIONAL references), |
pointer | (check POINTER references), |
recursion | (check for invalid recursion) or |
undefined | (check for undefined variables). |
The -C=alias option will produce a runtime error when it is
detected that assignment to a dummy argument affects another dummy argument.
At this release this is only detected for scalar dummy arguments.
The -C=dangling option will produce a runtime error when a
dangling pointer is used; additionally, if the runtime option
‘show_dangling’ is set, a warning will be produced at the time the
pointer becomes dangling (see Runtime Environment Variables for
further information).
The -C=undefined option is subject to a number of limitations;
in particular, it is not binary compatible with Fortran code compiled without
that option, and is not compatible with calling C code via a BIND(C)
interface.
See the Undefined Variable Detection section for further details.
- -coarray
- This option is short for -coarray=cosmp.
- -coarray=mode
- Set the coarray operation mode to mode, which must be single
for Single Image mode, or cosmp for Co-SMP mode; the option is not case-sensitive.
The default is -coarray=single.
In Single Image mode (-coarray=single), all coarray syntax is accepted, but
execution will not be in parallel: only a single image is supported.
In Co-SMP mode (-coarray=cosmp), parallel execution of multiple images on
an SMP machine is supported.
The maximum number of images in this mode is 1000.
If the -num_images=N option is used, the default number of
images to execute is N; with -num_images=auto, the default
number of images is the number of hardware threads available on the processor.
Note that the number of images may exceed the number of hardware threads, but doing so will only
improve performance if images spend a lot of time waiting (e.g. for synchronisation or input/output).
The -num_images= option may be overridden by the runtime environment variable
NAGFORTRAN_NUM_IMAGES
.
Code that uses any coarray features (coarray syntax or image control statements)
or that has any common blocks or global (saved or initialised) variables,
and that is compiled with -coarray=single, must never
be executed in Co-SMP mode, as it will not work correctly.
Code that avoids those features, and which is intended to work both in Co-SMP mode and single image mode,
should be compiled with the -thread_safe option.
The -coarray=cosmp option cannot be used at the same time as -gline or -openmp.
The -coarray=cosmp option may be specified with the -C=undefined option, but it
will automatically disable the latter option.
- -colour
- Colour the message output from the compiler using ANSI escape sequences and the
default foreground colouring scheme which is: red for error messages (including
fatal errors), blue for warning messages and green for information messages.
- -colour=scheme
- Colour the message output from the compiler according to the specified
scheme.
This is a comma-separated list of colour specifications, each consisting of a
message category name (“error”, “warn” or “info”) followed
by a colon and the foreground colour name, optionally followed by a plus sign
and the background colour name.
The colouring for unspecified categories will be the default.
Colours are: black, red, green, yellow, blue, magenta, cyan and white.
E.g. -colour=error:red+blue,warn:cyan,info:magenta+yellow
would be a rather garish colour scheme.
- -compatible
- Make external linkages compatible with other compilers where possible;
on Windows this is Microsoft Fortran (32-bit mode) or Intel Fortran (64-bit mode),
on MacOS and Linux this is g77, g95 and gfortran, and on other systems this is
the operating system vendor's compiler.
This affects the naming convention and procedure calling convention (for
example, on Windows it causes use of the “STDCALL” calling convention
that is commonly used for most DLLs, and the names are in upper case with no
added trailing underscore).
On Windows in 64-bit mode, -compatible is always in effect.
- -convert=format
- Set the default conversion mode for unformatted files to format.
This format may be overridden by an explicit
CONVERT=
specifier in the
OPEN
statement, or by the environment variable FORT_CONVERT
n
(where n is the unit number).
The value of format must be one of the following (not case-sensitive):
Format | Description |
BIG_ENDIAN | synonym for BIG_IEEE |
BIG_IEEE_DD | big-endian with IEEE floating-point, quad precision is double-double |
BIG_IEEE | big-endian with IEEE floating-point, including quad precision |
BIG_NATIVE | big-endian with native floating-point format |
LITTLE_ENDIAN | synonym for LITTLE_IEEE |
LITTLE_IEEE_DD | little-endian with IEEE floating-point, quad precision is double-double |
LITTLE_IEEE | little-endian with IEEE floating-point, including quad precision |
LITTLE_NATIVE | little-endian with native floating-point format |
NATIVE | no conversion (the default) |
- -Dname
- Defines name to fpp as a preprocessor variable.
This only affects files that are being preprocessed by fpp.
- -d_lines
- In fixed form only, accept lines beginning with “D” as normal Fortran statements,
replacing the D with a space.
Without this option, such lines are treated as comments.
- -dcfuns
- Enable recognition of non-standard double precision complex intrinsic
functions. These act as specific versions of the standard generic intrinsics
as follows:
Non-standard | Equivalent Standard Fortran Generic Intrinsic Function |
CDABS(A) | ABS(A) |
DCMPLX(X,Y) | CMPLX(X,Y,KIND=KIND(0d0)) |
DCONJG(Z) | CONJG(Z) |
DIMAG(Z) | AIMAG(Z) |
DREAL(Z) | REAL(Z) or DBLE(Z) |
- -double
- Double the size of default
INTEGER
, LOGICAL
, REAL
and
COMPLEX
.
Entities specified with explicit kind numbers or byte lengths are unaffected.
If quadruple precision REAL
is available, the size of
DOUBLE PRECISION
is also doubled.
- -dryrun
- Show but do not execute commands constructed by the compiler driver.
- -dusty
- Allows the compilation and execution of “legacy” software by downgrading
the category of common errors found in such software from “Error” to
“Warning”
(which may then be suppressed entirely with the -w option).
This option disables -C=calls,
and also enables Hollerith i/o (see the -hollerith_io option).
- -encoding=charset
- Specifies that the encoding system of the Fortran source files is charset,
which must be one of ISO_Latin_1, Shift_JIS or UTF_8.
If this option is not specified, the default encoding is UTF-8 for Fortran
source files that begin with a UTF-8 Byte Order Mark, and ISO Latin-1 (if the
language setting is English) or Shift-JIS (if the language setting is Japanese)
for other Fortran source files.
- -english
- Produce compiler messages in English (default).
- -F
- Preprocess only, do not compile.
Each file that is preprocessed will produce an output file of the same name
with the suffix replaced by
.f
, .f90
or .f95
according to the suffix of the input file.
This option is equivalent to -otype=Fortran.
- -f90_sign
- Use the Fortran 77/90 version of the
SIGN
intrinsic instead of the
Fortran 95 one (they differ in the treatment of negative zero).
- -f95
- Specify that the base language is Fortran 95.
This only affects extension message generation (Fortran 2003 and 2008 features
will be reported as extensions).
- -f2003
- Specify that the base language is Fortran 2003.
This only affects extension message generation (Fortran 2008 features
will be reported as extensions).
- -f2008
- Specify that the base language is Fortran 2008.
This is the default.
- -f2018
- Specify that the base language is Fortran 2018.
This implies the -recursive option.
- -fixed
- Interpret all Fortran source files according to fixed-form rules.
- -float-store
- (Gnu C based systems only)
Do not store floating-point variables in registers
on machines with floating-point registers wider than 64 bits. This can
avoid problems with excess precision.
- -fpp
- Preprocess the source files using fpp even if the suffix would normally
indicate an ordinary Fortran file.
- -framework f
- (MacOS only)
Use framework f during linking.
- -free
- Interpret all Fortran source files according to free-form rules.
- -g
- Produce information for interactive debugging by the host system debugger.
- -g90
- Produce debugging information for dbx90, a Fortran 90 aware front-end to the
host system debugger.
This produces a debug information (.g90) file for each Fortran source file.
This option must be specified for both compilation and linking.
- -gc
- Enables automatic garbage collection of the executable program.
This option must be specified for both compilation and linking,
and is unavailable on IBM z9 OpenEdition, MacOS, and Windows.
It is incompatible with the -thread_safe and
-mtrace options.
For more details see the
Automatic Garbage Collection
section.
- -gline
- Compile code to produce a traceback when a runtime error message is generated.
Only routines compiled with this option will appear in such a traceback.
This option increases both executable file size and execution time.
It is incompatible with the -thread_safe,
-openmp and -coarray=cosmp options.
For example:
Runtime Error: Invalid input for real editing
Program terminated by I/O error on unit 5 (Input_Unit,Formatted,Sequential)
main.f90, line 28: Error occurred in READ_DATA
main.f90, line 57: Called by READ_COORDS
main.f90, line 40: Called by INITIAL
main.f90, line 13: Called by $main$
- -help
- Display a one-line summary of the options available for the current mode
(=compiler, =callgraph,
=depend, =epolish, =interfaces,
=polish or =unifyprecision).
- -hollerith_io
- Enable Fortran-66 compatible input/output of character data stored in numeric
variables using the
A
edit descriptor.
This was superseded by the CHARACTER
datatype in Fortran 77.
- -I pathname
- Add pathname to the list of directories which are to be searched for
module information (
.mod
) files and INCLUDE
files.
The current working directory is always searched first, then any directories
named in -I options, then the compiler's library directory
(see the -Qpath option).
- -i8
- Set the size of default
INTEGER
and LOGICAL
to 64 bits.
This can be useful for switching between libraries that have 32-bit integer
arguments (on one platform) and 64-bit integer arguments (on another platform),
but which do not provide a named constant with the necessary KIND
value.
This has no effect on default REAL
and COMPLEX
sizes, so the
compiler is not standard-conforming in this mode.
- -indirect file
- Read the contents of file as additional arguments to the compiler driver.
This option may also be given by “@file”; note in this case there
is no space between the ‘@’ and the file name.
In an indirect file, arguments may be given on separate lines; on a single
line, multiple arguments may be separated by blanks.
A blank can be included in an option or file name by putting the whole option
or file name in quotes ("
); this is the only quoting mechanism.
An indirect file may reference other indirect files.
- -ieee=mode
- Set the mode of IEEE arithmetic operation according to mode,
which must be one of full, nonstd or stop.
- full
- enables all IEEE arithmetic facilities including non-stop arithmetic.
- nonstd
- Disables non-stop arithmetic, terminating execution on floating
overflow, division by zero or invalid operand.
If the hardware supports it, this also disables IEEE gradual underflow,
producing zero instead of a denormalised number; this can improve performance
on some systems.
- stop
- enables all IEEE arithmetic facilities except for non-stop arithmetic;
execution will be terminated on floating overflow, division by zero or
invalid operand.
The -ieee option must be specified when compiling the main
program unit, and its effect is global.
The default mode is -ieee=stop.
For more details see the
IEEE 754 Arithmetic Support
section.
This option is not available on IBM z9 Open Edition with hexadecimal
floating point.
- -info
- Request output of information messages, both “Info” and “Remark” (the least important).
The default is to suppress these messages.
- -kind=option
- Specify the kind numbering system to be used; option must be one of
byte, sequential or unique.
For -kind=byte, the kind numbers for INTEGER
,
REAL
and LOGICAL
will match the number of bytes of storage (e.g.,
default REAL
is 4 and DOUBLE PRECISION
is 8).
Note that COMPLEX
kind numbers are the same as its REAL
components, and thus half of the total byte length in the entity.
For -kind=sequential (the default),
the kind numbers for all datatypes are numbered sequentially from 1,
increasing with precision (e.g., default REAL
is 1 and
DOUBLE PRECISION
is 2).
For -kind=unique, the kind numbers are unique across all
data types, so that a kind number for one data type cannot be accidentally
used for another data type (except that COMPLEX
and REAL
are
still the same).
These kind numbers are all greater than 100 so do not match byte sizes either.
This option does not affect the interpretation of byte-length specifiers (an
extension to Fortran 77).
- -lx
- Link with library libx.a.
The linker will search for this library in the directories specified by
-Ldir
options followed by the normal system directories (see the ld(1) command).
- -Ldir
- Add dir
to the list of directories for library files (see the ld(1) command).
- -M
- Produce module information files (
.mod
files) only.
This option is equivalent to -otype=mod.
- -max_internal_proc_instances=N
- Set the maximum number of simultaneously active host instances of an internal
procedure that is being passed as an actual argument, or assigned to a
procedure pointer, to N.
The default maximum is normally 30, and increased to 160 if either the
-openmp or -thread_safe options are used.
- -max_parameter_size=N
- Set the maximum size of a
PARAMETER
to N MB (megabytes).
N must be in the range 1 to 1048576 (1MB to 1TB);
the default is 50 MB.
- -maxcontin=N
- Increase the limit on the number of continuation lines from 255 to N.
This option will not decrease the limit below the standard number.
- -mdir dir
- Write any module information (
.mod
) files to directory dir
instead of the current working directory.
- -message_encoding=charset
- Set the encoding scheme for compiler messages to charset, which must be
one of ISO_Latin_1, Shift_JIS or UTF_8 (not case-sensitive).
The -message_encoding=ISO_Latin_1 option is incompatible with
the -nihongo option.
The default message encoding is Shift_JIS on Windows and UTF_8 on other systems.
- -mismatch
- Downgrade consistency checking of procedure argument lists so that mismatches
produce warning messages instead of error messages.
This only affects calls to a routine which is not in the current file; calls
to a routine in the file being compiled must still be correct.
This option disables -C=calls.
- -mismatch_all
- Further downgrade consistency checking of procedure argument lists so that
calls to routines in the same file which are incorrect will produce warnings
instead of error messages.
This option disables -C=calls.
- -mtrace
- Trace memory allocation and deallocation. This option is a synonym for
-mtrace=on.
- -mtrace=trace_opt_list
- Trace memory allocation and deallocation according to the value of
trace_opt_list,
which must be a comma separated list of one or more of:
address |
(display addresses),
|
all |
(all options except for off),
|
line |
(display file/line info if known),
|
off |
(disable tracing output),
|
on |
(enable tracing output),
|
paranoia |
(protect memory allocator data structures against the user program),
|
size |
(display size in bytes) or
|
verbose |
(all options except for off
and paranoia
).
|
This option should be specified during both compilation and linking, and is
incompatible with the -gc option.
For more details see the
Memory Tracing
section.
The -mtrace=paranoia option is not available on IBM z9
Open Edition.
- -nan
- Initialise
REAL
and COMPLEX
variables to IEEE Signalling NaN,
causing a runtime crash if the values are used before being set.
This affects local variables, module variables, and INTENT(OUT)
dummy
arguments only; it does not affect variables in COMMON
or
EQUIVALENCE
.
This option is not available on IBM z9 Open Edition with hexadecimal
floating point.
- -nihongo
- Produce compiler messages in Japanese (if necessary, the encoding can be
changed by the -message_encoding= option).
This option is not available on IBM z9 Open Edition.
- -no_underflow_warning
- Suppress the warning message that normally appears if a floating-point
underflow occurred during execution.
This option is only effective if specified when compiling the main program.
- -nocheck_modtime
- Do not check for
.mod
files being out of date.
- -nomod
- Suppress module information (
.mod
) file production.
Combining this with -M will produce no output (other than
error and warning messages) at all, equivalent to -otype=none.
- -noqueue
- If no licence for the compiler is immediately available, exit with an error
instead of queueing for it.
- -num_images=N
- Set the expected number of images the program will run with to N, which
should be a number in the range 1 to 1000, ‘auto’, or ‘unknown’.
In Single Image mode (-coarray=single), the only affect is on analysis of
constant cosubscripts: if N is numeric, and
they evaluate to an image index greater than N, an error will be produced.
The effect of -num_images=unknown (or -num_images=auto)
is to suppress such analysis.
In CoSMP mode (-coarray=cosmp), the effect is to specify the default
number of images at execution time; this may be overridden by the runtime
environment variable NAGFORTRAN_NUM_IMAGES
.
The effect of -num_images=auto (or -num_images=unknown)
is to set the default number of images to the number of hardware threads
on the processor.
This option takes effect when compiling the main program.
The default in -coarray=single mode is -num_images=1,
and the default in -coarray=smp mode is -num_images=auto.
- -o output
- Name the output file output instead of the default.
If an executable is being produced the default is
a.out
;
otherwise it is file.o with the -c option, file.c with
the -S option, and file.f, file.f90 or file.f95 with
the -F option, where file is the base part of the source file (i.e.
with the suffix removed).
- -O
- Normal optimisation, equivalent to -O2.
- -ON
- Set the optimisation level to N.
The optimisation levels are:
- -O0
- No optimisation. This is the default, and is recommended when debugging.
- -O1
- Minimal quick optimisation.
- -O2
- Normal optimisation.
- -O3
- Further optimisation.
- -O4
- Maximal optimisation.
- -Oassumed
- This is a synonym for -Oassumed=contig.
- -Oassumed=shape
- Optimises assumed-shape array dummy arguments according to the value of
shape,
which must be one of
- always_contig
- Optimised for contiguous actual arguments.
If the actual argument is not contiguous a runtime error will occur
(the compiler is not standard-conforming under this option).
- contig
- Optimised for contiguous actual arguments; if the actual argument is not
contiguous (i.e. it is an array section) a contiguous local copy is made.
This may speed up array section accessing if a sufficiently large number of
array element or array operations is performed (i.e. if the cost of making the
local copy is less than the overhead of discontiguous array accesses), but
usually makes such accesses slower.
Note that this option does not affect dummy arguments with the
TARGET
attribute; these are always accessed via the dope vector.
- section
- Optimised for low-moderate accesses to array section (discontiguous) actual
arguments.
This is the default.
Note that CHARACTER
arrays are not affected by these options.
- -Oblock=N
- Specify the dimension of the blocks used for evaluating the
MATMUL
intrinsic.
The default value (only for -O1 and above) is system and
datatype dependent.
- -Onopropagate
- Disable the optimisation of constant propagation.
This is the default for -O1 and lower.
- -Onoteams
- Generate coarray access code assuming that teams are not being used.
This will produce incorrect results if executed while a
CHANGE TEAM
construct is active.
- -Opropagate
- Enable the optimisation of constant propagation.
This is the default for -O2 and higher.
- -Orounding
- Specify that the program does not alter the default rounding mode.
This enables the use of faster code for the
ANINT
intrinsic.
- -Ounroll=N
- Specify the depth to which simple loops and array operations should be
unrolled.
The default is no unrolling (i.e. a depth of 1) for -O0
and -O1, and a depth of 2 for -O
and higher optimisation levels.
It can be advantageous to disable the Fortran compiler's loop unrolling if the
C compiler normally does a very good job itself — this can be accomplished
with -Ounroll=1.
- -Ounsafe
- Perform possibly unsafe optimisations that may depend on the numerical
stability of the program.
On IBM z9 Open Edition this
option, in conjunction with -O4, passes NOSTRICT to
the C compiler.
- -openmp
- Enable OpenMP, producing extension messages for use of OpenMP features more
recent than the currently fully-supported OpenMP version.
In nagfor 7.1, this is equivalent to -openmp=3.1.
- -openmp=version
- Recognise OpenMP directives and link with the OpenMP support library.
Produce extension messages for the use of OpenMP features more recent than
OpenMP version, which must be equal to 3.0, 3.1, 4.0, 4.5, 5.0 or 5.1.
For more details see the
OpenMP Support
section.
This option is incompatible with the -coarray=smp option.
- -otype=filetype
- Specify the type of output file required to filetype, which must be one of
c | (C source file), |
exe | (executable file), |
fortran | (Fortran source file), |
mod | (module information file), |
none | (no output file), |
obj | (object file). |
The -c, -F and -M options are
equivalent to -otype=obj, -otype=Fortran and
-otype=mod respectively.
- -pg
- Compile code to generate profiling information which is written at
run-time to an implementation-dependent file (usually gmon.out
or mon.out).
An execution profile may then be generated using gprof.
This option must be specified for compilation and linking and may be
unavailable on some implementations.
- -pic
- Produce position-independent code (small model), for use in a shared library.
If the shared library is too big for the small model, use
-PIC.
This option is not available on IBM z9 Open Edition.
- -PIC
- Produce position-independent code (large model), for use in a shared library.
This option is not available on IBM z9 Open Edition.
- -quiet
- Suppress the compiler banner and the summary line, so that only diagnostic messages will appear.
- -Qpath pathname
- Change the compiler library pathname from its default location to
pathname.
(The default location on Unix is usually
‘
/usr/local/lib/NAG_Fortran
’ or
‘/opt/NAG_Fortran/lib
’)
This option is unnecessary on Windows as the installed location is
automatically detected.
- -r8
- Double the size of default
REAL
and COMPLEX
, and on machines for
which quadruple-precision floating-point arithmetic is available, double the
size of DOUBLE PRECISION
(and the non-standard DOUBLE COMPLEX
).
REAL
or COMPLEX
specified with explicit KIND
numbers or
byte lengths are unaffected — but since the KIND
intrinsic returns the
correct values, COMPLEX(KIND(0d0))
on a machine with quad-precision
floating-point will correctly select quad-precision COMPLEX
.
This has no effect on INTEGER
sizes, and so the compiler is not
standard-conforming in this mode.
Note: This option has been superseded by the -double
option which doubles the size of all numeric data types.
- -recursive
- Specifies that procedures are
RECURSIVE
by default.
This option is implied by the -f2018 option.
- -round_hreal
- Round all half precision operations to half precision.
Without this option, half precision expressions are evaluated in single precision and
only rounded to half precision when being assigned to a variable or passed as an
actual argument to a non-intrinsic or non-mathematical procedure.
This option affects compile-time evaluation as well as runtime evaluation.
- -s
- Strip symbol table information from the executable file.
This option is only effective if specified during the link phase.
- -S
- Produce assembler (actually C source code).
The resulting .c file should be compiled with the NAG Fortran compiler, not
with the C compiler directly.
This option is equivalent to -otype=c.
- -save
- This is equivalent to inserting the
SAVE
statement in all subprograms
which are not pure, not declared RECURSIVE
, and not RECURSIVE
by default (see the -recursive option).
It thus causes all non-automatic local variables in such subprograms to be statically allocated.
It has no effect on variables in BLOCK constructs.
- -strict95
- Produce obsolescence warning messages for use of ‘
CHARACTER*
’
syntax.
This message is not produced by default since many programs contain this
syntax.
- -target=machine
- Specify the machine for which code should be generated and optimised.
-
For x86-32 (x86-compatible 32-bit mode compilation on Linux and Windows), machine may be one of
i486, i586, i686, pentium2, pentium3, pentium4, prescott |
the specified Intel processor,
|
k6, k6-2, k6-3, k6-4, athlon, athlon-4, athlon-xp, athlon-mp |
the specified AMD processor,
|
pentium |
(equivalent to i586) or
|
pentiumpro |
(equivalent to i686).
|
The default is to compile for pentium4 on Linux, and prescott on Windows.
-
For x86-64 (x86-compatible 64-bit mode compilation on Linux, MacOS and
Windows), machine may be athlon64, nocona, or core2.
-
For Sun/SPARC, machine may be one of
- V7
- SPARCstation 1 et al,
- V8
- SPARCstation 2 et al,
- super
- SuperSPARC,
- ultra
- UltraSPARC or
- native
- the current machine.
The default is to compile for SPARC V7.
Note that programs compiled for later versions of the architecture may not run,
or may run much more slowly, on an earlier machine.
The -target=native option is not available with gcc.
-
For HP9000/700, machine may be one of
- 2.0
- the specified revision of the PA-RISC architecture (default) or
- native
- the current machine.
- -tempdir directory
- Set the directory used for the compiler's temporary files to directory.
The default is to use the directory named by the
TMPDIR
environment
variable, or if that is not set, /tmp on Unix-like systems and the Windows
temporary folder on Windows.
- -thread_safe
- Compile code for safe execution in a multi-threaded environment.
This must be specified when compiling and also during the link phase.
It is incompatible with the -gc and -gline options.
- -time
- Report execution times for the various compilation phases.
- -u
- Specify that
IMPLICIT NONE
is in effect by default, unless overridden by
explicit IMPLICIT
statements.
- -u=sharing
- Specify default sharing of
NONE
in OpenMP PARALLEL
and
TASK
constructs (including in combined constructs such as
PARALLELDO
).
This has the same effect as the DEFAULT(NONE)
clause, unless overridden
by an explicit DEFAULT(...)
directive.
- -unsharedrts
- Bind with the unshared (static) version of the Fortran runtime system; this
allows a dynamically linked executable to be run on systems where the
NAG Fortran Compiler is not installed.
This option is only effective if specified during the link phase.
- -v
- Verbose.
Print the name of each file as it is compiled.
- -V
- Print version information about the compiler.
- -w
- Suppress all warning messages.
This option is a synonym for -w=all.
- -w=class
- Suppress the warning messages specified by class, which must be one of
all, alloctr, obs, ques, uda, uei, uep,
uip, ulv, unreffed, unused, uparam, usf,
usy, x77 or x95.
- -w=all
- suppresses all warning messages;
- -w=alloctr
- suppresses warning messages about the use of allocatable components,
dummy arguments and functions;
- -w=note
- Suppress informational Notes;
- -w=obs
- suppresses warning messages about the use of obsolescent features;
- -w=ques
- suppresses warning messages about questionable usage;
- -w=uda
- suppresses warning messages about unused dummy arguments;
- -w=uei
- suppresses warning messages about unused explicit imports;
- -w=uep
- suppresses warning messages about unused external procedures;
- -w=uip
- suppresses warning messages about unused intrinsic procedures;
- -w=ulv
- suppresses warning messages about unused local variables;
- -w=unreffed
- suppresses warning messages about variables set but never referenced;
- -w=unused
- suppresses warning messages about unused entities — this is equivalent to
‘-w=uda -w=uei -w=uep -w=uip -w=ulv -w=uparam -w=usf -w=usy’;
- -w=uparam
- suppresses warning messages about unused
PARAMETER
s;
- -w=usf
- suppresses warning messages about unused statement functions;
- -w=usy
- suppresses warning messages about unused symbols;
- -w=x77
- suppresses extension warnings for obsolete but common extensions to Fortran 77
— these are TAB format, byte-length specifiers, Hollerith constants and D lines;
- -w=x95
- suppresses extension warnings for extensions to modern Fortran (not just
Fortran 95) that are not part of any Fortran standard.
- -Woptions
- The -W
option can be used to specify the path to use for a compilation component or
to pass an option directly to such a component.
The possible combinations are:
- -W0=path
- Specify the path used for the Fortran Compiler front-end.
Note that this does not affect the library directory; the
-Qpath option should be used to specify that.
- -Wc=path
- Specify the path to use for invoking the C compiler; this is used both for the
final stage of compilation and for linking.
- -Wc,option
- Pass option
directly to the host C compiler when compiling (producing the .o file).
Multiple options may be specified in a single -Wc,
option by separating them with commas.
- -Wl=path
- Specify the path to use for invoking the linker (producing the executable).
- -Wl,option
- Pass option
directly to the host C compiler when linking (producing the executable).
Multiple options may be specified in a single -Wl,
option by separating them with commas.
A comma may be included in an option by repeating it, e.g.
-Wl,-filelist=file1,,file2,,file3 becomes the linker
option -filelist=file1,file2,file3.
- -Wp=path
- Specify the path to use for invoking the fpp preprocessor.
- -Wp,option
- Pass option directly to fpp when preprocessing.
- -Warn=class
- Produce additional warning messages specified by class, which must be one of:
- allocation
- warn if an intrinsic assignment might cause allocation of the variable (or a
subcomponent thereof) being assigned to;
- constant_coindexing
- warn if an image selector has constant cosubscripts;
- reallocation
- warn if an intrinsic assignment might cause reallocation of an
already-allocated variable (or a subcomponent thereof) being assigned to;
- subnormal
- warn if an intrinsic operation or function with normal operands produces a
subnormal result (reduced precision, less than
TINY(
...)
).
Reallocation only occurs when the shape of an array, the value of a deferred
type parameter, or the dynamic type (if polymorphic), differs between the
variable (or subcomponent) and the expression (or the corresponding
subcomponent).
Allocation can occur also when the variable (or subcomponent) is not allocated
prior to execution of the assignment (except for broadcast assignment).
Note that -Warn=allocation thus subsumes
-Warn=reallocation.
- -wmismatch=proc-name-list
- Specify a list of external procedures for which to suppress argument data type
and arrayness consistency checking.
The procedure names should be separated by commas, e.g.
-wmismatch=p_one,p2.
Unlike the -mismatch
option, this only affects data type and arrayness checking, and no warning
messages are produced.
- -xlicinfo
- Report on the availability of licences for the compiler instead of compiling anything.
Also report the exact version of Kusari being used.
- -xs
- (Sun/SPARC option only)
Store the symbol tables in the executable (otherwise debugging is
only possible if the object files are kept).