Open jswesner opened 1 year ago
The problem is not my package, but that cmdstanr doesn't have permission to write to the directory. So it couldn't write the compiled model to disk. Seems like other people have had this problem and there is an option in cmdstanr to change the path? This is what I found by searching a bit: https://discourse.mc-stan.org/t/permissions-error-running-brms-on-windows-with-cmdstanr-backend/28429
Thank you. I tried changing the path as suggested there with no luck. But since the issue is in cmdstanr and permissions, I'll see if I can resolve it within cmdstanr first.
Sorry I can't be of more help. But yes, if you can get cmdstanr to work on, then ulam() should work. ulam() just builds Stan code and passes it to cmdstanr for the hard part.
Remember that you need to compile cmdstan etc. again with a new path.
I've found a workaround by using rstan as the backend instead of cmdstan with set_ulam_cmdstan(F)
. In case it was confusing to anyone else, I first tried to use rstan within the ulam() function: ulam(model...., cmdstan = F). But this did not work. After reading the help closer, I needed to use set_ulam_cmdstan(F)
first outside of the ulam() model. Then running the ulam() model worked fine.
Hi: I'm having trouble fitting a model with ulam. The model appears to start sampling, but ends in an error that "processx_exec failed". Th model works fine with quap(), and other models also work fine in rstan or brms. I've updated all packages (including cmdstan and process (the package referenced in the error). Any advice on next steps would be great. Thanks, jeff
Here's the model:
m5.3 = ulam( alist( D ~ dnorm(mu, sigma), mu <- a + bM*M + bA*A, a ~ dnorm(0, 0.3), bM ~ dnorm(0, 0.5), bA ~ dnorm(0, 0.5), sigma ~ dexp(1)), data = list(D = d$D, A = d$A, M = d$M))
Here's the error: Running MCMC with 1 chain, with 1 thread(s) per chain...
Error in
process_initialize(self, private, command, args, stdin, stdout, …
: ! Native call toprocessx_exec
failed Caused by error inchain_call(c_processx_exec, command, c(command, args), pty, pty_options, …
: ! create process 'ulam_cmdstanr_26394daa2cfa2ded9eea3abe7aa8d8c2.exe' (system error 5, Access is denied. ) @win/processx.c:1040 (processx_exec)Backtrace:
Here is my system info: OS Name Microsoft Windows 10 Enterprise Version 10.0.19044 Build 19044 platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
major 4
minor 2.2
year 2022
month 10
day 31
svn rev 83211
language R
version.string R version 4.2.2 (2022-10-31 ucrt) nickname Innocent and Trusting