BUG: Real space WRITE access (interpolate) fails if some ranks are empty

Aperta
#5,485 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@connorjward ci sta già lavorando.

Dal 24/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

The MFE (run with 3 processes)

from firedrake import *

mesh = UnitSquareMesh(1, 1)
vom = VertexOnlyMesh(mesh, [[0.7, 0.7]])

print(f"{mesh.comm.rank}: {vom.cell_set.size = }")

R = FunctionSpace(vom, "R", 0)
f = Function(R)

f.interpolate(666)
print(f"{mesh.comm.rank}: {f.dat.data_ro = }")

prints

0: vom.cell_set.size = np.int64(0)
1: vom.cell_set.size = np.int64(1)
2: vom.cell_set.size = np.int64(0)

0: f.dat.data_ro = array([0.])
1: f.dat.data_ro = array([666.])
2: f.dat.data_ro = array([0.])

When f.dat.data_ro should report 666 on all ranks.

This issue is occurring because the op2.Global underlying f is only getting touched on the single rank that has an owned point. Other ranks have zero sized parloops and so the value never gets set.

To corroborate this, the problem goes away if one does f.interpolate(666, access=op2.INC). This is because at the end of the parloop we do a reduction, so contributions from all ranks are included.

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

  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 firedrakeproject/firedrake

Tutte le issue di firedrakeproject/firedrake

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.