Installing the new (lastest stable release) LAMMPS Update

Hi,

I have been working on compiling the latest stable release of LAMMPS from GitHub - lammps/lammps: Public development project of the LAMMPS MD software package on Kestrel (nrel). I followed the general cmake make procedure based on LAMMPS documentation:

cd lammps                # change to the LAMMPS distribution directory
mkdir build; cd build    # create and use a build directory
cmake ../cmake           # configuration reading CMake scripts from ../cmake
cmake --build .          # compilation (or type "make")

After this, I run ‘make install’ and generate the lmp executable. I receive the following error:
[~] $ lmp
lmp: error while loading shared libraries: libjpeg.so.9: cannot open shared object file: No such file or directory

I was able to trace the source of this error by running,
ldd $(which lmp)
And I see the following:
libjpeg.so.9 => not found

In the CMakeLists.txt I don’t see any place where libjpeg.so.9 is being called. I would really appreciate some help in fixing this. Thanks

https://docs.lammps.org/Build_settings.html#output-of-jpeg-png-and-movie-files

Hi,

Thanks so much for your response! It was very helpful in solving the problem. However, now I am encountering a new problem. After I run the following commands with (relevant options):

[~] $ cmake -D PKG_MOLECULE=on -D PKG_KSPACE=on -D PKG_DRUDE=on -D PKG_ELECTRODE=on -D WITH_JPEG=no -D WITH_PNG=no ../cmake
[~] $ make install
[~] $ lmp # lmp excutable

lmp: error while loading shared libraries: libmkl_intel_lp64.so.1: cannot open shared object file: No such file or directory

I was able to trace the error by running ldd $(which lmp) as before, and I see the following:
libmkl_intel_lp64.so.1 => not found
libmkl_intel_thread.so.1 => not found
libmkl_core.so.1 => not found

I noticed that these libraries are called by the ELECTRODE package. After some digging, I found that this is the Intel Math Kernel Library (MKL) shared library. I tried fixing this error by exporting the correct LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/latest/lib/intel64:$LD_LIBRARY_PATH

I also tried,

-D MKL_LIBRARY=path # path to MKL libraries

But I keep getting the same error. I would really appreciate some help in fixing this. Thanks.

If you have a new problem, you should create a new topic.

This is not a LAMMPS problem, but a problem of your local machine. You probably didn’t load the required environment module. Same as with the JPEG library. You local support staff should help you with that. I don’t know anything about your machine.

This won’t help you, if you have problems using MKL. Instead you should add -D FFT=KISS -D USE_INTERNAL_LINALG=ON to your CMake configuration to bypass it and use LAMMPS-internal libraries instead.