kenkellner / jagsUI

R package to Run JAGS (Just Another Gibbs Sampler) analyses from within R
https://kenkellner.github.io/jagsUI/
35 stars 7 forks source link

run_parallel() implementation #37

Closed KylieMCurtis closed 4 years ago

KylieMCurtis commented 4 years ago

Hi Ken,

Thanks for being so responsive to my last question about progress status of jags() when parallel processing. I see that there is now a function, run_parallel(), that you have developed however I am confused as to what the parameters are for this function. It has definitely generated a few more questions:

1.) Regarding the inp parameter:

2.) Regarding the quiet parameter

Thank you for the help!

kenkellner commented 4 years ago

Hi Kylie,

run_parallel is an internal function that isn't meant to be used directly. It is called by jags() during an analysis in which you have set the option parallel=TRUE.

The recent changes I made were to enable monitoring the progress of MCMC chains while running in parallel in Windows. The solution I previously used for this apparently only works on Linux. The new approach creates a temporary HTML file to which the updates are written, and attempts to open the file in your web browser so you can track progress.

You don't have to set the HTML location yourself, it's saved to a temporary folder. If for some reason it isn't opened in your browser automatically, the path to the file should be printed to the R console so you can open it yourself. The file should also refresh itself every 10 seconds but you can refresh it manually also to see if there are any new updates.

If you set the option quiet=TRUE you will not get any updates, or any other output in your console as the analysis is running.