It is given in the caret documentation that to allow parallel processing the following code works
library(doMC)
registerDoMC(cores = 5)
## All subsequent mode
Just to expand on the implementation of the previous answers and basically using the Caret package documentation, here is a recipe that works for me:
set.seed(112233)
library(parallel)
# Calculate the number of cores
no_cores <- detectCores() - 1
library(doParallel)
# create the cluster for caret to use
cl <- makePSOCKcluster(no_cores)
registerDoParallel(cl)
# do your regular caret train calculation enabling
# allowParallel = TRUE for the functions that do
# use it as part of their implementation. This is
# determined by the caret package.
stopCluster(cl)
registerDoSEQ()