Yes, A is of R matrix class. What usually works is to copy the r code from a simulation run that started properly (even if the r code is identical). This is on a linux (UGE) cluster.
OK. It is less likely that your harddisk is going bad and more likely that your cluster has some sort of network file system. And maybe there was some noise during the sync or the timestamps are messed up or something leading to the readRDS error. But if it is also happening with plain R matrices that have been serialized to the disk, I am not sure the same error for serialized Stan models is indicative of a problem with RStan.
Have you resolved this issue yet? I got the exact same issue when I was running my code on the cluster. I don’t think it’s caused by the readRDS function. When I ran the readRDS function separately, it worked fine. But whenever I called the stan_model function on the cluster, the same error occurred.
Not really. For those simulations I got this error for I just took the .qsub file (in my case) from some other simulation that worked and tweaked that to contain the relevant information, and weirdly it worked. As the information in the .qsub files were identical, it may be something with the cores/nodes being assigned to the job.
Not sure if the issue has been resolved, but I ran into something very similar lately. I’m also using a cluster and received very similar (if not the same) error messages. When debugging, I figured that the error (in my case) had nothing to do with reading the data file, because when I tried importing my data as data.R file (that is without any .rds commands in my script), I was still getting that error, which supports @bgoodri response. When I run a model (e.g. model.stan), it automatically creates a copy of the model syntax and saves it as model.rds in my home repository. In my case, the solution was to delete that model.rds file, but I’m not sure of the underlying details of it.