The function set the number of CPU cores for parallel computation by the use of OpenMP library (http://openmp.org/). If the package was not complied with the library OpenMP (>= 3.0), this function is disabled.
Usage
setCores(n)
Arguments
Value
The total number of CPU cores in use will be returned and a message will be displayed. If the package was not complied with the library OpenMP (>= 3.0), the value one will be returned.
Rdversion
1.1
Details
When the package is loaded, only one CPU core is used.
References
SunTM ONE Studio 8 (2003) OpenMP API User's Guide. Sun Microsystems Inc., Santa Clara, U.S.A.
#Display the number of CPU cores in usesetCores()
#Set 2 CPU cores for parallel computationsetCores(2)
#Set 1 CPU core for serial computationsetCores(1)