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.)


1 PROGRAM main
2 !$OMP PARALLEL
3 CALL foo()
4 CALL bar()
5 CALL error()
6 !$OMP END PARALLEL
7 SUBROUTINE error()
8 ! Not allowed due to
9 ! nested control structs
10 !$OMP SECTIONS
11 !$OMP SECTION
12 CALL foo()
13 !$OMP SECTION
14 CALL bar()
15 !$OMP END SECTIONS
16 END
17 SUBROUTINE foo()
18 !$OMP DO
19 DO i = 1, n
20 ...
21 END DO
22 !$OMP END DO
23 END
24 SUBROUTINE bar()
25 !$OMP SECTIONS
26 !$OMP SECTION
27 CALL section1()
28 !$OMP SECTION
29 ...
30 !$OMP SECTION
31 ...
32 !$OMP END SECTIONS
33 END

in Table To:


© 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