Statalist


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

Re: st: multiple Stata jobs on Windows


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: multiple Stata jobs on Windows
Date   Thu, 3 Sep 2009 10:51:55 -0400

Hello Bulent,

Stata will detect other instances running by looking into the
tempfolder and checking the files there. Each subsequent instance will
have its tempfiles carry the instance ID in the name:

E.g. in the first Stata launched:

. tempfile f
. di `"`f'"'
R:\TEMP\ST_01000001.tmp

In the second Stata launched:
. tempfile f
. di "`f'"
R:\TEMP\ST_02000001.tmp

and so on. So they will not conflict with each other. For safety, give
about 1 second delay before running each Stata.
Using many Stata instances in parallel is a good way to exploit
multiple CPUs if you have a single CPU license.
I hope this does not go against any conditions of use set fourth by
StataCorp, otherwise they could have disabled
multiple instances. For example, it is a very convenient way to run
simulations, bootstrap and other similar tasks,
where iterations are independent from each other.

If you have 8 CPUs and enough memory - run 8 copies. If you have 8
CPUs and Stata MP-2 (2CPU) try 5-6 copies.
Practice will show. In many cases however memory becomes the
bottle-neck and you end up running just 1 or 2 Statas.

For a very detailed information on Stata instances and tempfiles from
Bill Gould, follow this link:
http://www.stata.com/statalist/archive/2007-08/msg01124.html


Best regards, Sergiy Radyakin





On Thu, Sep 3, 2009 at 10:19 AM, Jeph Herrin<jeph.herrin@yale.edu> wrote:
> Agree. I think the primary limitation is RAM, you have 16gb but
> don't say how much you want to allocate to each instance of Stata
> - that will most likely be your most immediate limitation on
> the number of Stata processes running, though if they are all
> CPU intensive they might run rather slowly.
>
> I have a 16gb machine with 64bit XP, and the OS will let me
> have a maximum of about 15gb.
>
> hth,
> Jeph
>
> Michael I. Lichter wrote:
>>
>> Bulent,
>>
>> I'm not sure what you're asking. It's certainly *possible* to run multiple
>> instances of Stata under Windows. You can launch it as many times as you
>> want. I've never noticed any problems resulting from doing so. If you're
>> asking about whether Stata does its own record and/or file locking to
>> protect against one instance of the program modifying a file that another
>> instance is also reading or modifying, I think the answer is "no".  If your
>> programs are careful to stay out of each others' way, I don't think there
>> would be a problem. (One question I have is whether you can count on
>> multiple instances of Stata not creating temporary files of the same name.)
>> As for the "optimum" number of jobs, I suspect that depends entirely on your
>> purpose, your system, and how disk or cpu intensive your jobs are.
>>
>> Michael
>>
>> Koksal, Bulent wrote:
>>>
>>> Dear Stata Users,
>>>
>>> I was wondering if it would be possible/feasible to run multiple Stata
>>> jobs by using the Windows version. I have a machine with the following
>>> properties:
>>> Inter Xeon CPU, E5430, 2.66 GHz, 16 GB RAM
>>>
>>> Can I launch, say 8 Stata sessions at the same time? If this is
>>> possible, how can I understand the optimum number of jobs possible to
>>> run without getting stuck? Thank you for any help.
>>>
>>>
>>
> *
> *   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index