File: test2.f90

package info (click to toggle)
opari 1.1%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 720 kB
  • sloc: cpp: 2,005; ansic: 901; f90: 252; makefile: 130; sh: 86; fortran: 50
file content (73 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
       program test2
       integer i

       !$omp parallel
       write(*,*) "parallel"
         !$omp do
         do i=1,4
           write(*,*) "do nowait",i
         enddo
         !$omp enddo nowait

         !$omp barrier

         !$omp do
         do i=1,4
           write(*,*) "do",i
         enddo
         !$omp end do

         !$omp sections
           !$omp section
           write(*,*) "section nowait 1"
           !$omp section
           write(*,*) "section nowait 2"
         !$omp end sections nowait

         !$omp master
         write(*,*) "master"
         !$omp end master

         !$omp critical
         write(*,*) "critical"
         !$omp end critical

         !$omp critical(foobar)
         write(*,*) "critical"
         !$omp end critical(foobar)

         !$omp atomic
         ! do this atomic
         i = i + 1

         !$omp single
         write(*,*) "single"
         !$omp end single

         !$omp sections
           !$omp section
           write(*,*) "section 1"
           !$omp section
           write(*,*) "section 2"
         !$omp endsections

       !$omp end parallel

       write(*,*) "sequential1"

       !$omp parallel do
       do i=1,4
         write(*,*) "pdo",i
       enddo
       !$omp end parallel do

       write(*,*) "sequential2"

       !$omp parallelsections
         !$omp section
         write(*,*) "psection 1"
         !$omp section
         write(*,*) "psection 2"
       !$omp end parallelsections

       end