Array creation with bindTo reads the bound-to location manager's PE 0 branch without a dependence check

Abierto
#4,174 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@lvkale ya está trabajando en esto.

Desde el 11/11/2026.

  • #4227 de @lvkale — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Start in src/ck-core/ckarray.C at CkCreateArrayAsync and trace how _lookupGroupAndBufferIfNotThere handles a missing location-manager branch and how held group creations update quiescence in _createGroup and _processBocInitMsg. Check tests/charm++/groupdep_creator for the randomized message queue setup; add a case creating array A with a custom map on PE 1, then array B bound to A. Done means the request waits for the branch and the test passes under +randomized_msgq.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What

CkCreateArray (src/ck-core/ckarray.C, around line 680) runs on PE 0 for every array creation request. When the options carry a location manager (an array created with bindTo), it reads that manager's PE 0 branch directly, to take the bound-to array's id layout:

CkLocMgr* mgr = CProxy_CkLocMgr(locMgr).ckLocalBranch();
if (mgr == nullptr)
  CkAbort("CkCreateArray: the location manager (group %d) this array binds to has"
          " no branch on PE 0 yet\n", locMgr.idx);
wide = mgr->isWideCollection();

The request arrives as a Converse message (handler ckArrayCreationHdl, sent by CkSendAsyncCreateArray) and goes through no group-dependence check, so the branch has to exist on PE 0 when the request is handled.

When it is missing

Since #4172 (fix for #4150), a group creation whose dependence is unsatisfied is held on the creating PE too. The first array's location manager is created on PE 0 with a dependence on the array's map group; a custom map created on another PE whose creation broadcast has not reached PE 0 holds the manager there. A request for an array bound to the first one that reaches PE 0 in that window aborts with the message above.

Not a regression: before #4172 the first array's creation itself aborted in this case, in CkLocMgr's constructor ("Local branch of array map is NULL!", cklocation.C). It is the one runtime path left that needs a just-created branch on PE 0 (Ritvik's review of #4172 lists the others: the map, CkLocCache, CkLocMgr, CkArray and multicast-manager creations all carry dependences, and AMPI's arrays do too).

Remedy

Make the request wait on PE 0 the way a held group creation does: in CkCreateArrayAsync, when the options name a location manager and _lookupGroupAndBufferIfNotThere finds no branch, leave the message in that group's pending queue (its handler is already ckArrayCreationHdl, so the redelivery when the branch is built re-enters the same handler) and return. Quiescence: count the held request as created, and as processed when it runs, as _createGroup and _processBocInitMsg do for a held group creation. A test would create array A with a custom map on PE 1 and, from PE 1 right after, array B bound to A, under +randomized_msgq (as tests/charm++/groupdep_creator does for groups).

Touches the charm++ core: yes (src/ck-core/ckarray.C).

Lenguaje dominante
C++
Estrellas
241
Forks
62
Merge medio
1 d 1 h
PR fusionados (30 d)
125

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de charmplusplus/charm

Todos los issues de charmplusplus/charm

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.