[torqueusers] Disabling or restrict in time the interactive queue

Sreedhar Manchu sm4082 at nyu.edu
Fri Mar 23 15:22:33 MDT 2012


Hello,

Here is the code you need to put in your submit filter/qsub wrapper

#!/bin/bash

args=("$@")
for((arg=0;arg<$#;arg++))
do
	if [ "${args[$arg]}" = "-I" ]
	then
		exit -1
	fi	
done

while read i
  do
    echo $i
  done


This simple code make sure that there won't be any interactive job requests from command line as it exits with torque message such as

qsub: Your job has been administratively rejected by the queueing system.
qsub: There may be a more detailed explanation prior to this notice.


You need to keep this code in a file like submit.sh

with permissions

ls -l submit.sh
-rwxr-xr-x 1 root root 45271 Mar 23 16:56 submit.sh


Then mention path to this file in /opt/torque/torque.cfg on login node or from where users submit their jobs

[root at login-0-0 ~]# cat /opt/torque/torque.cfg 
#SUBMITFILTER /share/apps/admins/torque/submit_current.sh 
SUBMITFILTER /share/apps/admins/torque/submit.sh 


I am not sure whether we can request interactive jobs from the script. But if we can, then I don't think it's that difficult to do it. Just work on each line, which is $i above and look for #PBS in each line and if you find I next to it just do exit -1.

This should avoid all the interactive jobs.

Sreedhar.




On Mar 16, 2012, at 12:33 PM, giggzounet wrote:

> Thx a lot!
> 
> I had tested this "disallowed_types", but on a "Route" queue...And it
> seems to work only with "Execution" queue.
> 
> Best regards,
> Guillaume
> 
> Le 16/03/2012 15:52, Sreedhar Manchu a écrit :
>> qmgr -c 'set queue <queue name> disallowed_types = interactive'
>> 
>> replace queue name with the queue you want to disable interactive jobs for.
>> 
>> Sreedhar.
>> 
>> 
>> On Mar 16, 2012, at 10:40 AM, giggzounet wrote:
>> 
>>> Hi,
>>> 
>>> Our university has a cluster with torque (3.0.2)/maui. We would like to
>>> disable the interactive queue or to restrict it in time. For example:
>>> - we would like to forbid "qsub -I".
>>> OR
>>> - we would like that "qsub -I" starts an interactive job for 30 minutes
>>> maximum.
>>> 
>>> Is it possible ?
>>> 
>>> Thx a lot,
>>> Best regards,
>>> Guillaume
>>> 
>>> _______________________________________________
>>> torqueusers mailing list
>>> torqueusers at supercluster.org
>>> http://www.supercluster.org/mailman/listinfo/torqueusers
> 
> 
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers



More information about the torqueusers mailing list