diff options
author | iarspider <iarspider@gmail.com> | 2022-04-07 23:58:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 14:58:50 -0700 |
commit | b92a6d106b66a390d2414ab7f498924853829eb3 (patch) | |
tree | 762022ac3c8c116ce79f80adf72bc8041cf3347a /var | |
parent | 2474609395dae6b691315f2580b861ef7ec1de85 (diff) | |
download | spack-b92a6d106b66a390d2414ab7f498924853829eb3.tar.gz spack-b92a6d106b66a390d2414ab7f498924853829eb3.tar.bz2 spack-b92a6d106b66a390d2414ab7f498924853829eb3.tar.xz spack-b92a6d106b66a390d2414ab7f498924853829eb3.zip |
Update ucx to 1.12.0; add variants (#29944)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ucx/package.py | 70 |
1 files changed, 64 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/ucx/package.py b/var/spack/repos/builtin/packages/ucx/package.py index a7ca871b74..a2e9c91fb6 100644 --- a/var/spack/repos/builtin/packages/ucx/package.py +++ b/var/spack/repos/builtin/packages/ucx/package.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import shutil from spack import * @@ -43,6 +44,8 @@ class Ucx(AutotoolsPackage, CudaPackage): version('1.2.1', sha256='fc63760601c03ff60a2531ec3c6637e98f5b743576eb410f245839c84a0ad617') version('1.2.0', sha256='1e1a62d6d0f89ce59e384b0b5b30b416b8fd8d7cedec4182a5319d0dfddf649c') + simd_values = ('avx', 'sse41', 'sse42') + variant('thread_multiple', default=False, description='Enable thread support in UCP and UCT') variant('optimizations', default=True, @@ -51,6 +54,8 @@ class Ucx(AutotoolsPackage, CudaPackage): description='Enable logging') variant('debug', default=False, description='Enable debugging') + variant('opt', default='0', values=('0', '1', '2', '3'), multi=False, + description='Set optimization level') variant('assertions', default=False, description='Enable assertions') variant('parameter_checking', default=False, @@ -85,9 +90,30 @@ class Ucx(AutotoolsPackage, CudaPackage): description="Compile with IB Connection Manager support") variant('backtrace-detail', default=False, description="Enable using BFD support for detailed backtrace") + variant('openmp', default=True, + description="Use OpenMP") + variant('shared', default=True, + description="Build shared libraries") + variant('static', default=False, + description="Build static libraries") + variant('ucg', default=False, + description="Enable the group collective operations " + + "(experimental component)") + variant('doc', default=True, + description="Generate doxygen documentation") + variant('simd', values=disjoint_sets( + ('auto',), + simd_values).with_default('auto').with_non_feature_values('auto')) + variant('verbs', default=False, + description='Build OpenFabrics support') + variant('rdmacm', default=False, + description='Enable the use of RDMACM') + variant('examples', default=True, + description='Keep examples') depends_on('numactl') - depends_on('rdma-core') + depends_on('rdma-core', when='+verbs') + depends_on('rdma-core', when='+rdmacm') depends_on('pkgconfig', type='build') depends_on('java@8', when='+java') depends_on('maven', when='+java') @@ -102,6 +128,8 @@ class Ucx(AutotoolsPackage, CudaPackage): depends_on('binutils+ld', when='%aocc', type='build') depends_on('binutils+ld', when='+backtrace-detail') + conflicts('~shared', when='~static', msg='Please select at least one of +static or +shared') + configure_abs_path = 'contrib/configure-release' @when('@1.9-dev') @@ -127,13 +155,12 @@ class Ucx(AutotoolsPackage, CudaPackage): else: config_args.append('--disable-params-check') - # Activate SIMD based on properties of the target - if 'avx' in self.spec.target: - config_args.append('--with-avx') - else: - config_args.append('--without-avx') + rdmac_prefix = lambda x: self.spec['rdma-core'].prefix \ + if 'rdma-core' in self.spec else None config_args.extend(self.enable_or_disable('optimizations')) + config_args.append('--enable-compiler-opt=' + + self.spec.variant['opt'].value) config_args.extend(self.enable_or_disable('assertions')) config_args.extend(self.enable_or_disable('logging')) @@ -157,9 +184,40 @@ class Ucx(AutotoolsPackage, CudaPackage): activation_value='prefix')) config_args.extend(self.with_or_without('xpmem', activation_value='prefix')) + config_args.extend(self.with_or_without('rdmacm', + activation_value=rdmac_prefix)) + + config_args.extend(self.enable_or_disable('static')) + config_args.extend(self.enable_or_disable('shared')) + config_args.extend(self.enable_or_disable('static')) + config_args.extend(self.with_or_without('openmp')) + + if self.spec.satisfies('simd=auto'): + # Activate SIMD based on properties of the target + if 'avx' in self.spec.target: + config_args.append('--with-avx') + else: + config_args.append('--without-avx') + elif self.spec.satisfies('simd=none'): + for instr in simd_values: + config_args.append('--without-' + instr) + else: + for instr in simd_values: + if self.spec.satisfies('simd=' + instr): + config_args.append('--with-' + instr) + else: + config_args.append('--without-' + instr) + + config_args.extend(self.with_or_without('verbs', + activation_value=rdmac_prefix)) # lld doesn't support '-dynamic-list-data' if '%aocc' in spec: config_args.append('LDFLAGS=-fuse-ld=bfd') return config_args + + @run_after('install') + def drop_examples(self): + if self.spec.satisfies('~examples'): + shutil.rmtree(join_path(self.spec.prefix, 'share', 'ucx', 'examples')) |