terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
224 stars 87 forks source link

Fix safeCopy on Windows #1705

Closed opotowsky closed 4 months ago

opotowsky commented 4 months ago

What is the change?

  1. Reverting the os.system(cmd) for windows to shutil.copyfile/shutil.copymode
  2. Reducing the wait time to 5 minutes

Why is the change being made?

  1. copy via os.system on Windows was taking an obscenely long time. And really we just needed the update from #1691 for linux functionality.
  2. 30 min for a wait time is bonkers, so given some tests run we think we can safely reduce it to 5 min.

Checklist

john-science commented 4 months ago

Approved.

Notes

  1. We discussed a sliding scale (bigger files get a longer time out). But.. there is no meaningful way to choose that sliding scale. So I think the "single number timeout for all files" solution that Arrielle implemented here.
  2. This function exists for a bonkers reason. Long term, I think we should move this function out of ARMI and into the cluster that is causing the problem.