Asking for help in the install of Openkim in LAMMPS for Ubuntu

64 views
Skip to first unread message

Hervé Y.

unread,
Dec 19, 2019, 8:11:30 PM12/19/19
to openkim
  These days i try to install OpenKIM in the LAMMPS in the Ubuntu system. i use <cmake> to install LAMMPS, and add KIM in the cmake code. the installation finally succed,  but i found that not all the example in the /LAMMPS/examples can be held.
  For some examples, the LAMMPS cannot runs and it mentioned that it cannot find the model name. I wonder whether this installation of KIM have the full package of KIM collection. 
  i try to use <kim-api-collections-management list>, but return no such command.
  thanks for helps.

Hervé Y.

unread,
Dec 19, 2019, 8:39:08 PM12/19/19
to openkim
this is the first time for i to searching in this forum. after searching in this forum, i found another installation method which i don't want to use the first time i see. the link is https://github.com/openkim/kim-api/blob/master/INSTALL
when using this method, should i install the LAMMPS before the installation of OpenKIM? should i enable the KIM pacage in the installation of LAMMPS?

Yaser Afshar

unread,
Dec 19, 2019, 9:59:20 PM12/19/19
to ope...@googlegroups.com
hi @Hervé,
In UBUNTU, to use `kim-api-collections-management` first it should be in the PATH. This is explained in the INSTALL file at
https://github.com/openkim/kim-api/blob/master/INSTALL as well as in the kim-api package INSTALL file, line 375.

You can employ the "kim-api-activate" utility to set up the PATH and bash-completion as
```
source ${HOME}/local/bin/kim-api-activate
```

If you do not know where did you install `kim-api-activate`, you can also use the 'locate' command.
`sudo apt-get install locate` should install the 'locate' command if you do not have it on your system.
Then you can use the utility to automatically install any extra models.

Hope this helps.
Kind regards,
Yaser

--

---
You received this message because you are subscribed to the Google Groups "openkim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openkim+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openkim/6a73bf75-692a-4830-b51d-16852f9f4ca6%40googlegroups.com.

Yaser Afshar

unread,
Dec 19, 2019, 10:16:39 PM12/19/19
to ope...@googlegroups.com
hi @Hervé

when using this method, should i install the LAMMPS before the installation of OpenKIM?

If you are installing from the source. To activate OpenKIM in LAMMPS, you should have it installed on your system. Please follow the instruction to install the KIM API from source,
After the KIM API package is installed, and if you use a non-standard PATH to install the KIM-API, you should use the "kim-api-activate" utility to set up the PATH and bash-completions. The activate script adds the utilities to the executable PATH, please read the section "D" in the INSTALL file for more information.

Hope this helps.
Kind regards,
Yaser

--

---
You received this message because you are subscribed to the Google Groups "openkim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openkim+u...@googlegroups.com.

Hervé Y.

unread,
Dec 19, 2019, 10:42:29 PM12/19/19
to openkim
Thanks for help, i'll try it

在 2019年12月20日星期五 UTC+8上午11:16:39,Yaser Afshar写道:
To unsubscribe from this group and stop receiving emails from it, send an email to ope...@googlegroups.com.

Hervé Y.

unread,
Dec 19, 2019, 11:45:52 PM12/19/19
to openkim
Thanks for your help
i follow the D.1 the typical build scenario, and succed. so i think that i don't have to use the "kim-api-activate", however, when i finish this process, and begin the "cmake" of LAMMPS, it returns this:
...
  KIM-API package not found.  Default behavior set to download and build our
  own
Call Stack (most recent call first):
  CMakeLists.txt:335 (include)


-- KIM-API download requested - we will build our own
...

before, when i haven't noticed the "kim-api-activate", i add these folds into environment by editing the bashrc with PKG_CONFIG_PATH, as mention inthe LAMMPS documentation 3.7.3. here the link https://lammps.sandia.gov/doc/Build_extras.html#kim-package

and a i have:

root@DESKTOP-EOHDBIH:/lammps/build# echo $PKG_CONFIG_PATH
/usr/local/bin:/root/kim-api-workspace/kim-api-2.1.3/pkg-config/:/usr/local/lib:/usr/local/lib:

now i realize that this step is unnecessary, however, it seems it doesn't work either. 

在 2019年12月20日星期五 UTC+8上午11:16:39,Yaser Afshar写道:
hi @Hervé
To unsubscribe from this group and stop receiving emails from it, send an email to ope...@googlegroups.com.

Yaser Afshar

unread,
Dec 20, 2019, 9:14:50 AM12/20/19
to ope...@googlegroups.com
hi @Hervé
I checked on ubuntu version 17.10 and did a fresh install following the instructions. Everything works fine for me. Just a minor thing that might be a problem with some Ubuntu versions. If you did a standard installation, it might happen that the `/usr/local/bin` where `kim-api-collections-management` is installed on ubuntu is not in your path and that is why you can not find `kim-api-collections-management`. You can resolve this simply by
```
echo "PATH=\$PATH:/usr/local/bin" >> ~/.bashrc
```
After that, please open a new terminal and you should be fine.
If this was not helpful and could not resolve your problem, please let me know in more detail everything you did plus your ubuntu version and we can help you with this.
Cheers,
Yaser

To unsubscribe from this group and stop receiving emails from it, send an email to openkim+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openkim/6cc74d09-eda0-4129-902c-c93911c50ca1%40googlegroups.com.

Hervé Y.

unread,
Dec 30, 2019, 11:07:47 AM12/30/19
to openkim
Hi @Yaser
I am very grateful for your help.
i started again from a fresh install ubuntu, and i have used the code to add the path into .bashrc that you provieded, but during the "cmake" step for LAMMPS, it still mentioned that "the KIM-package not found. we will download and build our own"
my ubuntu version is 18.04.3 LTS
and here is the details where i began from a fresh new ubuntu system.

$ sudo passwd root
$ su

after that, all the operation is using root
i am a Chinese user, so i change the souce list by a mirror source for China provided by Aliyun.
after that :

$ sudo apt-get update
$ sudo apt-get upgrade
$ apt install build-essential;
$ apt install cmake
$ apt install gfortran
$ apt update
$ apt upgrade

here i upgrade my ubuntu system and install some basic software. then i reboot the system.
then i download mpich3 from their official website and install it.

$ tar -zxvf mpich3.tar.gz 
$ cd mpich
$ ./configure --enable-shared=yes
$ make
$ make install

then i follow the D.1 Typical Build Scenario to install the KPI-API, but i didn't delete the build folder as suggesting in the D.1.
and the example provided in the D.1 can be held.

then i use the lammps-stable.tar.gz download from their official website. because use the code "git" to get LAMMPS is too slow here. the LAMMPS version is 7Aug19.
then i unpackage it in the main folde (/home/herve)
then

$ cd lammps
$ mkdir build
$ cd build

before the cmake, i use the presets of all_on.cmake, but i delete all the user package and other package i don't need, and there are BODY KIM MANYBODY MOLECULE MPIIO in the cmake file.
then i use the code
$ echo "PATH=\$PATH:/usr/local/bin" >> ~/.bashrc

close the terminal, open another ternimal, use su to get root, and return to the /home/herve/lammps/build folder
then i use

$ cmake -C ../cmake/presets/all_on.cmake -D PKG_GPU=off  ../cmake

and the feedback including "the KIM-package not found. we will download and build our own"

in fact, during the process, i have used 3 or four time  $ echo "PATH=\$PATH:/usr/local/bin" >> ~/.bashrc 
i don't know whether this matter.

Thanks again for your patience.

在 2019年12月20日星期五 UTC+8下午10:14:50,Yaser Afshar写道:

Daniel Karls

unread,
Dec 30, 2019, 1:38:00 PM12/30/19
to openkim
Hi Hervé,

(1) If you did follow section D.1 of the KIM API install instructions (to install system-wide), you should have the following directory and file:

/usr/local/lib/kim-api/
/usr/local/lib/libkim-api.so

Can you confirm that these exist?  This will confirm that the KIM API build/install succeeded.

(2) If you issue `pkg-config --list-all | grep "libkim"`, what do you get?  If LAMMPS is unable to locate your KIM API installation, it's almost certainly because pkg-config can't find it.

Dan
Reply all
Reply to author
Forward
0 new messages