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: controlling tempfile names, avoiding conflict between concurrent Stata instances


From   László Sándor <[email protected]>
To   [email protected]
Subject   Re: st: controlling tempfile names, avoiding conflict between concurrent Stata instances
Date   Fri, 6 Sep 2013 16:54:04 -0400

Hi Austin,

Sorry for the belated reply: No, I cannot. I am running batches on a
server, and I can only submit a single line each time, I cannot submit
first a DOS line changing STATATMP.

Thanks,

Laszlo

On Tue, Sep 3, 2013 at 11:31 AM, Austin Nichols <[email protected]> wrote:
> László Sándor <[email protected]>:
> Can you create a new folder in your temp directory for each new
> instance of Stata, then change the temp directory to that (temporary)
> folder?
>
> On Sun, Sep 1, 2013 at 11:25 PM, László Sándor <[email protected]> wrote:
>> FWIW, I cannot change STATATMP for my batches on the server, so I hope
>> the loop below can save me with tempfiles my own code opens. I am not
>> sure if built-in uses of temp files might still be prone to the error
>> of another Stata instance using a file with the same name already.
>>
>> tempfile test
>> cap confirm new file `test'
>> while _rc {
>> di "test existed already"
>> tempfile test
>> cap confirm new file `test'
>> }
>>
>> On Sun, Sep 1, 2013 at 1:54 PM, László Sándor <[email protected]> wrote:
>>> Hi,
>>> I think I have a conflict of file use between multiple Stata instances
>>> on my server trying to write to the same tempfile name by coincidence.
>>> Is there a simple way to make sure I can avoid this?
>>>
>>> To be clear, I have very similar code that used tempfiles intensively,
>>> and my code crashed with an error of a "ST_ah000001.tmp not being able
>>> to be modified or erased (likely cause: read-only)."
>>>
>>> This is under Stata 12.1 for Windows.
>>>
>>> Thanks,
>>>
>>> Laszlo
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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