Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Open MPI and env. variables (LD_LIBRARY_PATH and PATH) - complete and utter Open MPI / Linux noob
From: Dominik Táborský (bremby_at_[hidden])
Date: 2009-08-02 12:16:25


The .bashrc on your master is not run, therefore there are no echos.
Let's revise once more so that we're sure we understand each other :-)

On your master - on the computer you run "mpirun" - you put these 2
lines into your own .bashrc:

export PATH=$PATH:/openMPI/bin
export LD_RUN_FLAG=$LD_LIBRARY_PATH:/openMPI/lib

These 2 lines are in /home/tomislav/.bashrc (supposing your user is
tomislav).

On each of your node you can leave .bashrc files. Try putting this line
in them:
echo $PATH

Again, this file is /home/tomislav/.bashrc. It must be the same file. Or
if you don't have that file on your nodes, the system-wide bashrc file
should be run, which is - I think - /etc/bash.bashrc.

Now, when you run the command:
ssh node1 echo $PATH

It should print two lines:
1st should be the executed command which should print out new PATH,
2nd should be the command in the node's .bashrc file, which should be
the reduced PATH.

Anyway, let's try something:
$ echo $PATH
$ ssh node1 echo $PATH
node1$ echo $PATH

This should print out 3 lines, your master PATH twice and then the
reduced PATH once.

Let me know how that went.

Dr. Eddy

Tomislav Maric píše v Ne 02. 08. 2009 v 16:58 +0200:
> Dominik Táborský wrote:
> > Hi,
> >
> > This is it:
> >> slax_at_master$ ssh node1 'echo $PATH'
> >>
> >> gives me the reduced path on the slave node.
> >
> > I'm sorry, I was wrong. You typed it correctly. AFAIK, this command logs
> > in your node but the PATH variable is still just as on your master. I
> > had this issue and I solved it by editing the .bashrc file on the
> > master, NOT the node. That worked for me. Try editing the PATH and
> > LD_LIBRARY_PATH on the master, on the computer you run the mpirun
> > command.
> >
> > So, for example, if you have on the nodes the MPI installation
> > in /openMPI/, with subfolders "bin" and "lib", try putting these lines
> > into your .bashrc file on the master:
> > export PATH=$PATH:/openMPI/bin
> > export LD_RUN_FLAG=$LD_LIBRARY_PATH:/openMPI/lib
> >
> > It shouldn't matter where is your MPI installation on the master. The
> > nodes matter!
> >
> > Note: I am a openMPI beginner, I am not involved in development, I'm
> > just sharing my experience on the same problem and how I solved it. No
> > guarantee...
>
> I'm really gratefull for your help!
>
> I tried leaving only .bashrc at the master node and I have set the
> variables as you have suggested, but nothing changed.
>
> I've even read again in the man pages about ssh invoked bash, and it
> realy reads and executes/etc/bash.bashrc file and ~/.bashrc - which
> ever comes first. I've added echo commands to .bashrc on the master, but
> nothing is echoed, and
>
> ssh node1 'echo $PATH'
>
> gives the reduced path again. I'm frustrated. I'm a step away from
> running OpenFOAM on a LAN over a LiveDVD... :(
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users