New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Able to install and load rstan on RHEL7, but error on compile #829
Comments
Sorry you're getting an error. We've been seeing some Mac and Windows errors but not so many errors on Linux. Tagging @bgoodri who will hopefully have some ideas. |
Do you have -fPIC in your ~/.R/Makevars file?
…On Sat, Aug 15, 2020 at 1:32 PM Jonah Gabry ***@***.***> wrote:
Sorry you're getting an error. We've been seeing some Mac and Windows
errors but not so many errors on Linux. Tagging @bgoodri
<https://github.com/bgoodri> who will hopefully have some ideas.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#829 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ2XKSXMKYPQ7V7UYAWGPTSA3BDZANCNFSM4QAC36RQ>
.
|
Appreciate the prompt response! @jgabry: no need for apologies 🙂 I'm sure everyone noticed that the Stan team has been actively addressing these kinds of issue lately. @bgoodri : I've tried several options (from existing Github issue, SO, and my previous successes with Stan installation); the one that works for current installation is:
|
@bgoodri Were you implying that
@leungi Just to clarify, by "works for current installation" do you mean it works ok during the installation process but still does not work when compiling models?
Yeah unfortunately there have been a lot of difficulties with the latest RStan release. |
@jgabry: you're correct; the current Makevars allow successful installation, but fail on compilation. I believe @bgoodri meant to add
|
Can you try with my inline fork?
remotes::install_github("bgoodri/inline")
which should at least produce more output when you do
example(stan_model, package = "rstan", run.dontrun = TRUE)
|
Thanks for suggestion @bgoodri. Here is stdout from SessioninfoR version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.3 (Maipo)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rstan_2.21.2 ggplot2_3.3.2 StanHeaders_2.21.0-5
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 magrittr_1.5 munsell_0.5.0 colorspace_1.4-1
[5] R6_2.4.1 rlang_0.4.7 fansi_0.4.1 tools_4.0.2
[9] parallel_4.0.2 pkgbuild_1.1.0 grid_4.0.2 gtable_0.3.0
[13] loo_2.3.1 cli_2.0.2 withr_2.2.0 matrixStats_0.56.0
[17] ellipsis_0.3.1 RcppParallel_5.0.2 assertthat_0.2.1 tibble_3.0.3
[21] lifecycle_0.2.0 crayon_1.3.4 processx_3.4.3 gridExtra_2.3
[25] callr_3.4.3 codetools_0.2-16 vctrs_0.3.2 ps_1.3.4
[29] curl_4.3 inline_0.3.16 glue_1.4.1 V8_3.2.0
[33] compiler_4.0.2 pillar_1.4.6 prettyunits_1.1.1 scales_1.1.1
[37] stats4_4.0.2 jsonlite_1.7.0 pkgconfig_2.0.3 |
This error
/opt/R/4.0.2/lib/R/library/StanHeaders/include/stan/math/prim/mat/eigen_plugins.h:22:25:
error: expected type-specifier
using double_return_t =
std::conditional_t<std::is_const<std::remove_reference_t<T>>::value,
is due to the lack of C++14. Maybe you need to have CXX14 = g++ -std=c++1y
or something in ~/.R/Makevars or maybe your compiler is too old.
|
Makevars which allowed successful install as such:
The system compiler is indeed old, hence I use |
Can you add -v to the CXX14FLAGS so it dumps out more verbose information
when you do
example(stan_model, package = "rstan", run.dontrun = TRUE)
|
Whoaaa...it seems to work 🤩 🙏 both for the guidance! Steps taken:
Here is stdout from example(stan_model, package = "rstan", run.dontrun = TRUE) - rstan-example-v.txt One persistent concern I have is this warning message as model starts to compile - I'll raise another ticket for this. |
Don't worry about that 403 error. It tries to download the parser for the
next version of rstan to check that the Stan program will still work. That
might fail if your server restricts your internet access, but the MCMC is
not affected.
…On Sat, Aug 15, 2020 at 8:31 PM leungi ***@***.***> wrote:
Closed #829 <#829>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#829 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ2XKR372NEZYAYGHCXJYTSA4SF3ANCNFSM4QAC36RQ>
.
|
@bgoodri I didn't realize it tries to download even if there's no connection. I think the download should really be wrapped in |
It is wrapped in try()
https://github.com/stan-dev/rstan/blob/develop/rstan/rstan/R/stanc.R#L60
which is why it still works but some messages come through because it has
to start a different process.
…On Sun, Aug 16, 2020 at 1:00 PM Jonah Gabry ***@***.***> wrote:
@bgoodri <https://github.com/bgoodri> I didn't realize it tries to
download even if there's no connection. I think the download should really
be wrapped in try() or something like that because a user shouldn't have
to see error messages just because they're not connected to the internet.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#829 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ2XKQUUSTRDZU5M3EIBALSBAGDVANCNFSM4QAC36RQ>
.
|
Ah ok, but there has to be a better option than just letting the user see irrelevant error messages. If we can't suppress those error messages then I guess Or maybe wrapping more lines in Line 138 in a9a44bb
|
@jgabry: will this work; if so, I can do a PR. > ctx <- V8::v8()
# original
> ctx$source("https://github.com/stan-dev/stanc3/releases/download/nightly/stanc.js")
Error in open.connection(con, open = mode) : HTTP error 403.
# edit
> tryCatch({
ctx$source("https://github.com/stan-dev/stanc3/releases/download/nightly/stanc.js")
},
error = function(e) {
cat("")
}
)
> |
Not sure off the top of my head if that will work, but yeah it looks like the right idea. |
Hey guys! Getting something similar, but instead of Rstan, I'm using building the stan math library standalone. I'm trying to add the following flag to one of the make files, to see if this will compile my stan program: This is a centOS server. What I'm doing is looking for the string to detect $OS within a makefile, by using How do I check the value of this string? I've also just added Any suggestions? |
Summary:
rstan
installed and able to load, but error on compile.Description:
rstan
via CLI -scl enable devtoolset-7 "/opt/R/4.0.2/bin/Rscript -e 'install.packages(\"rstan\", repos=\"https://cloud.r-project.org\")'"
Reproducible Steps:
Current Output:
Refer to Reproducible Steps section.
Expected Output:
fit
model from Eight Schools exampleRStan Version:
R Version:
Operating System:
Red Hat Enterprise Linux Server 7.3 (Maipo)
The text was updated successfully, but these errors were encountered: