Skip to content

Commit

Permalink
change OMP env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
helske committed Oct 25, 2023
1 parent 3b5c6c1 commit 232b2fe
Show file tree
Hide file tree
Showing 23 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bssm 2.0.2 (Release date: 2023-10-18)
* Removed explicit C++ version requirement as required by new CRAN policies.
* Removed `magrittr` dependency and switched to native pipe, leading to
requirement for R 4.1.0+.
* Added Sys.setenv("OMP_THREAD_LIMIT" = 2) to fix weird CRAN issues with
* Added Sys.setenv("OMP_NUM_THREADS" = 2) to fix weird CRAN issues with
parallelisation on Debian.

bssm 2.0.1 (Release date: 2022-05-02)
Expand Down
2 changes: 1 addition & 1 deletion R/approx.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#' @export
#' @rdname gaussian_approx
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' data("poisson_series")
#' model <- bsm_ng(y = poisson_series, sd_slope = 0.01, sd_level = 0.1,
#' distribution = "poisson")
Expand Down
10 changes: 5 additions & 5 deletions R/bssm-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
#' time ts ts.union tsp tsp<- sd na.omit
#' @useDynLib bssm
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' # Create a local level model (latent random walk + noise) to the Nile
#' # dataset using the bsm_lg function:
#' model <- bsm_lg(Nile,
Expand Down Expand Up @@ -139,7 +139,7 @@ NULL
#' \url{https://stat.fi/tup/tilastotietokannat/index_en.html}.
#' @keywords datasets
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' data("drownings")
#' model <- bsm_ng(drownings[, "deaths"], u = drownings[, "population"],
#' xreg = drownings[, "summer_temp"], distribution = "poisson",
Expand Down Expand Up @@ -167,7 +167,7 @@ NULL
#' Time Series Analysis by State Space Methods. Oxford University Press.
#' https://doi.org/10.1093/acprof:oso/9780199641178.001.0001
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' data("exchange")
#' model <- svm(exchange, rho = uniform(0.97,-0.999,0.999),
#' sd_ar = halfnormal(0.175, 2), mu = normal(-0.87, 0, 2))
Expand All @@ -191,7 +191,7 @@ NULL
#' Scand J Statist. 1-38. https://doi.org/10.1111/sjos.12492
#'
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' # The data was generated as follows:
#' set.seed(321)
#' slope <- cumsum(c(0, rnorm(99, sd = 0.01)))
Expand Down Expand Up @@ -245,7 +245,7 @@ NULL
#' https://doi.org/10.32614/RJ-2021-103
#'
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' # reproducing the model:
#' data("negbin_series")
#' # Construct model for bssm
Expand Down
2 changes: 1 addition & 1 deletion R/ekpf_filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ekpf_filter <- function(model, particles, ...) {
#' @rdname ekpf_filter
#' @examples
#' \donttest{ # Takes a while
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' set.seed(1)
#' n <- 50
#' x <- y <- numeric(n)
Expand Down
4 changes: 2 additions & 2 deletions R/kfilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ kfilter.nongaussian <- function(model, ...) {
#' @export
#' @examples
#' \donttest{ # Takes a while on CRAN
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' set.seed(1)
#' mu <- -0.2
#' rho <- 0.7
Expand Down Expand Up @@ -139,7 +139,7 @@ ekf <- function(model, iekf_iter = 0) {
#' @export
#' @examples
#' \donttest{ # Takes a while on CRAN
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' set.seed(1)
#' mu <- -0.2
#' rho <- 0.7
Expand Down
2 changes: 1 addition & 1 deletion R/models.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ default_update_fn <- function(theta) {
#' @return An object of class \code{ssm_ulg}.
#' @export
#' @examples
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#'
#' # Regression model with time-varying coefficients
#' set.seed(1)
Expand Down
2 changes: 1 addition & 1 deletion R/post_correction.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ suggest_N <- function(model, theta,
#' @export
#' @examples
#' \donttest{
#' Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
#' Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
#' set.seed(1)
#' n <- 300
#' x1 <- sin((2 * pi / 12) * 1:n)
Expand Down
2 changes: 1 addition & 1 deletion man/bssm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/drownings.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ekf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ekpf_filter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/exchange.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gaussian_approx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/negbin_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/poisson_series.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/post_correct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ssm_ulg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ukf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/test_all.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sys.setenv("OMP_THREAD_LIMIT" = 2)
Sys.setenv("OMP_NUM_THREADS" = 2)

library("testthat")
test_check("bssm")
2 changes: 1 addition & 1 deletion vignettes/bssm.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vignette: |
---

```{r, echo = FALSE}
Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
if (!requireNamespace("rmarkdown") ||
!rmarkdown::pandoc_available("1.12.3")) {
warning(call. = FALSE, "These vignettes assume rmarkdown and pandoc version",
Expand Down
2 changes: 1 addition & 1 deletion vignettes/growth_model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vignette: |
---

```{r, echo = FALSE}
Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
if (!requireNamespace("rmarkdown") ||
!rmarkdown::pandoc_available("1.12.3")) {
warning(call. = FALSE, "These vignettes assume rmarkdown and pandoc version 1.12.3. These were not found. Older versions will not work.")
Expand Down
2 changes: 1 addition & 1 deletion vignettes/psi_pf.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bvignette: |
```

```{r, echo = FALSE}
Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
if (!requireNamespace("rmarkdown") ||
!rmarkdown::pandoc_available("1.12.3")) {
warning(call. = FALSE, "These vignettes assume rmarkdown and pandoc version 1.12.3. These were not found. Older versions will not work.")
Expand Down
2 changes: 1 addition & 1 deletion vignettes/sde_model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vignette: |
---

```{r, echo = FALSE}
Sys.setenv("OMP_THREAD_LIMIT" = 2) # For CRAN
Sys.setenv("OMP_NUM_THREADS" = 2) # For CRAN
if (!requireNamespace("rmarkdown") ||
!rmarkdown::pandoc_available("1.12.3")) {
warning(call. = FALSE, "These vignettes assume rmarkdown and pandoc version 1.12.3. These were not found. Older versions will not work.")
Expand Down

0 comments on commit 232b2fe

Please sign in to comment.