[GE dev] Core binding suggestion...

jewellc chris.jewell at warwick.ac.uk
Tue Oct 5 16:49:13 BST 2010


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=286026

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



More information about the gridengine-users mailing list