Installation of lammps

Hello, This is Shivam Tripathy, currently trying to install lammps (latest release) using git command but there has been significant problem in installation while building of cmakefiles or using ‘make -j$nproc)’ or using ‘make install’. The following is the configuration of my workstation:-

antpc@antpc:~$ nproc
128
antpc@antpc:~$ nvidia-smi
Wed Feb 18 14:08:34 2026       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 590.48.01              Driver Version: 590.48.01      CUDA Version: 13.1     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5090        Off |   00000000:3B:00.0  On |                  N/A |
|  0%   52C    P8             53W /  575W |     624MiB /  32607MiB |     10%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            3919      G   /usr/lib/xorg/Xorg                      199MiB |
|    0   N/A  N/A            4209      G   /usr/bin/gnome-shell                     45MiB |
|    0   N/A  N/A            4742      G   ...exec/xdg-desktop-portal-gnome          8MiB |
|    0   N/A  N/A            4975      G   /usr/bin/nautilus                        24MiB |
|    0   N/A  N/A           13061      G   .../7766/usr/lib/firefox/firefox        223MiB |
|    0   N/A  N/A           40841      G   /usr/bin/gnome-text-editor               21MiB |
+-----------------------------------------------------------------------------------------+
antpc@antpc:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Tue_Dec__16_07:23:41_PM_PST_2025
Cuda compilation tools, release 13.1, V13.1.115
Build cuda_13.1.r13.1/compiler.37061995_0

antpc@antpc:~$ cmake --version
cmake version 4.2.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
antpc@antpc:~$ mpicxx --version
g++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and system info:-
# System Details Report
---

## Report details
- **Date generated:**                              2026-02-18 14:09:20

## Hardware Information:
- **Hardware Model:**                              Giga Computing MS74-HB0-000
- **Memory:**                                      128.0 GiB
- **Processor:**                                   Intel® Xeon® 6710E × 128
- **Graphics:**                                    NVIDIA GeForce RTX™ 5090
- **Disk Capacity:**                               2.0 TB

## Software Information:
- **Firmware Version:**                            F25
- **OS Name:**                                     Ubuntu 24.04.4 LTS
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               46
- **Windowing System:**                            X11
- **Kernel Version:**                              Linux 6.8.0-90-generic

then I was following the cmake building using this :-

cmake ../cmake -D BUILD_MPI=on -D BUILD_OMP=on -D PKG_KSPACE=ON -D PKG_MANYBODY=ON -D PKG_MOLECULE=ON -D PKG_REAXFF=ON -D CMAKE_BUILD_TYPE=Release -D CMAKE_CUDA_ARCHITECTURES=120 -D CMAKE_CXX_COMPILER=mpicxx  -D FFT_KOKKOS=CUFFT -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=mpicc -D FFT=FFTW3 -D Kokkos_ENABLE_CUDA=ON -D Kokkos_ENABLE_OPENMP=ON -D Kokkos_ENABLE_SERIAL=ON -D Kokkos_ARCH_BLACKWELL120=ON -D PKG_KOKKOS=ON -D PKG_RIGID=ON -D PKG_REPLICA=ON -D PKG_GRANULAR=ON -D PKG_EXTRA-COMPUTE=ON

Errors came related to missing libraries, nvcc fatal errors, (also I installed kokkos 5.0.2 from git command in the system), then also errors begin come related to fatal errors in kokkos detection as well as architecture configuration confusion. After some hit and trial I installed the lammps, the job script i try to run goes into floating point exception whenever I try to do the “mpirun -np X”.
Hence, can anyone help me related to this ?
Warm Regards…

This only shows the version of the nvidia driver and the number of (virtual?) CPUs and that you are running on a Linux machine. It does not say anything about the kind of CPU, the kind of Linux, the compiler versions, the Linux version and so on.

This is far to vague and lacking any useful details that would be necessary to provide any meaningful assistance. All that one can tell you at this point is what is already written in the LAMMPS documentation and that any problems are likely due to your machine’s configuration or the details of you environment. In order to narrow down where things go wrong, you have to employ common sense and first start with a minimum compilation of LAMMPS without any added features or packages and then systematically add one individually to identify those that are causing problems and then describe the exact details and how to exactly reproduce what you have done.

nvcc is nvidia wrapper around their compilers. It is contained in the nvhpc package which is nvidia dedicated package for HPC and is required especially when you want to compile CUDA or other GPU related features.

Couple of things:

  1. Follow the cmake compilation routine from the manual step by step. You should not mix cmake and make compilation commands.
  2. The cmake command you use is complicated. Look into cmake presets. Some options can be put in external files for simplicity.
  3. Try to build KOKKOS and CUDA features in separate steps. Verify that one compiles well, then add the other one in your process.
  4. The required compilers for a given set of options should be detected by cmake before compiling. nvhpc is not required to compile most of LAMMPS libraries and core features. Try compiling simpler binaries with less features and build on slowly.

Also if you have trouble to compile and install LAMMPS, it is likely you will have trouble to install correctly nvhpc. You’ll need time and a good read at its documentation on nvidia website. Else contact your computer maintainer that should assist you in the process. Maybe it is already available as a module.

Not quite. You only need the CUDA toolkit and that can be downloaded separately. NVHPC is a bundle with the compiler that was formerly known as PGI (before NVIDIA took over its vendor) and a custom compiled copy of OpenMPI. I can only advise to not use that compiler package. I have given up trying to keep LAMMPS compatible with PGI/NVHPC long ago.

1 Like

I didn’t know the full backstory of the package. Good to know. I only had to mess with it because it is required by Quantum Espresso to get GPU features.

I agree that it is better to avoid it if not necessary.

Workstation details are as follows :-

antpc@antpc:~$ nproc
128
NVIDIA-SMI 590.48.01              Driver Version: 590.48.01      CUDA Version: 13.1

antpc@antpc:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Tue_Dec__16_07:23:41_PM_PST_2025
Cuda compilation tools, release 13.1, V13.1.115
Build cuda_13.1.r13.1/compiler.37061995_0

antpc@antpc:~$ cmake --version
cmake version 4.2.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
antpc@antpc:~$ mpicxx --version
g++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and system info:-

System Details Report


Report details

  • Date generated: 2026-02-18 14:09:20

Hardware Information:

  • Hardware Model: Giga Computing MS74-HB0-000
  • Memory: 128.0 GiB
  • Processor: Intel® Xeon® 6710E × 128
  • Graphics: NVIDIA GeForce RTX™ 5090
  • Disk Capacity: 2.0 TB

Software Information:

  • Firmware Version: F25
  • OS Name: Ubuntu 24.04.4 LTS
  • OS Build: (null)
  • OS Type: 64-bit
  • GNOME Version: 46
  • Windowing System: X11
  • Kernel Version: Linux 6.8.0-90-generic

This is only part of the information that I asked for, and the least important part, too.
Did you only read the first part of my response??

I am sorry, but I don’t have the time and patience to play 20 questions with you.
You have to wait for somebody else with more patience to get assistance.