Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edits to support icon-dsl on Daint #693

Merged
merged 5 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/icon/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class Icon(AutotoolsPackage):
branch='test_spec',
git='ssh://[email protected]/C2SM/icon-exclaim.git',
submodules=True)
version('gt4py',
branch='icon-dsl',
git='ssh://[email protected]/C2SM/icon-exclaim.git',
submodules=True)
version('nwp-master',
git='ssh://[email protected]/icon/icon-nwp.git',
submodules=True)
Expand Down Expand Up @@ -131,7 +135,7 @@ class Icon(AutotoolsPackage):
description=
'Enable extension of eccodes with center specific definition files')

depends_on('py-icon4py@0.0.1%gcc')
depends_on('py-icon4py@main%gcc')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better remove the @version completely and set it explicitely in an spack.yaml. This recipe needs to be as general as possible. Otherwise we can only build one specific version of icon-dsl

depends_on('gridtools@master%gcc')

depends_on('infero +quiet', when='+infero')
Expand Down Expand Up @@ -562,10 +566,8 @@ def configure_args(self):
cuda_host_compiler = self.compiler.cxx
cuda_host_compiler_stdcxx_libs = self.compiler.stdcxx_libs

config_vars['NVCFLAGS'].extend([
'-ccbin {0}'.format(cuda_host_compiler), '-g', '-O3',
'-arch=sm_{0}'.format(gpu)
])
config_vars['NVCFLAGS'].extend(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the variant +cuda-gcc since it relies on cuda_host_compiler.
Please find a way to not break it.

['-g', '-O3', '-arch=sm_{0}'.format(gpu)])
# cuda_host_compiler_stdcxx_libs might contain compiler-specific
# flags (i.e. not the linker -l<library> flags), therefore we put
# the value to the config_flags directly.
Expand Down
7 changes: 7 additions & 0 deletions packages/nvidia-blas/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ def libs(self):
shared=True,
recursive=True)

@property
def headers(self):

headers = ["cblas.h"]

return find_headers(headers, root=self.prefix, recursive=True)

def install(self, spec, prefix):
raise InstallError(
self.spec.format('{name} is not installable, you need to specify '
Expand Down
7 changes: 7 additions & 0 deletions packages/nvidia-lapack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ def libs(self):
shared=True,
recursive=True)

@property
def headers(self):

headers = ["lapack.h"]

return find_headers(headers, root=self.prefix, recursive=True)

def install(self, spec, prefix):
raise InstallError(
self.spec.format('{name} is not installable, you need to specify '
Expand Down
9 changes: 4 additions & 5 deletions packages/py-gt4py/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PyGt4py(PythonPackage):
# Build dependencies
depends_on('py-wheel', type='build')
depends_on('py-cython', type='build')
depends_on('py-setuptools@59.4:', type='build')
depends_on('py-setuptools@60.6.0', type='build')

depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
Expand All @@ -37,22 +37,21 @@ class PyGt4py(PythonPackage):
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]: +cython', type=('build', 'run'))
depends_on('py-deepdiff', type=('build', 'run'))
depends_on('py-deepdiff@5.6:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected].2:', type=('build', 'run'))
depends_on('[email protected]: +blas +lapack', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
Expand Down
4 changes: 3 additions & 1 deletion packages/py-icon4py/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def install(self, spec, prefix):
args.append('.')

pip = inspect.getmodule(self).pip
build_dirs = ['common', 'pyutils', 'testutils', 'atm_dyn_iconam']
build_dirs = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again you break the recipe for older version of icon4py.
I see two solutions:
Either we make each folder a variant, i.e. +liskov +common, ... or you restrict liskov to a newer version of icon4py.

'common', 'pyutils', 'testutils', 'liskov', 'atm_dyn_iconam'
]
for dir in build_dirs:
with working_dir(os.path.join(self.stage.source_path, dir)):
pip(*args)
Expand Down
11 changes: 11 additions & 0 deletions packages/py-setuptools/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from spack.package import *
from spack.pkg.builtin.py_setuptools import PySetuptools as SpackPySetuptools


class PySetuptools(SpackPySetuptools):
"""A Python utility that aids in the process of downloading, building,
upgrading, installing, and uninstalling Python packages."""

version('60.6.0',
sha256=
'eb83b1012ae6bf436901c2a2cee35d45b7260f31fd4b65fd1e50a9f99c11d7f8')
3 changes: 3 additions & 0 deletions packages/py-typing-extensions/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
class PyTypingExtensions(SpackPyTypingExtensions):
"""Backported and Experimental Type Hints for Python 3.7+"""

version("4.5.0",
sha256=
"5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb")
version("4.2.0",
sha256=
"f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376")