[GE users] NSLOTS in interactive session

reuti reuti at staff.uni-marburg.de
Tue Nov 17 18:52:17 GMT 2009


Am 17.11.2009 um 19:37 schrieb murple:

> I don't see $NSLOTS when running qlogin or qrsh. Is this normal? I'd
> like users to use qlogin -pe smp <slot range> and then see how many
> slots they got to adjust their parameters for multi-threaded programs.

yes, this is normal as it's a fresh shell. You can start a shell with:

$ qrsh -pty y bash

to get them set. Another option is to have a ~/.profile:

MYPARENT=`ps -p $$ -o ppid --no-header`
MYSTARTUP=`ps -p $MYPARENT -o command --no-header`

if [ "${MYSTARTUP:0:13}" = "sge_shepherd-" ]; then
    echo "Running inside SGE"
    echo "Job $MYJOBID"

    . /var/spool/sge/$HOSTNAME/active_jobs/$MYJOBID.1/environment
    unset HISTFILE

(adjust the location of /var/spool/sge to your spooling directory  
which is by default in $SGE_ROOT/spool)

-- Reuti


To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

More information about the gridengine-users mailing list