Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/C2SM/spack-c2sm into new_se…
Browse files Browse the repository at this point in the history
…ptember_tag_addition
  • Loading branch information
nfarabullini committed Sep 12, 2024
2 parents 806a4d8 + c77a581 commit 102fe6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ We suggest local/individual spack instances and the use of spack environments.

Clone the repository
```bash
git clone --depth 1 --recurse-submodules --shallow-submodules -b v0.20.1.5 https://github.com/C2SM/spack-c2sm.git
git clone --depth 1 --recurse-submodules --shallow-submodules -b v0.21.1.3 https://github.com/C2SM/spack-c2sm.git
```
Setup the shell environment.
Setup the shell environment and optionally specify an upstream, where spack will look for installed software, i.e.
```bash
. spack-c2sm/setup-env.sh
. spack-c2sm/setup-env.sh /user-environment
. spack-c2sm/setup-env.sh /mch-environment/v6
. spack-c2sm/setup-env.sh /mch-environment/v7
```
Sourcing this file will put the spack command in your PATH, set up your MODULEPATH to use Spack’s packages, and add other useful shell integration for certain commands, environments, and modules. For bash, it also sets up tab completion. (source: [spack docu](https://spack.readthedocs.io/en/v0.21.1/getting_started.html#shell-support))

Expand Down
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 102fe6c

Please sign in to comment.