[lammps-users] Lammps-python interface error

Hello

I tried to install python wrapper for lammps in ubuntu using the information available in the following website:
http://lammps.sandia.gov/doc/Section_python.html.
I was able to install the library _lammps_serial.so in /usr/local/lib/python2.6/dist-pacakges. I also defined environmental variable LD_LIBRARY_PATH of the installed library location. However when I called the function lmp = lammps () in python script, it gives the following error:

from lammps import lammps
lmp=lammps()

File “”, line 1, in
File “/usr/local/lib/python2.6/dist-packages/lammps.py”, line 52, in init
self.lib.lammps_open_no_mpi(0,None,byref(self.lmp))
File “/usr/lib/python2.6/ctypes/init.py”, line 366, in getattr
func = self.getitem(name)
File “/usr/lib/python2.6/ctypes/init.py”, line 371, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/lib/python2.6/dist-packages/_lammps_serial.so: undefined symbol: lammps_open_no_mpi

Please kindly let me know how to solve this issue. I’ll really appreciate your help.

Thanks
Rezwan

I don't know. The lammps_open_no_mpi function
is in the LAMMPS library interface (check this in
library.cpp and library.h). So if you wrapped LAMMPS
as a library correctly, according to the instructions,
it should be able to find it.

Steve

Thanks for the information