I noticed a bug when using CoupledMCMC, the state files are mangled, written on top of themselves, preventing the MCMC chain from resuming.
I think the bug comes from the use of the setStateFile method in the Runnable class. setStateFile only assigns fileName to the stateFileName variable if the the state file name is not user-defined already, so if the -state option is not used when launching beast.
So when using a -state option, all the setStateFile(filename) calls from HeatedChain are void, since the stateFileName variable is assigned back to the content of the -state option.
I tried to fix that by overriding the setStateFile method in HeatedChain. It seems to work, I'm able to use the -state option and resume analysis.
PS: I just noticed the changes in imports that my commit has. I'm not sure where they come from, they are not intentional on my part. Feel free to reject the pull request if that causes an issue.
I noticed a bug when using CoupledMCMC, the state files are mangled, written on top of themselves, preventing the MCMC chain from resuming. I think the bug comes from the use of the
setStateFile
method in theRunnable
class.setStateFile
only assignsfileName
to thestateFileName
variable if the the state file name is not user-defined already, so if the-state
option is not used when launching beast. So when using a-state
option, all thesetStateFile(filename)
calls fromHeatedChain
are void, since thestateFileName
variable is assigned back to the content of the-state
option. I tried to fix that by overriding thesetStateFile
method inHeatedChain
. It seems to work, I'm able to use the-state
option and resume analysis.PS: I just noticed the changes in imports that my commit has. I'm not sure where they come from, they are not intentional on my part. Feel free to reject the pull request if that causes an issue.