R/zzz.R

Defines functions .onLoad

## Up until R 2.15.0, the require("methods") is needed but (now)
## triggers an warning from R CMD check
#.onLoad <- function(libname, pkgname){
#    #require("methods")  ## needed with R <= 2.15.0
#    loadRcppModules()
#}

## Stop BLAS from using multiple threads which intereferes with mclapply calls
.onLoad <- function(libname=find.package("RhpcBLASctl"),pkgname="RhpcBLASctl"){
  blas_set_num_threads(1)
}

## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().

loadModule("ModelStructureEx", TRUE)
loadModule("ExperimentalDesignEx", TRUE)
loadModule("DataEx", TRUE)
loadModule("ModelEx", TRUE)
molsysbio/STASNet documentation built on May 29, 2019, 5:45 a.m.