Closed nafreymueller closed 1 year ago
Strange. It looks like it's successfully running the first stage of optimization on just the fixed effects but failing when it adds the random effects. Assuming you got that far, I doubt your issues installing glmmTMB are your issue (assuming you have a version installed). sdmTMB uses some utilities from glmmTMB (and is obviously inspired by it), but doesn't use it as part of the optimization.
Can you send me a minimal version of code and data I can experiment with? My email is in the DESCRIPTION file. I'm working mainly on a similar Mac setup.
I assume the basic examples in ?sdmTMB run for you?
Thanks for getting to this quickly! I've gotten the basic examples to run without issue. Will send you an email with the code/data in a minute
It looks like there's a solution! If you are going in between the arm and x86 versions of R on Apple Silicon using software like RSwitch (see this blog for details: https://www.dsquintana.blog/jags-apple-silicon-m1-mac/), this might be causing R to try to compile the x86 version for some packagers like so:
ld: warning: ignoring file /usr/local/clang8/lib/libc++.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: in '/usr/local/clang8/lib/libunwind.dylib', building for macOS-arm64 but attempting to link with file built for macOS-x86_64
If this applies, try re-installing the arm version of R for Apple Silicon.
In addition to this, I received a Mac Binary of sdmTMB from Sean that ran successfully - hopefully this may be available to others if they experience the same problem.
Thanks for the update @nafreymueller! Glad you found a solution.
Hi,
I am trying to run a spatiotemporal model of commercial whaling and am having issues with the model running on a Mac. I'm eventually going to scale this up with economic feedbacks, but am starting with environmental data and will add complexity later.
Here's the data table and code I'm using in the model
When I am running this on MacOS with an M1 chip, it fails quickly and returns the following error related to the Newton optimizer:
However, when running on a Linux server, the same code runs fine.
This may perhaps be an issue with running glmmTMB under the surface. I submitted a request there (https://github.com/glmmTMB/glmmTMB/issues/927)
I'm attaching the sessionInfo for both computers. Is there any obvious fix anyone can see?
Thanks for anyone who has insights.
Cheers, Nick