Open
Conversation
Contributor
Author
|
@lesliehebb -- I've added the five minute buffer in 3dca69d. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm experimenting with timed runs, and the job terminates at unexpected times. I've been testing with short runs that should last a few minutes, and they terminate after tens of seconds. it looks like they make a guess as to how long the next steps will take and try to anticipate when to stop.
Here I'll try to explain what's happening in the code before this pull request. It looks like this is what's happening:
avgtime=0(here)avgtime=(avgtime*msi+time1-time0)/(msi+1)(see here), which reduces toavgtime=(time1-time0)/(msi+1)foravgtime=0.time1is the time at the current step,time0is time at the start of the most recent step.msiis the MCMC step index.avgtime != 0, soavgtimeis set to the average run time per step times the number of steps, added to the elapsed time, all divided by the step number, i.e.((time per step)*(step #) + (delta t)) / (step #), which is equivalent to(time per step)/(step #) + (delta t)/(step #). What is this supposed to represent?time1+2*avgtime+300>maxtime(here), end the run. How was this expression chosen?I think it would make more sense to me if
avgtime = (time1 - time0)/msialways, iftime0was set at the beginning of the MCMC run and not reset for each step, and the terminating condition istime1 - time0 + avgtime > maxtime. This way if the elapsed time plus the time to complete the next step is greater than the requested maximum time, it will terminate the run.I've implemented that change in this pull request. I tested it locally and for a run with the
mcmc stepsparameter set to-80, i.e. 80 seconds, the output files were last changed 120 seconds after they were created, perhaps showing that there's some overhead before the chains begin running, but otherwise showing that this pull request does as intended.I've also updated the README to increment the apparent version number to
V4.5.1.