# IT4Innovations
# LK 2023

easyblock = 'EB_UCX_Plugins'

name = 'UCX-CUDA'
version = '1.13.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': '12.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 = [
    ('457187fa020e526609ba91e7750c9941d57bd57d60d6eed317b40ad8824aca93',
     '9bd95e2059de5dece9dddd049aacfca3d21bfca025748a6a0b1be4486e28afdd'),  # ucx-1.14.0.tar.gz
    {'UCX-CUDA-1.11.0_link_against_existing_UCX_libs.patch':
     '457187fa020e526609ba91e7750c9941d57bd57d60d6eed317b40ad8824aca93'},
]

builddependencies = [
    ('binutils', '2.39'),
    ('Autotools', '20220317'),
    ('pkgconf', '1.9.3'),
]

dependencies = [
    ('zlib', '1.2.12'),
    ('UCX', '1.14.0'),
    ('CUDA', '12.2.0', '', SYSTEM),
    ('GDRCopy', '2.3'),
]

moduleclass = 'lib'
