RStan giving (un)serialize error and removing -mtune/-march does not work after Windows 10 update


I have recently updated to Windows 10 and have subsequently had to reinstall and configure RStan using the instructions here, At some point in doing so, some of my models (that were fitting fine before the update) are no longer running properly. I keep getting the error below.

Error in unserialize(socklist[[n]]) : error reading from connection
Error in serialize(data, node$con, xdr = FALSE) : 
  error writing to connection

I first tried to run everything as administrator but no luck.

I then found solutions referring to “-mtune” and “-march”. I tried manually removing these from the Makevars.R file (see below) but again no luck. This was based on my (layman’s!) interpretation of the instructions here: Error in (un)serialize rstan for Windows


CXX14FLAGS=-O3 -march=native -mtune=native
CXX11FLAGS=-O3 -march=native -mtune=native



The error seems to only apply to cases where I have 2+ chains. When I reduce the number of chains to 1, R either aborts the session or the model runs slowly (independent of the number of cores).

Any help would be greatly appreciated!!!

1 Like

Do you have something called the “Killer Control Center Application” installed?

No, just checked and it’s not installed.

Should I install it? @bgoodri