[GE dev] Core binding suggestion...

templedf daniel.templeton at oracle.com
Tue Oct 5 17:36:12 BST 2010


Looks good to me.  Two comments, though.  First, it looks like you're 
only setting the binding strategy for SMP jobs if the binding strategy 
is already set.  That will fail, for example, if a user runs "qsub 
-clear -pe smp" because the -clear will wipe out the sge_request file. 
Second, you probably should set this as a client-side JSV in the 
sge_request file.  You don't want to run a Borne shell script JSV on the 
server side.

Daniel

On 10/ 5/10 08:49 AM, Chris Jewell wrote:
> On 5 Oct 2010, at 14:46, Daniel Templeton wrote:
>>
>> You could get there today in one of two ways.  The simple method would be to set -binding linear:1 in the sge_request file and teach your users to always pair -pe smp with -binding linear:$NSLOTS.
>>
>> The more sophisticated method would be to set up the sge_request file and then write a JSV that checks for -pe smp and automatically sets the binding appropriately.
>
>
> Many thanks Daniel!  This is what I came up with:
>
> jsv_on_verify()
> {
>    if [ `jsv_is_param pe_name` ]&&  [ `jsv_is_param binding_strategy` ]; then
>        if [ "`jsv_get_param pe_name`" = "smp" ]; then
>
>          job_smp_cores=`jsv_get_param pe_min`
>
> 	jsv_set_param binding_strategy "linear"
> 	jsv_set_param binding_amount $job_smp_cores
>          jsv_accept "SMP Job accepted with $job_smp_cores cores"
>
>          return
>        fi
>    fi
>    jsv_accept "Serial/MPI job accepted"
>    return
> }
>
> It seems to work well, but any comments on how to improve the script are more than welcome!
>
> Cheers,
>
> Chris
>
>
> --
> Dr Chris Jewell
> Department of Statistics
> University of Warwick
> Coventry
> CV4 7AL
> UK
> Tel: +44 (0)24 7615 0778
>
>
>
>
>

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

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



More information about the gridengine-users mailing list