mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-07 23:22:11 +01:00
25 lines
431 B
Fortran
25 lines
431 B
Fortran
! @@name: taskloop.1f
|
|
! @@type: F-free
|
|
! @@compilable: yes
|
|
! @@linkable: no
|
|
! @@expect: success
|
|
subroutine parallel_work
|
|
integer i
|
|
integer j
|
|
!$omp taskgroup
|
|
|
|
!$omp task
|
|
call long_running_task()
|
|
!$omp end task
|
|
|
|
!$omp taskloop private(j) grainsize(500) nogroup
|
|
do i=1,10000
|
|
do j=1,i
|
|
call loop_body(i, j)
|
|
end do
|
|
end do
|
|
!$omp end taskloop
|
|
|
|
!$omp end taskgroup
|
|
end subroutine
|