mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-22 05:41:23 +01:00
16 lines
276 B
Fortran
16 lines
276 B
Fortran
! @@name: tasking.11f
|
|
! @@type: F-free
|
|
! @@compilable: yes
|
|
! @@linkable: no
|
|
! @@expect: success
|
|
! @@version: omp_3.1
|
|
subroutine foo()
|
|
integer :: x
|
|
x = 2
|
|
!$omp task shared(x) mergeable
|
|
x = x + 1
|
|
!$omp end task
|
|
!$omp taskwait
|
|
print *, x ! prints 3
|
|
end subroutine
|