# IT4Innovations
# PH 2024

name = 'NVHPC'
version = '24.11'

homepage = 'https://developer.nvidia.com/hpc-sdk/'
description = """C, C++ and Fortran compilers included with the NVIDIA HPC SDK (previously: PGI)"""

toolchain = SYSTEM

local_tarball_tmpl = 'nvhpc_2024_%%(version_major)s%%(version_minor)s_Linux_%s_cuda_multi.tar.gz'
# By downloading, you accept the HPC SDK Software License Agreement
# https://docs.nvidia.com/hpc-sdk/eula/index.html
accept_eula = True
source_urls = ['https://developer.download.nvidia.com/hpc-sdk/%(version)s/']
sources = [local_tarball_tmpl % '%(arch)s']
checksums = [
    {
        local_tarball_tmpl % 'aarch64':
            'f2f64e5dec5e90dad5e12a31a992172b0aa19abf872ef1c54a1a437c7008eefb',
#        local_tarball_tmpl % 'ppc64le':
#            'e7330eb35e23dcd9b0b3bedc67c0d5443c4fd76b59caa894a76ecb0d17f71f43',
        local_tarball_tmpl % 'x86_64':
            '0c27d66ed0e2d3007d30ac904922a9abf96475197dc0f4dcc6316d235a1dc0c3',
    }
]

default_cuda_version = "11.0"

local_gccver = '13.3.0'
dependencies = [
    ('GCCcore', local_gccver),
    ('binutils', '2.42', '', ('GCCcore', local_gccver)),
    # This is necessary to avoid cases where just libnuma.so.1 is present in the system and -lnuma fails
    ('numactl', '2.0.18', '', ('GCCcore', local_gccver)),
]

module_add_cuda = False

moduleclass = 'compiler'
