I am trying to recruit more cores to increases my processing time for some lidar data I am analyzing but I keep getting "Error in makePSOCKcluster(names = spec, ...) : Cluster setup failed. 3 of 3 workers failed to connect." after I run this:
UseCores <-detectCores() -1
cl <- makeCluster(UseCores)
registerDoParallel(cl)
foreach(i=1:lengthcanopy_list)) %dopar% {
library(raster)
ttops <- vwf(CHM = canopy_test, winFun = lin, minHeight = 2, maxWinDiameter = NULL)
}
Why am I getting this error and what can I do to fix it?