asifzubair / deconR

R package for Bayesian deconvolution of bulk RNAseq data
0 stars 0 forks source link

package fails to install on the cluster #6

Closed asifzubair closed 4 years ago

asifzubair commented 4 years ago

When doing

> devtools::install_github("asifzubair/deconR")

I'm getting the following error:

...
g++ -std=c++1y -shared -L/hpcf/authorized_apps/rhel7_apps/R/install/3.6.1/lib64/R/lib -L/usr/local/lib64 -o deconR.so RcppExports.o stanExports_errorModel.o stanExports_errorModel2cellTypes.o stanExports_errorModel2cellTypesHeirar.o stanExports_indSigmat.o stanExports_indSigmatHyperprior.o stanExports_indSigmatHyperpriorInequal.o -L/hpcf/authorized_apps/rhel7_apps/R/install/3.6.1/lib64/R/lib -lR
installing to /research/rgs01/home/clusterHome/azubair/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-deconR/00new/deconR/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
DIAGNOSTIC(S) FROM PARSER:
Info:
Left-hand side of sampling statement (~) may contain a non-linear transform of a parameter or local variable.
If it does, you need to include a target += statement with the log absolute determinant of the Jacobian of the transform.
Left-hand-side of sampling statement:
    estimatedProportionsVecSimp ~ dirichlet(...)

** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
sh: line 1: 55529 Segmentation fault      '/hpcf/authorized_apps/rhel7_apps/R/install/3.6.1/lib64/R/bin/R' --no-save --slave 2>&1 < '/scratch_space/azubair/RtmpQksQuF/filec4027bf86bc1'

 *** caught segfault ***
address 0x20, cause 'memory not mapped'

Traceback:
 1: Module(module, mustStart = TRUE, where = env)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: tryCatch(Module(module, mustStart = TRUE, where = env), error = function(e) e)
 6: Rcpp::loadModule(module = "stan_fit4errorModel_mod", what = TRUE,     env = ns, loadNow = TRUE)
 7: (function (ns) Rcpp::loadModule(module = "stan_fit4errorModel_mod", what = TRUE,     env = ns, loadNow = TRUE))(<environment>)
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, classes, parentenv, handlers)
11: tryCatch((function (ns) Rcpp::loadModule(module = "stan_fit4errorModel_mod", what = TRUE,     env = ns, loadNow = TRUE))(<environment>), error = function(e) e)
12: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e),     list(FUN = f, WHERE = where)), where)
13: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e),     list(FUN = f, WHERE = where)), where)
14: .doLoadActions(where, attach)
15: methods::cacheMetaData(ns, TRUE, ns)
16: loadNamespace(package, lib.loc)
17: doTryCatch(return(expr), name, parentenv, handler)
18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
19: tryCatchList(expr, classes, parentenv, handlers)
20: tryCatch({    attr(package, "LibPath") <- which.lib.loc    ns <- loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)}, error = function(e) {    P <- if (!is.null(cc <- conditionCall(e)))         paste(" in", deparse(cc)[1L])    else ""    msg <- gettextf("package or namespace load failed for %s%s:\n %s",         sQuote(package), P, conditionMessage(e))    if (logical.return)         message(paste("Error:", msg), domain = NA)    else stop(msg, call. = FALSE, domain = NA)})
21: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)
22: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
23: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,     character.only = TRUE, logical.return = TRUE))
24: doTryCatch(return(expr), name, parentenv, handler)
25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
26: tryCatchList(expr, classes, parentenv, handlers)
27: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
28: try(suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,     character.only = TRUE, logical.return = TRUE)))
29: tools:::.test_load_package("deconR", "/research/rgs01/home/clusterHome/azubair/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-deconR/00new")
An irrecoverable exception occurred. R is aborting now ...
ERROR: loading failed
* removing ‘/research/rgs01/home/clusterHome/azubair/R/x86_64-pc-linux-gnu-library/3.6/deconR’
Error: Failed to install 'deconR' from GitHub:
  (converted from warning) installation of package ‘/scratch_space/azubair/Rtmp6PHXLT/file6b7969df4adc/deconR_0.0.0.9000.tar.gz’ had non-zero exit status

The annoying thing about this is that the package compiles and loads fine locally. However, it seems there is a problem with:

(function (ns) Rcpp::loadModule(module = "stan_fit4errorModel_mod", what = TRUE,     env = ns, loadNow = TRUE))(<environment>)

which could be because the file errorModel.stan isn't enitrely complete. Perhaps, on the cluster the checks are more stringent.

A few more details, I'm using gcc version 5.4.0. I skipped the advice here. Actually, I'm not even sure if I'm using CentOS. This comment was helpful - https://github.com/stan-dev/rstan/issues/642#issuecomment-493572000 - when figuring out this error:

version 'GLIBCXX_3.4.20' not found

EDIT: I tried removing errorModel.stan to see if that would fix the problem. Nope! it did not. :/

asifzubair commented 4 years ago

session info from the cluster:

R> devtools::session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Red Hat Enterprise Linux    
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       US/Central                  
 date     2019-10-11                  

─ Packages ───────────────────────────────────────────────────────────────────
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [2] CRAN (R 3.6.1)
 backports     1.1.4   2019-04-10 [2] CRAN (R 3.6.1)
 callr         3.3.2   2019-09-22 [1] CRAN (R 3.6.1)
 cli           1.1.0   2019-03-19 [2] CRAN (R 3.6.1)
 crayon        1.3.4   2017-09-16 [2] CRAN (R 3.6.1)
 desc          1.2.0   2018-05-01 [1] CRAN (R 3.6.1)
 devtools      2.2.1   2019-09-24 [1] CRAN (R 3.6.1)
 digest        0.6.20  2019-07-04 [2] CRAN (R 3.6.1)
 ellipsis      0.3.0   2019-09-20 [1] CRAN (R 3.6.1)
 fortunes      1.5-4   2016-12-29 [1] CRAN (R 3.6.1)
 fs            1.3.1   2019-05-06 [1] CRAN (R 3.6.1)
 glue          1.3.1   2019-03-12 [2] CRAN (R 3.6.1)
 magrittr      1.5     2014-11-22 [2] CRAN (R 3.6.1)
 memoise       1.1.0   2017-04-21 [2] CRAN (R 3.6.1)
 pkgbuild      1.0.6   2019-10-09 [1] CRAN (R 3.6.1)
 pkgload       1.0.2   2018-10-29 [1] CRAN (R 3.6.1)
 prettyunits   1.0.2   2015-07-13 [2] CRAN (R 3.6.1)
 processx      3.4.1   2019-07-18 [1] CRAN (R 3.6.1)
 ps            1.3.0   2018-12-21 [1] CRAN (R 3.6.1)
 R6            2.4.0   2019-02-14 [2] CRAN (R 3.6.1)
 Rcpp          1.0.1   2019-03-17 [2] CRAN (R 3.6.1)
 remotes       2.1.0   2019-06-24 [1] CRAN (R 3.6.1)
 rlang         0.4.0   2019-06-25 [2] CRAN (R 3.6.1)
 rprojroot     1.3-2   2018-01-03 [1] CRAN (R 3.6.1)
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.6.1)
 testthat      2.2.1   2019-07-25 [1] CRAN (R 3.6.1)
 usethis       1.5.1   2019-07-04 [1] CRAN (R 3.6.1)
 withr         2.1.2   2018-03-15 [2] CRAN (R 3.6.1)

[1] /research/rgs01/home/clusterHome/azubair/R/x86_64-pc-linux-gnu-library/3.6
[2] /research/rgs01/applications/hpcf/authorized_apps/rhel7_apps/R/install/3.6.1/lib64/R/library

session info from my decktop:

> devtools::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Ubuntu 16.04.6 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language en_US                       
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/Chicago             
 date     2019-10-11                  

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version    date       lib source                              
 assertthat    0.2.1      2019-03-21 [1] CRAN (R 3.6.1)                      
 backports     1.1.4      2019-04-10 [1] CRAN (R 3.6.1)                      
 callr         3.3.2      2019-09-22 [1] CRAN (R 3.6.1)                      
 cli           1.1.0      2019-03-19 [1] CRAN (R 3.6.1)                      
 codetools     0.2-16     2018-12-24 [4] CRAN (R 3.5.2)                      
 colorspace    1.4-1      2019-03-18 [1] CRAN (R 3.6.1)                      
 crayon        1.3.4      2017-09-16 [1] CRAN (R 3.6.1)                      
 deconR      * 0.0.0.9000 2019-10-11 [1] local                               
 desc          1.2.0      2018-05-01 [1] CRAN (R 3.6.1)                      
 devtools      2.2.0      2019-09-07 [1] CRAN (R 3.6.1)                      
 digest        0.6.21     2019-09-20 [1] CRAN (R 3.6.1)                      
 dplyr         0.8.3      2019-07-04 [1] CRAN (R 3.6.1)                      
 DT            0.9        2019-09-17 [1] CRAN (R 3.6.1)                      
 ellipsis      0.3.0      2019-09-20 [1] CRAN (R 3.6.1)                      
 foreach       1.4.7      2019-07-27 [1] CRAN (R 3.6.1)                      
 fs            1.3.1      2019-05-06 [1] CRAN (R 3.6.1)                      
 ggplot2       3.2.1      2019-08-10 [1] CRAN (R 3.6.1)                      
 glue          1.3.1      2019-03-12 [1] CRAN (R 3.6.1)                      
 gridExtra     2.3        2017-09-09 [1] CRAN (R 3.6.1)                      
 gtable        0.3.0      2019-03-25 [1] CRAN (R 3.6.1)                      
 htmltools     0.3.6      2017-04-28 [1] CRAN (R 3.6.1)                      
 htmlwidgets   1.3        2018-09-30 [1] CRAN (R 3.6.1)                      
 inline        0.3.15     2018-05-18 [1] CRAN (R 3.6.1)                      
 iterators     1.0.12     2019-07-26 [1] CRAN (R 3.6.1)                      
 lattice       0.20-38    2018-11-04 [4] CRAN (R 3.5.1)                      
 lazyeval      0.2.2      2019-03-15 [1] CRAN (R 3.6.1)                      
 loo           2.1.0      2019-03-13 [1] CRAN (R 3.6.1)                      
 magrittr      1.5        2014-11-22 [1] CRAN (R 3.6.1)                      
 Matrix        1.2-17     2019-03-22 [4] CRAN (R 3.6.1)                      
 matrixStats   0.55.0     2019-09-07 [1] CRAN (R 3.6.1)                      
 mclust        5.4.5      2019-07-08 [1] CRAN (R 3.6.1)                      
 memoise       1.1.0      2017-04-21 [1] CRAN (R 3.6.1)                      
 munsell       0.5.0      2018-06-12 [1] CRAN (R 3.6.1)                      
 pillar        1.4.2      2019-06-29 [1] CRAN (R 3.6.1)                      
 pkgbuild      1.0.5      2019-08-26 [1] CRAN (R 3.6.1)                      
 pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 3.6.1)                      
 pkgload       1.0.2      2018-10-29 [1] CRAN (R 3.6.1)                      
 prettyunits   1.0.2      2015-07-13 [1] CRAN (R 3.6.1)                      
 processx      3.4.1      2019-07-18 [1] CRAN (R 3.6.1)                      
 ps            1.3.0      2018-12-21 [1] CRAN (R 3.6.1)                      
 purrr         0.3.2      2019-03-15 [1] CRAN (R 3.6.1)                      
 R6            2.4.0      2019-02-14 [1] CRAN (R 3.6.1)                      
 Rcpp          1.0.2      2019-07-25 [1] CRAN (R 3.6.1)                      
 remotes       2.1.0      2019-06-24 [1] CRAN (R 3.6.1)                      
 rlang         0.4.0      2019-06-25 [1] CRAN (R 3.6.1)                      
 rprojroot     1.3-2      2018-01-03 [1] CRAN (R 3.6.1)                      
 rstan         2.19.2     2019-07-09 [1] CRAN (R 3.6.1)                      
 rstantools    2.0.0      2019-09-24 [1] Github (stan-dev/rstantools@d43bf9f)
 rstudioapi    0.10       2019-03-19 [1] CRAN (R 3.6.1)                      
 scales        1.0.0      2018-08-09 [1] CRAN (R 3.6.1)                      
 sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.6.1)                      
 StanHeaders   2.19.0     2019-09-07 [1] CRAN (R 3.6.1)                      
 testthat    * 2.2.1      2019-07-25 [1] CRAN (R 3.6.1)                      
 tibble        2.1.3      2019-06-06 [1] CRAN (R 3.6.1)                      
 tidyselect    0.2.5      2018-10-11 [1] CRAN (R 3.6.1)                      
 usethis       1.5.1      2019-07-04 [1] CRAN (R 3.6.1)                      
 withr         2.1.2      2018-03-15 [1] CRAN (R 3.6.1)                      

[1] /home/azubair/R/x86_64-pc-linux-gnu-library/3.6
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library
asifzubair commented 4 years ago

I upgraded Rcpp and pkgbuild and the segfault went away. Going to test this a bit further before closing the issue.