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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 5 Multi-Processing (PRO version only)Creating Parallelized ProgramsCompiler options for automatic parallelizationTo instruct the compiler to automate the parallelization process, use the --parallel compileroption. If there are optimization control lines (OCLs) embedded in the code, use the--ocl option to instruct the compiler to apply them. OCLs will be ignored if the --ocloption is absent. See “Optimization Control Line” on page 94 for details on OCLs. Whenautomatic parallelization is applied, the number of execution threads can be fixed at compiletime using the --threads option, or the user or Fortran runtime can decide how manythreads are required at execution time.See “Automatic Parallelization” on page 89.Compiler options for processing OpenMP directivesThe --openmp option instructs the compiler to parallelize a program by applying OpenMPdirectives embedded in the code. In addition to OpenMP directives in code, the compile willaccept options that can affect processing of OpenMP directives when used in combinationwith --openmp.The -Kpureomp option controls whether OpenMP directives are followed faithfully, or if latitudeis allowed in applying optimizations.The -Kthreadprivate option instructs the compiler to treat named common blocks as privatewithin the thread.See “OpenMP” on page 106.Other compiler options affecting parallelizationThe --threadstack option is used to fix the size of the stack for each thread at compiletime.The --threadheap option causes local variables to be stored on the threads heap, ratherthan on the threads stack.See “Compiler and Linker Options” on page 16 for more detailed descriptions of these compileroptions.Controlling parallel program executionEnvironment VariablesOpenMP specifies a number of environment variables, which are described in the OpenMPdocumentation at http://www.openmp.org. The following section details other environmentvariables that can be set to alter the way a parallel program executes.FLIB_FASTOMPThe FLIB_FASTOMP environment variable instructs the runtime environment whether ornot to use high speed runtime libraries. If the value of FLIB_FASTOMP is true or 1 the fastlibraries are used.84 <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!