Parallel computing
Kenneth Benoit and Stefan Müller
Source:vignettes/pkgdown/parallelisation.Rmd
parallelisation.Rmdquanteda takes advantage of parallel computing through the TBB (Threading Building Blocks) library to speed up computations. This guide provides step-by-step instructions on how to set up your system for using Quanteda with parallel capabilities on Windows, macOS, and Linux.
For Windows Users
Install RTools
- Download and install RTools from RTools download page.
- During installation, ensure you select the option to add RTools to the system path.
Check Installation
-
Open an R session and check that RTools is correctly configured:
find.package("pkgbuild")
For macOS users
Opening the Terminal
To open the terminal on macOS, press Cmd+Space to open
Spotlight, type “Terminal”, and press enter. Alternatively, you can find
the Terminal in /Applications/Utilities/.
Install required tools and libraries
-
Install XCode Command Line Tools
-
Type the following command in the terminal:
-
-
Install Homebrew
-
If Homebrew is not installed, run:
Follow the on-screen instructions.
-
-
Install TBB and pkg-config
-
After installing Homebrew, run:
-
-
Install gfortran
-
Required for compiling Fortran code, install using Homebrew:
-
For Linux users
Installing quanteda from CRAN
After setting up the required tools and libraries, install quanteda from CRAN:
install.packages("quanteda")Parallelisation functions properly if you receive a message detailing the number of threads used for parallel computing after loading quanteda.