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

cjf001 john.foley at motorola.com
Thu Jan 14 22:30:11 GMT 2010


Hey, you know, after I read your post, I realized what I was
missing in the syntax, and in the limited amount of testing
I've been able to do since then, I think it actually works !

What works is this :

    qsub -q 'queuename@!@hostgroup_to_avoid' ...

I had been trying something similar to this, but I was putting
the second "!" AFTER the second "@", instead of BEFORE it, as
in your example. When doing it this way, qsub takes it and like
I said, it appears to be assigning to the correct hostgroups
now. I did note that if the "queuename" is a wildcard (ie, "*"),
it does NOT seem to assign to the correct hostgroup.

Something else I noticed while playing with this last iteration -
the command :

    qsub -q '! *@!@Mech_sim'  ...

gives the error:

   Unable to run job: Job was rejected because job requests unknown queue "! *@!@Mech_sim".

At first I thought this was a syntax error, but later I realized that qsub is
simply saying that the queuename "! *" doesn't make any sense ! Ha ! Darn
thing is smarter than I would have given it credit for...   :)

Anyway, thanks for the inputs. I'll do some more testing tomorrow, but
right now it looks like it will do what I'm looking for - just had to
get the syntax correct.

Also, for the record, I'm running SGEv6.2u2.

       John



reuti wrote:
> 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].

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

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



More information about the gridengine-users mailing list