[GE users] "shell_start_mode=unix_behavior" and environment variables problems

Daniel Templeton Dan.Templeton at Sun.COM
Tue Jul 31 19:34:36 BST 2007


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

Goncalo,

The environment of a job consists of the following:

1) The environment settings of the user that started the execd, unless 
INHERIT_ENV is set to false
2) Overlaid with the environment settings set by the shell via .profile, 
.cshrc, etc. depending on whether the shell is a login shell or not
3) Overlaid with the SGE environment settings, like ARCH, JOB_ID, etc.
4) Overlaid with any environment settings explicitly passed via the -v 
or -V options.

Unless you specify -V when submitting the job, the user's environment at 
submission time will not be inherited.  In your particular case, I would 
first check that bash is in the list of login shells.  (See qconf 
-mconf.)  By default it is not.

Daniel

McCalla, Mac wrote:
> Hi Goncalo,
>
> I believe the default execd behavior is to start the user script with the same environment that it was started with.  In our environment (6.0u7) we actually depend on this to be true.
>
> Mac McCalla 
>
> -----Original Message-----
> From: Gon?alo Borges [mailto:goncalo at lip.pt] 
> Sent: Tuesday, July 31, 2007 1:14 PM
> To: users at gridengine.sunsource.net
> Subject: [GE users] "shell_start_mode=unix_behavior" and environment variables problems
>
> Dear All,
>
> 1 - A user is trying to submit a /bin/bash script to SGE. Both in the submission host and exec host where the job is supposed to run, the default shell definition for this user is /bin/csh. The default definition for the cluster queue is also /bin/csh.
>
> 2 - In the cluster queue definition, I've configure "shell_starting_mode=unix_behavior" in order for the system to ignore the cluster queue shell definition (bin/csh) and take into account the first line of the user script, which is #! /bin/bash.
>
> [root at sge01 Conf]# qconf -sq compasslip | grep shell
> shell                 /bin/csh
> shell_start_mode      unix_behavior
>
>
> 3 - What happens is that the environment is changed when the user submits the script. Check for example $PATH env variable:
>     3.1 - In the exec host, the $PATH variable seen from this user account is:
> PATH=/home/comp/helena/bin:/home/comp/helena/scripts:/usr/sue/bin:/bin:/usr/local/bin:/usr/local/bin/X11:/usr/bin:/usr/bin/X11:
>             
> /cern/pro/bin:/usr/java/j2sdk1.4.2_08/bin:/usr/local/sge/pro/bin/lx26-x86:/usr/local/sge/utils_scripts:/opt/lcg/bin:/usr/kerberos/bin:
>             
> /opt/edg/openmpi/bin:/opt/edg/bin:/opt/globus/bin:/opt/globus/sbin:/opt/mpi/bin:/usr/local/root/pro/bin:/opt/d-cache/dcap/bin:.:
>             
> /opt/d-cache//srm/bin:/opt/d-cache//dcap/bin:/opt/glite/bin:/opt/glite/externals/bin:/opt/gpt/sbin:/opt/d-cache/srm/bin:/usr/X11R6/bin
>
>     3.2 - The $PATH seen inside the /bin/bash script which runs in the same host is just:
> PATH=/tmp/62806.1.compasslip:/usr/local/bin:/bin:/usr/bin
>
> There are other env variable which disappear or are simply defined differently. The most immediate consequence is that since $PATH is not defined as the user would expect, some command simply do not work for the user.
>
> I'm doing something wrong? Is there a workaround to this?
>
> Thanks in advance
> Cheers
> Goncalo
>
>  
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list