LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-07-2004, 02:42 PM   #1
Maximus14221
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
rsh does not access environment variables


Hello,

I have a question regarding rsh. I am using dynamic executatbles on a Linux cluster and have mounted all the necessary shared libraries on nodes and set LD_LIBRARY_PATH accordingly on all nodes. When I perform the following command:

rsh computenode01 'cd /tmp; ./executable'

I get error message that "cannot find shared objects". I believe the problem is that the above command does not find the LD_LIBRARY_PATH variable. To verify, I used command

rsh computenode01 'echo $LD_LIBRARY_PATH'

It displays an empty line - not set. But when I actually rsh computenode01 (I am now in computenode01), and then do echo $LD_LIBRARY_PATH, the correct path is displayed.

This is very perplexing to me. Is there someway to configure rsh so that the issue is resolved? I need the command rsh computenode01 'cd /tmp; ./executable' to work for a research project.

Thank you very much for your help. Any help would be greatly appreciated.


Regards,
Shuowen Hu
 
Old 07-07-2004, 03:23 PM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
If it were me...
I would use SSH... but that's another discussion...

instead of rsh computenode01 'cd /tmp; ./executable' why don't you just do this:
rsh computenode01 '/tmp/executable'

and in the executable add the line to the top of the file:
export LD_LIBRARY_PATH=/path/to/library
 
Old 07-07-2004, 03:36 PM   #3
Maximus14221
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Original Poster
Rep: Reputation: 0
additional info

Hello,

Thanks for replying. Guess I should clarify a little more. The executables I am running are compiled Matlab codes using Mathworks' mcc compiler, so I can not modify that. I am interested in running:

rsh computenode01 -n '/tmp/Matlabexecutable'

but the error 'cannot find shared objects' appear. The problem is that rsh used in this way does not see $LD_LIBRARY_PATH although it is set on all nodes to the correct paths.

rsh computenode01 -n 'LD_LIBRARY_PATH=/appropriate/libraries/ ; /tmp/Matlabexecutable'
also gives the same error even though I try to manually set it again right before running the executable..

Is there some way I could modify the rsh config files to fix this issue?


Again, thank you all very much.


Sincerely,
Shuowen Hu
 
Old 07-08-2004, 10:11 AM   #4
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
Hmm.... messing around trying to figure out what is going on... I don't have a spare linux box to play with so I'm going back into my box and it appears to pick up variables defined in my .bashrc file.

instead of:
rsh computenode01 -n 'LD_LIBRARY_PATH=/appropriate/libraries/ ; /tmp/Matlabexecutable'
do this:
rsh computenode01 -n 'export LD_LIBRARY_PATH=/appropriate/libraries/ ; /tmp/Matlabexecutable'

if that doesn't work then some more questions:
How are you setting up your variable?
Are you putting it in your .bashrc file?
Which leads to the question what shell are you using?
If you rsh to the node then echo $LD_LIBRARY_PATH does it work?
What does 'env' display on the node?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variables naren Linux - Software 1 12-15-2004 06:44 AM
environment variables in c++ s3b0 Programming 6 08-27-2004 09:19 AM
environment variables kakridge Linux - Newbie 1 07-14-2003 06:25 PM
environment variables moeminhtun Linux - General 4 01-15-2003 09:50 AM
environment variables. jISV Linux - General 0 04-05-2002 06:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration