[GE users] How to find SGE default PATH

Olesen, Mark Mark.Olesen at arvinmeritor.com
Mon Mar 14 10:53:28 GMT 2005


The PATH seen by the job is that of the execd - which is inherited from the
/etc/init.d initialization script - with the job tmp directory prepended.

To force other paths, you need to ensure that ~/.profile (~/.login for csh)
are correctly sourced AND/OR source a global environment directly from the
job script.

For all our scripts, we use the following options:
	-S /bin/sh -cwd -j y

with the global configurations 
	shell_start_mode             posix_compliant
	login_shells                 sh,ksh,csh,tcsh,bash


The job script should thus force ~/.profile to be sourced and it is presumed
that the user has an appropriate environment configured there.

Nonetheless, it is possible to include a line such as 
	[ -f /opt/n1ge6/default/site/environ ] && \ 
	. /opt/n1ge6/default/site/environ

in the job script and use the environ script to set cluster-wide
environments (paths, license envs, etc). If the script really doesn't find
the executable in the pwd, you could always prepend it to the path via the
environ script.  Having the centralized 'environ' script is also handy for
any prolog/epilog scripts, since they are (unlike the jobs scripts) are
*never* with a logshell!


Regards,


Dr. Mark Olesen
Principal Engineer Thermofluids Analysis
ArvinMeritor Light Vehicle Systems
ArvinMeritor Emissions Technologies GmbH
Biberbachstr. 9
D-86154 Augsburg, GERMANY
tel: +49 (821) 4103 - 862
fax: +49 (821) 4103 - 7862
Mark.Olesen at ArvinMeritor.com

> -----Original Message-----
> From: Kamlesh Singh [mailto:kamleshsinghus at gmail.com]
> Sent: Saturday, March 12, 2005 1:09 AM
> To: users at gridengine.sunsource.net
> Subject: Re: [GE users] How to find SGE default PATH
> 
> Hi...
> I also have the similar problem, where PATH is not setup on the
> execution Host. How do you recreate the PATH on the execution Host.
> I can not pass it with -v PATH as value of $PATH (Application
> Tree)would be different on different type of Host.
> I tried to pass the prolog variable but some how Job starter does not
> recreate the PATH as it run in a new shell b'se of #!/bin/csh
> How do you recreate the ENV in the Job script. we use "modules" but
> the alias do not get setup in the execution server ENV.
> 
> qsub -v PROLOG="/home/kamsingh/tmp/GRID/jobs_starter" -q all.q at host171
> -cwd env.csh
> 
> Please help.
> Thanks
> Regards
> 
> 
> 
> On Fri, 11 Mar 2005 15:34:33 -0800 (PST), Ron Chen
> <ron_chen_123 at yahoo.com> wrote:
> > Yes, SGE by default adds
> > <job-tmp- dir>:/usr/local/bin:/usr/ucb:/bin:/usr/bin
> > to
> > the PATH.
> >
> > But you can also submit blast.sh, and may be it's
> > easier?
> >
> > -Ron
> >
> > --- Chunyan Wang <wangch at cpsc.ucalgary.ca> wrote:
> > > Thanks,
> > > My problem is:
> > > On my sge master host A, I want to submit a job to
> > > run on an execution
> > > host B, C, D, or E. I have a job script called
> > >
> > > sge-job.sh, and I use "qsub sge-job.sh" to submit
> > > this job. In sge-job.sh file, It calls another
> > > script blast.sh which is the script to run a Blast
> > > job on the host whatever SGE selects. On execution
> > > host, I have a blast.sh for the Blast job.
> > > Therefore, I want to find the default PATH for
> > > putting the blash.sh in each execution host. So when
> > > SGE select host C to run sge-job.sh, then will
> > > automaticlly execute the blast.sh on host C without
> > > specify the full path of blast.sh in sge-job.sh
> > > file. and SGE will find it where is the blast.sh on
> > > host C and run it. This job will be run as
> > > "apachebody" which doesn't have a shell on these
> > > host B, C, D, and E. so I can not define the path in
> > > .cshrc file.
> > >
> > > Thanks,
> > >
> > > joyce
> > >
> > >
> > >
> > > Rayson Ho wrote:
> > >
> > > >>I don't want to specified the full path for
> > > sge-job.sh
> > > >>file, So what is the default PATH for SGE to find
> > > this file. Because I
> > > >>want find the location for these job files without
> > > specifying the full
> > > >>PATH of the job file.
> > > >>
> > > >>
> > > >
> > > >How about qsub `which sge-job.sh`
> > > >
> > > >If the location is in the search path ($PATH), then
> > > `which sge-job.sh` will
> > > >print the abs path.
> > > >
> > > >Rayson
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >>I hope my explaination is clear. Anyone can tell
> > > me this.
> > > >>By the way, I found
> > >
> > >>/tmp/266.1.cbr.q:/usr/local/bin:/usr/ucb:/bin:/usr/bin.
> > > Is this the PATH?
> > > >>
> > > >>Thanks alot,
> > > >>
> > > >>Joyce
> > > >>
> > > >>
> > > >>
> > >
> > >---------------------------------------------------------
> > > >Get your FREE E-mail account at
> > > http://www.eseenet.com !
> > > >
> > >
> > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail:
> > > users-unsubscribe at gridengine.sunsource.net
> > > >For additional commands, e-mail:
> > > users-help at gridengine.sunsource.net
> > > >
> > > >
> > >
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > ---------------------------------------------------------------------
> > 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