Hi, I am a beginner at using LAMMPS, so please bared with me. I am currently running Ubuntu 24.02 server with AMD CPU (9654) with AMD GPU (MI210). I am using the stable branch off the github as of (25 Jun 2025). Below are the steps that I have done with screenshots. I have checked out the forum on here for the MI200 install from 2 years again but it did not help me to guide through this issue. Please and thank.
I have done:

Then a make hip -j$(nproc)
But I would keep getting this issue:
I was able to get the CPU build working with hip version and the oneapi.
Ok I have that built and it is working on 1 GPU but I am running into this issues for multiple.
ERROR: Could not determine local MPI rank for multiple GPUs with Kokkos because MPI library not recognized (…/kokkos.cpp:162)
Thank you for the help. I thought the Makefile.hip would include the backend too?
ERROR: Could not determine local MPI rank for multiple GPUs with Kokkos because MPI library not recognized (…/kokkos.cpp:162)
What MPI are you using?
I thought the Makefile.hip would include the backend too?
That is for the GPU package, not KOKKOS.
I am using intel oneapi and using its openmpi package. (I think it is not built correctly, when done it)
Then shouldn’t the “make hip” work with gpu?
I am using intel oneapi and using its openmpi package. (I think it is not built correctly, when done it)
The code is looking for one of several environment variables, see lammps/src/KOKKOS/kokkos.cpp at b7be53f3fcfdcc25f3e62a06d1fe624d4b20134c · lammps/lammps · GitHub. If your MPI doesn’t set one of those variables then it won’t work.
Then shouldn’t the “make hip”?
Not sure what you mean by this.
LAMMPS has two packages that support GPUs. One is called (quite confusingly) the “GPU” package, and the other is KOKKOS. They are different. So makefiles for the “GPU” package won’t work for the KOKKOS package. See 7.4. Accelerator packages — LAMMPS documentation for more info.
There is no benefit from using the Intel compilers, but when using “make hip” you are not using them but instead the AMD provided HIP compiler. Both are LLVM based and there is not much difference between them unless you want to use the INTEL package. Actually, there are multiple versions of the Intel compilers where we have had reports of them compiling LAMMPS incorrectly due to too aggressive optimization.
To the best of my knowledge, the Intel MPI package is not OpenMPI based but MPICH derived.
From your statements in this discussion it seems that you are not very familiar with how to use (and edit!) makefiles to build software. In that case, we usually recommend to consider using the CMake based build system. It does not require a multiple step build for some of the packages and no manual configuration of either target makefiles under src/MAKE or library/package makefiles in the lib folders, it can auto-detect many settings that are optimal for your system and for specific choices we provide some configuration presets. On top of that, you can tweak your configuration by re-running cmake (or more conveniently do this interactively with the ccmake tool).
Learning how to use CMake for compiling LAMMPS is an investment into the future since after the next stable release we will drop support for the traditional make build procedure in favor of CMake builds. Furthermore, the Kokkos project will drop their support for traditional makefiles as well, so as soon as we update the bundled Kokkos library to that version, it is definitely “game over” for the traditional build procedure when using the KOKKOS package.