Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMB crashing after working for 10 seconds #315

Open
awstringer1 opened this issue Jun 25, 2020 · 0 comments
Open

TMB crashing after working for 10 seconds #315

awstringer1 opened this issue Jun 25, 2020 · 0 comments

Comments

@awstringer1
Copy link

Hello,

I am learning TMB and love it! I have gone through the process of porting my (quite complicated) objective function over to the C++ language as provided by TMB. I have debugged compiler errors and run-time errors including using the extra package for floating point exceptions. gdbsource returns a "Program ran without errors" message when run.

I am now, however, running into a very tricky problem:

  1. I compile the code without errors using compile(), and load it using dynload(),
  2. I link it with ff = MakeADFun(...),
  3. I can run ff$fn(...), ff$gr(...), ff$he(...) immediately after, obtaining sensible results. However,
  4. regardless of what I do, about 10 seconds after calling MakeADFun(...), R crashes (as if there was a runtime error)– EVEN after ff$fn(...) etc runs successfully during that blissful 10 second interval.

I have to say I'm stumped here. It's too onerous and probably not too helpful to provide a full reproducible example here, since both the R and C++ code are quite long. I'd appreciate any direction anyone could give.

R version: 3.6.2
System: Ubuntu 18.04 LTS

Let me know if I can provide anything else, thanks!

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants