from: can't read /var/mail/esys.lsm - Error
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
- Assignee:
- No assignee Edit question
- Solved by:
- Dion Weatherley
- Solved:
- 2019-06-25
- Last query:
- 2019-06-25
- Last reply:
- 2019-06-25
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
Thank you Dion....I did as you mentioned and I get an import error message
"ImportError: libFoundation-
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
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
|
#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:/
7) Set up environment variables (by typing the following commands in the terminal)
export PATH=/usr/
export LD_LIBRARY_
export LIBRARY_
export 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
Thanks Dion Weatherley, that solved my question.
Thank you Dion....It worked when I executed it from the terminal....