@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, fetchpatch, gfortran, perl, libnl
22, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
3−, libpsm2, libfabric
3+, libpsm2, libfabric, pmix
44
55# Enable CUDA support
66, cudaSupport ? false, cudatoolkit ? null
@@ -46,7 +46,7 @@ in stdenv.mkDerivation rec {
4646 '';
4747
4848 buildInputs = with stdenv; [ gfortran zlib ]
49− ++ lib.optionals isLinux [ libnl numactl ]
49+ ++ lib.optionals isLinux [ libnl numactl pmix ]
5050 ++ lib.optionals cudaSupport [ cudatoolkit ]
5151 ++ [ libevent hwloc ]
5252 ++ lib.optional (isLinux || isFreeBSD) rdma-core
@@ -55,8 +55,11 @@ in stdenv.mkDerivation rec {
5555 nativeBuildInputs = [ perl ];
5656
5757 configureFlags = with stdenv; lib.optional (!cudaSupport) "--disable-mca-dso"
58− ++ lib.optional isLinux "--with-libnl=${libnl.dev}"
59− ++ lib.optional enableSGE "--with-sge"
58+ ++ lib.optionals isLinux [
59+ "--with-libnl=${libnl.dev}"
60+ "--with-pmix=${pmix}"
61+ "--with-pmix-libdir=${pmix}/lib"
62+ ] ++ lib.optional enableSGE "--with-sge"
6063 ++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
6164 # TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
6265 # https://github.com/openucx/ucx