From 03594cf18fb002687d42420bc53b0b6f40000fc9 Mon Sep 17 00:00:00 2001 From: "dupont-y@univ-nantes.fr" Date: Tue, 18 Feb 2025 16:02:45 +0100 Subject: [PATCH] add 2 variants --- glicid/packages/mpi.scm | 59 ++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/glicid/packages/mpi.scm b/glicid/packages/mpi.scm index 9112af4..60a4f00 100644 --- a/glicid/packages/mpi.scm +++ b/glicid/packages/mpi.scm @@ -10,7 +10,6 @@ #:use-module (guix gexp) #:use-module (gnu packages)) - ;(define-public openmpi-glicid-internal-pmix ; (package/inherit gnu:openmpi-4 ; (name "openmpi-glicid") @@ -21,23 +20,53 @@ ; ) ;) +(define-public openmpi-upstream-4.1.8 + (package + (inherit gnu:openmpi-4) + (name "openmpi-4-upstream") + (version "4.1.8") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.open-mpi.org/software/ompi/v" + (version-major+minor version) "/downloads/openmpi-" + version ".tar.bz2")) + (sha256 + (base32 "1a8jkxqxbkyx9np2vyjrhgckd0zdzkx1286c20kw079a2ginhvs6")) + (patches (search-patches "openmpi-mtl-priorities.patch")))))) + +(define openmpi-4-latest + (latest-version openmpi-upstream-4.1.8 gnu:openmpi-4)) (define-public openmpi-glicid - (package/inherit gnu:openmpi-4 + (package/inherit openmpi-4-latest (name "openmpi-glicid") - (arguments - (substitute-keyword-arguments (package-arguments gnu:openmpi-4) - ((#:configure-flags flags) - #~(append #$flags (list ;; original flags has --with-pmix=internal, we should remove it but last --with-pmix is the one taken into account. - (string-append "--with-pmix=" #$(this-package-input "openpmix")) - (string-append "--with-prrte=" #$(this-package-input "prrte")) - ) ;#$flags -)))) - (inputs (modify-inputs (package-inputs gnu:openmpi-4) - (append openpmix) ;; because we use pmix4 now, openpmi-4 defaults to internal pmix3 - (append prrte) ;; idem + (inputs (modify-inputs (package-inputs openmpi-4-latest) (replace "slurm" slurm-glicid))) - ) -) + )) + + + +(define-public openmpi-glicid-pmxv4 + (package/inherit openmpi-4-latest + (name "openmpi-glicid-pmxv4") + (arguments (substitute-keyword-arguments (package-arguments + openmpi-4-latest) + ((#:configure-flags flags) + #~(append #$flags + (list ;original flags has --with-pmix=internal, we should remove it but last --with-pmix is the one taken into account. + (string-append "--with-pmix=" + #$(this-package-input + "openpmix")) + (string-append "--with-prrte=" + #$(this-package-input "prrte"))) ;#$flags + )))) + (inputs (modify-inputs (package-inputs openmpi-4-latest) + (append openpmix) ; because we use pmix4 now, openpmi-4 defaults to internal pmix3 + (append prrte) ;idem + (replace "slurm" slurm-glicid))) + + )) +