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

Only enable CUDA in LAMMPS if it is an explicit dep + add support for building for NVIDIA Ampere GPUs #2208

Merged
merged 8 commits into from Oct 26, 2020

Conversation

ocaisa
Copy link
Member

@ocaisa ocaisa commented Oct 21, 2020

Also fixes #2073

@ocaisa
Copy link
Member Author

ocaisa commented Oct 21, 2020

Also taking the opportunity to add support for Ampere

Copy link
Contributor

@bartoldeman bartoldeman left a comment

Choose a reason for hiding this comment

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

lgtm

easybuild/easyblocks/l/lammps.py Outdated Show resolved Hide resolved
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')
Copy link
Contributor

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') ?

Copy link
Member Author

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

Copy link
Member

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?

@ocaisa
Copy link
Member Author

ocaisa commented Oct 22, 2020

Test report in https://gist.github.com/ocaisa/fbf071eecd693b63e16075868358b31b (stopping after successful configure)

@ocaisa
Copy link
Member Author

ocaisa commented Oct 22, 2020

Another test report for foss-cuda in https://gist.github.com/8a4872eeb39cc20ed3aa301fe37568cb

@@ -216,20 +224,21 @@ def configure_step(self, **kwargs):
if self.cfg['kokkos']:

if self.toolchain.options.get('openmp', None):
self.cfg.update('configopts', '-DKOKKOS_ENABLE_OPENMP=yes')
self.cfg.update('configopts', '-DKokkos_ENABLE_OPENMP=yes')
Copy link
Member Author

@ocaisa ocaisa Oct 23, 2020

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 boegel added this to the 4.3.1 (next release) milestone Oct 25, 2020
@boegel boegel changed the title Only enable CUDA in LAMMPS if it is an explicit dep Only enable CUDA in LAMMPS if it is an explicit dep + add support for building for NVIDIA Ampere GPUs Oct 25, 2020
Copy link
Member

@boegel boegel left a 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...

@boegel
Copy link
Member

boegel commented Oct 25, 2020

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS LAMMPS-3Mar2020-foss-2019b-Python-3.7.4-kokkos.eb
  • SUCCESS LAMMPS-3Mar2020-foss-2020a-Python-3.8.2-kokkos.eb
  • SUCCESS LAMMPS-3Mar2020-intel-2019b-Python-3.7.4-kokkos.eb
  • SUCCESS LAMMPS-7Aug2019-foss-2019b-Python-3.7.4-kokkos.eb
  • SUCCESS LAMMPS-7Aug2019-intel-2019b-Python-3.7.4-kokkos.eb
  • SUCCESS LAMMPS-7Aug2019-intel-2019b-Python-3.7.4-kokkos-OCTP.eb

Build succeeded for 6 out of 6 (6 easyconfigs in total)
node3411.kirlia.os - Linux centos linux 7.8.2003, x86_64, Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz (cascadelake), Python 2.7.5
See https://gist.github.com/90791dbc5f9123e1e50ea99350816bfb for a full test report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of deprecated CMake options for Kokkos in LAMMPS easyblock
4 participants