Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UltraNest support #68

Open
JohannesBuchner opened this issue Feb 11, 2021 · 3 comments
Open

UltraNest support #68

JohannesBuchner opened this issue Feb 11, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@JohannesBuchner
Copy link

Would you be interested to add support for https://johannesbuchner.github.io/UltraNest/ ?
The interface should be very similar to dynesty.
UltraNest is a very reliable tuning-parameter-free algorithm. It can be faster than dynesty, especially if you take advantage of vectorization.
It also supports resuming from disk and MPI parallelisation, if that is useful to you.

@3fon3fonov 3fon3fonov self-assigned this Feb 11, 2021
@3fon3fonov 3fon3fonov added the enhancement New feature or request label Feb 11, 2021
@3fon3fonov
Copy link
Owner

Very Cool! I was not aware of UltraNest, thanks a lot! including another sampler to the Exostriker should be easy in the core, but a bit time-consuming on the GUI part. Yet, I will definitely have a look and experiment! Comments are likely to follow, so stay tuned.

@3fon3fonov
Copy link
Owner

After a long time on this request, I am ready to experiment! @JohannesBuchner I could not find out of the box whether is possible with UltraNest to control the number of Threads/CPUs to be used in a multiprocessing. For instance, with dynesty I use something like:

from pathos.pools import ProcessPool as Pool
thread = Pool(ncpus=N_threads)

sampler = dynesty.NestedSampler(partial_func, prior_transform, ndim, nlive=nwalkers, pool = thread,
                                    queue_size=threads, sample = dynesty_samp, bound = ns_bound)
sampler.run_nested(print_progress=print_progress,dlogz=stop_crit, 
maxiter = ns_maxiter, maxcall = ns_maxcall )

thread.close()
thread.join()
thread.clear()

Can you please comment/advice how can I pass a pool to UltraNest, similar to what Dynesty and emcee support?

Sorry if this was obvious and I didn't see in in your documentation!

@JohannesBuchner
Copy link
Author

UltraNest can be transparently parallelized with MPI. Instead, the program is run with mpiexec (or mpirun). This runs N separate processes, which communicate with each other. No parallelisation code in exostriker is required. MPI is more powerful for distributing than python pools, which I recall often have the issue of serializing and sending the code to be executed to other cores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants