Basic HTML version of Foils prepared August 29 98

Foil 16 Orphaned Directives

From Designing and Building Parallel Programs 2: openMP Shared Memory Programming Language DoD Modernization Tutorial -- 1995-1998. by Ian Foster, Gina Goff, Ehtesham Hayder, Chuck Koelbel(Some foils prepared by Kuck & Associates, Inc.)


PROGRAM main
!$OMP PARALLEL
CALL foo()
CALL bar()
CALL error()
!$OMP END PARALLEL
SUBROUTINE error()
! Not allowed due to
! nested control structs
!$OMP SECTIONS
!$OMP SECTION
CALL foo()
!$OMP SECTION
CALL bar()
!$OMP END SECTIONS
END
SUBROUTINE foo()
!$OMP DO
DO i = 1, n
...
END DO
!$OMP END DO
END
SUBROUTINE bar()
!$OMP SECTIONS
!$OMP SECTION
CALL section1()
!$OMP SECTION
...
!$OMP SECTION
...
!$OMP END SECTIONS
END



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 11 1999