Personal tools
You are here: Home Computing Hardware Power6 Compiler Options

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 real size 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 declared DOUBLE PRECISION x , because the default real size is 4 bytes, and unless the constant ends with a D ... 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 .f or .f90 should 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 format xlf90 might be a better alternative.

 

-qsuffix=cpp=F90
Run code through preprocessor for files ending with the .F90 suffix. By default, only the .F suffix 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 -qsave sets the default storage class to STATIC, while -qnosave sets it to AUTOMATIC. The default depends on how the compiler is invoked (xlf, f77 or xlf90). You may need -qsave for some old legacy code that would otherwise produce strange bugs, but you would usually prefer -qnosave, because -qsave can 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 NONE in every program unit. (Useful to check against mis-typed variable names.)

 

Document Actions