Cluster Grid

Font Size

SCREEN

Layout

Menu Style

Cpanel

How to check the default shell and change it for my job in Sun Grid Engine

Ok, our default shell is /bin/csh.

How to check that? Either run a job, or check the configuration yourself.

 

[heri@fep-53-2 ~]$ qsub -q ibm-quad.q
echo $SHELL
Your job 94735 ("STDIN") has been submitted
[heri@fep-53-2 ~]$ watch qstat
[heri@fep-53-2 ~]$ cat STDIN.o94735
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
/bin/csh
[heri@fep-53-2 ~]$ qconf -sq ibm-quad.q | grep shell
shell                 /bin/csh
shell_start_mode      posix_compliant

Say you really don't like the defaults. Try this:

 

[heri@fep-53-2 ~]$ qsub -q ibm-quad.q -S /bin/bash
echo $SHELL
export MYVAR="If you can read this, it works."
echo $MYVAR
Your job 94739 ("STDIN") has been submitted
[heri@fep-53-2 ~]$ watch qstat
[heri@fep-53-2 ~]$ cat STDIN.o94739
/bin/bash
If you can read this, it works.
[heri@fep-53-2 ~]$