Hi,
LAMMPS version: (23 Jun 2022 - Update 2)
OS: Ubuntu 22.04.1 LTS
I run the following CMake
“~/lammps/lammps/build$ cmake -C …/cmake/presets/minimal.cmake -D PKG_GPU=on -D GPU_API=cuda -D GPU_PREC=double -D OCL_TUNE=generic -D GPU_ARCH=sm_51 -D CUDPP_OPT=no -D CUDA_MPS_SUPPORT=yes -D PKG_USER-OMP=on …/cmake
loading initial cache file …/cmake/presets/minimal.cmake”
The output was
- “CMake Error: Error processing file: /home/…/lammps/lammps/cmake/presets/minimal.cmake”
i.e. - Could NOT find ClangFormat: Found unsuitable version “0.0”, but required is at least “8.0” (found /usr/bin/clang-format)
However in terminal
- :/usr/bin$ clang-format-
clang-format-13 clang-format-diff-13
Therefore I made few changes in the FindClangFormat.cmake file as follows,
-
find_program(ClangFormat_EXECUTABLE NAMES clang-format
clang-format-15.0
clang-format-14.0
clang-format-13.0
clang-format-12.0
clang-format-11.0 -
if(ClangFormat_EXECUTABLE)
execute_process(COMMAND ${ClangFormat_EXECUTABLE} --version
OUTPUT_VARIABLE clang_format_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)if(clang_format_version MATCHES “^(Ubuntu |)clang-format version.*”)
string(REGEX REPLACE “^(Ubuntu |)clang-format version ([0-9.]+).*”
“\2”
but the configuration process provides still the same error.
Thank you for your assistance
Wenu