easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

NVHPC: Behavior without CUDA Version, Compute Capability

Open AndiH opened this issue 4 years ago • 1 comments

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.

AndiH avatar Dec 21 '20 15:12 AndiH

I think that makes sense, as long as there's a clear warning produced that the defaults will be used (via print_warning).

boegel avatar Jan 20 '21 08:01 boegel