# IT4Innovations
# BS 2023
easyblock = 'EB_UCX_Plugins'

name = 'UCX-CUDA'
version = '1.12.1'
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'http://www.openucx.org/'
description = """Unified Communication X
An open-source production grade communication framework for data centric
and high-performance applications

This module adds the UCX CUDA support.
"""

toolchain = {'name': 'GCCcore', 'version': '10.2.0'}
toolchainopts = {'pic': True}

source_urls = ['https://github.com/openucx/ucx/releases/download/v%(version)s']
sources = [{'filename': 'ucx-%(version)s.tar.gz', 'alt_location': 'UCX'}]
patches = [
    '%(name)s-1.11.0_link_against_existing_UCX_libs.patch',
]
checksums = [
    {'ucx-1.12.1.tar.gz': '40b447c8e7da94a253f2828001b2d76021eb4ad39647107d433d62d61e18ae8e'},
    {'UCX-CUDA-1.11.0_link_against_existing_UCX_libs.patch':
     '457187fa020e526609ba91e7750c9941d57bd57d60d6eed317b40ad8824aca93'},
]

builddependencies = [
    ('binutils', '2.35'),
    ('Autotools', '20200321'),
    ('pkgconf', '1.8.0'),
]

dependencies = [
    ('zlib', '1.2.11'),
    ('UCX', version),
    ('CUDA',  '11.7.0', '', SYSTEM),
    ('GDRCopy', '2.3'),
]

moduleclass = 'lib'
