COSMIC-PopSynth / COSMIC

COSMIC (Compact Object Synthesis and Monte Carlo Investigation Code)
GNU General Public License v3.0
45 stars 58 forks source link

Created maximum wall time option #620

Open xevra opened 2 months ago

xevra commented 2 months ago

For some applications, it's useful to end COSMIC gracefully after a certain amount of time has passed.

On the Open Science Grid, for example, a job is limited to 20 hours. If the job would go beyond 20 hours, it would be killed and data would be lost. Due to the nature of match filtering, it's not always possible to predict how long a COSMIC simulation will take to run.

In my applications, I would like to end the simulation at 19 hours to give the data time to download back from the run node, so I can process the outputs. Ending the process from the shell or launcher is an option which would enable the recovery of data and log files, but may interrupt COSMIC at an inopportune time.

The maximum wall time option enables gracefully ending a COSMIC job after a set amount of time, so that COSMIC will always end at the end of a loop.

The default value of 3155760 seconds corresponds to a little over a month. While this does technically change the default behavior of COSMIC, it will only affect simulations which would otherwise be running for more than one month (wall time).