Debian Codegraph @

libgomp/testsuite/libgomp.fortran/task-detach-12.f90

raw
1 program test
2 use omp_lib
3 implicit none
4 integer(omp_event_handle_kind) :: oevent, ievent
5 integer :: i
6 integer, allocatable :: temp(:)
7 ALLOCATE(temp(5))
8
9 !$omp parallel num_threads(3)
10 !$omp single
11 DO i=1,5
12 !$omp task firstprivate(i) firstprivate(temp) detach(oevent)
13 temp(:) = 0;
14 temp(1) = -1;
15 !print *,temp
16 call omp_fulfill_event(oevent)
17 !$omp end task
18 ENDDO
19 !$omp taskwait
20 !$omp end single
21 !$omp end parallel
22 end program