LF95 Linux User's Guide - Lahey Computer Systems
LF95 Linux User's Guide - Lahey Computer Systems
LF95 Linux User's Guide - Lahey Computer Systems
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)common a(1000), b(1000)!ocl independent(sub)do i = 2, 1000a(i) = b(i) + 1.0call sub(i-1)end do...endsubroutine sub(j)common a(1000)a(j) = a(j) + 1.0endMulti-processing I/O Statements and Intrinsic Procedure ReferencesIf there is an I/O statement, an intrinsic subroutine or function reference that is not suitablefor loop slicing in a procedure that is called in a parallelized DO loop, execution of the programwill produce incorrect results. The execution performance of the multi-processingprogram may decrease due to the overhead of parallel execution. Also, the result of the I/Ostatement may be different from the result of serial execution.The following is an example in which an I/O statement occurs in a procedure that is called ina parallelized DO loop.file: a.f!ocl independent(sub)do i = 1, 100j = icall sub(j)end do:endrecursive subroutine sub(n):print*, n:endOpenMPThe compiler supports OpenMP v.2.0 directives. This section describes parallelization usingOpenMP. Refer to the OpenMP Fortran specification included with LF64 in PDF format fornon-implementation-specific information on OpenMP. The following website includes comprehensiveinformation on OpenMP:http://www.openmp.org/106 <strong>Lahey</strong>/Fujitsu <strong>Linux</strong>64 Fortran User’s <strong>Guide</strong>