Closed heoa closed 7 years ago
What exactly do you want to benchmark?
@larskotthoff easiest would be computation time with different numbers of cores allocated.
Time is available as a normal performance measure, see the tutorial.
@larskotthoff I see no mention about OpenMP. There is no way to explicitly turn it off/on.
Yeah, if you want OpenMP support you need to compile the respective package with it (in this case xgboost
). You may be able to pass the number of cores to use, but that's something the learner package needs to support.
@heoa please state exactly at what level you want to use openmp
do you want to parallelize the fitting of the model (like xgboost)? this is not (directly) supported in mlr at all, you need to enable that through a param of the model.
mlr allows parallelization of resampling, benchmarking, tuning, etc. and this is done through parallelMap (which again wraps packages parallel and batchtools)
Why don't you just use the parameter nthread = 1
, e.g. makeLearner("classif.xgboost", nthread = 1)
? Shouldn't this already give you the possibility to "deactivate" OpenMP
.
#' Parallelization is automatically enabled if \code{OpenMP} is present.
#' Number of threads can also be manually specified via \code{nthread} parameter.
Reopen if this does not answer your question.
I would like to test OpenMP with MLR. For example, xgboost supports OpenMP if OpenMP enabled [1]. I would like to benchmark results with OpenMP and without OpenMP.
Does there exist some ways to benchmark the results from MLR with OpenMP or without OpenMP?
[1] https://github.com/dmlc/xgboost/blob/master/R-package/R/xgb.train.R