about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/openmpi
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-05-12 14:45:39 +0000
committerAlyssa Ross <hi@alyssa.is>2020-05-12 14:56:01 +0000
commiteb7dadee9c0f903f1152f8dd4165453bfa48ccf4 (patch)
treea6bd66dcbec895aae167465672af08a1ca70f089 /nixpkgs/pkgs/development/libraries/openmpi
parent3879b925f5dae3a0eb5c98b10c1ac5a0e4d729a3 (diff)
parent683c68232e91f76386db979c461d8fbe2a018782 (diff)
downloadnixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.gz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.bz2
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.lz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.xz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.zst
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.zip
Merge commit '683c68232e91f76386db979c461d8fbe2a018782'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/openmpi')
-rw-r--r--nixpkgs/pkgs/development/libraries/openmpi/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/openmpi/default.nix b/nixpkgs/pkgs/development/libraries/openmpi/default.nix
index 30085e950a49..627ac68d68d7 100644
--- a/nixpkgs/pkgs/development/libraries/openmpi/default.nix
+++ b/nixpkgs/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;