Enable nowait with a properly located barrier for nested loop where not all loops are independent

Aperta
#3,624 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
fortran, python
Ambito
compilers, hpc

Direzione di ricerca

Start by reading the discussion in PR #3617 and the nested-loop OpenMP example in issue #3624. Determine the required barrier placement and nowait behavior when only an inner loop is independent; done means the transformation handles this case correctly without synchronization errors and has tests covering it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Note: Contrary to what I said in the review, I don't think this will happen often in NEMO because we already parallelise the outermost-iteration-independent loop. There are rare situations where we skip outermost parallelisable loops but not often. So this is low priority.

Is it currently all or nothing? E.g. in this case it goes to the ancestor-non-independent loop, the "do i" loop and the check is performed there, but since it has already gone up a loop, it could ponentially be "nowait" if the barrier is in the right location , e.g.:

!$omp parallel default(shared) private(i,j,k)
do i = 1, 50
    do j = 1, 100
       !$omp do schedule(auto)
      do k = 1, 50
        arr(i + k, j) = i + j + k
      end do
      !$omp end do nowait
    end do
    !$omp barrier
end do
!$omp end parallel

Originally posted by @sergisiso in #3617

Lingua principale
Python
Stelle
141
Fork
39
Merge medio
2g 16h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stfc/PSyclone

Tutte le issue di stfc/PSyclone

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.