guix_mirror_bot pushed a commit to branch hpc-team
in repository guix.

commit 5d8f250e5b4cb9184567d505478863856aaeb115
Author: Romain GARBAGE <[email protected]>
AuthorDate: Fri Jan 30 18:11:45 2026 +0100

    gnu: Add openmpi-rocm, an Open MPI variant with ROCm support.
    
    * gnu/packages/mpi.scm (openmpi-5): New variable.
    
    Merges guix/guix!6032
    
    Change-Id: I2ff58c0f76d861f4570b4d9dd60aefa747a73345
    Signed-off-by: Cayetano Santos <[email protected]>
---
 gnu/packages/mpi.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index a4921d56da..72ba4ecd6a 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -67,6 +67,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages rocm)
   #:use-module (gnu packages rocm-tools)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages valgrind)
@@ -463,6 +464,25 @@ software vendors, application developers and computer 
science researchers.")
 
            #:disallowed-references (list (canonical-package gcc))))))
 
+;; XXX: ROCm support in Open MPI is enabled in a variant and not in the base
+;; package due to its dependency rocm-hip-runtime retaining references to
+;; clang-rocm, which causes the closure to go from ~400MB to ~2.4GB. See
+;; https://codeberg.org/guix/guix/issues/5585
+(define-public openmpi-rocm
+  (package/inherit openmpi-5
+    (name "openmpi-rocm")
+    (arguments
+     (substitute-keyword-arguments (package-arguments openmpi-5)
+       ((#:configure-flags flags '())
+        #~(cons* (string-append "--with-rocm="
+                                #$(this-package-input "rocm-hip-runtime"))
+                 #$flags))))
+    (inputs (modify-inputs (package-inputs openmpi-5)
+              ;; XXX: This might break openmpi-5 for architectures where ROCm
+              ;; is not supported.
+              (append rocm-hip-runtime)))
+    (synopsis "MPI-3 implementation (with ROCm support)")))
+
 (define-public openmpi-c++
   (package/inherit openmpi
     (name "openmpi-c++")

Reply via email to