Greetings,
Per the subject line, I have just found -clogit- runs about 30-40 times slower under Stata 13 MP2 than on another (somewhat inferior) machine running Stata 12 IC. Some example code is below, which took 10 sec under Stata 13 MP2, and 0.25 sec on the machine running Stata 12 IC. (Another example I compared had a 229 sec vs. 7 sec differential.) Both of these Stata copies are running on Windows 7, with updated 64 bit versions of Stata.
I understand that Stata MP has overhead costs vs. a single processor version, but this difference seems clearly excessive. I tried -set processor 1- and it made no difference. So, I'm presuming the difference is v.12 vs. v13, or else something very strange happened in the parallelization of the -clogit- code.
Can any of you out there verify an observation like this? And, can anyone explain it, presuming it's correct?
Regards, Mike
Per the subject line, I have just found -clogit- runs about 30-40 times slower under Stata 13 MP2 than on another (somewhat inferior) machine running Stata 12 IC. Some example code is below, which took 10 sec under Stata 13 MP2, and 0.25 sec on the machine running Stata 12 IC. (Another example I compared had a 229 sec vs. 7 sec differential.) Both of these Stata copies are running on Windows 7, with updated 64 bit versions of Stata.
I understand that Stata MP has overhead costs vs. a single processor version, but this difference seems clearly excessive. I tried -set processor 1- and it made no difference. So, I'm presuming the difference is v.12 vs. v13, or else something very strange happened in the parallelization of the -clogit- code.
Can any of you out there verify an observation like this? And, can anyone explain it, presuming it's correct?
Regards, Mike
Code:
// Test code to run -clogit- for timing clear // Create some data appropriate to a clogit set obs 200 set seed 8575 gen int id = _n expand 2 sort id gen byte tx = mod(_n, 2) ==0 gen fixed = 2 * runiform() if !tx replace fixed = fixed[_n -1] if tx gen x1 = runiform() gen x2 = runiform() gen ystar = fixed + 3 * x1 + 4 * x2 + rnormal(0,1) quiet summ ystar, meanonly gen byte y = (ystar > r(mean)) // // Run some estimations. 5 reps was enough for me. local reps = 5 timer clear 1 timer on 1 forval i = 1/5 { quiet clogit y x1 x2, group(id) } timer off 1 timer list 1
Comment