Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Corrupted .do File and Stata built-in warnings - STATA 16 MP

    I am posting here to see if anyone has had this experience before. I was working with a do file, and saving it religiously (every 2 minutes). I was using this file on a high-performance computing network, with Stata 16 - MP(x). It turns out, the folder I was saving the do file to was at or very near capacity, and although STATA appeared to be saving my do file without any problems, it had actually been corrupted on the system without my knowledge, and replaced with a 0-byte version. The HPC team said they have rarely seen a program not give warnings that it is not saving, or overwriting data with no data -- but this is what happened. It appeared to be saving normally (to me), but the do file was not saved. I only discovered the issue when I thought I needed an update for what I was doing, and went to install the latest stata updates. Before doing so, STATA gave me an error message that my do file had not been saved, and would I like to save it. I said yes, and it closed the do file (I did not realize the do files would close if I initiated an update). It then stopped it when it prompted me to save or clear the data in the program (thankfully). Since the do file closed "normally", I have not been able to find backups of it, or previous saved versions. Has anyone had this issue before? It has been a terrible coding loss for me, and if stata does not have it programmed not to overwrite with 0-byte files, or not to warn that the do file is not saving, perhaps that is a bug of some kind?

    I know there are strict posting protocols on STATALIST. Because this is a different kind of post, I didn't see what other information I should include - it's more of a general query. Thank you for any input or for any suggestions anyone has. My HPC session is still running for another 7.5 hours - if anyone has ideas for any other ways to recover code it would be very much appreciated (I have looked in the temp file, but there does not seem to be a do file temp file there).

    Laura

  • #2
    You didn't get a quick answer or any answer.

    I would suggest you contact Stata support – this kind of technical issue is more up their alley then Stata list alley.

    Since Stata closes the Stata window and opens an update window whenever it does an update, I'm not surprised that it forced you to close the window. Which would include the do file.

    Some of the code may be in your output window if that would help.

    Comment


    • #3
      Laura Taylor , if you had executed from the doeditor:
      • portions of a saved do-file or
      • unsaved do-file
      then that content is in the tempfolder. It will not be having an expected name, but more of STD####_######.tmp where # is some digit. You can often find relevant ones by date or by content by searching for the text that you remember from your code. There will be other files. You are interested in the stD*.tmp files.

      " I was using this file on a high-performance computing network, with Stata 16 - MP(x). It turns out, the folder I was saving the do file to was at or very near capacity, "
      This is sad. A high-performance network with no space to save a do-file??

      Advice for practical work - save your data to a different drive from your code when working with anything significant, that can potentially grow to the size of a disk, or where you are not certain of the footprint.

      I would also recommend you to try to reproduce the issue e.g. by taking a USB-stick and filling it with some files up to capacity - epsilon (couple of sectors) then trying to save your do-file there. If it reports success while the file is not saved correctly - that's a bug that needs to be reported to the developers. This will help others not to end up in the same situation.

      Best, Sergiy Radyakin

      Comment

      Working...
      X