From 4cb989a2d3a671c8d49bfc9c94027f4996a72f50 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 17 Aug 2012 14:51:11 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8680 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/Section_python.html | 19 +++++++++++-------- doc/Section_python.txt | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/doc/Section_python.html b/doc/Section_python.html index e4d48975b6..64889c3d53 100644 --- a/doc/Section_python.html +++ b/doc/Section_python.html @@ -270,24 +270,27 @@ and type:
>>> from lammps import lammps
 >>> lmp = lammps() 
 
-

If you get no errors, you're ready to use LAMMPS from Python. -If the load fails, the most common error to see is +

If you get no errors, you're ready to use LAMMPS from Python. If the +2nd command fails, the most common error to see is

OSError: Could not load LAMMPS dynamic library 
 

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 -one of the auxiliary shared libraries it depends on. The error -message should give you some indication of what went wrong. +one of the auxiliary shared libraries it depends on, or if something +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
 >>> CDLL("liblammps.so") 
 
-

If an error occurs, carefully go thru the steps above and in -Section_start 5 about building a shared -library and about insuring Python can find the necessary 2 files. +

If an error occurs, carefully go thru the steps in Section_start +5 and above about building a shared +library and about insuring Python can find the necessary two files +it needs.

Test LAMMPS and Python in serial:
diff --git a/doc/Section_python.txt b/doc/Section_python.txt index e21ff33ce8..38fad3451f 100644 --- a/doc/Section_python.txt +++ b/doc/Section_python.txt @@ -266,24 +266,27 @@ and type: >>> from lammps import lammps >>> lmp = lammps() :pre -If you get no errors, you're ready to use LAMMPS from Python. -If the load fails, the most common error to see is +If you get no errors, you're ready to use LAMMPS from Python. If the +2nd command fails, the most common error to see is OSError: Could not load LAMMPS dynamic library :pre 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 -one of the auxiliary shared libraries it depends on. The error -message should give you some indication of what went wrong. +one of the auxiliary shared libraries it depends on, or if something +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 >>> CDLL("liblammps.so") :pre -If an error occurs, carefully go thru the steps above and in -"Section_start 5"_Section_start.html#start_5 about building a shared -library and about insuring Python can find the necessary 2 files. +If an error occurs, carefully go thru the steps in "Section_start +5"_Section_start.html#start_5 and above about building a shared +library and about insuring Python can find the necessary two files +it needs. [Test LAMMPS and Python in serial:] :h5