Feel snowfall package easy to use than the parallel package
################################################## ###############################
SFinit (Parallel = TRUE, cpus = nCore) initialization #
####### ##################################
sfLibrary (MASS) R # dependency package loading MASS
sfLibrary (dplyr) # Loading packages rely R
##################
sfExport ( "data.layer", "sel.crs", 'end.layer', 'Allt', 'thiswidth' , 'na.dir', 'csv.path' ) # load dependent objects
sfExport ( "export_csv", "get.allvalue ") # load dependent function
############# ##################################################
# parallel computing
result <- sfLapply (rest.t, fun = function (t) {
}
sfStop () # end parallel
##############################################
When setting the number of parallel arithmetic core, generally, each thread you consider your calculation, the maximum possible value memory (for example 15Gb), the total value of the memory (e.g., 128GB) may be divided by a single thread maximum memory (15GB ), the best number of cores (8) you set.