# IT4Innovations
# LK 2023

name = 'NVHPC'
version = '23.7'

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

toolchain = SYSTEM

# 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/']
local_tarball_tmpl = 'nvhpc_2023_%%(version_major)s%%(version_minor)s_Linux_%s_cuda_multi.tar.gz'
sources = [local_tarball_tmpl % '%(arch)s']
checksums = ['fea91d95ff18bca1ce7afde50371caa02001ade8bed6ddfc5ff70862ccbebece']


local_gccver = '13.2.0'
dependencies = [
    ('GCCcore', local_gccver),
    ('binutils', '2.40', '', ('GCCcore', local_gccver)),
    ('numactl', '2.0.16')
]

default_cuda_version = '12.2'

import os
if os.environ.get("CLUSTERNAME") in ["KAROLINA"]:
   cuda_compute_capabilities = "8.0"
else:
   cuda_compute_capabilities = "7.0"

moduleclass = 'compiler'
