Closed iperedaagirre closed 2 years ago
I agree that this is not as expected but without a reproducible example not much I can do... Some explanations:
gdbsource("myproject.R", TRUE)
gives some further insight?In any case, this is more appropriate for the tmb-users list. Thanks
Thank you! I've tried interactive run of gdbsource, and didn't make any difference and wouldn't tell me either where the error was, I reinstalled both R and TMB and didn't solve anything either. I tried in two other computers and I had the same error in one of both, but got it to work in the second one. Now it does output the lines where the errors are when running gdbsource. Nothing that I could tell I did differently, but it kind of "solved" on its own...
I'm sorry for the inconveniences, and thank you
Description:
I'm trying to work on a model that used to work and I've done a few modifications on. When trying to run the MakeADFun command, which looks like this:
MakeADFun(Data, parameters, DLL=ModelName,hessian=TRUE,random=c("U","R"))
, R crashes and the terminal gives me the following error:TMB has received an error from Eigen. The following condition was not met: EIGEN_IMPLIES(RowsAtCompileTime!=Dynamic,rows==RowsAtCompileTime) && EIGEN_IMPLIES(ColsAtCompileTime!=Dynamic,cols==ColsAtCompileTime) && EIGEN_IMPLIES(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic,rows<=MaxRowsAtCompileTime) && EIGEN_IMPLIES(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic,cols<=MaxColsAtCompileTime) && rows>=0 && cols>=0 && "Invalid sizes when resizing a matrix or array." Please check your matrix-vector bounds etc., or run your program through a debugger. Aborted (core dumped)
According to the TMB guide, seems like an Out-of-bounds error, so I proceed to use
gdbsource("my_project.R")
, changing the compile line in my R file to add the required"-O0 -g"
parameters, but it returnsProgram returned without errors
, so I cannot find the error on my .cpp code.Reproducible Steps:
MakeADFun
-O0 -g
parameters to compilegdbsource("my_project.R")
Current Output:
TMB has received an error from Eigen. The following condition was not met: EIGEN_IMPLIES(RowsAtCompileTime!=Dynamic,rows==RowsAtCompileTime) && EIGEN_IMPLIES(ColsAtCompileTime!=Dynamic,cols==ColsAtCompileTime) && EIGEN_IMPLIES(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic,rows<=MaxRowsAtCompileTime) && EIGEN_IMPLIES(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic,cols<=MaxColsAtCompileTime) && rows>=0 && cols>=0 && "Invalid sizes when resizing a matrix or array." Please check your matrix-vector bounds etc., or run your program through a debugger. Aborted (core dumped)
Program returned without errors
Expected Output:
Normal execution on the first case, or line of error for the second case.
TMB Version:
1.7.22
R Version:
3.6.2
Operating System:
Ubuntu 16.04.6 LTS