CMake Error - immintrin.h

When I attempt to build the latest version of LAMMPS (from git) with cmake, it
is unable to find `immintrin.h` even though it exists.

The relevant output is as follows:

CMakeError.log (1.33 KB)

CMakeOutput.log (106 KB)

thanks for reporting. in the future, please report such issues on github, especially since this applies only to the development branch.
please try the following change as a remedy:

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 911b6f0f1…8ab954048 100644
— a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1135,7 +1135,7 @@ endif()

if(PKG_USER-INTEL)
include(CheckIncludeFile)

  • check_include_file(immintrin.h FOUND_IMMINTRIN)
  • check_include_file_cxx(immintrin.h FOUND_IMMINTRIN)
    if(NOT FOUND_IMMINTRIN)
    message(FATAL_ERROR "immintrin.h header not found, Intel package won’t w>
    endif()

It works with the change. Thanks a lot!

I wrote to the mailing list because I wasn't sure if it was indeed an issue
with lammps' files. Next time, I'll err on the side of assuming to the
contrary. :slight_smile: