Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Multithreading not working?
Date: Tue, 27 May 2008 19:06:11 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 24
Message-ID: <g1hm33$lsm$1@canopus.cc.umanitoba.ca>
References: <g1hjee$k00$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1211915171 22422 192.70.172.160 (27 May 2008 19:06:11 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Tue, 27 May 2008 19:06:11 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:470694



In article <g1hjee$k00$1@fred.mathworks.com>,
David Doria <daviddoria@gmail.com> wrote:
>I just installed matlab 2008a and noticed under "general"
>properties "automatic multithreading" is enabled.  I have
>some code with some "embarrassingly parallel" for loops that
>takes hours to run.  I ran the code with this option enabled
>and there was no activity on more than 1 processor, infact
>the one processor is only at 20%.  Why would it not use the
>other processors?

The BLAS routines are multithreaded. If you do not happen to
be doing something like \ or (e.g.) singular value decomposition,
then whether Matlab will end up using the BLAS routines or not
will depend on its success in figuring out that a given
expression is can be fully or partially rewritten in terms to
calls to BLAS routines -- and dependant upon Matlab figuring out
that making such a call is worthwhile (there is considerable
overhead to starting multithreading.)


-- 
   So you found your solution
   What will be your last contribution?
   -- Supertramp (Fool's Overture)