I am working on a windows 10 sever and updated r from version 4.0 to 4.0.2. I reinstalled rstan from Cran then installed rstan which installed version 2.21 and I was using version 2.19.3. Now I cant rtun stan at all and get the following message which has never happened to me before.
running the command below always worked fine
fit <- stan(file = “SingleComponentBinding.stan”, data = Dat, pars=c(‘Fmaxe1’,‘EC501’,‘sigma’,‘C_pred’,‘theta1’,‘theta2’), + iter = 4000, warmup=2000, chains = 5, thin=2, seed=82058, cores=5, + control=list(adapt_delta=0.9, max_treedepth=10))
but now I get the following error and have spent hour deleting and reinstalling to no avail.
The NEXT version of Stan will not be able to pre-process your stan program please open issue at
https://github.com/stan-dev/stanc3/issues if you can share or at least describe your Stan program. This will help ensure that Stan continues to work on your Stan programs in the future. Thank you! This message can be avoided by wrapping your function call inside suppressMessages(). cannot remove file ‘C:\Users\johnson.rd.1\AppData\Local\Temp\3\Rtmpikkggv\file20ec4e345171.stan’, reason 'No such file or directory’running command ‘C:/PROGRA~1/R/R-4.0.2/bin/x64/R CMD SHLIB file20ec48d11d2a.cpp 2> file20ec48d11d2a.cpp.err.txt’ had status 1cannot open file ‘file20ec48d11d2a.cpp.err.txt’: No such file or directoryError in file(con, “r”) : cannot open the connection Error in sink(type = “output”) : invalid connection
I replaced the StanHeaders file after deleting the zzz file same error
The NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
https://github.com/stan-dev/stanc3/issues
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In file.remove(c(unprocessed, processed)) :
cannot remove file 'C:\Users\johnson.rd.1\AppData\Local\Temp\3\RtmpuyaCA2\file46478dac2a.stan', reason 'No such file or directory'
2: In system(cmd, intern = !verbose) :
running command 'C:/PROGRA~1/R/R-4.0.2/bin/x64/R CMD SHLIB file464692e2461.cpp 2> file464692e2461.cpp.err.txt' had status 1
3: In file(con, "r") :
cannot open file 'file464692e2461.cpp.err.txt': No such file or directory
Error in sink(type = "output") : invalid connection
It appears I still have the same issue. I’m running:
Windows 10 with a network drive
R version 4.0.2
R Studio version 1.3.959
Rtools version 4.0
packageVersion(“rstan”) = 2.21.1
packageVersion(“StanHeaders”) = 2.21.0.6
I completed the steps described here, to try and make sure everything is installed on my internal drive. When running:
.libPaths()
The following is returned:
“C:/R/library” “C:/Program Files/R/R-4.0.2/library”
In a clean R session without any stanfit objects, when running:
example(stan_model, package = “rstan”, run.dontrun = TRUE)
The following is returned:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: file3f8e0744e7.o:file3f8e0744e7.cpp:(.text+0x124c): undefined reference to rstan::stan_fit::stan_fit(SEXPREC*, int)' C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3f8e0744e7.o:file3f8e0744e7.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D1Ev[_ZN3tbb8internal26task_scheduler_observer_v3D1Ev]+0x14): undefined reference to tbb::internal::task_scheduler_observer_v3::observe(bool)’
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: file3f8e0744e7.o:file3f8e0744e7.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D0Ev[_ZN3tbb8internal26task_scheduler_observer_v3D0Ev]+0x1c): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)’
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-m
In addition: Warning messages:
1: package ‘StanHeaders’ was built under R version 4.1.0
2: In file.remove(c(unprocessed, processed)) :
cannot remove file ‘C:\Users\wolf5246\AppData\Local\Temp\RtmpoDt9QP\file3f873d214ed.stan’, reason ‘No such file or directory’
StanHeaders is saved in “C:\R\library\StanHeaders” - so no issue with spaces in the address.