Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Will Stata/MP speed up running multiple dofiles inbatch mode?

From   Alex Eapen <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: Will Stata/MP speed up running multiple dofiles inbatch mode?
Date   Thu, 20 Jan 2011 21:25:08 +1100

Thanks Neil. That clarifies it for me. The commands I intend to run in each dofile are -summ- and  -regress-. So by your reasoning  I will see improvements when I upgrade to Stata/MP.
Sent via BlackBerry®

-----Original Message-----
From: Neil Shephard <[email protected]>
Sender: "[email protected]"
	<[email protected]>
Date: Thu, 20 Jan 2011 20:41:29 
To: [email protected]<[email protected]>
Reply-To: "[email protected]" <[email protected]>
Subject: Re: st: RE: Will Stata/MP speed up running multiple dofiles in
 batch mode?

On Thu, Jan 20, 2011 at 12:32 AM, Alex Eapen <[email protected]> wrote:
> I would appreciate some advice on whether Stata/MP will be helpful in the following situation:
> I currently have Stata/SE 10.1 for Mac. I would like to run several do-files at once (rather than sequentially). I see that this can be done by running Stata in batch mode from, say, the Terminal application in Mac OS (see That is, at the prompt in the Terminal application in a Mac OS, I type:
> statase -b do &
> followed by....
> statase -b do &
> and then...
> statase -b do &
> And all three dofiles run simultaneously.

> 1. My first question is whether there is a limit on how many do files can be run simultaneously in this manner?

They run simultaneously, but they are actually separate processes.
Unless there is a licensing issue with regards to how many instances
of Stata you can have running simultaneously on one computer you can
start as many batch jobs as you want.

> 2. I compared the time it takes to execute a single dofile alone to when it is run simultaneously with the other two. (I ensured all three dofiles contain exactly the same code, so any difference in time-to-run is not because of different commands in them). When the three dofiles are running simultaneously, possibly because stata resources on my computer are being stretched across three dofiles, each one takes longer to complete. Will Stata/MP help in this situation? Will Stata/MP distribute the execution of dofiles (or parts of them) across multiple cores and thus reduce the time it takes for each to complete?

Thats because you have three processes vying for your computers RAM
and CPU resources.  If you have Stata/MP then_one_ instance of Stata
will be able to use multiple cores in your computer.  If you used
Stata/MP and did exactly what you have above, you would stil have
three separate processes vying for the RAM and CPU resources, so
unless each do-file will run faster under Stata/MP you won't see any

An overview of Stata/MP performance improvements can be found at

You will also need to ensure that you have a 64-bit Intel Mac (see


“Truth in science can be defined as the working hypothesis best suited
to open the way to the next better one.” - Konrad Lorenz

Email - [email protected]
Website -
Photos -

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index