NBISweden / MrBayes

MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. For documentation and downloading the program, please see the home page:
http://NBISweden.github.io/MrBayes/
GNU General Public License v3.0
232 stars 79 forks source link

Better checking of clock tree consistency #294

Closed ronquist closed 8 months ago

ronquist commented 8 months ago

Johanna Orsholm reported that checkpointing issues persist in the MPI version for certain clock tree models. I could not replicate the problem; the fix of the checkpointing issue in the serial version (see my previous pull request) appears also to have fixed it in the MPI version. Thus, it seems likely that Johanna is still running on the old code unintentionally; I have asked her to verify this.

However, when reviewing the code I discovered that the consistent check of clock tree models is currently done before the starting values are read in from a checkpoint file when a chain is continued (mcmc with append=yes). Therefore, I added a check after the starting values have been read in through an extra call to CheckModel. Also, in CheckModel I extended the check of the clock tree consistency to the starting values of all chains, because starting values are read in separately for each chain. It is not sufficient to just check the first chain, as done previously (and sufficient for auto-generated starting values).

This pull request contains these updates to the consistency check.