From ba22af0de027055c50963e458b0eee259999c613 Mon Sep 17 00:00:00 2001
From: Howard Pritchard <howardp@lanl.gov>
Date: Sat, 18 Jan 2020 12:52:26 -0700
Subject: [PATCH] openmpi: swat btl/uct ucx 1.7 bug (#14522)

Unfortunately UCX 1.7.0 is appearing in RPMS before it's officially released.
There's a problem with Open MPI 4.0.x where x < 3 and this version of UCX,
namely that the UCT BTL fails to compile.

See https://github.com/open-mpi/ompi/issues/7128

This patch works around the problem by disabling the build of the UCT BTL
for releases 4.0.0 to 4.0.2.

add hppritcha (me) as maintainer

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
---
 var/spack/repos/builtin/packages/openmpi/package.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 1f94009753..aac0c4c60b 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -75,6 +75,8 @@ class Openmpi(AutotoolsPackage):
     list_url = "http://www.open-mpi.org/software/ompi/"
     git = "https://github.com/open-mpi/ompi.git"
 
+    maintainers = ['hppritcha']
+
     version('develop', branch='master')
 
     # Current
@@ -427,6 +429,10 @@ def configure_args(self):
         if spec.satisfies('@3.0.0:', strict=True):
             config_args.append('--with-zlib={0}'.format(spec['zlib'].prefix))
 
+        if spec.satisfies('@4.0.0:4.0.2'):
+            # uct btl doesn't work with some UCX versions so just disable
+            config_args.append('--enable-mca-no-build=btl-uct')
+
         # some scientific packages ignore deprecated/remove symbols. Re-enable
         # them for now, for discussion see
         # https://github.com/open-mpi/ompi/issues/6114#issuecomment-446279495
-- 
GitLab