hsdar_parallel: hsdar_parallel

Description Usage Details Value Author(s) Examples

View source: R/multicore_funtions.R

Description

Get all functions which support parallel execution. Currently, the parallel backend functions in doMPI and doMC are supported.

Usage

1

Details

Parallel execution is performed via the foreach-package. Care is taken that a function will never run in parallel if the calling function is already using multicore processing.

Value

Vector containing supported function names

Author(s)

Lukas Lehnert

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
supported_functions <- hsdar_parallel()
supported_functions

data(spectral_data)

## Example for Windows and other systems where doMPI is available
## Load library
library(doMPI)
## Register number of workers
cl <- startMPIcluster(count = 3)
registerDoMPI(cl)

## Transform speclib using 3 cores
bd <- transformSpeclib(spectral_data)

## Close the cluster (important to get rid of processes)
closeCluster(cl)

## Example for Linux and other systems where doMC is available
## Load library
library(doMC)
## Register number of workers
registerDoMC(3)

## Transform speclib using 3 cores
bd <- transformSpeclib(spectral_data)

## End(Not run)

hsdar documentation built on Aug. 4, 2020, 5:06 p.m.