From: Jonathan on
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.
From: John D'Errico on
"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?
>

Why are people never happy? Either their code does not
use parallel processing enough, so is too slow, or it uses
too much.

Long story short, use a better OS. Or get a machine with
more cores and hyper-threading. Or get a cheap laptop
that you use on the side to surf the web, do e-mail, and
word processing on.

John
From: Matt J on
"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.
================

Is that really true? If MATLAB always parallelizes computation, why buy the Parallel Computing Toolbox?
From: Jonathan on
"John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <i2v154$an2$1(a)fred.mathworks.com>...
> "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?
> >
>
> Why are people never happy? Either their code does not
> use parallel processing enough, so is too slow, or it uses
> too much.
>
> Long story short, use a better OS. Or get a machine with
> more cores and hyper-threading. Or get a cheap laptop
> that you use on the side to surf the web, do e-mail, and
> word processing on.
>
> John

I'm quite happy. I'm simply asking if there is a setting to control the multi-processing. It's not too much to ask to have control over things. If you don't have anything productive to add to the conversation, I suggest you don't post.

Further to that point, your comments are inane. I've tried my code on a 2-core, 4-core and 8-core machine and it maxes out to 100% cpu usage every time. The solution is not to purchase an additional machine - that's simply wasteful and without sense. The solution is to have a simple checkbox that you click and say yes/no to parallel usage.
From: Bruno Luong on
"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.

Bruno