I want to submit single jobs to the Sun Grid Engine, and make them look like they are executing locally. Instead of creating stdout and stderr file to output these to the calling terminals stdout and stderr.

According to this page -k oe will keep standard output or standard error streams will be retained on the execution host.

However when I try this command:

qsub -cwd -sync yes -k oe -N "test" -V "helloworld.sh"

I get :

qsub: ERROR! invalid option argument "-k"

Tool version:

which qsub => ... sge/6.2u5/bin/lx24-x86/qsub

  1. -cwd : keeps current working directory
  2. -sync yes : qsub command does not complete until the submitted job completes
  3. -k oe : Maintain stdout and stderr.
  4. -N "test" : Name the job
  5. -V : copies environment variables (except $PATH)

Someone offline suggested these options:

qrsh -V -noshell -cwd "hellworld.sh"

Then setting an alias in you .rc

alias qrun 'qrsh -V -noshell -cwd !*'

Which makes submitting any script to the grid just:

qrun helloworld.sh
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.