easyblock = "MakeCp"

name = 'NCCL'
version = '2.4.2'

homepage = 'https://developer.nvidia.com/nccl'
description = """The NVIDIA Collective Communications Library (NCCL) implements multi-GPU and multi-node collective
communication primitives that are performance optimized for NVIDIA GPUs."""

# gcccuda/2019a uses CUDA 10.1
toolchain = {'name': 'gcccuda', 'version': '2019a'}

local_cuda_version = '10.1'

# Download from https://developer.nvidia.com/nccl/nccl-download (after log in)
sources = ['%%(namelower)s_%%(version)s-1+cuda%s_x86_64.txz' % local_cuda_version]
checksums = ['27dad0e9495d2382e34d2701472a702007be65275b22f782e74613af08e0a39b']

skipsteps = ['build']

files_to_copy = ['lib', 'include']

sanity_check_paths = {
    'files': ['lib/libnccl.%s' % SHLIB_EXT, 'lib/libnccl_static.a', 'include/nccl.h'],
    'dirs': ['include'],
}

moduleclass = 'lib'
