[GE users] Réf. : Re: [GE users] Réf. : Re: [GE users] Qrsh and PATH variable

Thierry Darnige darnige at ccr.jussieu.fr
Thu Jun 14 14:59:09 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. ]

Thanks Andy,
 
But the mechanism you describe (.profile in my case) is more or less the
same as the /etc/login.conf I use and doesn't work...
With login.conf, I get all my variables except the path that is overriden by
sge_starter with the path written by sge_execd in the job environment file.
It seems that this happens after the remote shell has started.
 
Thierry
 
-------Message original-------
 
De : Andy Schwierskott
Date : 13/06/2007 15:39:59
A : users at gridengine.sunsource.net
Sujet : Re: [GE users] Rif. : Re: [GE users] Qrsh and PATH variable
 
Thierry,
 
ok, I understand.
 
What your users could do: Usually .cshrc is sourced (for (t)csh users) - the
PATH could be set there.
I'm not sure about sh/bash/ksh if they source .profile.
 
To avoid recursive setting of $PATH this code snippet could be added by the
users to .cshrc
 
if ($?JOB_ID == 1 && $?path_set == 0) then
    setenv PATH <matlab_path>:$PATH
    setenv path_set
endif
 
As admin you can do the following: A prolog script is configured to run as
admin user (or root). It modifies the file $SGE_JOB_SPOOL_DIR/environment
and sets PATH to the correct value.
 
Andy
 
> Thank you Andy,
>
> But the current PATH (I mean on the submit host) is not the same as my
> remote PATH (on the nodes).
> I would like to use the PATH defined on the nodes (as I do for other env
> variables through the /etc/login.conf).
> This one is overloaded with a "hard coded" path ... (remote job directory
+
> hard coded path).
>
>     qrsh env
> .....
> PATH=/tmp/1471.1.all.q:/usr/local/bin:/bin:/usr/bin
> MATLAB=/usr/local/matlab
> .....
>
>
> Thierry
>
>
> -------Message original-------
>
> De : Andy Schwierskott
> Date : 13/06/2007 14:56:12
> A : users at gridengine.sunsource.net
> Sujet : Re: [GE users] Qrsh and PATH variable
>
> Thierry,
>
> if the current PATH should be exported you'd just type in
>
>    qrsh -v PATH
>
> to be verified by:
>
>     qrsh '/bin/echo $PATH'
>     qrsh -v PATH '/bin/echo $PATH'
>
> Andy
>
>
> On Wed, 13 Jun 2007, Thierry Darnige wrote:
>
>> Hello,
>>
>> I'm using sge6 on netbsd and experiments some problems with the qrsh
> command
>> (redirected to ssh) and the PATH variable :
>>
>> I just want to be able to issue a command like "qrsh matlab" on any node
>> (the used PATH is then the node environment variable grabbed from
> /etc/login
>> conf) and avoid to give the absolute path for matlab.
>>
>> SGE seems to overload the node PATH with a default (what I've confirmed
> with
>> a quick look to the code). Nevertheless, the user can specify his own
PATH
>> through a "-V" option in the qrsh command but it's longer to type than
> using
>> the absolute path.
>>
>> Do you know a more "userfriendly" way to do that ? I'm sure I'm missing
>> something ...
>>
>> Thank you
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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
 
 

    [ Part 2, Image/JPEG (Name: "endless_sky2.jpg") 5.3 KB. ]
    [ Unable to print this part. ]


    [ Part 3, Image/GIF (Name: "elephant_fr.gif") 36 KB. ]
    [ Unable to print this part. ]



More information about the gridengine-users mailing list