Skip to content

Commit

Permalink
icon: remove ccbin, replace -lcudart with -cuda (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominichofer authored Sep 12, 2024
1 parent ed8f9de commit c77a581
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions repos/c2sm/packages/icon/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,14 @@ def configure_args(self):
'NVCC={0}'.format(self.spec['cuda'].prefix.bin.nvcc)
])

libs += self.spec['cuda'].libs
# -cuda is an umbrella flag for NVHPC
# that pulls in all the needed CUDA libraries and wrappers
# It can't go into libs as spack prepends -l
flags['LDFLAGS'].append('-cuda')

cuda_host_compiler = self.compiler.cxx
cuda_host_compiler_stdcxx_libs = self.compiler.stdcxx_libs

if 'none' in self.spec.variants['dsl'].value:
flags['NVCFLAGS'].extend(
['-ccbin {0}'.format(cuda_host_compiler)])

flags['NVCFLAGS'].extend([
'-g', '-O3',
'-arch=sm_{0}'.format(self.spec.variants['cuda_arch'].value[0])
Expand Down

0 comments on commit c77a581

Please sign in to comment.