mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-07 23:22:11 +01:00
29 lines
532 B
Fortran
29 lines
532 B
Fortran
! @@name: tasking.9f
|
|
! @@type: F-fixed
|
|
! @@compilable: yes
|
|
! @@linkable: no
|
|
! @@expect: rt-error
|
|
module example
|
|
contains
|
|
subroutine work
|
|
!$omp task
|
|
! Task 1
|
|
!$omp task
|
|
! Task 2
|
|
!$omp critical
|
|
! Critical region 1
|
|
! do work here
|
|
!$omp end critical
|
|
!$omp end task
|
|
!$omp critical
|
|
! Critical region 2
|
|
! Capture data for the following task
|
|
!$omp task
|
|
!Task 3
|
|
! do work here
|
|
!$omp end task
|
|
!$omp end critical
|
|
!$omp end task
|
|
end subroutine
|
|
end module
|