I build kim-api successfully using the source code. For a quick check I tried " kim-api-collections-management list" but it returns the following error,
/usr/local/bin/…/libexec/kim-api/kim-api-collections-info: error while loading shared libraries: libkim-api.so.2: cannot open shared object file: No such file or directory
Aborting!
I also tried compiling Lammps with the installed kim-apt and the “make-omp” commands returns,
KIM_SimulatorHeaders.h: No such file or directory #include “KIM_SimulatorHeaders.h”
Did you follow this part of the INSTALL instructions?
The first thing that comes to mind is that the last line sudo ldconfig was accidentally skipped. The second thing, is that you might need to open a new terminal and try the check from there (this would cause a “reload” of the configuration in the new shell).
If neither of these fix things, then we’ll need to investigate further.
@relliott Sorry for my bad understanding of your response. I mistakenly read it return instead of the rerun. I have changed the /etc/ld.so.conf file and added lib64 (This was the path mentioned in the \texttt{install.manifest.txt} file) to the paths and now the kim works very well.
But I still have a problem with building \texttt{LAMMPS} with \texttt{KIM} and I get the following error,
In file included from ../style_pair.h:81,
from ../force.cpp:21:
../pair_kim.h:70:10: fatal error: KIM_SimulatorHeaders.h: No such file or directory
70 | #include "KIM_SimulatorHeaders.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:109: force.o] Error 1
make[1]: Leaving directory '/home/u211355/LAMMPS/src/Obj_omp'
make: *** [Makefile:213: omp] Error 2
Now you’ll need to provide some more details about how you are setting up and compiling LAMMPS. It’s obvious that it can’t find the kim-api header files, but I don’t know why.
I have used the source file to build \texttt{LAMMPS} and already have a working version of \texttt{lmp_omp}. To add \texttt{kim} I first do make yes-kim then do make omp. The error raises after performing the make procedure. my gcc version is (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) and the following header files are created after make yes-kim.
No, that github issue was related to the lammps cmake build system.
Is /usr/local the right prefix for your install? That is, does (for example) the file /usr/local/include/kim-api/KIM_SimulatorHeaders.h exist on your system?
Also, it may be helpful if you can post the kim-api-configuration-detailed.log file from the kim-api build process.
OK, something is definitely not right, there should be a -I .... flag for the kim-api on the mpicxx lines. The -I/home/u211355/miniconda3/include looks like it might be a mistake.
I have also noticed that when I exit the conda base environment I get the following error while doing make omp instead of the previous error, I’m not how it might be related but please find it the following;
As an aside, now that we know what’s going on. I think this might have been simpler if the install prefix /usr instead of the default /usr/local is used. I think this is the preference for centos.
centos doesn’t “support” /usr/local by default. So, that is why we needed to add it to the ldconfig file and to set the PKG_CONFIG_PATH environment variable.
If, instead we install the kim-api to the /usr prefix, then I think the regular procedure would work without these additions.
To build the kim-api for installation in the /usr prefix you would do:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
make
sudo make install
sudo ldconfig