Thread Subject:
multithreading support on 2 cpus

Subject: multithreading support on 2 cpus

From: Luna Moon

Date: 21 Aug, 2007 16:55:02

Message: 1 of 4

I have two Xeon 2.4GHz cpus on my Intel PC. I am using Matlab 2007a on
Windows XP.

I saw there is an option of multithreading in Preference of Matlab
GUI, I set it to be "autuomatic", it recognizes 2 cpus.

I am now running a large Monte Carlo program, I still only see only
about 50% in the task manager. The other 49% is being used by System
Idle Process.

What's wrong?

Thanks!

Subject: multithreading support on 2 cpus

From: Penny Anderson

Date: 21 Aug, 2007 18:12:26

Message: 2 of 4

"Luna Moon" <lunamoonmoon@gmail.com> wrote in message
news:1187715302.408468.127830@z24g2000prh.googlegroups.com...
>I have two Xeon 2.4GHz cpus on my Intel PC. I am using Matlab 2007a on
> Windows XP.
>
> I saw there is an option of multithreading in Preference of Matlab
> GUI, I set it to be "autuomatic", it recognizes 2 cpus.
>
> I am now running a large Monte Carlo program, I still only see only
> about 50% in the task manager. The other 49% is being used by System
> Idle Process.
>
> What's wrong?
>
> Thanks!


Hi Luna,

You probably aren't using the math functions in MATLAB that are
multithreaded. These include the BLAS-based linear algebra routines
including matrix multiplication, and the element-wise operators.

Penny Anderson
The MathWorks, Inc.

Subject: multithreading support on 2 cpus

From: David

Date: 13 Oct, 2007 17:30:22

Message: 3 of 4

"Penny Anderson" <penny@mathworks.com> wrote in message <faf9ua$ljk
$1@fred.mathworks.com>...
>
> You probably aren't using the math functions in MATLAB that are
> multithreaded. These include the BLAS-based linear algebra routines
> including matrix multiplication, and the element-wise operators.
>
> Penny Anderson
> The MathWorks, Inc.


The new R2007b multithreading doesn't seem to lead to any improvement on
a a DUAL 2.5 GHz G5 Mac (PowerPC) when running the MATLAB benchmak
("bench"). Clearly that benchmark must be designed to test the BLAS routines
and element-wise operations, ... or else it is a useless benchmark. There was
very little (if any) difference when switching between multi-threading on or
off.

What gives?

What example or benchmark can a MATLAB user run to verify whether there is
any multi-threading happening, and measure the benefit (for instance, on a
quad-core CPU, or multiple CPUs).

-- David Jones

Subject: multithreading support on 2 cpus

From: Penny Anderson

Date: 15 Oct, 2007 14:46:33

Message: 4 of 4

"David " <djones.nospam@remove.mcmaster.ca> wrote in message
news:feqvbe$s88$1@fred.mathworks.com...
> "Penny Anderson" <penny@mathworks.com> wrote in message <faf9ua$ljk
> $1@fred.mathworks.com>...
>>
>> You probably aren't using the math functions in MATLAB that are
>> multithreaded. These include the BLAS-based linear algebra routines
>> including matrix multiplication, and the element-wise operators.
>>
>> Penny Anderson
>> The MathWorks, Inc.
>
>
> The new R2007b multithreading doesn't seem to lead to any improvement on
> a a DUAL 2.5 GHz G5 Mac (PowerPC) when running the MATLAB benchmak
> ("bench"). Clearly that benchmark must be designed to test the BLAS
> routines
> and element-wise operations, ... or else it is a useless benchmark. There
> was
> very little (if any) difference when switching between multi-threading on
> or
> off.
>
> What gives?
>
> What example or benchmark can a MATLAB user run to verify whether there is
> any multi-threading happening, and measure the benefit (for instance, on a
> quad-core CPU, or multiple CPUs).
>
> -- David Jones

David,

bench is an old benchmark from pre-multithreading days. In fact, only the LU
benchmark is a really good test of the new multithreading features, in
particular the BLAS routines underlying the LAPACK routine DGETRF called
within LU. On Mac/PowerPC, multithreaded BLAS is ALWAYS on so even though
you think you are toggling between single-threaded and multithreaded
performance, in fact you are always seeing multithreaded BLAS kicking in. As
an aside, the SPARSE benchmark ends up calling BLAS routines as well, and
you are always seeing those in multithreaded variants on PowerPC as well.

Try to run the multithreaded computation demo which will also run
element-wise operations with and without multithreading. Those should show
performance differences from single-threaded to multi-threaded runs.

http://www.mathworks.com/products/matlab/demos.html?file=/products/demos/shipping/matlab/multithreadedcomputations.html


Penny.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
multithread David 13 Oct, 2007 13:30:40
multicore David 13 Oct, 2007 13:30:40
multicore Tim Davis 21 Aug, 2007 15:27:23
rssFeed for this Thread

Contact us