The variables RTI%i were not being calculated after live points had been generated. The function delete_outermost_point called in src/polychord/nested_sampling.F90 assumes that they have. This function is however only called in uninitialised form if nprior>nlive, and only results in undefined behavior for positive likelihoods (since this drives the minpos search function into regions of unallocated space). While this therefore seems to be one of those 'how did that ever work?' bugs, the actual situation in which it expresses itself is actually quite unusual, since loglikelihoods are usually negative (although not always, depending on the dimensions of continuous variables in probability densities like P(D|theta)).
Many thanks @yallup for the MWE, and for pointing this out. Could you test whether this fixes your solution
The variables
RTI%i
were not being calculated after live points had been generated. The functiondelete_outermost_point
called insrc/polychord/nested_sampling.F90
assumes that they have. This function is however only called in uninitialised form ifnprior>nlive
, and only results in undefined behavior for positive likelihoods (since this drives theminpos
search function into regions of unallocated space). While this therefore seems to be one of those 'how did that ever work?' bugs, the actual situation in which it expresses itself is actually quite unusual, since loglikelihoods are usually negative (although not always, depending on the dimensions of continuous variables in probability densities like P(D|theta)).Many thanks @yallup for the MWE, and for pointing this out. Could you test whether this fixes your solution
Fixes #72