This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Predetermined loop iterators
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 19 Oct 2005 10:49:27 -0400
- Subject: Re: [gomp] Predetermined loop iterators
- References: <20051019141108.GR16034@devserv.devel.redhat.com> <200510191036.49870.dnovillo@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 19, 2005 at 10:36:48AM -0400, Diego Novillo wrote:
> It means every sequential do-loop inside a parallel construct. Regardless
> of other enclosing constructs.
Where parallel construct here is just
!$omp parallel
or also
!$omp parallel {do,sections,workshare}?
What about nested !$omp parallels?
integer :: i
call omp_set_nested (.true.)
!$omp parallel default (none)
i = 1 ! is i predetermined here?
!$omp parallel default (none)
do i = 1, 10 ! here it is predetermined
end do
!$omp end parallel
!$omp end parallel
Are they privatized only on the parallel?
integer :: i
!$omp parallel default (none)
i = 1 ! is i predetermined here?
!$omp sections
do i = 1, 10 ! or just private in sections?
end do
!$omp section
do i = 4, 14
end do
!$omp end sections
!$omp end parallel
!$omp parallel default (none)
i = 1 ! here I'm quite sure it is not predetermined
!$omp do
do i = 1, 10 ! because i should be private in !$omp do
end do
!$omp end parallel
> > The patch below implements do iterators being predetermined only
> > directly in !$omp parallel construct (or if/do/... constructs within
> > it), but not in nested !$omp constructs nor in !$omp parallel
> > {do,sections,workshare}.
> >
> I don't think this is a good idea. It would deviate us from the standard.
I guess best would be to agree on testcases, check them with Intel
and then implement it.
Jakub