I have a model that runs with 1/6th of my data. However, when I use all of the data I get the error code:
Error in unserialize(socklist[[n]]) : error reading from connection
When I run the model with only 1/6 of the data it only uses 17GB RAM to run. When I run the model with all of the data it uses 20GB memory before it then fails and returns the error. However, I have 200GB of RAM with no higher memory limits in RStudio, on a Linux machine (versions: RStan 2.18.2 and R 3.2.1). The full dataset is 3000 lines.
When I move the transformed parameters to the model block it runs fine with all of the data. However, I need to have access to these parameters so not storing them to memory is not an ideal solution.
Any ideas or insights would be greatly appreciated!
(I have read other posts about the error code and I have tried but they haven’t helped as far as I can tell:
- deleting the Makevars and Makevars.win file
- chains = 1 but R crashes
- fewer iterations
- I increased the RAM to 600GB).