nimble icon indicating copy to clipboard operation
nimble copied to clipboard

can't recover after forgetting to use 'project' in second call to compileNimble

Open paciorek opened this issue 9 years ago • 3 comments

If we forget to use 'project' in the second compile call, then subsequent correct use of 'project' fails.

code <- nimbleCode({ y ~ dnorm(a,1) a ~ dnorm(0,1) }) m <- nimbleModel(code, data = list(y=0), inits = list(a=1)) cm <- compileNimble(m) conf <- configureMCMC(m) mcmc <- buildMCMC(conf) Cmcmc <- compileNimble(mcmc) # forget to use project Cmcmc <- compileNimble(mcmc, project = m) # this now fails too

paciorek avatar May 18 '16 16:05 paciorek

Can you try second call with resetFunctions = TRUE.

I think it’s part of larger need for more flexible compilation management.

On May 18, 2016, at 9:02 AM, Christopher Paciorek [email protected] wrote:

If we forget to use 'project' in the second compile call, then subsequent correct use of 'project' fails.

code <- nimbleCode({ y ~ dnorm(a,1) a ~ dnorm(0,1) }) m <- nimbleModel(code, data = list(y=0), inits = list(a=1)) cm <- compileNimble(m) conf <- configureMCMC(m) mcmc <- buildMCMC(conf) Cmcmc <- compileNimble(mcmc) # forget to use project Cmcmc <- compileNimble(mcmc, project = m) # this now fails too

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub https://github.com/nimble-dev/nimble/issues/160

perrydv avatar May 18 '16 16:05 perrydv

I had forgotten about resetFunctions... all the same, no dice even with that set to TRUE.

On Wed, May 18, 2016 at 9:03 AM, perrydv [email protected] wrote:

Can you try second call with resetFunctions = TRUE.

I think it’s part of larger need for more flexible compilation management.

On May 18, 2016, at 9:02 AM, Christopher Paciorek < [email protected]> wrote:

If we forget to use 'project' in the second compile call, then subsequent correct use of 'project' fails.

code <- nimbleCode({ y ~ dnorm(a,1) a ~ dnorm(0,1) }) m <- nimbleModel(code, data = list(y=0), inits = list(a=1)) cm <- compileNimble(m) conf <- configureMCMC(m) mcmc <- buildMCMC(conf) Cmcmc <- compileNimble(mcmc) # forget to use project Cmcmc <- compileNimble(mcmc, project = m) # this now fails too

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub < https://github.com/nimble-dev/nimble/issues/160>

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/nimble-dev/nimble/issues/160#issuecomment-220074976

paciorek avatar May 18 '16 16:05 paciorek

hmm, first call to compileNimble(mcmc) without specifying a project seems to work now. Not sure if that's intended.

paciorek avatar Nov 16 '16 18:11 paciorek