[torqueusers] login-scripts within mom

Garrick Staples garrick at clusterresources.com
Thu Dec 7 13:11:38 MST 2006

On Thu, Dec 07, 2006 at 07:45:23PM +0100, Thomas Zeiser alleged:
> On Thu, Dec 07, 2006 at 11:08:11AM -0700, Garrick Staples wrote:
> > On Thu, Dec 07, 2006 at 11:58:00AM +0100, Dr. Bert Wiegers alleged:
> > > hi users/developers,
> > > 
> > > can I configure torque in a way that mom excecutes standard user
> > > login-scripts on each computenode before starting the job (non interactive)?
> > 
> > Doesn't it already happen?  The initial process is started as the user's
> > login shell.
> that's true -- but depending on how the mom is compiled (cf.
> http://www.clusterresources.com/pipermail/torqueusers/2006-October/004525.html)
> new shells may be forked to actually execute the job script. And
> these shells are no longer login shells (at least by default) and
> thus do not get definitions of aliases or shell functions as e.g.
> used by modulecmd.tcl ...

You don't need a login shell to get aliases and shell functions, or else
you'd never be able to use them in a shell script.

Login shells get you the initial set of environmental variables.  Since
they are exportable, they should only be setup once.

More information about the torqueusers mailing list