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

unknown error code when fitting SSM #31

Closed
Spines151 opened this issue Mar 9, 2022 · 5 comments
Closed

unknown error code when fitting SSM #31

Spines151 opened this issue Mar 9, 2022 · 5 comments

Comments

@Spines151
Copy link

Addition to post # 25 Error when running fit_ssm - closed

I get a cryptic error message trying to run fit_SSM

fit <-fit_ssm(argos, vmax = 5, model ="crw", time.step = 6)
fitting crw...
Error in .Call("getParameterOrder", data, parameters, new.env(), NULL, : Incorrect number of arguments (4), expecting 3 for 'getParameterOrder'

Some googling later, I found people reporting issues with the matrix and TBM versions, so I followed the advice (post #25) to install tbm from the source, but the error remained.
Rv 4.1.1
foieGras (0.7.6)
matrix (1.4.0)
tbm (0.3.5)

Any advice?
Thanks

@jlguilherme
Copy link

Hi, today I started experiencing the exact same issue after updating all packages in R (trying to solve a different issue).

I just removed the latest TMB version 1.8.0 (not tbm - I believe you have that wrong) and installed 1.722 and it is working now.

I hope that helps!

@jamesgrecian
Copy link
Collaborator

Thanks for highlighting the issue @Spines151.

I've noticed it today while trying to run some example code. It looks like there's been a change in the latest version of TMB that's resulting in some incompatibility issues. I've seen a similar issue come up on the glmmTMB forum: glmmTMB/glmmTMB#791

A patch for now would be to role back the version of TMB you are using:
devtools::install_version("TMB", version = "1.7.20", repos = "http://cran.r-project.org")

HTH,
James

@ianjonsen
Copy link
Owner

ianjonsen commented Apr 7, 2022

If you have installed the binary foieGras 0.7-6 from CRAN (ie. on Windows or Mac) then you are getting C++ code compiled against TMB 1.7.20. If you have TMB versions 1.8.0 or up installed then you'll get this error. You can:

  1. install the CRAN version from source using install.packages("foieGras", type = "source")

  2. install from GitHub using remotes::install_github("ianjonsen/foieGras@staging")

Either option will build the package from source & compile the C++ code against whatever version of TMB you have installed. This will stop the error.

@BelindaCannell
Copy link

BelindaCannell commented Apr 26, 2022

Hi Ian
I have been having the same issue :
Error in .Call("getParameterOrder", data, parameters, new.env(), NULL, : Incorrect number of arguments (4), expecting 3 for 'getParameterOrder'.

I uninstalled the foiegras package and tried to reinstall from Github (i.e. install from GitHub using remotes::install_github("ianjonsen/foieGras@staging"). There were many packages that also need to be upgraded, so I chose to upgrade all of them. However, the package cli was unable to be upgraded and foiegras was unable to be installed. I then tried install.packages("foieGras", type = "source"). This had installed foieGras_1.0.0.9500.tar.gz’ into a temp file. So I then tried to install from github again.

Unfortunately the package failed to install. Here are the last few lines from the installation:

C:/R/Library/RcppEigen/include/Eigen/src/Core/CoreEvaluators.h:960:8: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits::type' {aka '__vector(2) double'} [-Wignored-attributes]
(cd TMB; //uniwa.uwa.edu.au/userhome/staff8/00041818/My Documents/R/R-4.0.5/bin/i386/Rscript --no-save --no-restore compile.R)
sh: //uniwa.uwa.edu.au/userhome/staff8/00041818/My: No such file or directory
make: *** [Makevars.win:9: tmblib] Error 127
ERROR: compilation failed for package 'foieGras'

  • removing 'C:/R/Library/foieGras'

Warning messages:
1: In i.p(...) : installation of package ‘cli’ had non-zero exit status
2: In i.p(...) :
installation of package ‘C:/Users/00041818/AppData/Local/Temp/Rtmp0KyQvN/file282c62935898/foieGras_1.0.0.9500.tar.gz’ had non-zero exit status

Can you please advise what I need to do in order to be able to install foiegras.

Kind regards
Belinda

@ianjonsen
Copy link
Owner

Hi Belinda,

The cli package isn't a direct requirement for foieGras but must be for one of foieGras's dependencies. You probably don't need the latest cli version so I would try reinstalling from the CRAN package versions, rather than GitHub, using this sequence:

  1. uninstall foieGras with: remove.packages("foieGras")
  2. close R/RStudio and then reopen
  3. install cli with install.packages("cli") - if you get a message asking if you want to install from source, choose "no"
  4. install foieGras with: install.packages("foieGras", type = "source")`

This should install the CRAN versions of cli and foieGras 0.7-6. The GitHub version is currently experimental and mostly untested.

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

No branches or pull requests

5 participants