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

trouble with installation #12

Open
mfisher5 opened this issue Mar 14, 2024 · 1 comment
Open

trouble with installation #12

mfisher5 opened this issue Mar 14, 2024 · 1 comment

Comments

@mfisher5
Copy link

I'm excited to try the new release with some data that are grouped by site habitat, but I keep getting a non-zero exit status warning when I use devtools to install zoid from github. It looks like there might be an error in the code for model_dirichregmod? Or maybe I need to try updating another package / R permissions on my desktop first? I'm in R version 4.1.3 (2022-03-10). Thanks for the help!

> devtools::install_github("noaa-nwfsc/zoid")

The downloaded source packages are in
	‘C:\Users\mfisher5\AppData\Local\Temp\RtmpOErnoU\downloaded_packages’
-- R CMD build ------------------------------------------------------------------------------------------------------------------------
v  checking for file 'C:\Users\mfisher5\AppData\Local\Temp\RtmpOErnoU\remotes2ae820826225\noaa-nwfsc-zoid-c82b045/DESCRIPTION' ...
-  preparing 'zoid': (714ms)
v  checking DESCRIPTION meta-information ... 
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'zoid_1.3.1.tar.gz'
   Warning: file 'zoid/configure' did not have execute permissions: corrected
   
* installing *source* package 'zoid' ...
** using staged installation
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
 error in 'model_dirichregmod' at line 7, column 2
  -------------------------------------------------
     5:   int N_covar; // number of covariates in design matrix X
     6:   matrix[N_samples, N_covar] design_X;
     7:   array[N_bins,N_bins-1] int prod_idx;
         ^
     8:   int overdisp; // whether or not to include overdispersion term
  -------------------------------------------------

PARSER EXPECTED: <one of the following:
  a variable declaration, beginning with type,
      (int, real, vector, row_vector, matrix, unit_vector,
       simplex, ordered, positive_ordered,
       corr_matrix, cov_matrix,
       cholesky_corr, cholesky_cov
  or '}' to close variable declarations>
Error in rstan::stanc(file_name, allow_undefined = TRUE, obfuscate_model_name = FALSE,  : 
  failed to parse Stan model 'dirichregmod' due to the above error.
Calls: <Anonymous> -> sapply -> lapply -> FUN -> <Anonymous>
Execution halted
ERROR: configuration failed for package 'zoid'
* removing 'C:/Users/mfisher5/Documents/R/R-4.1.3/library/zoid'
* restoring previous 'C:/Users/mfisher5/Documents/R/R-4.1.3/library/zoid'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/mfisher5/AppData/Local/Temp/RtmpOErnoU/file2ae8f3c3fa4/zoid_1.3.1.tar.gz’ had non-zero exit status
@ericward-noaa
Copy link
Member

I think this may be a package update issue? I just tried a new installation on a Mac and it seems to work fine.

R version 4.3.1 (2023-06-16)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

My version of R is slightly newer, so that may be also worth trying. For packages, I'd update everything -- but Stan/StanHeaders seem like the obvious ones that could be causing issues.

Related, I also started working this up in TMB -- which may be a good solution for some of the giant datasets you're working with. This is still very much in development, but available here: https://github.com/noaa-nwfsc/zoidtmb

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

2 participants