I have now performed many different tests, both in my laptop and in the hpc, and using MPI seems to consistently yield slower results.
ultranest: 4.3.1
mpich: 4.2.1
I have also tried downgrading ultranest to 3.6.4, but still the test was unsuccessful.
I have been testing with this custom snippet, to make sure it's not something we do in colibri:
import ultranest
import time
import ultranest.stepsampler as ustepsampler
def log_likelihood(params):
return -0.5 * sum((params - 0.5) ** 2 / 0.1**2)
def bayesian_prior(cube):
return cube
Nparams = 50
parameters = ["w%i" % i for i in range(Nparams)]
sampler = ultranest.ReactiveNestedSampler(
parameters,
log_likelihood,
bayesian_prior,
log_dir="ultranest_log",
)
sampler.stepsampler = ustepsampler.SliceSampler(
generate_direction=ultranest.stepsampler.generate_mixture_random_direction,
nsteps=2*Nparams,
)
t0 = time.time()
ultranest_result = sampler.run()
t1 = time.time()
print("ULTRANEST RUNNING TIME: %f" % (t1 - t0))
# sampler.plot()
I have now performed many different tests, both in my laptop and in the hpc, and using MPI seems to consistently yield slower results.
ultranest: 4.3.1
mpich: 4.2.1
I have also tried downgrading ultranest to 3.6.4, but still the test was unsuccessful.
I have been testing with this custom snippet, to make sure it's not something we do in colibri: