If I'm understanding correctly you want to fit 6 regions x 10 sets = 60 separate MCMCs?
If so, you'll need to set it up as 60 separate tasks and then use the approach given in the "parallelizing nimble" example.
Something like this:
```
chain_output <- parLapply(cl = this_cluster, X = 1:60,
fun = run_MCMC_allcode,
data = myData, code = myCode,
useWAIC = useWAIC)
```
`run_MCMC_allcode` would look something like this:
```
run_MCMC_allcode <- function(i, data, code, useWAIC = TRUE) {
library(nimble)
# determine region and set from flattened index
region <- ((i-1) %/% 10) + 1
set <- ((i-1) %% 10) + 1
region <- i %% 10
# then your code needs to appropriate adjust to the region and set...
....
}
```
-Chris