Dear developers
I am installing Lammps version 4Feb2025 on AMD computer (bi processor 96 cores genoa)
using
cmake -C …/cmake/presets/most.cmake -C …/cmake/presets/kokkos-openmp.cmake …/cmake
openMPI is installed . mpirun and mpicc are in /usr/bin.
/usr/lib/x86_64-linux-gnu/openmpi/ exist and there are libmpi.* files.
but there is no include subfolder as searched for by the install see error message below :
Imported target “MPI::MPI_CXX” includes non-existent path
"/usr/lib/x86_64-linux-gnu/openmpi/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
- The path was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and references files it does not
provide.
CMake Error at /usr/share/cmake-3.28/Modules/FindMPI.cmake:1278 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.28/Modules/FindMPI.cmake:1322 (_MPI_try_staged_settings)
/usr/share/cmake-3.28/Modules/FindMPI.cmake:1645 (_MPI_check_lang_works)
CMakeLists.txt:400 (find_package)
– Configuring incomplete, errors occurred!
Which are the files in the include folder that the install search for ?
Another option is to install openmpi in an opt/ or /usr/local directory and use it. But I would prefer using the existing one for avoiding possible conflicts and multiple versions
May be this a problem of the Ubuntu version and it would preferable to remove it and install the openmpi version from https://www.open-mpi.org/
Thanks for your help.
Best
Pascal
You may be missing the openmpi-dev package.
And if it exists, you should check where it puts the include files.
On Fedora 41 for example they are in /usr/include/openmpi-x86_64/
Thanks a lot Axel
There is no include folder in this directory. So I think, as you suggest, the dev package has not be installed.
I will do it and launch the lammps install again.
Thanks again
Best
Pascal
Hi
the package libopenmpi-dev was missing.
afetr installation the inclde subdirectory was present.
I built lammps using cmake 
cmake -C …/cmake/presets/most.cmake -C …/cmake/presets/kokkos-openmp.cmake …/cmake
cmake --build .
It seems to be successful
lmp -h gives:
/softs/lammps-4Feb2025/build/lmp -h
Large-scale Atomic/Molecular Massively Parallel Simulator - 4 Feb 2025
Usage example: /softs/lammps-4Feb2025/build/lmp -var t 300 -echo screen -in in.alloy
List of command-line options supported by this LAMMPS executable:
-echo none/screen/log/both : echoing of input script (-e)
-help : print this help message (-h)
-in none/filename : read input from file or stdin (default) (-i)
-kokkos on/off ... : turn KOKKOS mode on or off (-k)
-log none/filename : where to send log output (-l)
-mdi '<mdi flags>' : pass flags to the MolSSI Driver Interface
-mpicolor color : which exe in a multi-exe mpirun cmd (-m)
-cite : select citation reminder style (-c)
-nocite : disable citation reminder (-nc)
-nonbuf : disable screen/logfile buffering (-nb)
-package style ... : invoke package command (-pk)
-partition size1 size2 ... : assign partition sizes (-p)
-plog basename : basename for partition logs (-pl)
-pscreen basename : basename for partition screens (-ps)
-restart2data rfile dfile ... : convert restart to data file (-r2data)
-restart2dump rfile dgroup dstyle dfile ...
: convert restart to dump file (-r2dump)
-restart2info rfile : print info about restart rfile (-r2info)
-reorder topology-specs : processor reordering (-r)
-screen none/filename : where to send screen output (-sc)
-skiprun : skip loops in run and minimize (-sr)
-suffix gpu/intel/kk/opt/omp: style suffix to apply (-sf)
-var varname value : set index style variable (-v)
OS: Linux "Ubuntu 24.04.2 LTS" 6.8.0-55-generic x86_64
Compiler: GNU C++ 13.3.0 with OpenMP 4.5
C++ standard: C++17
Embedded fmt library version: 10.2.0
MPI v1.0: LAMMPS MPI STUBS for LAMMPS version 4 Feb 2025
Accelerator configuration:
KOKKOS package API: OpenMP Serial
KOKKOS package precision: double
Kokkos library version: 4.5.1
OPENMP package API: OpenMP
OPENMP package precision: double
OpenMP standard: OpenMP 4.5
FFT information:
FFT precision = double
FFT engine = mpiFFT
FFT library = FFTW3 with threads
KOKKOS FFT engine = mpiFFT
KOKKOS FFT library = KISS
Active compile time flags:
-DLAMMPS_GZIP
-DLAMMPS_SMALLBIG
sizeof(smallint): 32-bit
sizeof(imageint): 32-bit
sizeof(tagint): 32-bit
sizeof(bigint): 64-bit
Available compression formats:
Extension: .gz Command: gzip
Extension: .bz2 Command: bzip2
Extension: .zst Command: zstd
Extension: .xz Command: xz
Extension: .lzma Command: xz
Installed packages:
AMOEBA ASPHERE BOCS BODY BPM BROWNIAN CG-DNA CG-SPICA CLASS2 COLLOID COLVARS
COMPRESS CORESHELL DIELECTRIC DIFFRACTION DIPOLE DPD-BASIC DPD-MESO DPD-REACT
DPD-SMOOTH DRUDE EFF ELECTRODE EXTRA-COMMAND EXTRA-COMPUTE EXTRA-DUMP
EXTRA-FIX EXTRA-MOLECULE EXTRA-PAIR FEP GRANULAR INTERLAYER KOKKOS KSPACE
LEPTON MACHDYN MANYBODY MC MEAM MESONT MISC ML-IAP ML-POD ML-SNAP ML-UF3 MOFFF
MOLECULE OPENMP OPT ORIENT PERI PHONON PLUGIN POEMS QEQ REACTION REAXFF
REPLICA RHEO RIGID SHOCK SPH SPIN SRD TALLY UEF VORONOI YAFF
I am a bit surprised tha the only reference to MPI is MPI V1.0.
Moreover running a simplescript fails .
###################
# 1) Initialisation
###################
units metal # style of unit used in the simulation
# for metal style :: mass=gram/mole ; dist=A ; time=ps ; E=eV ; vel=A/ps ; F=eV/A ; T=deg K ; P=bars ; density=gram/cm^dim
dimension 3 # set the dimensionality of the simulation
boundary p p m # set the style of boundaries for the global simulation box in each dimension
atom_style atomic # define what style of atom (atomic, molecule, charge, ...)
processors 2 2 1
ERROR: Specified processors != physical processors (src/comm.cpp:432)
Last input line: processors 2 2 1
would it mean that the 2x96 cores machine is seen a single core one ?
Thanks a lot for advice
Best
Pascal
I check the machine configuration using lscpu
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 192
On-line CPU(s) list: 0-191
I should add which openmpi version is installed :
mpirun --version
mpirun (Open MPI) 4.1.6
I have found the problem. It is an incorrect openmpi installation using apt install.
I will install it from the regular version at https://www.open-mpi.org
Best
Pascal
Hmmm… on Ubuntu machines, I usually install:
mpi-default-bin
and mpi-default-dev
and I get what I need. Those are “virtual packages”, if I look specifically for packages with openmpi
in the name that it has installed I find libopenmpi-dev'
libopenmpi3t64,
openmpi-bin, and
openmpi-common`.
This means you have configured a serial LAMMPS version. There is still something missing that CMake cannot detect your MPI library. There may be a hint in the CMake output.
I seriously doubt that. I just compiled LAMMPS yesterday on a Ubuntu 24.04LTS (virtual) machine and it had no problem using the OpenMPI package installed by the apt package manager.
Large-scale Atomic/Molecular Massively Parallel Simulator - 4 Feb 2025 - Development
Git info (develop / patch_4Feb2025-169-g4246fab500-modified)
Usage example: ./lmp -var t 300 -echo screen -in in.alloy
[...]
OS: Linux "Ubuntu 24.04.2 LTS" 6.8.0-55-generic x86_64
Compiler: GNU C++ 13.3.0 with OpenMP 4.5
C++ standard: C++17
Embedded fmt library version: 10.2.0
MPI v3.1: Open MPI v4.1.6, package: Debian OpenMPI, ident: 4.1.6, repo rev: v4.1.6, Sep 30, 2023
Thanks a lot Axel
This is strange since I got the same installed packages, as you mention, using ```sudo apt list --installed openmpi
say:
libopemmpi-dev
openmpi-common
openmpi-bin
I have installed openmpi from the tarball of open-mpi.org and rebuild lammps 4Feb2025
and from lmp -h command I get:
Compiler: GNU C++ 13.3.0 with OpenMP 4.5
C++ standard: C++17
Embedded fmt library version: 10.2.0
MPI v3.1: Open MPI v5.0.7, package: Open MPI pbrault@ms4allhpc1 Distribution, ident: 5.0.7, repo rev: v5.0.7, Feb 14, 2025
Accelerator configuration:
KOKKOS package API: OpenMP Serial
KOKKOS package precision: double
Kokkos library version: 4.5.1
OPENMP package API: OpenMP
OPENMP package precision: double
OpenMP standard: OpenMP 4.5
FFT information:
FFT precision = double
FFT engine = mpiFFT
FFT library = FFTW3 with threads
KOKKOS FFT engine = mpiFFT
KOKKOS FFT library = KISS
I ran the same sample script and MPI seems now properly running properly
mpirun -np 4 lmp -in lammps-test-mpi.lammps
LAMMPS (4 Feb 2025)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
using 1 OpenMP thread(s) per MPI task
Lattice spacing in x,y,z = 2.87 2.87 2.87
Created orthogonal box = (0 0 0) to (20.09 20.09 71.75)
2 by 2 by 1 MPI processor grid
I do not understand what happens. Vendor of the AMD computer said me, he installed openmpi through meta-openmpi or something similar.
Thanks a lot again for your advices.
Best
Pascal
No you don’t. You are missing libopenmpi3t64
.
Vendors are not to be trusted.
I forgot to mention it, but libopenmpi3t64
was present too, as well as libcaf-openmpi-3t64
May be I can try again using apt install mpi-default-bin
and mpi-default-dev
Thanks a lot again.
Best
Pascal