From a707c5bd2b5dd0380fe8546b4f67ca993f520b4a Mon Sep 17 00:00:00 2001 From: Phil Carns Date: Thu, 22 Aug 2019 20:02:57 -0400 Subject: libfabric package: add kdreg variant (off by default) (#12521) This variant (off by default) adds support for the kdreg option in the GNI provider. It is disabled by default in order to avoid potential runtime conflicts with the cray-mpich library. Only one library at a time can use this feature. This patch allows the libfabric package to work correctly out of the box on systems like Cori at NERSC (since it's CLE7 update). Otherwise the spack build may autodetect kdreg headers on the system and enable this problematic feature. --- var/spack/repos/builtin/packages/libfabric/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/libfabric/package.py b/var/spack/repos/builtin/packages/libfabric/package.py index 8465974532..363e383f58 100644 --- a/var/spack/repos/builtin/packages/libfabric/package.py +++ b/var/spack/repos/builtin/packages/libfabric/package.py @@ -48,6 +48,13 @@ class Libfabric(AutotoolsPackage): multi=True ) + # NOTE: the 'kdreg' variant enables use of the special /dev/kdreg file to + # assist in memory registration caching in the GNI provider. This + # device file can only be opened once per process, however, and thus it + # frequently conflicts with MPI. + variant('kdreg', default=False, + description='Enable kdreg on supported Cray platforms') + depends_on('rdma-core', when='fabrics=verbs') depends_on('opa-psm2', when='fabrics=psm2') depends_on('psm', when='fabrics=psm') @@ -99,6 +106,11 @@ class Libfabric(AutotoolsPackage): def configure_args(self): args = [] + if '+kdreg' in self.spec: + args.append('--with-kdreg=yes') + else: + args.append('--with-kdreg=no') + for fabric in self.fabrics: if 'fabrics=' + fabric in self.spec: args.append('--enable-{0}=yes'.format(fabric)) -- cgit v1.2.3-70-g09d2