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.

Optimization Control LineNote:If a variable that is not used temporarily is described in a TEMP specifier by mistake, LF64may do an incorrect loop slicing and the program results may be incorrect.INDEPENDENTThe INDEPENDENT specifier is used to indicate to LF64 that parallel execution is the sameas serial execution even if a procedure is called in the DO loop. As a result, the DO loop thatcontains the procedure is suitable for loop slicing.Syntax:!OCL INDEPENDENT [ (e [,e]...) ]Here, "e" is a procedure name which does not inhibit loop slicing. The wild card specificationis usable in "e". If the procedure name is omitted, INDEPENDENT becomes effectivefor all procedures within the range of the DO loop. See “Wild Card Specification” on page102 for wild card specification.Note that the procedure e must be compiled with the --parallel option.The INDEPENDENT specifier can be placed at the loop position or the total position.The effect of INDEPENDENT depends on its position.• At the loop positionINDEPENDENT allows loop slicing for the DO loop (and all nested loops) corresponding tothe OCL.• At the total positionINDEPENDENT allows loop slicing for all loops in the program containing the OCL. Considerthe following code:do i = 1, 10000j = ia(i) = fun(j)end do..endfunction fun(j)fun = sqrt(real(j**2+3*j+6))endIn the program above, because the procedure "FUN" is called in the DO loop, the system cannotdetermine whether the DO loop can be parallelized.If the programmer knows that there is no problem even if the DO loop which contains thereference to the procedure "FUN" is sliced, the DO loop can be sliced by using INDEPEN-DENT as shown in the code below.<strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong> 101

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

Saved successfully!

Ooh no, something went wrong!