Compiler Options
This is not a substitute for the Fortran Compiler
User's Guide.
However, there are a few compiler options that are
used over and over again - here you can see them at a glance:
- -q64
-
Use 64 bit-addressing mode. Without this flag
your arrays cannot be bigger than 2 GB.
Be sure to note the
non-obvious interrelations
between this compiler/linker flag and IBM's parallel libraries!
- -qautodbl=dbl4
-
Promote the default
realsize to 8 bytes. Using this option makes it superfluous to change all the declarations in your T3E code. - -qrealsize=8
-
The option affects the size of real constants and variables
of the default size -
objects that are declared with a kind type parameter or length,
such as REAL(4) or COMPLEX*16, are not affected.
This may give you somewhat finer control than the
-qautodbl option.
(When the -qautodbl option turns on automatic doubling,
padding, or both, the -qrealsize option has no effect.)
- -qdpc=e
-
Use double precision constants. You're in for a surprise
if you compile your CRAY code and discover that in a statement like
DATA x /1.000000000001/the trailing digit is quietly discarded. This happens even if you have declaredDOUBLE PRECISION x, because the default real size is 4 bytes, and unless the constant ends with aD ...exponent it will be treated as a single precision constant, no matter how many digits are specified! You can stay away from this murky area if you use the more general -qautodbl or -qrealsize options. - -qfree=f90
-
- -k
-
Free source format. If you or the compiler cannot
agree as to what the file suffix
.for.f90should imply. - -qfixed=80
-
This option can be used if you are calling the compiler under the name
xlf(implying Fortran fixed format), but are using the preprocessor and find that 72 columns are not enough. Of course, using Fortran 90 free formatxlf90might be a better alternative. - -qsuffix=cpp=F90
-
Run code through preprocessor for files ending
with the
.F90suffix. By default, only the.Fsuffix triggers the C preprocessor. - -WF,-DVARIABLE[=value]
-
Have the code run through the preprocessor, with the variable
defined (as value). You can define several preprocessor variables
with this option, e.g.
-WF,-DAIX,-DBITS=64,-DTEST. - -qnosave
-
The option
-qsavesets the default storage class to STATIC, while-qnosavesets it to AUTOMATIC. The default depends on how the compiler is invoked (xlf,f77orxlf90). You may need-qsavefor some old legacy code that would otherwise produce strange bugs, but you would usually prefer-qnosave, because-qsavecan have unpleasant performance side effects. - -qsource
-
Use this option to get detailed compiler diagnostics.
- -C
-
Runtime checking of array bounds.
- -qundef
-
- -u
-
This is equivalent to inserting
IMPLICIT NONEin every program unit. (Useful to check against mis-typed variable names.)
