Hi everybody,

Am 17.05.2011 17:03, schrieb Mark Suhovecky:
> Chris-
>
> Our PE for SMP jobs here uses
>
>  allocation_rule    $pe_slots
>
> and in the submission script, the environment variable $NSLOTS
> will give the # of slots requested.
>
>   
Matlab Code:
maxNumCompThreads(str2num(getenv('NSLOTS')))

But be aware of the following warning from Matlab:
Warning: maxNumCompThreads will be removed in a future release. Please
remove any instances
of this function from your code.


> I'd be interested in knowing how your Matlab solution works- I've just 
> recently
> become aware of this core-grabbing behavior on Matlab's part.
>
>
>   
You can also use the start-up option "-singleCompThread" to keep matlab
in single threaded mode:
matlab -singleCompThread
> Mark 
> ________________________________________
> From: [email protected] [[email protected]] On Behalf 
> Of Chris Jewell [[email protected]]
> Sent: Tuesday, May 17, 2011 10:20 AM
> To: [email protected] Users
> Subject: [gridengine users] Get num slots in interactive session
>
> Hi All,
>
> Does anybody have a (simple) way of obtaining the requested number of slots 
> for, say, a parallel SMP interactive session from within that session?  I'm 
> currently having an issue with Matlab spawning too many threads and causing 
> load average problems: Matlab by default uses as many threads as there are 
> CPUs on a physical machine, but I use core binding to control such unwise 
> assumptions.  Therefore, for optimum performance, it would be really useful 
> to write a script in the matlabrc file that grabs the number of requested SMP 
> slots, and sets the maxNumCompThreads accordingly.
>
> Chris
>
>
> --
> Dr Chris Jewell
> Department of Statistics
> University of Warwick
> Coventry
> CV4 7AL
> UK
> Tel: +44 (0)24 7615 077
Greetings,

Kasper
Ruhr-University Bochum

<<attachment: kasper_fischer.vcf>>

_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to