Installing kim in linux

Dear all,

I am trying to install KIM package with my LAMMPS. I have installed kim api v2.3.0and wished to use that version. I try to install the lammps with the command “make ubuntu” in “/home/leo/桌面/lammps/lammps-29Aug2024/src”.but i get the follow problem. My “kim-prefix.txt” is “/home/leo/miniconda3/envs/kim-env/lib” , i do not konw if the address is right .
make ubuntu
Gathering installed package information (may take a little while)
make[1]: 进入目录“/home/leo/桌面/lammps/lammps-29Aug2024/src”
Gathering git version information
make[1]: 离开目录“/home/leo/桌面/lammps/lammps-29Aug2024/src”
Compiling LAMMPS for machine ubuntu
make[1]: 进入目录“/home/leo/桌面/lammps/lammps-29Aug2024/src/Obj_ubuntu”
make[1]: 离开目录“/home/leo/桌面/lammps/lammps-29Aug2024/src/Obj_ubuntu”
make[1]: 进入目录“/home/leo/桌面/lammps/lammps-29Aug2024/src/Obj_ubuntu”
mpic++ -g -O3 -std=c++11 -DLAMMPS_GZIP -DLAMMPS_FFMPEG -DFFT_FFTW3 -I/usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…/include/kim-api -I/usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…/lib/x86_64-linux-gnu/kim-api/mod -I/home/leo/miniconda3/include -DLMP_KIM_CURL -c …/main.cpp
mpic++ -g -O3 -std=c++11 main.o -L. -llammps_ubuntu -lfftw3 -L/usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…//lib/x86_64-linux-gnu -lkim-api -L/home/leo/miniconda3/lib -lcurl -ldl -o …/lmp_ubuntu
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…/lib/x86_64-linux-gnu/libmpi_cxx.so: undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:96:…/lmp_ubuntu] 错误 1
make[1]: 离开目录“/home/leo/桌面/lammps/lammps-29Aug2024/src/Obj_ubuntu”
make: *** [Makefile:398:ubuntu] 错误 2

Please help me in this regard
Regards,
Leo

1 Like

Hi Leo,

It doesn’t actually look like the problem you are having is coming from KIM – the error

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…/lib/x86_64-linux-gnu/libmpi_cxx.so: undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32

is not KIM related. I do have some tips for you, but you may wish to ask in the main LAMMPS forum if they do not help.

Do you have any reason why you are building LAMMPS with traditional make instead of 3.1. Build LAMMPS with CMake — LAMMPS documentation? If you do not have a specific reason to use traditional make, I would recommend switching to CMake as it generally does a better job of finding things automatically. LAMMPS is also available as the lammps package from conda-forge since it looks like you’re using Conda anyway, so you could try that as well.

Cheers, ilia