Skip to content

Commit

Permalink
comment out TBB stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoodri committed Apr 8, 2022
1 parent e4c1be8 commit e63e48a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: rstanarm
Type: Package
Title: Bayesian Applied Regression Modeling via Stan
Version: 2.21.2
Date: 2022-03-16
Version: 2.21.3
Date: 2022-04-08
Encoding: UTF-8
Authors@R: c(person("Jonah", "Gabry", email = "jsg2201@columbia.edu", role = "aut"),
person("Imad", "Ali", role = "ctb"),
Expand Down
21 changes: 11 additions & 10 deletions tests/testthat/test_stan_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ test_that("Stan programs are available", {

library(rstan)
Sys.unsetenv("R_TESTS")
TBB <- system.file("lib", .Platform$r_arch, package = "RcppParallel", mustWork = TRUE)
SH <- system.file(ifelse(.Platform$OS.type == "windows", "libs", "lib"),
.Platform$r_arch, package = "StanHeaders", mustWork = TRUE)
Sys.setenv(LOCAL_LIBS = paste0("-L", shQuote(TBB), " -tbb -tbbmalloc ",
"-L", shQuote(SH) , " -lStanHeaders"))
# TBB <- system.file("lib", .Platform$r_arch, package = "RcppParallel", mustWork = TRUE)
# SH <- system.file(ifelse(.Platform$OS.type == "windows", "libs", "lib"),
# .Platform$r_arch, package = "StanHeaders", mustWork = TRUE)
# Sys.setenv(LOCAL_LIBS = paste0("-L", shQuote(TBB), " -tbb -tbbmalloc ",
# "-L", shQuote(SH) , " -lStanHeaders"))
# Sys.setenv(PKG_LIBS = Sys.getenv("LOCAL_LIBS"))
Eigen <- dir(system.file("include", "stan", "math", "prim",
package = "StanHeaders", mustWork = TRUE),
pattern = "Eigen.hpp$", full.names = TRUE, recursive = TRUE)[1]
Sys.setenv(PKG_CXXFLAGS = paste("-include", shQuote(Eigen)))
# Eigen <- dir(system.file("include", "stan", "math", "prim",
# package = "StanHeaders", mustWork = TRUE),
# pattern = "Eigen.hpp$", full.names = TRUE, recursive = TRUE)[1]
# Sys.setenv(PKG_CXXFLAGS = paste("-include", shQuote(Eigen)))

functions <- sapply(dir(MODELS_HOME, pattern = "stan$", full.names = TRUE), function(f) {
mc <- readLines(f)
Expand All @@ -62,7 +62,8 @@ model_code <- paste(c("functions {", functions, "}"), collapse = "\n")
stanc_ret <- stanc(model_code = model_code, model_name = "Stan Functions",
allow_undefined = TRUE)
expose_stan_functions(stanc_ret, rebuild = TRUE, verbose = TRUE)
Rcpp::sourceCpp(file.path(INCLUDE_DIR, "tests.cpp"), rebuild = TRUE, verbose = TRUE)
# Rcpp::registerPlugin("rstan", rstan:::rstanplugin)
# Rcpp::sourceCpp(file.path(INCLUDE_DIR, "tests.cpp"), rebuild = TRUE, verbose = TRUE)
N <- 99L

# bernoulli
Expand Down

0 comments on commit e63e48a

Please sign in to comment.