This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Predetermined loop iterators


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]