BUG: Parallel assembly of expressions involving SpatialCoordinates, on submeshes, can give the wrong answer
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- distributed-systems
Línea de trabajo
Comienza con el MFE de Python inline del issue y ejecútalo en serie y con 8 núcleos para reproducir los distintos valores de qty_1 y qty_2. Traza el ensamblaje paralelo de submallas para formas usando las SpatialCoordinates del parent frente a las del submesh; se considera terminado cuando ambas cantidades coincidan en paralelo, como lo hacen en serie. En el informe no se nombran archivos del repositorio ni tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There seems to be a bug where submesh assembly is not done correctly in parallel. See the MFE below.
I compute two quantities, qty_1 and qty_2, by assembling two UFL forms over the submesh. The UFL forms are the same, but for qty_1 it uses the parent SpatialCoordinates, and for qty_2 the submesh SpatialCoordinates.
In serial this gives the same answer, the script output is: qty_1 is 2.83297e+00, qty_2 is 2.83297e+00
In parallel (8 cores) it gives: qty_1 is 2.61235e+00, qty_2 is 2.83297e+00
So it seems that assembling parent mesh SpatialCoordinates may be bugged in parallel.
MFE:
from firedrake import *
# Create the unlabelled mesh (unit square)
mesh = UnitSquareMesh(4, 4)
x_sc, y_sc = SpatialCoordinate(mesh)
# Label the mesh, creating the left-half, right-half and interface
DG0 = FunctionSpace(mesh, "DG", 0)
DGT0 = FunctionSpace(mesh, "DGT", 0)
tag_L = Function(DG0).interpolate(conditional(lt(x_sc, 0.5), 1, 0)) # Left-half, of dimension 2
tag_R = Function(DG0).interpolate(conditional(gt(x_sc, 0.5), 1, 0)) # Right-half, of dimension 2
tag_G = Function(DGT0).interpolate(conditional(lt(abs(x_sc - 0.5), 1.0e-8), 1, 0)) # Interface, of dimension 1
label_L = 1
label_R = 2
label_G = 3
mesh = RelabeledMesh(mesh, [tag_L, tag_R, tag_G], [label_L, label_R, label_G])
x_sc, y_sc = SpatialCoordinate(mesh)
# Create the submeshes
mesh_L = Submesh(mesh, 2, label_L) # Left-half mesh, of dimension 2
mesh_R = Submesh(mesh, 2, label_R) # Right-half mesh, of dimension 2
mesh_G = Submesh(mesh, 1, label_G) # Interface mesh, of dimension 1
# Create the measure on the interface
metadata = {"quadrature_degree": 15}
ds_G = Measure("dx", domain=mesh_G, intersect_measures=[ds(mesh_L), ds(mesh_R), dx(domain=mesh)], metadata=metadata)
# Create a UFL expression using the parent SpatialCoordinates
ufl_expr_1 = exp(x_sc + y_sc)
# Same expression, replacing the parent SpatialCoordinates with the interface SpatialCoordinates
ufl_expr_2 = replace(ufl_expr_1, {SpatialCoordinate(mesh) : SpatialCoordinate(mesh_G)})
# Integrate over the interface, and print the result
qty_1 = assemble(ufl_expr_1 * ds_G)
qty_2 = assemble(ufl_expr_2 * ds_G)
PETSc.Sys.Print("qty_1 is %.5e, qty_2 is %.5e" % (qty_1, qty_2))
# Running in parallel (8 cores) gives: qty_1 is 2.61235e+00, qty_2 is 2.83297e+00
# Running in serial gives: qty_1 is 2.83297e+00, qty_2 is 2.83297e+00
- Lenguaje dominante
- Python
- Estrellas
- 684
- Forks
- 204
- Merge medio
- 4 d 14 h
- PR fusionados (30 d)
- 46
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de firedrakeproject/firedrake
-
BUG: NonlinearVariationalSolver errors with adj_kwargsPosiblemente ocupada @dham la tomó hace 151 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
firedrakeproject/firedrake#5186 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
firedrakeproject/firedrake#5091 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
firedrakeproject/firedrake#3556 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
firedrakeproject/firedrake#5644 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Function.assign on a subset fails with a Constant, a Real Function or abs in the expressionPosiblemente ocupada @connorjward la tomó hace 2 días. Abierto
firedrakeproject/firedrake#5643 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de firedrakeproject/firedrake
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
datamodel-code-generator/datamodel-code-generator#6906 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
UKGovernmentBEIS/optstop#12 ·
-
bug good first issue severity: low
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/Awesome-Ads#37 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
smokin-salmon/smoked-salmon#1095 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Sienna-Platform/SiennaSchemas#130 ·
Los mantenedores suelen responder en 3 días