Subject: [bug#27917] high performance fabric support for openmpi

From: Dave Love <[email-masked]>
Date: Wed, 02 Aug 2017 14:47:17 +0100

This adds RDMA support to openmpi, and also the ofi (libfabric) mtl.

It still needs psm(2)/infinipath support.  I don't know where that
should go in the source; libpsm(2) makes sense in rdma-core, like mlx5,
but has separate sources.

>From e6384acc4e486e5668c99a6d168c2543328e07b0 Mon Sep 17 00:00:00 2001
From: Dave Love <[email-masked]>
Date: Wed, 2 Aug 2017 14:22:49 +0100
Subject: [PATCH 2/2] gnu: Add libfabric.

* gnu/packages/linux.scm (libfabric): New function.
---
 gnu/packages/linux.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dd9c34999..57a27d2da 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4306,3 +4306,34 @@ tool, to understand the type of environment a process runs in, and for
 comparing system environments.")
    (home-page "http://github.com/jamesodhunt/procenv/")
    (license license:gpl3+)))
+
+(define-public libfabric
+  (package
+    (name "libfabric")
+    (version "1.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://github.com/ofiwg/libfabric/releases/download/v"
+                       version "/libfabric-" version ".tar.bz2"))
+       (sha256
+        (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
+    (build-system gnu-build-system)
+    (inputs `(("rdma-core" ,rdma-core)
+              ;; add psm, psm(2)
+              ("libnl" ,libnl)))
+    (home-page "http://ofiwg.github.io/libfabric/")
+    (synopsis "Open Fabric Interfaces")
+    (description
+     "OpenFabrics Interfaces (OFI) is a framework focused on exporting fabric
+communication services to applications.  OFI is best described as a collection
+of libraries and applications used to export fabric services.  The key
+components of OFI are: application interfaces, provider libraries, kernel
+services, daemons, and test applications.
+
+Libfabric is a core component of OFI.  It is the library that defines and
+exports the user-space API of OFI, and is typically the only software that
+applications deal with directly.  It works in conjunction with provider
+libraries, which are often integrated directly into libfabric.")
+    (license (list license:bsd-3 license:gpl2)))) ;dual
-- 
2.11.0

>From 585095b2facaf812e2584f2470c43c53ce0ca834 Mon Sep 17 00:00:00 2001
From: Dave Love <[email-masked]>
Date: Wed, 2 Aug 2017 14:11:54 +0100
Subject: [PATCH 1/2] gnu: openmpi: Add RDMA and libfabric support.

* gnu/packages/mpi.scm (openmpi)[inputs]: Add rdma-core, libfabric.
---
 gnu/packages/mpi.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index b17d81664..5290c5c98 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -139,7 +139,9 @@ bind processes, and much more.")
     (build-system gnu-build-system)
     (inputs
      `(("hwloc" ,hwloc "nogui")
-       ("gfortran" ,gfortran)))
+       ("gfortran" ,gfortran)
+       ("rdma-core" ,rdma-core)
+       ("libfabric" ,libfabric)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("perl" ,perl)))
-- 
2.11.0