Bookmark and Share

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: file already exists error


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: RE: file already exists error
Date   Fri, 26 Mar 2010 13:07:15 -0500

I looked at Bill Gould's explanation, and here's an occasion I've come
across in which different instances might interfere. For my
simulations, I sometimes start several Stata instances nearly
simultaneously (which is a bad idea as is):

set obs 8
gen str40 call = ""
forvalues thread = 1/8 {
  * prepare some simulation code
  replace call = "simulate something with a new seed"
  outfile call using simulation-`thread'.do in `thread', replace
}

forvalues thread = 1/8 {
   ! stata do simulation-`thread'.do
}

Then although I've specified 8 threads to be started, I tend to see at
most Stata 5 in Windows taskbar. That is, there will be say two or
three windows named Stata 2 or Stata 3. Per Bill's explanation,
several instances of Stata that were launched at the same time looked
at the instance file, found 1 and "applied" for instance #2. These
file operations were slower than starting a new thread, so there was
another instance of Stata that also observed instance 1 available, and
decided to become instance 2. There is a possibility that some
instances or seqs may clash, although I don't remember any error
messages of this flavor (I cannot say I really look at those
multi-megabyte simulation logs very carefully though).

In all likelihood, Elan's issues are some sort of delayed writes or
file locks or backups that the OS performs on these files, even though
they are in the personal space. That's weird, of course, but, as Bill
explained, -tempfile- logic is pretty simplistic and assumes no one
else wants to deal with Stata's temporary files. (I am sure that in
the original request, Sergiy R was manipulating at least 10
-tempfiles- at any given point in time :)).

Both of these issues are those of Stata interacting with the operating
system. Of course users should be shielded from these issues, but some
users like me just ask for trouble :))

On Fri, Mar 26, 2010 at 12:42 PM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> Have you perused
> http://www.stata.com/statalist/archive/2007-08/msg01124.html yet?
>
>
> HTH
> Martin
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Cohen, Elan
> Sent: Freitag, 26. März 2010 18:24
> To: '[email protected]'
> Subject: st: file already exists error
>
> This is a hard error to report since I get it haphazardly, and it's been
> impossible for me to replicate.
>
> Occasionally, I will get an error that says:
>
> file C:\DOCUME~1\cohened\LOCALS~1\Temp\ST_0000001b.tmp already exists
> r(602);
>
> This error can come after any command; today -symmetry-, yesterday
> -reshape-.  Sometimes the error will stop happening if I simply rerun the
> command, sometimes I need to wait 5 minutes, and sometimes I need to restart
> Stata entirely.
>
> It may be important to know that I don't have admin priveleges on my
> computer but since it seems to be writing to my personal space, I'm not sure
> how that would be the problem.
>
> Is there a way to check to check if my Stata installation is corrupt?  Any
> other suggestions?
>
> Version 11 on Win XP Pro SP3.
>
> Thanks,
>
> - Elan
>
>
> *
> *   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/
>



-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index