12.07.2015 Views

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

LF95 Linux User's Guide - Lahey Computer Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2 Developing with LF64For debugging, the following option settings will provide an increased level of diagnosticability, both at compile time, and during execution:--chk -g --trace --infoThe -pca option may be additionally be used to check for corruption of constant arguments;if the results are correct with -pca but bad with -npca a constant argument has beencorrupted.For further analysis during development, consider specifying any of the following options:--ap --chkglobal -f95 --lst --sav --wo --xref(Note: Specifying -chkglobal or -chk (x) must be used for compilation of all files of theprogram, or incorrect results may occur.)For production code, we recommend the following option settings:--nap --nchk --ng -O3 --npca --nsav --ntraceFor code that will be used only on the compiling machine, the option --fast should be usedin place of -O3.Note that the options that begin with --n are the default settings. They are shown to indicatethat the positive version of the option should not be specified in order to achieve maximumperformance.If the program performs many I/O operations, consider tuning the blocksize with the --blockoption.Programs may be tuned with additional optimization options, refer to the index under “optimizationoptions”. Whereas the base optimizations will almost always result in increasedperformance, experimentation will be required to achieve additional performance. Someoptions to try might be -x option to inline code and data, or --Karray_transform to apply optimizationsto code that uses arrays. While dramatic performance enhancements might be seen,it is also possible that performance will degrade when trying these or other options.If optimization (-O) produces radically different results or causes runtime errors, try compilingwith --info to see exactly which steps are being taken to optimize. The --info optionalso generates warnings on sections of code that are unstable and therefore may cause problemswhen optimized. A common example of such code is an IF statement that comparesfloating-point variables for equality. When optimization seems to alter the results, try usingthe --ap option to preserve arithmetic precision while still retaining some optimization.48 <strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!