pytorch / pytorch/pytorch

[distributed] ProcessGroupMPI: cudaAwareMpiCheck() does not support Cray MPICH GPU-aware MPI

Open
#178,191 1 comment 0 reactions 0 assignees View on GitHub
bot-triaged oncall: distributed oncall: distributed infra ptd-bot-triaged
Dominant language
Python
Stars
103k
Forks
29.6k
PR merge metrics
PR metrics pending

Description

### 🐛 Describe the bug

cudaAwareMpiCheck() does not recognize Cray MPICH as CUDA-aware even when it is properly configured. The function only checks for MPIX_CUDA_AWARE_SUPPORT via MPIX_Query_cuda_support(), which is an OpenMPI-specific API. On Cray MPICH systems this symbol is not defined, so the function always falls through to return false in the #else branch, regardless of runtime configuration.
Cray MPICH uses a different mechanism: MPIX_GPU_SUPPORT_CUDA is defined in mpi.h as a GPU type identifier, and GPU-aware communication is enabled at runtime via MPICH_GPU_SUPPORT_ENABLED=1. Neither of these is handled by the current code.
This completely blocks the use of PyTorch DDP with the MPI backend on GPU systems running Cray MPICH, which is the standard MPI on many large HPC clusters including Polaris at ALCF (Argonne National Laboratory), where I encountered this issue in my research.

### Versions

Collecting environment information...
PyTorch version: 2.8.0
Is debug build: False
CUDA used to build PyTorch: 12.9
ROCM used to build PyTorch: N/A

OS: SUSE Linux Enterprise Server 15 SP6 (x86_64)
GCC version: (SUSE Linux) 14.3.0
Clang version: 7.0.1 (tags/RELEASE_701/final 349238)
CMake version: version 4.1.2
Libc version: glibc-2.38

Python version: 3.12.11 | packaged by conda-forge | (main, Jun 4 2025, 14:45:31) [GCC 13.3.0] (64-bit runtime)
Python platform: Linux-6.4.0-150600.23.73-default-x86_64-with-glibc2.38
Is CUDA available: True
CUDA runtime version: 12.9.86
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A100-SXM4-40GB
GPU 1: NVIDIA A100-SXM4-40GB
GPU 2: NVIDIA A100-SXM4-40GB
GPU 3: NVIDIA A100-SXM4-40GB

Nvidia driver version: 570.124.06
cuDNN version: Could not collect
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Caching allocator config: N/A

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Vendor ID: AuthenticAMD
Model name: AMD EPYC 7543P 32-Core Processor
CPU family: 25
Model: 1
Thread(s) per core: 2
Core(s) per socket: 32
Socket(s): 1
Stepping: 1
BogoMIPS: 5589.99
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin brs arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm debug_swap verw_clear clear_cpu_buf_vm ibpb_exit_to_user
Virtualization: AMD-V
L1d cache: 1 MiB (32 instances)
L1i cache: 1 MiB (32 instances)
L2 cache: 16 MiB (32 instances)
L3 cache: 256 MiB (8 instances)
NUMA node(s): 4
NUMA node0 CPU(s): 0-7,32-39
NUMA node1 CPU(s): 8-15,40-47
NUMA node2 CPU(s): 16-23,48-55
NUMA node3 CPU(s): 24-31,56-63
Vulnerability Gather data sampling: Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Mitigation; Safe RET
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsa: Mitigation; Clear CPU buffers
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Versions of relevant libraries:
[pip3] gpytorch==1.14.2
[pip3] numpy==2.2.6
[pip3] numpyro==0.19.0
[pip3] nvidia-cudnn-frontend==1.15.0
[pip3] onnx==1.19.0
[pip3] onnx-ir==0.1.11
[pip3] onnx-tf==1.6.0
[pip3] onnxruntime-gpu==1.23.0
[pip3] onnxscript==0.3.1
[pip3] optree==0.17.0
[pip3] pytorch-lightning==2.5.5
[pip3] torch==2.8.0
[pip3] torch_cluster==1.6.3+pt28cu129
[pip3] torch-geometric==2.7.0
[pip3] torch_memory_saver==0.0.8
[pip3] torch_scatter==2.1.2+pt28cu129
[pip3] torch_sparse==0.6.18+pt28cu129
[pip3] torch_spline_conv==1.2.2+pt28cu129
[pip3] torch-tb-profiler==0.4.3
[pip3] torchao==0.9.0
[pip3] torchaudio==2.8.0
[pip3] torchdata==0.11.0
[pip3] torchinfo==1.8.0
[pip3] torchmetrics==1.8.2
[pip3] torchvision==0.23.0a0+824e8c8
[pip3] torchviz==0.0.3
[pip3] triton==3.5.0
[conda] gpytorch 1.14.2 pypi_0 pypi
[conda] magma-cuda126 2.6.1 1 pytorch
[conda] mkl 2024.2.2 ha770c72_17 conda-forge
[conda] mkl-include 2025.2.0 hf2ce2f3_629 conda-forge
[conda] numpy 2.2.6 pypi_0 pypi
[conda] numpyro 0.19.0 pypi_0 pypi
[conda] nvidia-cudnn-frontend 1.15.0 pypi_0 pypi
[conda] optree 0.17.0 pypi_0 pypi
[conda] pytorch-lightning 2.5.5 pypi_0 pypi
[conda] tbb 2021.13.0 hb60516a_3 conda-forge
[conda] torch 2.8.0 pypi_0 pypi
[conda] torch-cluster 1.6.3+pt28cu129 pypi_0 pypi
[conda] torch-geometric 2.7.0 pypi_0 pypi
[conda] torch-memory-saver 0.0.8 pypi_0 pypi
[conda] torch-scatter 2.1.2+pt28cu129 pypi_0 pypi
[conda] torch-sparse 0.6.18+pt28cu129 pypi_0 pypi
[conda] torch-spline-conv 1.2.2+pt28cu129 pypi_0 pypi
[conda] torch-tb-profiler 0.4.3 pypi_0 pypi
[conda] torchao 0.9.0 pypi_0 pypi
[conda] torchaudio 2.8.0 pypi_0 pypi
[conda] torchdata 0.11.0 pypi_0 pypi
[conda] torchinfo 1.8.0 pypi_0 pypi
[conda] torchmetrics 1.8.2 pypi_0 pypi
[conda] torchvision 0.23.0a0+824e8c8 pypi_0 pypi
[conda] torchviz 0.0.3 pypi_0 pypi
[conda] triton 3.5.0 pypi_0 pypi

cc @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta @msaroufim @dcci @aditvenk @weifengpy @xmfan

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.