modules with rsh/ssh
Manage your shell environment variables and aliases
Brought to you by:
leomania,
xdelaruelle
From: Jeff S. <jsq...@la...> - 2002-02-18 23:43:40
|
First, thanks for your work on modules. We love them. :-) We're using the latest release -- 3.1.6. However, we've having issues with modules when paired with remote shell agents such as rsh/ssh. Although the problem exists on all types of machines, I'll limit the description to linux machines and the setup described in INSTALL.RH7x, and limit my discussion to the bash and csh shells for simplicity. ----- The problem is the two different parts of setting up the module environment -- the stuff that gets executed: a) once, from /etc/csh.login and /etc/profile (/etc/custom/csh.login and /etc/custom/profile, respectively) b) every shell, from /etc/csh.cshrc and /etc/bashrc (/etc/custom/csh.cshrc and /etc/custom/bashrc, respectively) ----- rsh and ssh do exactly the same thing (indeed, they are both documented to do the same thing -- I think that since ssh came after rsh, it just followed the well-established rsh precedent). So I'll just discuss rsh. Obviosuly, in a situation where one logs into a console, this all functions exactly as described. And when one executes "rsh hostname" to get a shell on a remote machine, it also functions exactly as described. The problem is when trying to execute a single command on the remote node -- something like: rsh hostname who The remote rsh daemon -- the one on the machine "hostname" will *not* treat the shell that "who" runs in as a login shell. Hence, the "login"-time module initialization stuff is not run -- i.e., the stuff in step a), listed above. End result: $MODULE_VERSION is not defined, and Badness results. For example, if a csh user has "module load null" in their $HOME/.cshrc file, and they execute: rsh hostname who they'll see: ----- [14:22] pokey:~ % ssh 127.0.0.1 who MODULE_VERSION: Undefined variable. jsquyres :0 Feb 18 07:42 jsquyres pts/0 Feb 18 07:42 ----- The situation and error is very similar for bash users for have "module load null" in their $HOME/.bashrc file. Does anyone have any suggestions for this kind of situation? Those of us in the parallel computing world run commands on remote nodes all the time. Being able to use modules for remote command executions would be a very valuable tool. Thanks for your time. {+} Jeff Squyres {+} jsq...@la... {+} http://www.lam-mpi.org/ |