diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index 30085e950a49..627ac68d68d7 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, fetchpatch, gfortran, perl, libnl , rdma-core, zlib, numactl, libevent, hwloc, pkgsTargetTarget, symlinkJoin +, libpsm2, libfabric # Enable CUDA support , cudaSupport ? false, cudatoolkit ? null @@ -9,6 +10,10 @@ # Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default , enablePrefix ? false + +# Enable libfabric support (necessary for Omnipath networks) on x86_64 linux +, fabricSupport ? stdenv.isLinux && stdenv.isx86_64 + }: assert !cudaSupport || cudatoolkit != null; @@ -44,7 +49,8 @@ in stdenv.mkDerivation rec { ++ lib.optionals isLinux [ libnl numactl ] ++ lib.optionals cudaSupport [ cudatoolkit ] ++ [ libevent hwloc ] - ++ lib.optional (isLinux || isFreeBSD) rdma-core; + ++ lib.optional (isLinux || isFreeBSD) rdma-core + ++ lib.optional fabricSupport [ libpsm2 libfabric ]; nativeBuildInputs = [ perl ]; @@ -56,6 +62,7 @@ in stdenv.mkDerivation rec { # https://github.com/openucx/ucx # https://www.open-mpi.org/faq/?category=buildcuda ++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ] + ++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ] ; enableParallelBuilding = true;