Hi all,
One of my users is complaining that the $NSLOTS variable doesn't exist
when submitting qlogin jobs. The only info I've found regarding this is
this message from 2009:
http://arc.liv.ac.uk/pipermail/gridengine-users/2009-November/027862.html
I have tested it in BASH, and it doesn't work. Neither ".
/var/spool/sge/$HOSTNAME/active_jobs/$MYJOBID.1/environment" nor "source
/var/spool/sge/$HOSTNAME/active_jobs/$MYJOBID.1/environment" load anything.
It seems that, as the contents of the environment file are plain
variable definitions with no export command at all, nothing is done. The
workaround I've found is:
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"
MYJOBID=${MYSTARTUP:13}
MYJOBID=${MYJOBID% -bg}
echo "Job $MYJOBID"
for i in $(cat
/var/spool/sge/$HOSTNAME/active_jobs/$MYJOBID.1/environment); do
export ${i};
done
unset HISTFILE
fi
Does anyone have a "more elegant" way to do this?
Thanks in advance,
Txema
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users