From: Walter Roberson on
Bruno Luong wrote:
> "Jonathan " <jonathan.ethier(a)crc.gc.ca> wrote in message
> <i2uvm8$7iv$1(a)fred.mathworks.com>...
>> Hi Everyone,
>>
>> One of the best things about a multi-core processor for my work is the
>> ability to run simulations and leaving a core free for word
>> processing. However, I've found in MATLAB 2009b and 2010a that MATLAB
>> automatically uses multi-core and it would seem the majority of my
>> code is parallelize and thus I never seem to have a free core during
>> simulations.
>>
>> Long story short: how do I turn off multi-processing or better, limit
>> the number of cores MATLAB will use during simulation?
>>
>> Thanks.
>
> Start your matlab session with -singleCompThread option. It is no longer
> possible to tune the number of threads within the session.

"The Skinny on maxNumCompThreads"

http://blogs.mathworks.com/loren/2007/09/12/controlling-multithreading/
From: Bruno Luong on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i2vdv8$kt1$1(a)canopus.cc.umanitoba.ca>...

>
> "The Skinny on maxNumCompThreads"
>

This command has been removed.

Bruno
From: Walter Roberson on
Bruno Luong wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message
> <i2vdv8$kt1$1(a)canopus.cc.umanitoba.ca>...
>
>>
>> "The Skinny on maxNumCompThreads"
>>
>
> This command has been removed.

Possibly removed in 2010b (pre-release), but it is still documented as of 2010a
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/maxnumcompthreads.html
From: Bruno Luong on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i2vj06$saa$1(a)canopus.cc.umanitoba.ca>...
> Bruno Luong wrote:
> > Walter Roberson <roberson(a)hushmail.com> wrote in message
> > <i2vdv8$kt1$1(a)canopus.cc.umanitoba.ca>...
> >
> >>
> >> "The Skinny on maxNumCompThreads"
> >>
> >
> > This command has been removed.
>
> Possibly removed in 2010b (pre-release), but it is still documented as of 2010a
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/maxnumcompthreads.html

You are right Walter, the command is still functioning despite of the warning. I prefer they keep it.

Bruno
From: Steven_Lord on


"Jonathan " <jonathan.ethier(a)crc.gc.ca> wrote in message
news:i2uch4$9qm$1(a)fred.mathworks.com...
> Hi Everyone,
>
> One of the best things about a multi-core processor for my work is the
> ability to run simulations and leaving a core free for word processing.
> However, I've found in MATLAB 2009b and 2010a that MATLAB automatically
> uses multi-core and it would seem the majority of my code is parallelize
> and thus I never seem to have a free core during simulations.
>
> Long story short: how do I turn off multi-processing or better, limit the
> number of cores MATLAB will use during simulation?

What OS are you using? If you're on Windows, you can change the processor
affinity for MATLAB in Task Manager to tell it to only use certain cores. I
believe you can do something similar on other operating systems, but I don't
know the process to do so off the top of my head.

If you want to tell MATLAB to only use one computational thread, use
the -singleCompThread startup option when you start MATLAB.

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f8-4994.html#bq24t0c

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com