2022-11-04 09:35:42 -07:00

26 lines
499 B
Fortran

! @@name: tasking.7
! @@type: F-fixed
! @@operation: compile
! @@expect: success
! @@version: omp_3.0
module example
integer tp
!$omp threadprivate(tp)
integer var
contains
subroutine work
!$omp task
! do work here
!$omp task
tp = 1
! do work here
!$omp task
! no modification of tp
!$omp end task
var = tp ! value of var can be 1 or 2
!$omp end task
tp = 2
!$omp end task
end subroutine
end module