[Beowulf] Problem with environment variable
Robert G. Brown
rgb at phy.duke.edu
Mon Jul 27 12:47:05 PDT 2009
On Sun, 26 Jul 2009, Giuseppina Venezia wrote:
> Hello,
>
> I'am using PVM with two nodes: a master node with Fedora Core 8 called
> "pippo" and a slave node with ubuntu 8.10 called "pluto".
I've encountered this problem before, but it was a rather long time ago
and I don't remember the solution. I think it had to do with the shell
and environment passing. If you read man bash (down where it describes
logging in vs shell commands) you will note that whether or not a given
bash executes /etc/profile depends on whether or not the shell is a
"login shell" (yes) or "command shell" (no) or a "shell command" (very
much no). rsh hostname command (IIRC) thus bypasses /etc/profile.
Passing an environment variable from your source shell is also very
painful (that is, almost impossible). These are all reasons I abandoned
rsh in favor of ssh -- ssh permits one to pass environment variables if
one so desires.
Anyway, I'd suggest experimenting with the placement of the setting of
the PVM values and/or fixing up your shell so that no matter what kind
of shell you run (interactive or non-interactive) they get set. Since I
got irritated at the differential execution pathways, I eventually
created this as my .bashrc:
if [ -f $HOME/.bash_profile ]
then
. $HOME/.bash_profile
fi
and put all of the interesting stuff in .bash_profile. That way, at the
expense of setting e.g. the prompt when it isn't strictly necessary, I
get EXACTLY the same environment for remote shell commands that I have
for remote login sessions, right down to the ability to use aliases in
the remote commands. Naturally, in my .bash_profile I do have the
following stanza:
# Critical PVM environment variables
PVM_ROOT=/usr/share/pvm3
PVM_RSH=/usr/bin/ssh
XPVM_ROOT=/usr/share/pvm3/xpvm
export PVM_ROOT PVM_RSH XPVM_ROOT
See if this sort of thing helps. If it is, as I suspect, the fact that
it is somehow bypassing the expected shell initialization pathway, that
should fix it.
rgb
>
> I've installed PVM on both "pippo" and "pluto", and set those
> environment variables:
>
> PVM_ROOT, PVM_ARCH, PVM_RSH and PVM_TMP.
>
> in .bashrc and /etc/profile
>
> Tha problem in that when I add another host from the master node I got
> the following error:
>
> pvm> add pluto
> add pluto
> 0 successful
> HOST DTID
> pluto Can't start pvmd
>
> Auto-Diagnosing Failed Hosts...
> pluto...
> Verifying Local Path to "rsh"...
> Rsh found in /usr/bin/rsh - O.K.
> Testing Rsh/Rhosts Access to Host "pluto"...
> Rsh/Rhosts Access is O.K.
> Checking O.S. Type (Unix test) on Host "pluto"...
> Host pluto is Unix-based.
> Checking $PVM_ROOT on Host "pluto"...
>
> The value of the $PVM_ROOT environment
> variable on pluto is invalid ("").
> Use the absolute path to the pvm3/ directory.
>
> pvm>
>
> However, if I try echo $PVM_ROOT on slave node ("pluto") I got
>
> /usr/lib/pvm3
>
> Could you help me?
> Thank you in advance
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin Computing
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
>
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf
mailing list