-
Notifications
You must be signed in to change notification settings - Fork 307
Only enable CUDA in LAMMPS if it is an explicit dep + add support for building for NVIDIA Ampere GPUs #2208
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
Only enable CUDA in LAMMPS if it is an explicit dep + add support for building for NVIDIA Ampere GPUs #2208
Conversation
|
Also taking the opportunity to add support for Ampere |
bartoldeman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
in CMake defs
easybuild/easyblocks/l/lammps.py
Outdated
| def __init__(self, *args, **kwargs): | ||
| super(EB_LAMMPS, self).__init__(*args, **kwargs) | ||
| self.cuda = 'cuda' in [dep['name'].lower() for dep in self.cfg.dependencies()] or \ | ||
| hasattr(self.toolchain, 'COMPILER_CUDA_FAMILY') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's wrong with just using get_software_root('CUDA') ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to turn off CUDA right now, in our case CUDA leaks in because it is a dep of UCX way down the stack, but a CUDA build will not run on a node without GPUs so we need a way be explicit about whether we want CUDA or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this approach is better: only if we're building with CUDA included as a dep or with a CUDA-enabled toolchain should CUDA support be enabled.
It probably doesn't hurt to create an easy method for this in the Toolchain class in framework?
|
Test report in https://gist.github.com/ocaisa/fbf071eecd693b63e16075868358b31b (stopping after successful configure) |
|
Another test report for foss-cuda in https://gist.github.com/8a4872eeb39cc20ed3aa301fe37568cb |
|
|
||
| if self.toolchain.options.get('openmp', None): | ||
| self.cfg.update('configopts', '-DKOKKOS_ENABLE_OPENMP=yes') | ||
| self.cfg.update('configopts', '-DKokkos_ENABLE_OPENMP=yes') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest versions of LAMMPS enforce the Kokkos spelling in the cmake defs but they are backwards compatible so safe to swap out
boegel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, test reports with existing easyconfigs coming up...
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 6 out of 6 (6 easyconfigs in total) |
Also fixes #2073