Skip to content

Commit

Permalink
Debugging WSL failure
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmodrak committed Aug 14, 2023
1 parent ebc7d7b commit 0b78407
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -509,20 +509,21 @@ compile <- function(quiet = TRUE,
stanc_options[["use-opencl"]] <- TRUE
}
if (!is.null(user_header)) {
user_header <- wsl_safe_path(absolute_path(user_header))
#user_header <- wsl_safe_path(absolute_path(user_header))
user_header <- user_header
cpp_options[["USER_HEADER"]] <- user_header
stanc_options[["allow-undefined"]] <- TRUE
private$using_user_header_ <- TRUE
}
if (!is.null(cpp_options[["USER_HEADER"]])) {
cpp_options[["USER_HEADER"]] <- wsl_safe_path(absolute_path(cpp_options[["USER_HEADER"]]))
private$using_user_header_ <- TRUE
user_header <- cpp_options[["USER_HEADER"]]
#user_header <- cpp_options[["USER_HEADER"]]
}
if (!is.null(cpp_options[["user_header"]])) {
cpp_options[["user_header"]] <- wsl_safe_path(absolute_path(cpp_options[["user_header"]]))
private$using_user_header_ <- TRUE
user_header <- cpp_options[["user_header"]]
#user_header <- cpp_options[["user_header"]]
}
if (is.null(stanc_options[["name"]])) {
stanc_options[["name"]] <- paste0(self$model_name(), "_model")
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-model-compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ test_that("cmdstan_model works with user_header", {
}
}"
cat(hpp, file = tmpfile, sep = "\n")
warning(paste0("tmpfile test: ", tmpfile))
mod <- cmdstan_model(
stan_file = testing_stan_file("bernoulli_external"),
user_header = tmpfile
Expand Down

0 comments on commit 0b78407

Please sign in to comment.