pynbody / tangos

The Agile Numerical Galaxy Organisation System
BSD 3-Clause "New" or "Revised" License
18 stars 13 forks source link

Resume calculation interactions with --force #256

Open Martin-Rey opened 3 months ago

Martin-Rey commented 3 months ago

Hi,

I have greatly appreciated the new features for restoring runs (#245) which have been a big timesaver for HPC tangos applications.

They however interact unexpectedly with the --force keyword. Even if this keyword is passed, if the Tangos runs has previously crashed/was terminated, the calculation resumes from its previous state rather than recomputing from start as expected from setting --force. You can of course delete the cache folder to avoid this, but the point of --force in my mind is to supersede time-gaining manoeuvres (e.g. don't recalculate if properties already exist).

Was this a wanted behaviour from the resume feature, or an oversight?

Martin

apontzen commented 3 months ago

The flag you are looking for is actually --no-resume. I kept this separate from --force since they seem logically distinct to me, and one might want one without the other. That said, I think the advice to delete all the resume info is probably not the best — the message should probably point to the flag rather than the brute-force approach.

Martin-Rey commented 3 months ago

Aha! Many thanks for the pointer, this does exactly what I wanted.