pyop3: compiled assignment in "inc" mode gives wrong values in parallel
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- compilers, distributed-systems
Direzione di ricerca
Start by running the reproduction script under mpiexec -n 2 and -n 3, comparing the "array" and "compile" eager strategies on the owned entries. The issue points at the compiled INC assignment visiting ghost entries before the halo exchange adds them to their owners. Done means the compile strategy matches the array strategy on 2 and 4 ranks, and the maintainers have decided whether INC on a whole Dat with ghosts is supported.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On more than one rank, an eager pyop3 assignment in "inc" mode with eager_strategy="compile" gives wrong values. The "array" strategy gives the right values.
from firedrake import *
import numpy as np
mesh = UnitSquareMesh(6, 6)
V = FunctionSpace(mesh, "CG", 1)
g = Function(V).assign(1)
for strategy in ["array", "compile"]:
f = Function(V).assign(1)
f.dat.assign(g.dat, "inc", eager=True, eager_strategy=strategy)
nwrong = mesh.comm.allreduce(np.count_nonzero(f.dat.data_ro != 2))
PETSc.Sys.Print(f"{strategy}: {nwrong} owned entries differ from 2")
On main (ed5fcad68) with mpiexec -n 3 this prints
array: 0 owned entries differ from 2
compile: 31 owned entries differ from 2
On 1 rank both strategies are correct. On 2 and 4 ranks the compile strategy gives 19 and 29 wrong owned entries. The lazy form f.dat.iassign(g.dat)() gives the same wrong values, and so does op3.loop(p := V.nodes.iter(), f.dat[p].iassign(g.dat[p]), eager=True).
The wrong entries are the owned entries that are ghost entries on other ranks. Each of them gets g once from its own rank and once more from every rank that holds it as a ghost, so its value is 2 plus the number of ghost copies. Before the halo exchange the ghost entries hold 0 + g, so the compiled assignment visits them as well, and the INC halo exchange then adds them to their owners.
Is "inc" meant to work for an assignment to a whole Dat with ghost entries? Or is INC only valid in a loop over owned entities?
An LLM (Claude Code) found this while I was digging into other pyop3 assignment work. G-ADOPT does not use this path but I am flagging it anyway.
- Lingua principale
- Python
- Stelle
- 684
- Fork
- 204
- Merge medio
- 4g 14h
- PR unite (30g)
- 46
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firedrakeproject/firedrake
-
BUG: NonlinearVariationalSolver errors with adj_kwargsForse già presa @dham l’ha presa 151 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
firedrakeproject/firedrake#5186 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
firedrakeproject/firedrake#5091 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
firedrakeproject/firedrake#3556 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
firedrakeproject/firedrake#5644 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Function.assign on a subset fails with a Constant, a Real Function or abs in the expressionForse già presa @connorjward l’ha presa 2 giorni fa. Aperta
firedrakeproject/firedrake#5643 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di firedrakeproject/firedrake
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Sienna-Platform/SiennaSchemas#130 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
firedrakeproject/Irksome#293 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ida-arbeitszeit/workers-control#1578 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aws-samples/sample-per-model-bedrock#898 ·
I maintainer di solito rispondono entro 1 giorno