Hi Dongchen,
This usually means that you have not provided a valid covariance or precision matrix (or values for nodes from which it is computed, in this case qq) in data, inits or constants. The Cholesky decomposition (chol.default) is called as part of nimble's handling of dmnorm. Based on the "model$q" in the message, it looks like the q[1:3, 1:3] is not a valid precision matrix. The Error message you see is from nimbleModel's attempt to calculate all nodes in your model, which is still uncompiled and so executing in R, and so that is an R error message. It should be surrounded by a nimble message that errors at this stage are not necessarily a problem; they might just mean that your model is not fully initialized, which is what we typically see with the chol error. Since q is a deterministic node computed as qq * diag(3), is it possible that you have not provided a value for q in data, inits, or constants? (A value will not be simulated from the prior as part of nimbleModel. That will only happen later if you start MCMC, for example, and the model is still not fully initialized.) To check, you can enter:
model$qq
model$q
You've only shown your nimbleCode, not a call to nimbleModel or nimbleMCMC (which would make your example fully reproducible), so I can only guess at what's going on.
HTH and please follow up if you're still stuck.
Perry