Unverified Commit 6cc3f2ca authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

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

parents 9ebe222e c6a6c141
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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))