Skip to content

Commit d1ccc89

Browse files
author
Caspar van Leeuwen
committed
Raise EB error if the toolkit version isn't defined (yet) in the lookup table
1 parent ffed74a commit d1ccc89

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

eb_hooks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ def is_cuda_cc_supported_by_toolkit(cuda_cc, toolkit_version):
194194
# Strip the dot
195195
cuda_cc = cuda_cc.replace('.', '')
196196

197+
# Raise informative error if `toolkit_version` is not yet covered in CUDA_SUPPORTED_CCS
198+
if not toolkit_version in CUDA_SUPPORTED_CCS:
199+
msg = f"Trying to determine compatibility between requested CUDA Compute Capability ({cuda_cc})"
200+
msg +=f" and CUDA toolkit version {toolkit_version} failed: support for CUDA Compute Capabilities"
201+
msg +=" not known for this toolkit version. Please install the toolkit version manually, run"
202+
msg +=" 'nvcc --list-gpu-arch' to determine he supported CUDA Compute Capabilities, and then add these"
203+
msg +=f" to the CUDA_SUPPORTED_CCS table in the EasyBuild hooks ({build_option('hooks')})"
204+
raise EasyBuildError(msg)
205+
197206
if cuda_cc in CUDA_SUPPORTED_CCS[toolkit_version]:
198207
return True
199208
else:

0 commit comments

Comments
 (0)