Announcement

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

  • Sudden Quadrupling of Compute Time

    I have a loop (length ~7000) of 50 calls to ivregress gmm which initially took about 10 hours to run. A couple hours later, I ran it again (same code and computer) and it was on track to take about 4x as long. Of course it's possible that for some reason it would get more efficient with more iterations but I didn't wait around to find out. Here is some more context/troubleshooting
    • I do have a large dataset but I'm importing small chunks of it using the rowrange option at the beginning of the loop (n=400, less than 20 variables). I verified this step takes very little time but I include this info in case there is some cache related issue that might be relevant. I also do a clear command at the top of the loop
    • I didn't have anything else running and restarted my computer but it didn't help. Using very little % of CPU and memory
    • I reinstalled (and updated) Stata and it was on track to take even longer. I'm using MP 17
    If anyone knows some further troubleshooting steps I could take or any theories as to why this might be occurring, it'd be much appreciated

  • #2
    It's not clear why you would suddenly see such a jump in computation time if all of the factors have stayed the same. You have said the code and computer haven't changed, but have the data changed?

    Two things to consider:
    - did you set the number of usable processors to a lower amount than your Stata license allows?
    - do you have power profile/power saving schemes on your computer that would reduce effective processing speed of your computer? This is especially common for laptops and can greatly increase runtime.

    Comment


    • #3
      The answer is no to both. I was using whatever the default setting was for processors and I'm on a desktop computer (and not using any kind of power saving scheme). To give a fuller chronology: I let the loop run once overnight. Then I ran part of the loop, say i=2000/4000, which was going at about the same speed. Then last night I tried the full loop again and it was suddenly going very slow. That's when I restarted my computer, reinstalled, etc but it didn't help. This morning it's not any better. It could be something wrong with my computer itself but I thought the change in that short of a timespan was very odd, especially since the ivregress commands are all done on the same number of observations (400).

      Comment

      Working...
      X