Parallel Version of the L-BFGS-B Optimization Method

Provides a parallel version of the L-BFGS-B method of optim(). The main function of the package is optimParallel(), which has the same usage and output as optim(). Using optimParallel() can significantly reduce the optimization time.

The package provides a parallel versions of the L-BFGS-B optim method. If the evaluation of the function fn takes more than 0.1 seconds, optimParallel can significantly reduce the optimization time. For a p-parameter optimization, the speed increase is about factor 1+2p when no analytic gradient is specified and 1+2p processor cores are available.

See the ArXiv e-prints URL also available as package vignette for more information.

R> vignette("optimParallel")


  • version 0.8: commit f0a8ed6e658cb481d549fd908d5640bf03abf394 Author: Florian Gerber [email protected] Date: Mon Feb 25 18:38:17 2019 +0100 (1) the mechanism to call 'fn' and 'gr' in parallel was improved to avoid unecessary copies of objects between processes in the cluster. (2) the 'BFGS' and 'GC' methods are nolonger supported.

  • version 0.7-4: bug fix commit 813a06269b6e777157fbe529bc62e38fc4d59de4 Author: Florian Gerber [email protected] Date: Mon Oct 15 22:40:37 2018 -0600 (1) 'fn'. 'gr' can now be functions from other packages calling compiled code, e.g., optimParallel(par=1, fn=dnorm, mean=3)

  • version 0.7-3: bug fix commit 01ebb9016000a7b087c01b190db0b7ab9d4778d6 Author: Florian Gerber [email protected] Date: Fri Jul 27 22:40:37 2018 -0600 (1) indexing 'par' by names inside 'fn' works now. e.g. optimParallel(par=c(a=1), fn <- function(x) {x["a"]^2}) (2) using functions and method from loaded packages works now. 'fn' and 'gr' have now .GlobalEnv as parent environment. (3) the default value for the argument 'method' is now "L-BFGS-B". (4) the help page ?optimParallel contains a new section 'Notes' summarizing considerations for the practical use.

  • version 0.7-2: CRAN release commit f46556cee870a5c13145ddfdf5f2e3998ea0b317 Author: Florian Gerber [email protected] Date: Tue May 1 12:43:35 2018 +0200

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.8 by Florian Gerber, 25 days ago

Report a bug at

Browse source code at

Authors: Florian Gerber

Documentation:   PDF Manual  

GPL (>= 2) license

Depends on stats, parallel

Suggests R.rsp, roxygen2, spam, microbenchmark, testthat, ggplot2, numDeriv, lbfgsb3, lbfgsb3c

Suggested by GLMMadaptive.

See at CRAN