Open ctxu-NWPU opened 2 months ago
I've never compiled LAMMPS with ScaLAPACK, so I don't know why you'd want to do that. Regardless, it looks like, for some reason, doing it causes LAMMPS to enable ScaLAPACK inside QUIP, which is wrong because LAMMPS needs a completely serial QUIP library. Also, it appears that the link line that cmake generates doesn't actually link in scalapack for some reason, but even if it did, this could be bad, because you don't want ScaLAPACK active inside QUIP.
If you don't really need scalapack for some LAMMPS reason, don't enable it. If you do, we may have to dig into how LAMMPS compiles QUIP and stop ScaLAPACK in LAMMPS from turning on ScaLAPACK in QUIP.
I've never compiled LAMMPS with ScaLAPACK, so I don't know why you'd want to do that. Regardless, it looks like, for some reason, doing it causes LAMMPS to enable ScaLAPACK inside QUIP, which is wrong because LAMMPS needs a completely serial QUIP library. Also, it appears that the link line that cmake generates doesn't actually link in scalapack for some reason, but even if it did, this could be bad, because you don't want ScaLAPACK active inside QUIP.
If you don't really need scalapack for some LAMMPS reason, don't enable it. If you do, we may have to dig into how LAMMPS compiles QUIP and stop ScaLAPACK in LAMMPS from turning on ScaLAPACK in QUIP.
Thanks for your suggestion, I'll try to fix this by excluding ScaLAPACK in quip. My purpose is to reproduce the simulation of silicon in the past paper with quip/lammps.
You definitely don't need any of the lapack/scalapack flags passed to cmake. All I routinely use (pretty sure cmake is depending on MKLROOT
env var to find MKL for fftw, but if you don't have MKL, you can just remove the -D FFT
flag altogether) is the following. Pretty sure essentially none of those options are even needed if all you plan to run is QUIP.
cmake -D BUILD_SHARED_LIBS=ON \
-D PKG_CLASS2=ON \
-D PKG_KSPACE=ON \
-D PKG_MANYBODY=ON \
-D PKG_MEAM=ON \
-D PKG_MISC=ON \
-D PKG_ML-QUIP=ON \
-D PKG_MOLECULE=ON \
-D PKG_REAXFF=ON \
-D YAML_BUILD_SHARED_LIBS=OFF \
-D FFT=MKL \
../cmake
hello, i have a unresolved problem due to unknown reasons. When I want to build LAMMPS with cmake, i face a complex problem. The following is my operations.
output:
– Appending :/home/ctxu/lapack-3.12.0 to CMAKE_LIBRARY_PATH: /home/ctxu/gcc-9.5.0/lib64/libscalapack.a;:/home/ctxu/lapack-3.12.0 – Running check for auto-generated files from make-based build system – Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE) – Generating style headers… – Generating package headers… – Generating lmpinstalledpkgs.h… – 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 LAPACK BLAS JPEG PNG ZLIB QUIP – <<< Build configuration >>> LAMMPS Version: 20230802 Operating System: Linux CentOS 7 CMake Version: 3.25.2 Build type: RelWithDebInfo Install path: /home/ctxu/lammps/lammps Generator: Unix Makefiles using /usr/bin/gmake – Enabled packages: ML-QUIP – <<< Compilers and Flags: >>> – C++ Compiler: /home/ctxu/lammps/mpich_install/bin/mpicxx Type: GNU Version: 9.5.0 C++ Flags: -O2 -g -DNDEBUG Defines: LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_OMP_COMPAT=4;LAMMPS_JPEG;LAMMPS_PNG;LAMMPS_GZIP – Fortran Compiler: /home/ctxu/lammps/mpich_install/bin/mpifort Type: GNU Version: 9.5.0 Fortran Flags: -O2 -g -DNDEBUG – C compiler: /home/ctxu/lammps/mpich_install/bin/mpicc Type: GNU Version: 9.5.0 C Flags: -O2 -g -DNDEBUG – <<< Linker flags: >>> – Executable name: lmp_mpi – Static library flags: – <<< MPI flags >>> – MPI_defines: MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H – MPI includes: – MPI libraries: ; – Configuring done – Generating done – Build files have been written to: /home/ctxu/lammps/lammps/build
As you can see, although I tried to build scalapack when cmake, it still had a lot of problems. I want to know how to gap the error. I'm sorry to bother you. @max-veit @Montmorency @jameskermode @bernstei