Alpha KIM and LAMMPS example

So, I successfully compiled the alpha KIM release on a 64bit Ubuntu 11.04 machine. This time it worked out of the box.

However, setting KIM_DYNAMIC initially failed, and required changing line 98 of Include.mk to:
SHARED_LIB_FLAG = -shared -fPIC

for my machine.

Additionally, I noticed that while the tarball on the openkim site worked, the github is empty of models and tests, is that on purpose?

I also tried to get the LAMMPS example from the workshop running, and got lmp_serialkim with the addition of ‘-ldl’ to the Makefile.serialkim in LIBS,
but when I try to run the examples, they do not give good results. The lammps example runs fine, but each of the KIM examples give ouputs like the following:

So, I successfully compiled the alpha KIM release on a 64bit Ubuntu 11.04
machine. This time it worked out of the box.

However, setting KIM_DYNAMIC initially failed, and required changing line 98
of Include.mk to:
  SHARED_LIB_FLAG = -shared -fPIC

for my machine.

Great. Thanks for the information. I'm sure it will be helpful for others who try to use the package.

Additionally, I noticed that while the tarball on the openkim site worked,
the github is empty of models and tests, is that on purpose?

Yes. Take a look at the file README.git in the github repository. There is one extra step in the build process when using the git repository directly.

In short, you need to do the following

    cd $KIM\_DIR/EXAMPLE\_LEGOS     make

Then follow the regular INSTALL instructions.

I also tried to get the LAMMPS example from the workshop running, and got
lmp_serialkim with the addition of '-ldl' to the Makefile.serialkim in LIBS,
but when I try to run the examples, they do not give good results.

I think the '-ldl' is only required when using the dynamic linking option of the openkim-api package.

The lammps example runs fine, but each of the KIM examples give ouputs like the following:

-----------------------
LAMMPS (15 Jan 2010)
Lattice spacing in x,y,z = 4.05 4.05 4.05
Created orthogonal box = (0 0 0) to (97.2 97.2 97.2)
1 by 1 by 1 processor grid
Created 58825 atoms
Setting up run ...
Memory usage per processor = 17.7404 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
      0 2 -194049.4 0 -194034.19 17.687515
918335.72
Fx = -0.008903765287
Fx = -0.008662984544
Fx = -0.00819696626
Fx = -0.007505332867
Fx = -0.006588199307
Fx = -0.005446184612
Fx = -0.004080425529
Fx = -0.002492592023
Fx = -0.0006849042833
ERROR: Energy was not tallied on needed timestep
-----------------------------------------------------------------

With that ERROR line as the final one. The kim.log isn't very revealing
either:

-------------------
The following may not match
OneBasedLists dummy none none [] input: 0 output: 1

KIM_API_model::model_init: call statically linked initialize routine
for::model_Al_PF_ErcolessiAdams
----------------------

I get this kind of behavior whether I compile kim with or without the
dynamic flag set, though in the case of the dynamic flag, the kim.log, while
the same speaks of a dynamically linked initialize rather than static.

I'll keep working at it, just thought I should let you know.

This appears to be a LAMMPS issue. I see you are using the "15 Jan 2010"
version. Please try the "27 Mar 2011" version, which is the one I tested the files with, and see if it works...

Cheers,

Ryan