git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8680 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -270,24 +270,27 @@ and type:
|
|||||||
<PRE>>>> from lammps import lammps
|
<PRE>>>> from lammps import lammps
|
||||||
>>> lmp = lammps()
|
>>> lmp = lammps()
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>If you get no errors, you're ready to use LAMMPS from Python.
|
<P>If you get no errors, you're ready to use LAMMPS from Python. If the
|
||||||
If the load fails, the most common error to see is
|
2nd command fails, the most common error to see is
|
||||||
</P>
|
</P>
|
||||||
<PRE>OSError: Could not load LAMMPS dynamic library
|
<PRE>OSError: Could not load LAMMPS dynamic library
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>which means Python was unable to load the LAMMPS shared library. This
|
<P>which means Python was unable to load the LAMMPS shared library. This
|
||||||
typically occurs if the system can't find the LAMMPS shared library or
|
typically occurs if the system can't find the LAMMPS shared library or
|
||||||
one of the auxiliary shared libraries it depends on. The error
|
one of the auxiliary shared libraries it depends on, or if something
|
||||||
message should give you some indication of what went wrong.
|
about the library is incompatible with your Python. The error message
|
||||||
|
should give you an indication of what went wrong.
|
||||||
</P>
|
</P>
|
||||||
<P>You can also test the load directly in Python as follows
|
<P>You can also test the load directly in Python as follows, without
|
||||||
|
first importing from the lammps.py file:
|
||||||
</P>
|
</P>
|
||||||
<PRE>>>> from ctypes import CDLL
|
<PRE>>>> from ctypes import CDLL
|
||||||
>>> CDLL("liblammps.so")
|
>>> CDLL("liblammps.so")
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>If an error occurs, carefully go thru the steps above and in
|
<P>If an error occurs, carefully go thru the steps in <A HREF = "Section_start.html#start_5">Section_start
|
||||||
<A HREF = "Section_start.html#start_5">Section_start 5</A> about building a shared
|
5</A> and above about building a shared
|
||||||
library and about insuring Python can find the necessary 2 files.
|
library and about insuring Python can find the necessary two files
|
||||||
|
it needs.
|
||||||
</P>
|
</P>
|
||||||
<H5><B>Test LAMMPS and Python in serial:</B>
|
<H5><B>Test LAMMPS and Python in serial:</B>
|
||||||
</H5>
|
</H5>
|
||||||
|
|||||||
@ -266,24 +266,27 @@ and type:
|
|||||||
>>> from lammps import lammps
|
>>> from lammps import lammps
|
||||||
>>> lmp = lammps() :pre
|
>>> lmp = lammps() :pre
|
||||||
|
|
||||||
If you get no errors, you're ready to use LAMMPS from Python.
|
If you get no errors, you're ready to use LAMMPS from Python. If the
|
||||||
If the load fails, the most common error to see is
|
2nd command fails, the most common error to see is
|
||||||
|
|
||||||
OSError: Could not load LAMMPS dynamic library :pre
|
OSError: Could not load LAMMPS dynamic library :pre
|
||||||
|
|
||||||
which means Python was unable to load the LAMMPS shared library. This
|
which means Python was unable to load the LAMMPS shared library. This
|
||||||
typically occurs if the system can't find the LAMMPS shared library or
|
typically occurs if the system can't find the LAMMPS shared library or
|
||||||
one of the auxiliary shared libraries it depends on. The error
|
one of the auxiliary shared libraries it depends on, or if something
|
||||||
message should give you some indication of what went wrong.
|
about the library is incompatible with your Python. The error message
|
||||||
|
should give you an indication of what went wrong.
|
||||||
|
|
||||||
You can also test the load directly in Python as follows
|
You can also test the load directly in Python as follows, without
|
||||||
|
first importing from the lammps.py file:
|
||||||
|
|
||||||
>>> from ctypes import CDLL
|
>>> from ctypes import CDLL
|
||||||
>>> CDLL("liblammps.so") :pre
|
>>> CDLL("liblammps.so") :pre
|
||||||
|
|
||||||
If an error occurs, carefully go thru the steps above and in
|
If an error occurs, carefully go thru the steps in "Section_start
|
||||||
"Section_start 5"_Section_start.html#start_5 about building a shared
|
5"_Section_start.html#start_5 and above about building a shared
|
||||||
library and about insuring Python can find the necessary 2 files.
|
library and about insuring Python can find the necessary two files
|
||||||
|
it needs.
|
||||||
|
|
||||||
[Test LAMMPS and Python in serial:] :h5
|
[Test LAMMPS and Python in serial:] :h5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user