From 85ce22a0b848d03f066137d2efd6a65d3f6c632c Mon Sep 17 00:00:00 2001
From: Ken Raffenetti <raffenet@users.noreply.github.com>
Date: Wed, 27 Nov 2019 16:34:46 -0600
Subject: [PATCH] mpich: Add ucx dependency (#13921)

---
 var/spack/repos/builtin/packages/mpich/package.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 9ad46f7b91..8e0de0cadf 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -94,6 +94,8 @@ class Mpich(AutotoolsPackage):
     # See https://github.com/pmodels/mpich/issues/3665
     depends_on('libfabric@:1.6', when='device=ch3 netmod=ofi')
 
+    depends_on('ucx', when='netmod=ucx')
+
     depends_on('libpciaccess', when="+pci")
     depends_on('libxml2')
 
@@ -217,10 +219,13 @@ def configure_args(self):
 
         config_args.append(device_config)
 
-        # Specify libfabric's path explicitly, otherwise configure might fall
-        # back to an embedded version of libfabric.
+        # Specify libfabric or ucx path explicitly, otherwise
+        # configure might fall back to an embedded version.
         if 'netmod=ofi' in spec:
             config_args.append('--with-libfabric={0}'.format(
                 spec['libfabric'].prefix))
+        if 'netmod=ucx' in spec:
+            config_args.append('--with-ucx={0}'.format(
+                spec['ucx'].prefix))
 
         return config_args
-- 
GitLab