Skip to content

lammps: GPU/Kokkos package updates#35885

Merged
alalazo merged 3 commits intospack:developfrom
rbberger:lammps_rocm
Mar 8, 2023
Merged

lammps: GPU/Kokkos package updates#35885
alalazo merged 3 commits intospack:developfrom
rbberger:lammps_rocm

Conversation

@rbberger
Copy link
Copy Markdown
Member

@rbberger rbberger commented Mar 6, 2023

LAMMPS has multiple GPU backends. The most actively developed one is for Kokkos, but the older GPU package also supports various backends, including HIP.

This adds the missing rocm variant to lammps. By default, if kokkos is not enabled, it will build with the GPU package, as has been the case with the existing +opencl and +cuda variants.

The patch is necessary because of the hipcub dependency. It gets installed into a non-standard location when used via Spack. The current LAMMPS cmake was making some assumptions which break in that case. Since I have to choose some sort of cutoff for maintaining this, the patch is only applied beginning from the last stable release.

This and another issue in upstream develop should be resolved soon with lammps/lammps#3674

I've also added a new dependent variant gpu_precision, which was/is actually the most significant benefit of the GPU package over Kokkos, as it allows you to choose between single, mixed, or double precision when doing the offloading.

For +kokkos, I've also added the propagation of the cuda_arch and amdgpu_target properties.

Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

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

Checked package syntax and idioms and LGTM

@alalazo alalazo merged commit 3feadc0 into spack:develop Mar 8, 2023
@rbberger rbberger deleted the lammps_rocm branch March 18, 2023 06:17
jmcarcell pushed a commit to key4hep/spack that referenced this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants