Skip to content

Commit

Permalink
Restrict threads in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Dec 10, 2023
1 parent d57e67d commit b825abb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ test_that("stan_sample runs", {
)
expect_no_error(
samp_gd_par <- stan_sample(loglik_fun, inits, additional_args = list(y), grad_fun = grad,
lower = c(-Inf, 0), num_threads = 4,
num_chains = 4, seed = 1234)
lower = c(-Inf, 0), num_threads = 2,
num_chains = 2, seed = 1234)
)
expect_no_error(
samp_gd_dense <- stan_sample(loglik_fun, inits, additional_args = list(y), grad_fun = grad,
Expand Down Expand Up @@ -84,7 +84,7 @@ test_that("stan_pathfinder runs", {
)
expect_no_error(
path_gd_par <- stan_pathfinder(loglik_fun, inits, additional_args = list(y), grad_fun = grad,
num_threads = 4, lower = c(-Inf, 0), seed = 1234)
num_threads = 2, num_paths = 2, lower = c(-Inf, 0), seed = 1234)
)
})

Expand Down

0 comments on commit b825abb

Please sign in to comment.