LAMMPS PHONON package error

Hello,
I have successfully compiled LAMMPS with the PHONON package.

$ cmake ../cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx -D PKG_MANYBODY=yes -D PKG_PYTHON=yes -D PKG_PHONON=yes
-- Appending /opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/libfabric/lib:/opt/intel/compilers_and_libraries_2020.1.217/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2020.1.217/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.1.217/linux/tbb/lib/intel64/gcc4.8:/opt/intel/compilers_and_libraries_2020.1.217/linux/tbb/lib/intel64/gcc4.8:/opt/intel/compilers_and_libraries_2020.1.217/linux/daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.1.217/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_2020.1.217/linux/daal/../tbb/lib/intel64_lin/gcc4.8 to CMAKE_LIBRARY_PATH: /opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/libfabric/lib:/opt/intel/compilers_and_libraries_2020.1.217/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2020.1.217/linux/compiler/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.1.217/linux/tbb/lib/intel64/gcc4.8:/opt/intel/compilers_and_libraries_2020.1.217/linux/tbb/lib/intel64/gcc4.8:/opt/intel/compilers_and_libraries_2020.1.217/linux/daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_2020.1.217/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_2020.1.217/linux/daal/../tbb/lib/intel64_lin/gcc4.8
-- Running check for auto-generated files from make-based build system
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
-- Found Python: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter Development Development.Module Development.Embed
-- Generating style headers...
-- Generating package headers...
-- Generating lmpinstalledpkgs.h...
-- The following tools and libraries have been found and configured:
 * Git
 * MPI
 * OpenMP
 * Python
 * ClangFormat (required version >= 8.0)

-- <<< Build configuration >>>
   LAMMPS Version:   20230802
   Operating System: Linux Ubuntu" 22.04
   CMake Version:    3.22.1
   Build type:       RelWithDebInfo
   Install path:     /home/nagase/.local
   Generator:        Unix Makefiles using /usr/bin/gmake
-- Enabled packages: MANYBODY;PHONON;PYTHON
-- <<< Compilers and Flags: >>>
-- C++ Compiler:     /opt/intel/compilers_and_libraries_2020.1.217/linux/bin/icpx
      Type:          IntelLLVM
      Version:       2021.0.0
      C++ Flags:     -O2 -g -DNDEBUG
      Defines:       LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_OMP_COMPAT=4;LAMMPS_GZIP;LAMMPS_FFMPEG;LMP_PYTHON
      Options:       -Wno-tautological-constant-compare;-Wno-unused-command-line-argument
-- <<< Linker flags: >>>
-- Executable name:  lmp
-- Static library flags:
-- <<< MPI flags >>>
-- MPI_defines:      MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H
-- MPI includes:     /opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/include
-- MPI libraries:    /opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib/libmpicxx.so;/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib/libmpifort.so;/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib/release/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/librt.a;/usr/lib/x86_64-linux-gnu/libpthread.a;
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nagase/soft/20230810_4_release_lammps_intel/lammps/build
$ cmake --build .
...
[100%] Built target lammps
[100%] Building CXX object CMakeFiles/lmp.dir/home/nagase/soft/20230810_4_release_lammps_intel/lammps/src/main.cpp.o
[100%] Linking CXX executable lmp
[100%] Built target lmp
$ ls
CMakeCache.txt  CMakeFiles  Makefile  cmake_install.cmake  etc  includes  liblammps.a  lmp  styles

But the calculations with PHONON package are failed.

ERROR: Unrecognized fix style 'phonon' is part of the PHONON package, but seems to be missing because of a dependency (src/modify.cpp:917)

The calculations with MANYMODY package and the calculations with KIM package are succeed.
So, I think there is a problem with the way the PHONON package is compiled.

I would be grateful to you for any assistance.

This is not a bug, but documented behavior. You have not installed the KSPACE package, which is required since it provides the necessary interface to the FFT library. Please see: fix phonon command — LAMMPS documentation and 6.2. Package details — LAMMPS documentation

1 Like

I have solved the problem.

Thank you for your kind cooperation!