UltraNest fails when using MPI with likelihoods with plateaus. Apparently, this is because in lines 1445-1451 in integrator.py,
if 1 < P < len(Ls) and len(Ls) - P + 1 < nroots:
# guess the number of points needed: P-1 are useless
self.logger.debug(
'Found plateau of %d/%d initial points at L=%g. '
'Avoid this by a continuously increasing loglikelihood towards good regions.',
P, nroots_needed, Lmin)
nroots_needed = min(num_stop, nroots_needed + (P - 1))
,self.logger is called by each process, but it's only defined on rank 0. So, the other ranks throw an Attribute not found error. Changing these lines to
if 1 < P < len(Ls) and len(Ls) - P + 1 < nroots:
# guess the number of points needed: P-1 are useless
if self.log:
self.logger.debug(
'Found plateau of %d/%d initial points at L=%g. '
'Avoid this by a continuously increasing loglikelihood towards good regions.',
P, nroots_needed, Lmin)
nroots_needed = min(num_stop, nroots_needed + (P - 1))
seems to fix this. If you with wish, I can submit a pull request?
UltraNest fails when using MPI with likelihoods with plateaus. Apparently, this is because in lines 1445-1451 in integrator.py,
,
self.logger
is called by each process, but it's only defined on rank 0. So, the other ranks throw an Attribute not found error. Changing these lines toseems to fix this. If you with wish, I can submit a pull request?