jtriley / StarCluster

StarCluster is an open source cluster-computing toolkit for Amazon's Elastic Compute Cloud (EC2).
http://star.mit.edu/cluster
GNU Lesser General Public License v3.0
582 stars 313 forks source link

How to specify the location of shared library when running a MPI program? #593

Closed xiongjie494 closed 7 years ago

xiongjie494 commented 8 years ago

I have run my MPI helloworld program succeed. Now I have another MPI program, named pvserver (ParaView Server), need to be run on cluster. When I execute the following command:


sgeadmin@master:~$ mpirun -np 2 ./pvserver

I got the errors:


/home/sgeadmin/ParaView-4.1.0-Linux-64bit/lib/paraview-4.1/pvserver: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

As a comparison, I run the program not using MPI as follow, it is success.


sgeadmin@master:~$ ./pvserver

That means the sequence program can find the shared library libGLU.so.1. So, my problem is how specify the location of shared library when running a MPI program? Could I pass some parameter about library location to the command 'mpirun'?

Thank you.

vasisht commented 8 years ago

You can set up the LD_LIBRARY_PATH to point to the location of your libraries in your .bashrc. export LD_LIBRARY_PATH=/home/sgeadmin/ParaView-4.1.0-Linux-64bit/lib/:$LD_LIBRARY_PATH or set it it on the command line and pass it to mpirun

export LD_LIBRARY_PATH=/home/sgeadmin/ParaView-4.1.0-Linux-64bit/lib/:$LD_LIBRARY_PATH
mpirun -x LD_LIBRARY_PATH ....

xiongjie494 commented 8 years ago

Hi, vasisht, thank you for your help! But it seems the mpirun cannot accept the -x option. I am using mpich2. Is the -x is the option for openMPI, not for mpich2?

Thank you.

xiongjie494 commented 8 years ago

How can I do for the mpich2? Thank you.

vasisht commented 8 years ago

It might easier just to set the LD_LIBRARY_PATH in .bashrc. That will carryover the enviroment variables.

On Sat, Sep 24, 2016 at 10:36 AM, xiongjie494 notifications@github.com wrote:

How can I do for the mpich2? Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jtriley/StarCluster/issues/593#issuecomment-249367864, or mute the thread https://github.com/notifications/unsubscribe-auth/ABq0YjSrSBxV1ywQQL-d0djEWBrzQyaPks5qtTVtgaJpZM4J_RRR .

Pour trouver les limites du possible il faut tenter l'impossible.

xiongjie494 commented 7 years ago

Thank you vasisht! I am sorry to reply later. I am been out of town for these days. The problem is fixed now followed by your advice. Thank you.