[GE users] SGE in shell script problem

Chris Dagdigian dag at sonsorol.org
Wed Dec 14 16:26:00 GMT 2005


Hi Jon,

Inside your shell script can you just source the official SGE setup  
script?

  #!/bin/bash

  # set up SGE environment for the script
  source /path/to/sge_root/<cell>/common/settings.sh

  # do some work (call your qstat command & do stuff with the output)


As a general rule, if you really do have the following ENV variables  
active in your environment then the qstat command will work:

# Most important ENV values for SGE (using example values; you have  
to adjust to match your install)  ...
SGE_CELL=default
SGE_EXECD_PORT=702
SGE_QMASTER_PORT=701
SGE_ROOT=/common/sge

To debug your cron script you may want to put a command in there that  
dumps the current ENV values. It is highly likely that cron or your  
script itself is not successfully setting and exporting the SGE_ROOT  
value.

-Chris




On Dec 14, 2005, at 11:15 AM, Jon Savian wrote:

> Hi Every1
>
> I am trying to write a bash shell script (not an sge submit script)
> and am trying to get some output from "/path/to/bin/qstat -f" to
> parse.  When i run I run the script myself it has no problem getting
> output.  If I set it up to use cron it will not execute and gives the
> error "please define SGE_ROOT".  Exporting the variable or just
> defining it in the script again,ie. SGE_ROOT=/path/to/gridengine, do
> not work.
>
> Any suggestions?
>
> Jon (the funky homosapien)
>

---------------------------------------------------------------------
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