Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: MP running no faster than IC
From
Ted Player <[email protected]>
To
[email protected]
Subject
Re: st: RE: MP running no faster than IC
Date
Mon, 8 Jul 2013 21:27:08 -0600
I've tried to see evidence of MP using multiple cores using a 32-core
virtual machine on Amazon's EC2. I created a new benchmark program
(shown below) that estimates 100 regression models without
bootstrapping. I set Stata MP to use 1 to 12 processors. (I stop at
12 because that's as high as my purchased Stata license will allow.)
If MP were using multiple cores, the run times would fall
dramatically. As shown below, the run times are absolutely flat.
If MP will not improve a basic program like benchmark2.do, what *will*
it improve? I would hate to think I wasted my money on buying MP
rather than SE!
benchmark2.do
--------------------------------------------------------------
creturn list
quietly {
forvalues i = 1/12 {
set processors `i'
clear all
sysuse auto
timer on 1
forvalues j = 1/25 {
regress mpg weight gear foreign
regress weight gear foreign mpg
regress gear foreign mpg weight
regress foreign mpg weight gear
}
timer off 1
timer list
local elapsed = r(t1)
noisily display "When `i' processors are used, this benchmark
process required ... `elapsed' ... seconds"
}
}
Output from EC2 (an instance of cc2.8xlarge: a 64-bit, 32-core virtual
Windows machine)
---------------------------------------------------------------------------------------------------------------------------------
. creturn list
...
c(MP) = 1
c(processors) = 12 (Stata/MP, set processors)
c(processors_lic) = 12
c(processors_mach) = 32
c(processors_max) = 12
c(os) = "Windows"
c(osdtl) = "64-bit"
c(machine_type) = "PC (64-bit x86-64)"
...
When 1 processors are used, this benchmark process required ... .421 ... seconds
When 2 processors are used, this benchmark process required ... .421 ... seconds
When 3 processors are used, this benchmark process required ... .421 ... seconds
When 4 processors are used, this benchmark process required ... .421 ... seconds
When 5 processors are used, this benchmark process required ... .422 ... seconds
When 6 processors are used, this benchmark process required ... .421 ... seconds
When 7 processors are used, this benchmark process required ... .421 ... seconds
When 8 processors are used, this benchmark process required ... .421 ... seconds
When 9 processors are used, this benchmark process required ... .422 ... seconds
When 10 processors are used, this benchmark process required ... .421
... seconds
When 11 processors are used, this benchmark process required ... .421
... seconds
When 12 processors are used, this benchmark process required ... .421
... seconds
On Mon, Jul 8, 2013 at 8:12 PM, Mark Finnis <[email protected]> wrote:
> Hi Ted,
>
> I have Stata/SE 12.1 and upgraded to Stata/MP4 13.0 recently. I left the SE
> 12.1 install in place for the moment.
>
> On a laptop (so slower processor) under W7-64bit, I get 27.7s and 34.2s
> respectively.
>
> Watching activity via "Task Manager", SE tasks 1 processor and MP uses all 4
> "as advertised" ...
>
> An "interesting anomaly".
>
> It would be interesting to see the results from a different platform!
>
> Cheers
> Mark
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/