On Thu, Nov 26, 2009 at 3:06 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> " I believe that all estimation commands should benefit from multiple CPUs"
>
>
> As http://www.stata.com/statamp/report.pdf says, there are two reasons why
> no performance improvement is achieved: " ...either because (the commands)
> are inherently sequential ... or because no effort was made to parallelize
> them". For instance, -xtmixed- does not run faster, either, but certainly
> belongs to the group of estimation commands as well. The fact that no effort
> was made itself is probably grounded in the insight that the performance
> improvement to be expected is not all that great.
Martin, this is precisely the question: is it not implemented because
there is no more efficient algorithm, or because the developers didn't
have time to implement it.
Here is a comparison of Mata's matrix multiplication (looks good) and
matrix determinant computation (doesn't look good):
http://img690.imageshack.us/img690/5555/mataparallel.png
or here if the above link doesn't work:
http://img690.imageshack.us/i/mataparallel.png/
Computing a determinant in Stata (as opposed to Mata) is ~4-5 times
slower, but also not sensitive to the number of CPUs.
We know that computing a determinant is highly-parallelizable. (see
e.g. here: http://cjtcs.cs.uchicago.edu/articles/1997/5/cj97-05.pdf
and references within).
So the fact that it is not sensitive to the number of CPUs in Mata
tells me that most probably "no effort was made" not because there
would be no effect, but because it is still work in progress.
It would be great if there were explicit parallelization instructions
in Mata (like it is done in most modern languages), so that we could
implement parallel algorithms ourself.
Best, Sergiy Radyakin
>
>
> HTH
> Martin
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Sergiy Radyakin
> Gesendet: Donnerstag, 26. November 2009 05:12
> An: [email protected]
> Betreff: st: Mata MP
>
> Dear All,
>
> 1) I have just bumped into a phrase: "since ghk2() is written Mata it
> does not benefit from multiple processors in Stata/MP".
> Here: http://www.cgdev.org/files/1421516_file_Roodman_cmp_FINAL.pdf
> I wonder why is that?
>
> 2) mprobit is not benefitting from multiple CPUs. Is it a fundamental
> problem and nothing can be done? or is it just
> "not-yet-implemented"? (It is surprising, since I believe that all
> estimation commands should benefit from multiple CPUs).
>
> Thank you,
> Sergiy Radyakin
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/