HAPI: +gpushm aborts in hapiInit (ipcHandleOpen, invalid argument) when each process sees only its own GPU
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
- 49/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- distributed-systems
Direzione di ricerca
Start in src/arch/cuda/hybridAPI/hapi_impl.cpp around ipcHandleOpen (the report cites lines 1722–1745) and trace how peer device buffers are opened and indexed. Reproduce with one visible GPU per task using --gpus-per-task=1 and +gpushm, then check the manual's GPU messaging section. Done when the behavior matches one of the stated expected outcomes and the manual describes the GPU visibility requirement.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
+gpushm aborts in hapiInit when each process of a node can see only its own GPU, which is the shape Slurm's --gpus-per-task=1 produces.
Observed
NCSA Delta, A100 node, CUDA 13.2, charm reconverse-linux-x86_64 cuda (branch ckdyn-dev7 at 669707835, recharm base 16f27646b; the HAPI code is unchanged there), two processes on one node:
srun --mpi=pmix -n 2 -c 4 --gpus-per-task=1 ./ckdyntest +pe 2 +gpushm
...
HAPI> hapi IPC event pool size - 16 per PE, 16 per device
HAPI> Enabling P2P access between devices
Fatal hapi Error [1] invalid argument at .../src/arch/cuda/hybridAPI/hapi_impl.cpp:1739
------- Processor 0 Exiting: Called CmiAbort ------
Reason: Exit due to hapi error
[0] #0 hapiErrorDie (libcharm.so)
[0] #1 hapiInit (libcharm.so)
Both processes abort the same way (job 23677329 on gpua011; the same for a charm4py program). The same binaries with both GPUs visible to both tasks (srun -n 2 --gpus=2 --gpu-bind=none ... +gpushm) start and run; IPC device transfers then work.
Cause
ipcHandleOpen (hapi_impl.cpp, around line 1722-1745) loops over every other process on the physical node and, for each of that process's devices, calls hapiIpcOpenMemHandle on the handle of its device communication buffer. With one GPU per task, that buffer lives on a device this process cannot see (Slurm sets CUDA_VISIBLE_DEVICES per task), and cuIpcOpenMemHandle returns invalid argument. The index device_count * i + j also assumes every process on the node sees the same number of devices.
Expected
Either +gpushm skips peers whose devices are not visible and falls back to the non-IPC path for them, with a message, or hapiInit prints that +gpushm needs all of the node's GPUs visible to every process and aborts with that text instead of invalid argument. The manual's GPU messaging section should state the requirement either way.
Found while validating charm4py 2's device paths on Delta, 2026-11-08. Logs on Delta: /projects/mzu/lkale/software/charm4py-thin/devp-23677329/py_posted_receive_n2shm.log and ckdyn_n2shm.log.
🤖 Generated with Claude Code
- Lingua principale
- C++
- Stelle
- 241
- Fork
- 62
- Merge medio
- 1g 1h
- PR unite (30g)
- 121
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 charmplusplus/charm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmplusplus/charm#4210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
charmplusplus/charm#4160 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
charmplusplus/charm#3619 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
charmplusplus/charm#4204 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
charmplusplus/charm#4197 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di charmplusplus/charm
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
bug test
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenAssetIO/OpenAssetIO#1527 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
ROCm/rocm-systems#15475 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
Sendspin/sendspin-cpp#257 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
pocoproject/poco#5664 ·
I maintainer di solito rispondono entro 2 giorni