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
Add CMake support for HIP via CHIP-SPV #3365
Conversation
@pvelesko Thanks for your submission. Please note that we cannot merge this unless the documentation is updated accordingly. It would also be nice, if you could discuss the differences to using OpenCL. From the perspective of a scientist user with minimal experience in compiling software (i.e. a large part of the LAMMPS user community) using OpenCL may be preferred as its pre-requisites are minimal. We would also appreciate it very much, if you could also add support for the conventional build system (should not be too difficult considering the small number of changes for CMake). |
@akohlmey I updated the documentation and addressed the PR comments. I also modified the Makefile for GPU and it seems to compile the GPU stuff ok but I run into some issues with MPI calls |
Can you provide some details about this? I.e. which commands did you run where and what was the output to the screen? |
|
Please see these variable definitions in Makefile.hip:
Apparently Makefile.hip assumes that people use OpenMPI while you seem to be using MPICH 😉 Looks like this needs a little "GNU make magic(tm)" to discriminate between those and have alternatives to retrieve the MPI settings from the MPI compiler wrappers. |
|
Do you have some spare magic lying around that you could use to implement it? ;-) Is there an urgency to have this merged right away? I can probably come up with some way (we've done similar things elsewhere, e.g. to detect/select the python executable) if I can find some time... |
@akohlmey I can cast lvl 1 attempt. https://www.mpich.org/static/docs/v3.1/www1/mpicxx.html We have
Looks like we can get it from |
@pvelesko I just tried to cast a spell on the HIP makefile based on our other hacks. It works for me on Fedora 36 with both OpenMPI and MPICH. Please check it out and let us know. |
@akohlmey LGTM |
Summary
Add CMake support for compiling LAMMPS for Intel GPUs via CHIP-SPV implementation of HIP.
Related Issue(s)
none
Author(s)
Paulius Velesko
PGLC for Argonne ALCF
pvelesko@pglc.io
Licensing
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
Backward Compatibility
Backwards compatible.
Implementation Notes
When using the HIP backend it is now mandatory to have
HIP_PATH
set in the environment. Previously, it would default to/opt/rocm/
but this default no longer makes sense now that there are multiple HIP implementations.Post Submission Checklist
Further Information, Files, and Links
https://github.com/CHIP-SPV/chip-spv