diff options
author | albestro <9337627+albestro@users.noreply.github.com> | 2020-08-02 16:56:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-02 09:56:50 -0500 |
commit | ef3338a49bf4303230d08558a2b6bb8a4ae05dd8 (patch) | |
tree | 48bcd1b815c9172e0387ad9714f3b1fabd99a791 /var | |
parent | 8e6fe883eb4a13d51245f3398c7c7e93dc9f06f7 (diff) | |
download | spack-ef3338a49bf4303230d08558a2b6bb8a4ae05dd8.tar.gz spack-ef3338a49bf4303230d08558a2b6bb8a4ae05dd8.tar.bz2 spack-ef3338a49bf4303230d08558a2b6bb8a4ae05dd8.tar.xz spack-ef3338a49bf4303230d08558a2b6bb8a4ae05dd8.zip |
Improve HPX package management of coroutines implementation (#17654)
* introduce logic for boost+context dependency and generic_context variant
* fix OTF2 instrumentation minor problem
* default coroutine impl depends on platform
* fix flake8
* add reference to ~generic_coroutines conflict info
* Update var/spack/repos/builtin/packages/hpx/package.py
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hpx/package.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py index 028019864c..b859227e3b 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -5,6 +5,7 @@ from spack import * +import sys class Hpx(CMakePackage, CudaPackage): @@ -48,6 +49,14 @@ class Hpx(CMakePackage, CudaPackage): description="Support for networking through parcelports", ) + default_generic_coroutines = True + if sys.platform.startswith('linux') or sys.platform == 'win32': + default_generic_coroutines = False + variant( + "generic_coroutines", default=default_generic_coroutines, + description='Use Boost.Context as the underlying coroutines' + ' context switch implementation.') + variant('tools', default=False, description='Build HPX tools') variant('examples', default=False, description='Build examples') @@ -69,6 +78,15 @@ class Hpx(CMakePackage, CudaPackage): # https://github.com/STEllAR-GROUP/hpx/issues/4728#issuecomment-640685308 depends_on('boost@:1.72.0', when='@:1.4') + # COROUTINES + # ~generic_coroutines conflict is not fully implemented + # for additional information see: + # https://github.com/spack/spack/pull/17654 + # https://github.com/STEllAR-GROUP/hpx/issues/4829 + depends_on('boost+context', when='+generic_coroutines') + _msg_generic_coroutines = 'This platform requires +generic_coroutines' + conflicts('~generic_coroutines', when='platform=darwin', msg=_msg_generic_coroutines) + # CXX Standard depends_on('boost cxxstd=11', when='cxxstd=11') depends_on('boost cxxstd=14', when='cxxstd=14') @@ -120,7 +138,7 @@ class Hpx(CMakePackage, CudaPackage): args.extend(self.instrumentation_args()) if 'instrumentation=apex' in spec: - args += ['-DAPEX_WITH_OTF2=ON' + args += ['-DAPEX_WITH_OTF2=ON', '-DOTF2_ROOT={0}'.format(spec['otf2'].prefix)] # Networking @@ -154,6 +172,12 @@ class Hpx(CMakePackage, CudaPackage): spec.variants['max_cpu_count'].value )) + # HPX_WITH_GENERIC_CONTEXT_COROUTINES + args.append( + self.define_with_variant( + 'HPX_WITH_GENERIC_CONTEXT_COROUTINES', 'generic_coroutines') + ) + # Examples args.append('-DHPX_WITH_EXAMPLES={0}'.format( 'ON' if '+examples' in spec else 'OFF' |