You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a follow-up to #1093 and #1098 using expose_stan_functions can still cause unspecific errors sometimes.
Description:
expose_stan_function yields an unspecific error sometimes when used on ..._lp functions.
Reproducible Steps:
library("rstan")
#> Loading required package: StanHeaders#> #> rstan version 2.32.5 (Stan version 2.32.2)#> For execution on a local, multicore CPU with excess RAM we recommend calling#> options(mc.cores = parallel::detectCores()).#> To avoid recompilation of unchanged Stan programs, we recommend calling#> rstan_options(auto_write = TRUE)#> For within-chain threading using `reduce_sum()` or `map_rect()` Stan functions,#> change `threads_per_chain` option:#> rstan_options(threads_per_chain = 1)## make temporary directorytmpdir<- tempdir()
## definfe test stan functionstan_function<-'functions{ void test(real variable) {} }'stan_function_lp<-'functions{ void test_lp(real variable1, real variable2, real long_variable_name) {} }'## write stan function to file
writeLines(stan_function, file.path(tmpdir, "test.stan"))
writeLines(stan_function_lp, file.path(tmpdir, "test_lp.stan"))
## compile stan function
expose_stan_functions(file.path(tmpdir, "test.stan"))
message("Success")
#> Success
expose_stan_functions(file.path(tmpdir, "test_lp.stan"))
#> #> WARNING: The tools required to build C++ code for R were not found.#> #> Please install Command Line Tools for XCode (or equivalent).#> Error in expose_stan_functions(file.path(tmpdir, "test_lp.stan")): Compilation failed!
Summary:
As a follow-up to #1093 and #1098 using
expose_stan_functions
can still cause unspecific errors sometimes.Description:
expose_stan_function
yields an unspecific error sometimes when used on..._lp
functions.Reproducible Steps:
Created on 2024-02-08 with reprex v2.1.0
Current Output:
An error.
Expected Output:
No error.
RStan Version:
Latest
develop
(277167c): 2.33.1.9000R Version:
R version 4.3.2 (2023-10-31)
Operating System:
macOS 14.3
The text was updated successfully, but these errors were encountered: