Download LF95 Linux User`s Guide - Lahey Computer Systems
Transcript
Chapter 5 Multi-Processing (PRO version only) The letter P shown on the left side of the source program marks the parallelized statements. !ocl independent(fun) p do i = 1,1000 p j = i p a(i) = fun(j) p end do . . end function fun(j) fun = sqrt(real(j**2+3*j+6)) end Note: If a procedure that cannot be sliced is described in an INDEPENDENT specifier by mistake, LF64 may perform an incorrect loop slicing and program results may be incorrect. Wild Card Specification In the operand of the following optimization control specifiers, a wild card may be specified for a variable name or a procedure name: • • • DISJOINT TEMP INDEPENDENT The wild card specification is a combination of the special wild card characters and alphanumeric characters. The effect is the same as specifying all of the variable names and procedure names that agree with the wild card expression. There are two wild card characters, "*" and "?", and they match the following character strings. • • "*" matches any character string of one or more alphanumeric characters. "?" matches any single alphanumeric character. A wild card specification cannot contain more than one wild card character. !ocl temp(w*) In this example, w* matches any variable beginning with w and having a length of two or more characters. For example, the variable names work1, w2, and work3 are included in this specification. !ocl disjoint(a?) In this example, a? matches any two-character array name which has a for the first character. For example, the array names a1, a2, and aa are included in this specification. The array name abc is not included in this specification because its length is not two. !ocl independent(sub?) 102 Lahey/Fujitsu Linux64 Fortran User’s Guide