metrumresearchgroup / Torsten

library of C++ functions that support applications of Stan in Pharmacometrics
BSD 3-Clause "New" or "Revised" License
52 stars 11 forks source link

troubleshoting installation #8

Closed csetraynor closed 5 years ago

csetraynor commented 5 years ago

This is potentially related to #3 but I can not find a solution after trying the source install.R recommended and the alternative install_torsten from the submodule torstenHeaders.

I have tried to install the R interface of Torsten install_error.txt but I can not troubleshot the follwoing error (atttached). I have made sure that my .R/Makevars look like this: CXX14 = g++ -fPIC

CXXFLAGS=-O3 -std=c++1y -mtune=native -march=native -Wno-unused-variable -Wno-unused-function CXXFLAGS += -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=30

CXX14FLAGS=-O3 -std=c++1y -mtune=native -march=native -Wno-unused-variable -Wno-unused-function CXX14FLAGS += -DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -DBOOST_MPL_LIMIT_LIST_SIZE=30

My session info is: R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /opt/scp/software/mro/3.5.1-foss-2017a/lib64/R/lib/libRblas.so LAPACK: /opt/scp/software/mro/3.5.1-foss-2017a/lib64/R/lib/libRlapack.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.19.1 StanHeaders_2.18.1 RevoUtils_11.0.1
[4] RevoUtilsMath_11.0.0

loaded via a namespace (and not attached): [1] Rcpp_1.0.1.3 pillar_1.3.1.9000 compiler_3.5.1
[4] plyr_1.8.4 torstenHeaders_0.1.1 tools_3.5.1
[7] digest_0.6.15 pkgbuild_1.0.0 memoise_1.1.0
[10] tibble_2.1.1.9000 gtable_0.2.0 debugme_1.1.0
[13] pkgconfig_2.0.2 rlang_0.3.99.9003 rstudioapi_0.7
[16] curl_3.2 yaml_2.2.0 parallel_3.5.1
[19] loo_2.1.0.9000 gridExtra_2.3 xml2_1.2.0
[22] httr_1.3.1 withr_2.1.2 dplyr_0.8.1.9000
[25] devtools_1.13.6 stats4_3.5.1 grid_3.5.1
[28] tidyselect_0.2.5.9000 inline_0.3.15 glue_1.3.1.9000
[31] R6_2.4.0 processx_3.1.0 ggplot2_3.0.0
[34] callr_2.0.4 purrr_0.2.5 magrittr_1.5
[37] scales_0.5.0 matrixStats_0.54.0 rvest_0.3.2
[40] assertthat_0.2.1.9000 colorspace_1.3-2 lazyeval_0.2.1
[43] munsell_0.5.0 crayon_1.3.4

yizhang-yiz commented 5 years ago

Your rstan is v2.19.1. Did you installed it from rstan repo? Because CRAN is still pointing to 2.18.2.

Can you remove rstan & StanHeaders then give another try?

csetraynor commented 5 years ago

Hi and thanks for the quick answer. The thing is that I had the other version as there are currently some issues with installation of rstan in CentOS Linux 7. See this thread in stan discourse: https://discourse.mc-stan.org/t/make-lang-ast-def-o-error-1/6405 However, I have installed now stan 2.18.2 as explained in that thread but the error persists. install_error2.txt R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /opt/scp/software/mro/3.5.1-foss-2017a/lib64/R/lib/libRblas.so LAPACK: /opt/scp/software/mro/3.5.1-foss-2017a/lib64/R/lib/libRlapack.so

locale: [1] LC_CTYPE=en_US.UTF-8
[2] LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8
[8] LC_NAME=C
[9] LC_ADDRESS=C
[10] LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 [12] LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets [6] methods base

other attached packages: [1] torstenHeaders_0.1.1 devtools_1.13.6
[3] rstan_2.18.2 StanHeaders_2.18.1-10 [5] ggplot2_3.0.0 RevoUtils_11.0.1
[7] RevoUtilsMath_11.0.0

loaded via a namespace (and not attached): [1] Rcpp_1.0.1.3 git2r_0.23.0
[3] pillar_1.4.1.9000 compiler_3.5.1
[5] plyr_1.8.4 tools_3.5.1
[7] digest_0.6.15 zeallot_0.1.0
[9] pkgbuild_1.0.0 memoise_1.1.0
[11] tibble_2.1.3.9000 gtable_0.2.0
[13] debugme_1.1.0 pkgconfig_2.0.2
[15] rlang_0.3.99.9003 rstudioapi_0.7
[17] commonmark_1.2 curl_3.2
[19] parallel_3.5.1 yaml_2.2.0
[21] loo_2.1.0.9000 gridExtra_2.3
[23] httr_1.3.1 xml2_1.2.0
[25] stringr_1.3.1 roxygen2_6.1.0
[27] withr_2.1.2 dplyr_0.8.1.9000
[29] vctrs_0.1.0.9004 stats4_3.5.1
[31] grid_3.5.1 tidyselect_0.2.5.9000 [33] glue_1.3.1.9000 inline_0.3.15
[35] R6_2.4.0 processx_3.1.0
[37] pacman_0.4.6 purrr_0.2.5
[39] callr_2.0.4 magrittr_1.5
[41] matrixStats_0.54.0 backports_1.1.2
[43] scales_0.5.0 rvest_0.3.2
[45] assertthat_0.2.1.9000 colorspace_1.3-2
[47] stringi_1.2.4 lazyeval_0.2.1
[49] munsell_0.5.0 crayon_1.3.4

yizhang-yiz commented 5 years ago

Let's sort things out one a time, as now I'm confused which library you're having problem to setup, rstan from CRAN or Torsten. Are you able to install rstan from CRAN through install.packages?

csetraynor commented 5 years ago

Hi, yes I am able to install rstan from CRAN by using: install.packages("rstan", repos = "https://cloud.r-project.org/", dependencies = TRUE)

yizhang-yiz commented 5 years ago

Great. The error msg points to BH package. Which version do you have?

csetraynor commented 5 years ago

The version of BH is BH_1.69.0-1

yizhang-yiz commented 5 years ago

Does install_error2.txt contain everything installation emits? I don't see error msg there.

csetraynor commented 5 years ago

Hi and thanks a lot for looking into this. I have checked and the StanHeaders have been overwriten with the torstenHeaders so I thought to install rstan for Linux CentOS 7 as described in the rstan documentation, (instead of sourcing again install.R) https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Linux But the error is seemingly poting to BH indeed. I tried reinstalling BH but the same error persist here it is the error. install_error3.txt

yizhang-yiz commented 5 years ago

Either your BH or rstan is corrupted. Try remove BH, rstan, StanHeaders and use install.R script. I understand this is a bit pain, and we are working on Torsten's R package.

csetraynor commented 5 years ago

Yes, I will try to do that. For the moment if that is not working I will give a go to use the wrapper to cmdstan the R wrapper for cmdstan. https://discourse.mc-stan.org/t/r-wrapper-for-cmdstan/6790