-
Notifications
You must be signed in to change notification settings - Fork 87
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
Screen output during simulation and interrupting a run #247
Comments
MultiNest is Fortran code written by Farhan Feroz. PyMultiNest is only the python wrapper. Most of what you ask is MultiNest-related, and nothing that PyMultiNest can control.
Sorry to not be more useful. |
Thanks for your quick answer!
|
re 1&2: PyMultiNest just passes things to MultiNest, which calls back a function for evaluation. So PyMultiNest is not in control. For progress viz you would need either a) another thread that monitors sys.stdout/sys.stderr, but catching output doesn't work very reliably, also fortran does some weird caching. b) write a small core program that uses pymultinest, and then call this from another python program with |
Ok, thanks! Thanks for the sketch—maybe someone will feel inspired to fill it out :). |
First of all, thanks for the very useful package! I am using it through
species
and it works very well. Now a few things:UltraNest
(example from a call fromspecies
:with the last line getting updated. Currently, the console buffer is filled with blocks:
and it is hard to tell where one is, and whatever messages were printed before calling
MultiNest
are off the buffer.I do not know the details of
MultiNest
but would a "percentage complete" be possible/meaningful/not too complicated to implement? It would be helpful for long runs (to estimate when to get results).More importantly, is it possible to interrupt a run with
Ctrl+C
, for instance, buttouch
ing a "stop" file would be ok too? Currently, if I realise I made some mistake, the only solution seems to be to suspendpython
withCtrl+Z
and then to kill it withkill %%
. My interest is for runs throughspecies
and @tomasstolker suggested it should be done fromMultiNest
. Please see Running multinest or ultranest in parallel? tomasstolker/species#89 (comment). Uh, I hope you agree with him 🏓 😉.Printing a simple one-line "Using N cores in parallel" or so at the beginning of
MultiNest
would be nice to confirm that one indeed is using 1×N cores and not N×1 core as can happen if MPI is not set up properly. I was not sure at first and used timing tests to figure it out but this feels a bit too complicated. Depending on the problem, timing tests might not reveal that parallelisation is on, as you essentially pointed out 😄.The text was updated successfully, but these errors were encountered: