LF Fortran Express User's Guide - Lahey Computer Systems, Inc.
LF Fortran Express User's Guide - Lahey Computer Systems, Inc.
LF Fortran Express User's Guide - Lahey Computer Systems, Inc.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 2 Developing with <strong>LF</strong> <strong>Fortran</strong><br />
Specify -ap to guarantee the consistency of REAL and COMPLEX calculations, regardless<br />
of optimization level; user variables are not assigned to registers. Consider the following<br />
example:<br />
Example<br />
X = S - T<br />
2 Y = X - U<br />
...<br />
3 Y = X - U<br />
By default (-nap), during compilation of statement 2, the compiler recognizes the value X is<br />
already in a register and does not cause the value to be reloaded from memory. At statement<br />
3, the value X may or may not already be in a register, and so the value may or may not be<br />
reloaded accordingly. Because the precision of the datum is greater in a register than in memory,<br />
a difference in precision at statements 2 and 3 may occur.<br />
Specify -ap to choose the memory reference for non INTEGER operands; that is, registers<br />
are reloaded. -ap must be specified when testing for the equality of randomly-generated<br />
values.<br />
The default, -nap, allows the compiler to take advantage of the current values in registers,<br />
with possibly greater accuracy in low-order bits.<br />
Specifying -ap will usually generate slower executables.<br />
-BLOCK blocksize<br />
Default blocksize<br />
Compile only. Default: 8192 bytes<br />
Default to a specific blocksize for file I/O (See the OPEN Statement in the <strong>LF</strong> <strong>Fortran</strong> Language<br />
Reference). blocksize must be a decimal INTEGER constant. Specifying an optimal<br />
blocksize can make an enormous improvement in the speed of your executable. The program<br />
TRYBLOCK.F90 in the SRC directory demonstrates how changing blocksize can affect execution<br />
speed. Some experimentation with blocksize in your program is usually necessary to<br />
determine the optimal value.<br />
-[N]C<br />
Suppress Linking<br />
Compile only. Default: -nc<br />
Specify -c to create object (.OBJ), and, if necessary, module (.MOD) files without creating<br />
an executable. This is especially useful in make files, where it is not always desirable to perform<br />
the entire build process with one invocation of the driver.<br />
-[N]CHK [([a][,e][,s][,u][,x])]<br />
Checking<br />
Compile only. Default: -nchk<br />
30 <strong>LF</strong> <strong>Fortran</strong> <strong>Express</strong> User’s <strong>Guide</strong>