[GE users] "NOT" expression in qsub command ?

reuti reuti at staff.uni-marburg.de
Thu Jan 14 20:10:05 GMT 2010


Am 14.01.2010 um 20:00 schrieb cjf001:

> OK, that syntax works !   But.... it doesn't give me what I'm looking
> for, apparently since the "-l h=xxxxx" is looking for HOSTS, not  
> HOSTGROUPS.

Yes, looks like this would be an RFE to honor hostgroups.


> qsub accepts the command, but it still assigns to a machine in the
> hostgroup I'm trying to avoid - probably because the hostgroup name
> really doesn't match the hostname !
>
> Turns out, after looking at your example, the following is also  
> accepted:
>
>    qsub -q '! clusterqueuename@@hostgroupname'

Which version of SGE? I always get an "unknown queue" error in 6.2u4;  
maybe it's taken literally.

There was also a note in:

http://wiki.gridengine.info/wiki/index.php/EvaluationExpressionSupport

Maybe it was not implemented in this way.


> But.... it appears to only negate the "clusterqueuename" part of the
> queue description, not the "hostgroupname" part - that is, it assigned
> to a different cluster queue, but it still assigned to the hostgroup
> I'm trying to avoid.

So you want to avoid a complete hostgroup and not just one queue from  
this hostgroup. It's a matter of discussion what should have a  
stronger binding, but I think the ! being taken into account only for  
the queue name would be find. You could use:

-q '*@!@group_to_avoid'

Yeah, it's not working due to the first mentioned necessary RFE.

If you want only to avoid one queue from a hostgroup, but use this  
queue on other hostgroups and other queues in this hostgroup it would  
be:

-q '!(queue_to_avoid@@group_to_avoid)'

as

-q '!queue_to_avoid | *@!@group_to_avoid'


The `man sge_types` is indeed telling something more than is  
implemented I think.

-- Reuti


> So, unless anyone has any other great ideas (!) it looks like the only
> way I can get what I'm looking for (which is, succinctly, to avoid  
> assigning
> to certain hostgroups) would be to create an inverse hostgroup for all
> my hostgroups, containing all the hosts EXCEPT those in the original
> hostgroup - then assign to this inverse hostgroup. Kind of messy,  
> but it
> could be done with a cron-type script that creates/updates these
> "inverted" hostgroups every 5 mintues or so, I guess.
>
> I'll troll this out to the group for a bit before I do that, to see if
> there's any other (simpler) thoughts on how to handle this -
>
>    Thanks !
>
>       John
>
>
> templedf wrote:
>> You want:
>>
>>    qsub -q clusterqueuename -l h='!hostgroupname' .....
>>
>> Daniel
>>
>> cjf001 wrote:
>>> Guys -
>>>
>>> I'm trying to understand the "expressions" part of the sge_types
>>> man page, and whether it's even applicable to what I'd like to
>>> do....
>>>
>>>
>>> I can currently request a queue as follows:
>>>
>>>      qsub -q clusterqueuename@@hostgroupname .....
>>>
>>> and I can put wildcards in there too, as in:
>>>
>>>      qsub -q *@@hostgroupname .....    (gets any cluster queue on  
>>> hostgroupname)
>>>      qsub -q clusterqueuename@@* ..... (gets clusterqueuename on  
>>> any hostgroup)
>>>
>>>
>>> but what I'd like to do is is request to NOT get a particular
>>> hostgroup or clusterqueue. It would seem that something like this:
>>>
>>>      qsub -q ! clusterqueuename@@hostgroupname
>>>
>>> might work, but it doesn't, and neither can I get any combination of
>>> quotes, parens, etc to work - either I get a shell error or qsub  
>>> error.
>>>
>>> Anybody ever done this, and/or know the right syntax to make  
>>> something
>>> like this work ?
>>>
>>>       TIA !
>>>
>>>         John
>>>
>>> ------------------------------------------------------
>>> http://gridengine.sunsource.net/ds/viewMessage.do? 
>>> dsForumId=38&dsMessageId=238786
>>>
>>> To unsubscribe from this discussion, e-mail: [users- 
>>> unsubscribe at gridengine.sunsource.net].
>>>
>>
>> ------------------------------------------------------
>> http://gridengine.sunsource.net/ds/viewMessage.do? 
>> dsForumId=38&dsMessageId=238804
>>
>> To unsubscribe from this discussion, e-mail: [users- 
>> unsubscribe at gridengine.sunsource.net].
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do? 
> dsForumId=38&dsMessageId=238815
>
> To unsubscribe from this discussion, e-mail: [users- 
> unsubscribe at gridengine.sunsource.net].

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=238826

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



More information about the gridengine-users mailing list