I am running Stan models on my university’s computing server (linux system), by submitting a batch file that calls Rscript mymodel.R. Previously when I run rstan on my computer in RStudio, I can check the model chain progress in the RStudio Viewer console. I am wondering now if there is any way I can view my model progress when I run it on the server, or is there any way to write the model chain progress to the console or to a text file?
It appears as a text file in the tempdir() of the R process that is running mymodel.R. Usually, the cluster itself is going to have some mechanism to save stdout and stderr. What batch processing software is your server using to run jobs?
The server uses Moab to run jobs. I checked the manual and found the stdout file it saved and I have my chain progress written into this stdout file. So the problem is resolved. Thanks!
Hi! I have the same problem/question. I can’t find any temporary directories or stdout files. I’m running stan within an Rmd, and get:
“no method available for opening ‘file:///tmp/Rtmp2JHyvQ/file7a9105eafb6_StanProgress.html’”
It would be great to be able to see the progress of the chains. Do I modify open_progress somehow?
With open_progress = FALSE, I at least get output on progress to the PuTTY session (and don’t get the error above). But I can’t use sink() to get it to output to a .txt file.
When knitting an Rmd, it is going to be difficult to find what tempdir() is being used for that R session. I guess it will be whatever subdirectory of /tmp starting with Rtmp is most recently created.
This is what tempdir() says, but I can’t see the directory when I “ls”?
tempdir()
[1] “/tmp/RtmpnPbwcm”
q()
Save workspace image? [y/n/c]: n
ubuntu@ip…:~$ ls -a
. .bashrc .profile .vimrc
… bin runstan.R .yadm
.aws .cache .ssh
.bash_history data .sudo_as_admin_successful
.bash_logout general_model.Rmd .tmux.conf