mrc-ide / odin

ᚩ A DSL for describing and solving differential equations in R
https://mrc-ide.github.io/odin
Other
105 stars 13 forks source link

Incomprehensible error (with vapply) during compilation #259

Open AntoineBraultChile opened 2 years ago

AntoineBraultChile commented 2 years ago

Hello, I wrote a discrete SIR model with odin. When I try to compile it, I get the followiing obscure error:

Generating model in c Error in vapply(X, FUN, character(1), ...) : values must be length 1, but FUN(X[[1]]) result is length 0

What is weird is that the line of the error is not indicated. (It could be related to the issue #184) Do you have any advice to debug the code (the model is around 600 lines long)?

Thank you very much.

richfitz commented 2 years ago

This is most likely an issue where there is a bug in your model but also a bug in odin trying to report this back to you. It's possible that the result of traceback() immediately after the error will be informative, but more likely that I would need your model code to reproduce