[GE users] how to find available slots for multiple pe assigned to a single queue

johnny laynejg at vcu.edu
Tue Oct 10 20:56:54 BST 2006


hi again,
Sorry to keep posting, but I just realized that the $slot I'm pushing 
onto the array in (1.) is the number _used_, you have to subtract that 
from (split("/", $wrds[2]))[1] to get the number of slots _open_, or 
understand that it's the number of used slots being returned. Sorry 
about that, but I didn't want to just cut and paste code.
johnny

> 1. This actually returns a list of {slots, load} per queue instance, 
> but will give you the idea; you can then take this list and sort it or 
> whatever you like:
> # get the name of the queue to investigate
> my $q = $_[0];
> # prepare an empty array to store the info
> my @slots_and_loads = ();
> my $test = 1;
>
> # open a qstat process to search for info on the queue
> open(QSTAT, "qstat -f | grep $q |") or $test = 0;
> if (0 == $test) {
> print "Failed to open qstat process! Couldn't determine the # slots 
> open in $q...\n";
> # be sure to check for this returned error value!
> return ();
> }
> while (<QSTAT>) {
> chomp($_);
> my @wrds = split(" ", $_);
> # make sure queue instance not in an unruly state
> if (5 == @wrds) {
> # prepare queue info
> my $slots = (split("/", $wrds[2]))[0];
> # store the number of open slots for this queue instance
> push @slots_and_loads, "$slots";
> # store the load on this queue instance --> NOTE: for some purposes, 
> it might be better to use rsh to get this....
> push @slots_and_loads, $wrds[3]; # you could also push the name of the 
> queue instance here if you like
> }
> }
> close(QSTAT);
> return @slots_and_loads;
>
>
> SLIM H.A. wrote:
>> We have an ethernet and a myrinet host group, each with their special
>> pe. I created a single queue from these two groups, as the user has to
>> specify the pe anyway when requesting the nslots with the -pe option.
>> However qmon displays all used/available slots in the queue and does not
>> separate between pe. I cannot find a simple way to discover the 
>> available slots for each pe
>> in the queue (eg with qstat) but maybe someone has done this before?
>>
>> A solution would be to create a separate queue for each of the pe's/host
>> groups but that seems an unnecessary proliferation of queues?
>>
>> Thanks
>>
>> Henk
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>> For additional commands, e-mail: users-help at gridengine.sunsource.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list