bug#72062: [PATCH v3 0/5] Add OpenMPI 5.x.

Message ID 87le0svc2h.fsf@gnu.org
State New
Headers
Series bug#72062: [PATCH v3 0/5] Add OpenMPI 5.x. |

Commit Message

Ludovic Courtès Aug. 19, 2024, 2:09 p.m. UTC
  Hello,

Romain GARBAGE <romain.garbage@inria.fr> skribis:

>   gnu: Add openpmix.
>   gnu: Add prrte.
>   gnu: slurm: Add PMIx support.
>   gnu: Add openmpi-5.
>   gnu: openmpi: Set default version to 4.x.

I made the change below to ensure that all the versions of the ‘slurm’
package would still build.  It took me a while :-) but in the end it’s
just about removing ‘openmpix’ from the inputs of older versions.

Will push shortly.

Thank you!

Ludo’.
  

Patch

diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index c62402cf5c..440a808f68 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -247,7 +247,10 @@  (define-public slurm
                    (string-append "--with-munge=" #$(this-package-input "munge"))
 
                    ;; Use PMIx bundled with Open MPI (this is required for Open MPI 5.x).
-                   (string-append "--with-pmix=" #$(this-package-input "openpmix"))
+                   #$(let ((openmpix (this-package-input "openpmix")))
+                       (if openmpix
+                           #~(string-append "--with-pmix=" #$openmpix)
+                           "--without-pmix"))
 
                    ;; 32-bit support is marked as deprecated and needs to be
                    ;; explicitly enabled.
@@ -310,10 +313,10 @@  (define-public slurm-22.05
 
 (define-public slurm-21.08
   (package
-    (inherit slurm)
+    (inherit slurm-22.05)
     (version "21.08.8")
     (source (origin
-              (inherit (package-source slurm))
+              (inherit (package-source slurm-22.05))
               (method url-fetch)
               (uri (string-append
                     "https://download.schedmd.com/slurm/slurm-"
@@ -321,14 +324,19 @@  (define-public slurm-21.08
               (patches '())                       ;drop 'salloc' patch
               (sha256
                (base32
-                "1sjln54idc9rhg8f2nvm38sgs6fncncyzslas8ixy65pqz2hphbf"))))))
+                "1sjln54idc9rhg8f2nvm38sgs6fncncyzslas8ixy65pqz2hphbf"))))
+
+    ;; This and older versions of slurm have PMIx support but they seem to
+    ;; require an older version of openpmix.  Disable PMIx support.
+    (inputs (pk 'x (modify-inputs (package-inputs slurm-22.05)
+                (delete "openpmix"))))))
 
 (define-public slurm-20.11
   (package
-    (inherit slurm)
+    (inherit slurm-21.08)
     (version "20.11.9")
     (source (origin
-              (inherit (package-source slurm))
+              (inherit (package-source slurm-21.08))
               (method url-fetch)
               (uri (string-append
                     "https://download.schedmd.com/slurm/slurm-"
@@ -340,10 +348,10 @@  (define-public slurm-20.11
 
 (define-public slurm-20.02
   (package
-    (inherit slurm)
+    (inherit slurm-20.11)
     (version "20.02.6-1")
     (source (origin
-              (inherit (package-source slurm))
+              (inherit (package-source slurm-20.11))
               (method url-fetch)
               (uri (string-append
                     "https://download.schedmd.com/slurm/slurm-"
@@ -353,7 +361,7 @@  (define-public slurm-20.02
                (base32
                 "0qj4blfymrd2ry2qmb58l3jbr4jwygc3adcfw7my27rippcijlyc"))))
     (arguments
-     (substitute-keyword-arguments (package-arguments slurm)
+     (substitute-keyword-arguments (package-arguments slurm-20.11)
        ((#:configure-flags flags ''())
         #~(append '("CFLAGS=-O2 -g -fcommon" "LDFLAGS=-fcommon")
                   #$flags))))))
@@ -363,7 +371,7 @@  (define-public slurm-19.05
     (inherit slurm-20.02)
     (version "19.05.8")
     (source (origin
-              (inherit (package-source slurm))
+              (inherit (package-source slurm-20.02))
               (method url-fetch)
               (uri (string-append
                     "https://download.schedmd.com/slurm/slurm-"
@@ -376,11 +384,11 @@  (define-public slurm-19.05
 ;; Same as Debian 10
 (define-public slurm-18.08
   (package
-    (inherit slurm-20.02)
+    (inherit slurm-19.05)
     (version "18.08.9")
     (source
       (origin
-        (inherit (package-source slurm))
+        (inherit (package-source slurm-20.02))
         (uri (string-append
                "https://download.schedmd.com/slurm/slurm-"
                version ".tar.bz2"))