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

Description Usage Arguments Details Value Note Author(s) Examples

Description

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

Usage

1
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.

Details

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

Value

The function returns the number of cores in use.

Note

This function is a slightly modified version of function setCores in package spMC version 0.2.2 written by Luca Sartore <drwolf85@gmail.com>

Author(s)

Felix Anker (anker@wias-berlin.de)

Examples

1
2
3
4
5
## 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)

Example output

Use the function setCores() to change the number of CPU cores.

awsMethods documentation built on May 8, 2019, 5:02 p.m.