from: can't read /var/mail/esys.lsm - Error

Asked by Sadeep Madhushan

I have installed Esys particle as mentioned by Dion..However I get the following error msg "from: can't read /var/mail/esys.lsm" when I am trying to type following command in the terminal "from esys.lsm import *".

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Dion Weatherley
Solved:
Last query:
Last reply:
Revision history for this message
Dion Weatherley (d-weatherley) said :
#1

Hi Sadeep,

ESyS-Particle has a Python scripting interface so you must either execute ESyS-P commands from within the Python interpreter or from a text file via the "mpirun -np # esysparticle myscript.py" (where #=number of worker processes + 1).

To test your installation, first start the python interpreter from the terminal:
$ python
(Omit the $ sign. This represents the terminal comnand prompt)
Once Python has started, type the import command. You should get no error messages if ESyS-Particle is installed correctly.

Cheers,

Dion

Revision history for this message
Sadeep Madhushan (pthilakarath) said :
#2

Thank you Dion....I did as you mentioned and I get an import error message
 "ImportError: libFoundation-2.3.5.so: cannot open shared object file: No such file or directory"
That means Esys-particel is not installed correctly isn't it? I will reinstall Esys particle by following the method listed in here and let you know. Thanks again

Revision history for this message
Sadeep Madhushan (pthilakarath) said :
#3

I found the problem. In step 4 "sudo apt-get install libvtk5-dev python-epydoc" needs to be changed to "sudo apt-get install libvtk6-dev python-epydoc" as libvtk5-dev is obsolete.

However when I run the bingle.py, I get a syntax error for the command given in the esysparticle tutorial as well as the command mentioned by you.

SyntaxError: invalid syntax
>>> mpirun -np 2 esysparticle bingle.py
  File "<stdin>", line 1
    mpirun -np 2 esysparticle bingle.py

Please let me know why this error occurs? Thanks

Revision history for this message
Best Dion Weatherley (d-weatherley) said :
#4

Hi Sadeep,

The "mpirun ..." command needs to be executed from the terminal, rather than from within Python.

Also, it is unlikely that your "importError" was due to the missing libvtk libraries. These libraries are optional for ESyS-Particle installation. It is more likely that your environment variables have not been correctly set after installing ESyS-Particle.

From the installation instructions here:
https://answers.launchpad.net/esys-particle/+faq/1613

7) Set up environment variables (by typing the following commands in the terminal)
export PATH=/usr/local/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
export LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH

[OPTIONALLY, append these 'export' lines to the end of ~/.bashrc to permanently set these variables; recommended]

Thereafter, try executing "mpirun -np 2 esysparticle bingle.py" from the terminal.

Cheers,

Dion

Revision history for this message
Sadeep Madhushan (pthilakarath) said :
#5

Thanks Dion Weatherley, that solved my question.

Revision history for this message
Sadeep Madhushan (pthilakarath) said :
#6

Thank you Dion....It worked when I executed it from the terminal....