easybuild-easyblocks
easybuild-easyblocks copied to clipboard
NVHPC: Behavior without CUDA Version, Compute Capability
The way I set up nvhpc.py
is such that it will fail if no default_cuda_version
and no cuda_compute_capabilities
is given. Both can be set via different means (easyconfig, command line, inferred by CUDA module).
@samcmill suggests changing the behavior. He suggests to rather relay the non-availability of the variables to the HPC SDK's install
procedure. The reason for the suggestions comes from the fact that the installation will only break for wrong variables after the sources have been downloaded – which might be a lengthy process.
This could be achieved by not erroring out, but rather printing warnings when no CUDA version or Compute Capability is detected and, in that case, not provide NVHPC_DEFAULT_CUDA
and NVHPC_STDPAR_CUDACC
to the install
script. Sketch:
nvhpc_env_vars = {
'NVHPC_INSTALL_DIR': self.installdir,
'NVHPC_SILENT': 'true'
}
if default_cuda_version is not None:
nvhpc_env_vars['NVHPC_DEFAULT_CUDA'] = str(default_cuda_version)
if default_compute_capability is not None:
nvhpc_env_vars['NVHPC_STDPAR_CUDACC'] = str(default_compute_capability)
What do you think of the suggested change, @boegel, @bartoldeman?
This becomes more relevant with https://github.com/easybuilders/easybuild-easyconfigs/pull/11920 in which we now can automatically download sources from the web.
I think that makes sense, as long as there's a clear warning produced that the defaults will be used (via print_warning
).