Disabling shell login commands during job submission

Posted by chris Mon, 18 May 2009 14:33:58 GMT

In this mailing list thread, the following request was made:

...when a job is submitted via qsub, and it gets dispatched to the execution node, it looks like the user's .login or .bash_profile (or whatever the shell's login sequence calls for) is executed on the execution node. Is there a way to change or prevent this action ?

There were a few different options and the thread is worth reading for the discovery of commands that seem to work on the command-line but not via the QMON gui but the one that caught my eye was Dan's reminder regarding qsub arguments that I rarely remember are available:

qsub -b y -shell n ...
The "-b" switch tells SGE that a direct binary executable is being submitted and the "-shell n" explicitly disables the shell related actions.

This seems a sensible approach to use when the intent is not to disable login actions globally.