Dominik Táborský wrote:
> 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

are you sure this is the right syntax:

ssh node1 echo $PATH

?

ssh node1 echo $PATH gives me only the full PATH and doesn't log me on
to node1.

OK, here's what I've tried:

ssh node1 && echo $PATH

gives me first the $PATH on the master, and then the reduced one, as you
said.


echo $PATH
ssh node1 && echo $PATH

gives me the master $PATH twice, and then the reduced one.

At least now I know that ~/.bashrc is not being called at all. You see,
I've also tried

ssh node1

and if ssh is using non-interactive login bash, it should start a
.bashrc. If it started .bashrc on the master, it would, because of the

echo $PATH

, echo the master $PATH, and if it starts the .bashrc on the slave node,
it would echo the reduced path. Something is not right. I've even
written echo master node and echo slave node in both .bashrc and nothing
echoed.

if i try

ssh mario 'echo $PATH' i get the reduced $PATH still.

One more thing to know, I set ALL environmental variables using
OpenFOAM's bashrc script, both for OpenFOAM and OMPI, but this shouldn't
make any difference because

. $FOAM_INST_DIR/OpenFOAM-1.5-dev/etc/bashrc

script sets all the variables the right way on the master AND slave node
, meaning that I run successful serial simulations on both computers. :)

Any suggestions?


Reply via email to