mpipython: error while loading shared libraries: libFoundation-2.0.so

Asked by Gonzalo Tancredi

I'm running ESyS-particle in Ubuntu.
I succesfully installed it, but when I try to run the first example of the Tutorial

mpiexec -machinefile hosts.txt -np 2 mpipython bingle.py

I get the following error message:

mpipython: error while loading shared libraries: libFoundation-2.0.so: cannot open shared object file: No such file or directory
mpipython: error while loading shared libraries: libFoundation-2.0.so: cannot open shared object file: No such file or directory

Could anyone give some advice?

Gonzalo

Question information

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

Hi Gonzalo,

This error usually occurs because your default LD_LIBRARY_PATH does not include the directory where the ESyS-Particle shared libraries were installed. Assuming you installed ESyS-Particle in /usr/local, try updating your LD_LIBRARY_PATH environment variable:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

So that you don't need to type this command every time you open a new terminal, you can add this line to the end of your ~/.bashrc file.

I hope this helps and have fun with ESyS-Particle!

Cheers,

Dion.

Revision history for this message
Anton Gladky (gladky-anton) said :
#2

I have updated the ~/.bashrc file as recommended, but this problem still occurs.
I have normal Ubuntu 9.04 installation. Can anybody help to solve it?

Thanks in advance.

Revision history for this message
Anton Gladky (gladky-anton) said :
#3

The problem still occurs

Revision history for this message
Anton Gladky (gladky-anton) said :
#4

I have found the solution. When I started the simulation, the system required the password. It is wrong.
in file "/etc/hosts" I changed:

  127.0.0.1 MYHOSTNAME

to

  1XX.X.X.X MYHOSTNAME

So, I changed the local IP on my static real IP. And it works!

I can not clearly explain why, but it works :)

Revision history for this message
Vince Boros (v-boros) said :
#5

Hello Anton:

I am glad that you found the workaround, but my apology for not reading your question sooner. If you wish to know the reason why your fix was necessary, read https://answers.launchpad.net/esys-particle/+question/70285 from the third post. In brief, the problem stemmed from a version of OpenMPI that is shipped with Ubuntu 9.0.4. It has apparently been remedied in a later OpenMPI.

Best regards,

Vince

Revision history for this message
Quinn Reynolds (quinn-reynolds) said :
#6

Hi,

Just a quick note - this error can also occur when using ESyS-Particle compiled against MPICH (perhaps OpenMPI too, though I haven't tested that). Since MPICH uses non-interactive SSH shells when it launches more than one process, the $PATH, $LD_LIBRARY_PATH and $PYTHONPATH environment variables are often not set properly when the slave process(es) launch and you get the shared library error above.

You can get around this by creating or modifying the ~/.ssh/environment file which sets env variables for SSH shells spawned from your current user account. The syntax for the file is "variable = path(s)", one on each line, so for eg I have:

LD_LIBRARY_PATH=/usr/local/lib
PYTHONPATH=/usr/local/lib/python2.5/site-packages

You may also need to tell the SSH server(s) to allow users to set their own environment variables, which can be done by adding the following line to each server's /etc/ssh/sshd_config:

PermitUserEnvironment yes

Kind regards,
Quinn

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

Hi Quinn,

Thanks for this informative post. This is an annoying problem that pops up occasionally so I'm sure your suggestions will come in handy.

Cheers,

Dion.