openmpi: fix cuda-aware mpi support (#429641)

This commit is contained in:
Doron Behar
2025-08-05 09:04:30 +03:00
committed by GitHub
+9
View File
@@ -57,6 +57,14 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://github.com/open-mpi/ompi/commit/4d4f7212decd0d0ca719688b15dc9b3ee7553a52.patch";
hash = "sha256-Mb8qXtAUhAQ90v0SdL24BoTASsKRq2Gu8nYqoeSc9DI=";
})
# This patch can be removed with the next openmpi update (>5.0.6)
# See https://github.com/open-mpi/ompi/issues/12924 and https://github.com/open-mpi/ompi/pull/12934
# Fix the size_t/int parameter compile error in coll/cuda
(fetchpatch {
name = "fix-size-t-int-parameter";
url = "https://github.com/open-mpi/ompi/commit/399f69d68735839d379913a5433ea81dbdbd98bf.patch";
hash = "sha256-TbB73a419v5JGkiyBAwe/t+6g+pzaR15yAZhdbJIXG4=";
})
];
postPatch = ''
@@ -137,6 +145,7 @@ stdenv.mkDerivation (finalAttrs: {
# https://github.com/openucx/ucx
# https://www.open-mpi.org/faq/?category=buildcuda
(lib.withFeatureAs cudaSupport "cuda" (lib.getDev cudaPackages.cuda_cudart))
(lib.withFeatureAs cudaSupport "cuda-libdir" "${cudaPackages.cuda_cudart.stubs}/lib")
(lib.enableFeature cudaSupport "dlopen")
(lib.withFeatureAs fabricSupport "psm2" (lib.getDev libpsm2))
(lib.withFeatureAs fabricSupport "ofi" (lib.getDev libfabric))