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: Stata Temp File issue

From   Kevin Geraghty <>
Subject   Re: st: Stata Temp File issue
Date   Tue, 14 Dec 2010 10:25:43 -0800 (PST)

I realize you shouldn't have to do this, that stata ought to be able to keep track of this stuff on its own, but one straightforward fix for this problem might be explicitly setting the temp directory at the start of each concurrent job, so that they don't share the same temp/work directory, and there will be no file naming conflicts for active temporary files.

something like:

sysdir set tmpdir <my chosen temporary directory>

It's cheaper than a new copy of stata 11, at any rate.

In passing I have noticed on occasion stray temp files in work directories, that is if one is running one's code out of a particular directory, stray temp files may be left behind in that directory, rather than system temp. It seems to happen most in interactive use, where sessions may not be cleanly logged out.  But it does suggest that temporary files are not always created in system temp. 

----- "John C. Vernaleo" <> wrote:

> Hi.
> I'm running:
> Stata/MP 9.2 for Windows
> Born 20 Jul 2007
> on some Windows XP 32 bit machines and some Windows 7 64bit machines. 
> I
> realize my Stata version is rather old so I will understand if the
> only
> answer I get is 'upgrade', but I wanted to try anyway.
> Basically, I run a large number of Stata jobs over night.  On the
> Windows
> XP machines I run at most 2 stata jobs at a time.  On the Windows 7
> machines I run up to 4 at a time.
> On the Windows 7 machines, I frequently find that Stata will crash
> with
> errors related to either not being able to find a temp file or not
> being
> able to access or write to the temp file.  If I look in the logs from
> the
> concurrent processes, there will be one that has the same temp file
> name
> (which does explain the error).
> I have cleared out the directory where Stata leaves temp files (as
> there
> were some orphaned Stata temp files there) but that seems to have no
> impact.
> The way I understood it, I thought the first two characters in a
> Stata
> temp file (the XX in ST_XXyyyyyy.tmp) indicated the instance of Stata
> that
> was running which would make such overlap impossible.  Am I
> missunderstanding something?  Did things work differently back in
> Stata9?
> And more importantly, is there way to avoid this (assuming I am even
> understanding the situation properly)?
> Sorry for such a long writeup.  Thanks for reading.
> John
> -------------------------------------------------------
> John C. Vernaleo, Ph.D.
> Research Associate
> Ada Investment Management
> 152 West 57th Street, 20th Floor
> New York, NY 10019
> -------------------------------------------------------
>  This communication is for informational purposes only. It is not
> intended to be, nor should it be construed or used as, financial,
> legal, tax or investment advice or an offer to sell, or a solicitation
> of any offer to buy, an interest in any fund advised by Ada Investment
> Management LP, the Investment advisor.  Any offer or solicitation of
> an investment in any of the Funds may be made only by delivery of such
> Funds confidential offering materials to authorized prospective
> investors.  An investment in any of the Funds is not suitable for all
> investors.  No representation is made that the Funds will or are
> likely to achieve their objectives, or that any investor will or is
> likely to achieve results comparable to those shown, or will make any
> profit at all or will be able to avoid incurring substantial losses. 
> Performance results are net of applicable fees, are unaudited and
> reflect reinvestment of income and profits.  Past performance is no
> guarantee of future results. All f!
>  inancial data and other information are not warranted as to
> completeness or accuracy and are subject to change without notice.
> Any comments or statements made herein do not necessarily reflect
> those of Ada Investment Management LP and its affiliates. This
> transmission may contain information that is confidential, legally
> privileged, and/or exempt from disclosure under applicable law. If you
> are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or use of the information contained
> herein (including any reliance thereon) is strictly prohibited. If you
> received this transmission in error, please immediately contact the
> sender and destroy the material in its entirety, whether in electronic
> or hard copy format.
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

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