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

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

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" (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.



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

Thank you Dion....I did as you mentioned and I get an import error message
 "ImportError: 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 :

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, 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
  File "<stdin>", line 1
    mpirun -np 2 esysparticle

Please let me know why this error occurs? Thanks

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

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:

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" from the terminal.



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

Thanks Dion Weatherley, that solved my question.

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

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