I am trying to run random forest code to classify satellite imageries using the caret package in R studio. While training the model I always get an error "error in unserialize(socklist[[n]]) : error reading from connection". I am using a system having i9(13th gen), 128 GB ram and tried using at 28, 24, 16 cores. All the attempts ended up in this error. I reinstalled R and R studio, changed the version to older ones, run the script in terminal but this same error occurs. While trying to close the cluster "error in unserialize(node$con) : error reading from connection" this error comes. I am using caret package and for parallel computing the doparallel package
"cl <- makeCluster(3/4 * detectCores())
registerDoParallel(cl)"
The same code was successfully run in a laptop with i5 (9th gen); 16 GB ram using only 3 cores but took 12 hours for output. How can i resolve this issue. Is this the problem with code or R studio or the system which I am using?