gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / mpi.scm
index c9cd7b1..55641d8 100644 (file)
@@ -5,7 +5,7 @@
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;;
@@ -30,6 +30,7 @@
                 #:hide (expat))
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix deprecation)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
@@ -50,7 +51,7 @@
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match))
 
-(define-public hwloc
+(define-public hwloc-1
   ;; Note: For now we keep 1.x as the default because many packages have yet
   ;; to migrate to 2.0.
   (package
@@ -129,11 +130,11 @@ a powerful programming interface to gather information about the hardware,
 bind processes, and much more.")
     (license bsd-3)))
 
-(define-public hwloc-2.0
+(define-public hwloc-2
   ;; Note: 2.0 isn't the default yet, see above.
   (package
-    (inherit hwloc)
-    (version "2.0.3")
+    (inherit hwloc-1)
+    (version "2.1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.open-mpi.org/software/hwloc/v"
@@ -141,12 +142,12 @@ bind processes, and much more.")
                                   "/downloads/hwloc-" version ".tar.bz2"))
               (sha256
                (base32
-                "09f7ajak8wv5issr0hw72vs3jkldc7crcc7z5fd34sspkvrsm4z3"))))
+                "0qh8s7pphz0m5cwb7liqmc17xzfs23xhz5wn24r6ikvjyx99fhhr"))))
 
     ;; libnuma is no longer needed.
-    (inputs (alist-delete "numactl" (package-inputs hwloc)))
+    (inputs (alist-delete "numactl" (package-inputs hwloc-1)))
     (arguments
-     (substitute-keyword-arguments (package-arguments hwloc)
+     (substitute-keyword-arguments (package-arguments hwloc-1)
        ((#:phases phases)
         `(modify-phases ,phases
            (replace 'skip-linux-libnuma-test
@@ -158,10 +159,17 @@ bind processes, and much more.")
                   "-1"))
                #t))))))))
 
+(define-deprecated hwloc-2.0 'hwloc-2
+  hwloc-2)
+
+(define-public hwloc
+  ;; The latest stable series of hwloc.
+  hwloc-2)
+
 (define-public openmpi
   (package
     (name "openmpi")
-    (version "4.0.1")
+    (version "4.0.2")
     (source
      (origin
       (method url-fetch)
@@ -169,10 +177,11 @@ bind processes, and much more.")
                           (version-major+minor version)
                           "/downloads/openmpi-" version ".tar.bz2"))
       (sha256
-       (base32 "02cpzcp113gj5hb0j2xc0cqma2fn04i2i0bzf80r71120p9bdryc"))))
+       (base32 "0ms0zvyxyy3pnx9qwib6zaljyp2b3ixny64xvq3czv3jpr8zf2wh"))
+      (patches (search-patches "openmpi-mtl-priorities.patch"))))
     (build-system gnu-build-system)
     (inputs
-     `(("hwloc" ,hwloc "lib")
+     `(("hwloc" ,hwloc-2 "lib")
        ("gfortran" ,gfortran)
        ("libfabric" ,libfabric)
        ("libevent" ,libevent)
@@ -185,6 +194,10 @@ bind processes, and much more.")
                   (member (%current-system) (package-supported-systems psm2)))
              `(("psm2" ,psm2))
              '())
+       ,@(if (and (not (%current-target-system))
+                  (member (%current-system) (package-supported-systems ucx)))
+             `(("ucx" ,ucx))
+             '())
        ("rdma-core" ,rdma-core)
        ("valgrind" ,valgrind)
        ("slurm" ,slurm)))              ;for PMI support (launching via "srun")
@@ -217,12 +230,10 @@ bind processes, and much more.")
                     (lambda* (#:key inputs #:allow-other-keys)
                       (setenv "C_INCLUDE_PATH"
                               (string-append (assoc-ref inputs "opensm")
-                                             "/include/infiniband/:"
-                                             (getenv "C_INCLUDE_PATH")))
+                                             "/include/infiniband"))
                       (setenv "CPLUS_INCLUDE_PATH"
                               (string-append (assoc-ref inputs "opensm")
-                                             "/include/infiniband/:"
-                                             (getenv "CPLUS_INCLUDE_PATH")))
+                                             "/include/infiniband"))
                       #t))
                   (add-before 'build 'remove-absolute
                     (lambda _
@@ -334,19 +345,27 @@ only provides @code{MPI_THREAD_FUNNELED}.")))
      ;; Allow oversubscription in case there are less physical cores available
      ;; in the build environment than the package wants while testing.
      (setenv "OMPI_MCA_rmaps_base_mapping_policy" "core:OVERSUBSCRIBE")
+
+     ;; UCX sometimes outputs uninteresting warnings such as:
+     ;;
+     ;;   mpool.c:38   UCX  WARN  object 0x7ffff44fffc0 was not returned to mpool ucp_am_bufs
+     ;;
+     ;; These in turn leads to failures of test suites that capture and
+     ;; compare stdout, such as that of 'hdf5-parallel-openmpi'.  Thus, tell
+     ;; UCX to not emit those warnings.
+     (setenv "UCX_LOG_LEVEL" "error")
      #t))
 
 (define-public python-mpi4py
   (package
     (name "python-mpi4py")
-    (version "3.0.2")
+    (version "3.0.3")
     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "mpi4py" version))
-        (sha256
-          (base32
-            "1q28xl36difma1wq0acq111cqxjya32kn3lxp6fbidz3wg8jkmpq"))))
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mpi4py" version))
+       (sha256
+        (base32 "07ssbhssv27rrjx1c5vd3vsr31vay5d8xcf4zh9yblcyidn72b81"))))
     (build-system python-build-system)
     (arguments
      `(#:phases