awsMethods (version 1.1-1)

setCores: Set the number of cores to use for openMP.

Description

The function sets the number of cores used in openMP parallelization in part of the Fortran code.

Usage

setCores(n, reprt = TRUE)

Arguments

n

number of cores to use. If n is missing the actual number of cores in use is returned.

reprt

Logical, is reprt==TRUE the number of cores in use is reported.

Value

The function returns the number of cores in use.

Details

The number of cores is restricted to integers between 1 (default) and the number of available cores.

Examples

Run this code
# NOT RUN {
## Report number of cores available and in use
  setCores()
## Set number of cores used in openMP to minimum of 
## 12 and number of available cores
  setCores(12)
# }

Run the code above in your browser using DataLab