[BUG] Release branch fails to build with EXTRA-PAIR
wcwitt opened this issue · 3 comments
wcwitt commented
The following build recipe fails as written but works if I clone the stable
branch instead of release
.
git clone -b release https://github.com/lammps/lammps.git
cd lammps
mkdir build
cd build
cmake \
-DPKG_EXTRA-PAIR=yes \
../cmake
make -j 3
My system information is
-- The CXX compiler identification is GNU 10.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Running check for auto-generated files from make-based build system
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/libmpichcxx.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Looking for C++ include omp.h
-- Looking for C++ include omp.h - found
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: CXX
-- Found GZIP: /usr/bin/gzip
-- Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE)
-- Looking for C++ include cmath
-- Looking for C++ include cmath - found
-- Generating style headers...
-- Generating package headers...
-- Generating lmpinstalledpkgs.h...
-- Found Python3: /home/wcw/tools/miniconda3/bin/python3.9 (found version "3.9.7") found components: Interpreter
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE) (Required is at least version "8.0")
-- The following tools and libraries have been found and configured:
* Git
* MPI
* OpenMP
* Python3
-- <<< Build configuration >>>
LAMMPS Version: 20240207 patch_7Feb2024
Operating System: Linux Ubuntu" 20.04
CMake Version: 3.26.3
Build type: RelWithDebInfo
Install path: /home/wcw/.local
Generator: Unix Makefiles using /usr/bin/make
-- Enabled packages: EXTRA-PAIR
-- <<< Compilers and Flags: >>>
-- C++ Compiler: /usr/bin/c++
Type: GNU
Version: 10.3.0
C++ Flags: -O2 -g -DNDEBUG
Defines: LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_OMP_COMPAT=4;LAMMPS_GZIP
-- <<< Linker flags: >>>
-- Executable name: lmp
-- Static library flags:
-- <<< MPI flags >>>
-- MPI_defines: MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H
-- MPI includes: /usr/include/x86_64-linux-gnu/mpich
-- MPI libraries: /usr/lib/x86_64-linux-gnu/libmpichcxx.so;/usr/lib/x86_64-linux-gnu/libmpich.so;
-- Configuring done (8.2s)
-- Generating done (0.1s)
-- Build files have been written to: /home/wcw/work/t-lammps/lammps/build
and the error occurs here
[ 91%] Building CXX object CMakeFiles/lammps.dir/home/wcw/work/t-lammps/lammps/src/EXTRA-PAIR/pair_coul_slater_long.cpp.o
/home/wcw/work/t-lammps/lammps/src/EXTRA-PAIR/pair_coul_slater_long.cpp:24:10: fatal error: ewald_const.h: No such file or directory
24 | #include "ewald_const.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/lammps.dir/build.make:5228: CMakeFiles/lammps.dir/home/wcw/work/t-lammps/lammps/src/EXTRA-PAIR/pair_coul_slater_long.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:171: CMakeFiles/lammps.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
If the fix is straightforward I'm willing to make a PR. Thanks for taking a look.
wcwitt commented
Just tried on develop
as well - same error.
akohlmey commented
The same issue was reported in the LAMMPS forum on MatSci.org minutes ago. The workaround is the same: either add -D PKG_KSPACE=yes
to your CMake command line or move the file ewald_const.h
from src/KSPACE
to src
.
wcwitt commented
Thanks - not urgent for me, just thought I should flag it.