Closed danielturek closed 8 months ago
@perrydv I'm not seeing what is going wrong here, but I'll note it seems to relate to lack of indexing. If I change to
out[1:p , i] <- mat[ 1:p, i] * vec[i]
it compiles.
I think this needs attention from you ASAP in case there is implication for release, which it feels like there will be.
Thanks for the report. I just made a PR to try to fix this.
@perrydv @paciorek
There are two tests using a model with the
dlkj_corr_cholesky
distribution. Different versions of this model appear in the testing files of both thenimble
package (in test-mcmc.R) and in thenimbleHMC
package (in test-HMC.R).In the
nimble
version of this test, thenimbleModel
call does not build derivatives. In this case, the model builds and compiles fine.In the
nimbleHMC
version of this test, thenimbleModel
call includesbuildDerivs = TRUE
. Subsequently the model is built, and compilation of the model fails.Reproducible code is provided below, which includes the
buildDerivs = TRUE
for the model, and fails at model compilation.Noting also, this model involves a custom function (
uppertri_mult_diag
) which also hasbuildDerivs = TRUE
, which could also be the source of a problem.