Specifying n >1 chains is not enough. You need some parallel backend. You
can use snow/snowfall or doMC (these are R libraries) for example. Maybe
others, google is your friend. Word of caution about doMC (maybe also
snowfall, never tested it), you might need to specify RNG (seed, sampler)
for each chain in the starting values list because once you split your job,
each core "thinks" you are running just one chain and they all choose
"Wichmann-Hill" with the same .Random.seed and you get 4 copies of the same
chain. With different *parameter* starting values this might not be such a
big deal for you, it depends on your application, just thought I'll mention
it. See jags manual and ?RNG.
Good luck

On Sun, Nov 25, 2012 at 11:57 AM, Noah Silverman <noahsilverman@ucla.edu>wrote:

> Hello,
>
> I have a fairly complex hierarchical model that I using rjags to fit.
>  Short test runs verify that it works and everything appears to be setup
> correctly.
>
> Now that I want to collect a larger sample from the posterior (5,000 or
> more).  This looks like it will take several days to run on my hardware
> (Intel core i7, 16GB RAM)
>
> I read in the rjags documentation that there is an option for parallel
> chains.  Since my cpu has 4 cores, it seems logical to run 4 chains in
> parallel, collection 1,250 samples each.  Should provide a nice speedup.
>
> However, when calling rjags with the n.chains options set to 4, I don't
> see it actually doing anything in parallel.  Watching a cpu monitor, I only
> see a single thread running on a single core.  So clearly something isn't
> working correctly.
>
> Software versions:
> R 2.15.2
> jags 3.2.0
> Ubuntu 12.04  (64bit version)
>
>
> Can anyone suggest where I might look to get this running in parallel?
>
> Thanks
>
>
> --
> Noah Silverman, M.S.
> UCLA Department of Statistics
> 8117 Math Sciences Building
> Los Angeles, CA 90095
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]


