nolanlab / citrus

Citrus Development Code
GNU General Public License v3.0
31 stars 20 forks source link

Segfault error, "address 0x0, cause 'unknown'' #68

Closed mleipold closed 9 years ago

mleipold commented 9 years ago

I just tried installing Citrus today. I was able to get the UI up and running. I'm running R3.1.1, with Citrus0.8, I believe.

As a test, I have 9 files: 3 of each type of group. I just used the default settings, clustering on all 33 of my parameters.

However, when I hit run, I get an error message:

Launching citrus interface with target directory: /Users/himcuser/Desktop/Citrus testing

Scanning parameters in FCS files Reading parameters in G7-541278-OMRF.fcs Reading parameters in G7-541551-OMRF.fcs Reading parameters in G7-590088-OMRF.fcs Reading parameters in G8-500004-OMRF.fcs Reading parameters in G8-541290-OMRF.fcs Reading parameters in G8-541833-OMRF.fcs Reading parameters in G9-541305-OMRF.fcs Reading parameters in G9-541308-OMRF.fcs Reading parameters in G9-590117-OMRF.fcs

Number of parameters per file: G7-541278-OMRF.fcs: 33 G7-541551-OMRF.fcs: 33 G7-590088-OMRF.fcs: 33 G8-500004-OMRF.fcs: 33 G8-541290-OMRF.fcs: 33 G8-541833-OMRF.fcs: 33 G9-541305-OMRF.fcs: 33 G9-541308-OMRF.fcs: 33 G9-590117-OMRF.fcs: 33

Listening on http://127.0.0.1:5867 simpleWarning: GUI Setup Complete

Running Citrus File: /Users/himcuser/Desktop/Citrus testing/citrusOutput/runCitrus.R Logging output to: /Users/himcuser/Desktop/Citrus testing/citrusOutput/citrusOutput.log Reading Condition defaultCondition Reading file G7-541551-OMRF.fcs Sampling 1000 events. Reading file G8-541833-OMRF.fcs Sampling 1000 events. Reading file G9-541305-OMRF.fcs Sampling 1000 events. Reading file G7-541278-OMRF.fcs Sampling 1000 events. Reading file G8-541290-OMRF.fcs Sampling 1000 events. Reading file G9-541308-OMRF.fcs Sampling 1000 events. Reading file G7-590088-OMRF.fcs Sampling 1000 events. Reading file G8-500004-OMRF.fcs Sampling 1000 events. Reading file G9-590117-OMRF.fcs Sampling 1000 events. Clustering 9000 events

* caught segfault * address 0x0, cause 'unknown'

Traceback: 1: .Call("hclust_from_data", data = x, link = as.integer(method), dist = as.integer(distance), p = as.numeric(p), DUP = FALSE, NAOK = FALSE, PACKAGE = "Rclusterpp") 2: Rclusterpp.hclust(data) 3: citrus.cluster.hierarchical(data =

[then a HUGE list of numbers....several screens' worth]

4: do.call(paste0("citrus.cluster.", clusteringType), args = list(data = citrus.combinedFCSSet$data[, clusteringColumns])) 5: citrus.cluster(citrus.combinedFCSSet, clusteringColumns, ...) 6: citrus.clusterAndMapFolds(citrus.combinedFCSSet, clusteringColumns, labels = labels, nFolds = nFolds) 7: citrus.full(fileList = fileList, labels = labels, clusteringColumns = clusteringColumns, dataDirectory = dataDirectory, outputDirectory = outputDirectory, family = family, modelTypes = modelTypes, nFolds = nFolds, fileSampleSize = fileSampleSize, featureType = featureType, minimumClusterSizePercent = minimumClusterSizePercent, transformColumns = transformColumns, transformCofactor = transformCofactor, scaleColumns = scaleColumns, medianColumns = medianColumns) 8: eval(expr, envir, enclos) 9: eval(ei, envir) 10: withVisible(eval(ei, envir)) 11: source(runFile) 12: citrus.launchUI()

Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection:


If I'm understanding this correctly, it's reading my files properly, sampling, and then something happens when it tries to cluster?

Note: I have a copy of the entire error message, including all the numbers, if you want to see it all.

Mike

rbruggner commented 9 years ago

Can you try two things?

1) Can you re-run exactly as before and confirm that it crashes again? 2) On the last tab of the GUI, can you check the "Set Multicore Usage" option, set the value to one, and re-run?

Also, what OS and version are you using?

mleipold commented 9 years ago

It gave me that error both times I've tried it: the first time when I changed some of the default parameters (events per file, etc). So, the second time, I didn't change any of the default parameters, and it still gave me that error message.

As requested, I re-ran a third time, making sure to do Part 2 of your request. It failed again. I have a labmate who also recently installed it (last couple days, I think), and he's getting the same error message.

I'm using Mac Mavericks 10.9.4. I have Xcode 5.1.1

Just in case it tells you something: when I do the library(citrus) command in R, this is what I get:

library("citrus") Loading required package: Rclusterpp Loading required package: Rcpp Loading required package: RcppEigen Loading required package: pamr Loading required package: cluster Loading required package: survival Loading required package: splines Loading required package: glmnet Loading required package: Matrix Loaded glmnet 1.9-8

Loading required package: samr Loading required package: impute Loading required package: matrixStats matrixStats v0.10.0 (2014-06-07) successfully loaded. See ?matrixStats for help. Loading required package: ggplot2 Loading required package: flowCore Loading required package: igraph

Attaching package: ‘igraph’

The following object is masked from ‘package:flowCore’:

parent

Loading required package: parallel

Loading required package: reshape2

rbruggner commented 9 years ago

I have been able to replicate this problem. There is some problem compiling the Rclusterpp package using the current XCode compilers (clang).

As a workaround, you should be able to re-compile Rclusterpp, citrus, and supporting packages using g++4.8, as described on the wiki.

Let me know if that works.

mleipold commented 9 years ago

OK. I'd had problems trying to do the g++48 installation, even though MacPorts installer said everything had been completed successfully. This time, I made sure that R and Citrus and basically everything except a web browser and ther Terminal were closed.

It seems like it went ok, until this part: Start R and recompile the Rclusterpp and its dependancies using the newly installed compiler:

When I did the second part, I got this error message:


install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source") trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/Rcpp_0.11.2.tar.gz' Content type 'application/x-gzip' length 2004313 bytes (1.9 Mb)

opened URL

downloaded 1.9 Mb

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/RcppEigen_0.3.2.1.2.tar.gz' Content type 'application/x-gzip' length 1254206 bytes (1.2 Mb)

opened URL

downloaded 1.2 Mb

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/Rclusterpp_0.2.3.tar.gz' Content type 'application/x-gzip' length 318190 bytes (310 Kb)

opened URL

downloaded 310 Kb

The downloaded source packages are in ‘/private/var/folders/df/hh_m9h_s3gdbj3t6tjwr5cdw0000gq/T/RtmpUTXUG3/downloaded_packages’ Warning messages: 1: In install.packages(c("Rcpp", "RcppEigen", "Rclusterpp"), type = "source") : installation of package ‘Rcpp’ had non-zero exit status 2: In install.packages(c("Rcpp", "RcppEigen", "Rclusterpp"), type = "source") : installation of package ‘RcppEigen’ had non-zero exit status 3: In install.packages(c("Rcpp", "RcppEigen", "Rclusterpp"), type = "source") : installation of package ‘Rclusterpp’ had non-zero exit status g++-mp-4.8 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppEigen/include" -I../inst/include -fopenmp -fPIC -Wall -mtune=core2 -g -O2 -c hclust.cpp -o hclust.o \ libs /bin/sh: g++-mp-4.8: command not found make: *\ [hclust.o] Error 127 ERROR: compilation failed for package ‘Rclusterpp’

* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rclusterpp’

I have not proceeded any further, as it does not appear to me that Rclusterpp got recompiled properly.

Please advise.

Mike

rbruggner commented 9 years ago

Hm. Sounds like g++48 is either not installed correctly or the path is not configured correctly.

What happens when you start a terminal and run:

g++-mp-4.8 -v

?

On Aug 15, 2014, at 8:08 AM, mleipold notifications@github.com wrote:

OK. I'd had problems trying to do the g++48 installation, even though MacPorts installer said everything had been completed successfully. This time, I made sure that R and Citrus and basically everything except a web browser and ther Terminal were closed.

It seems like it went ok, until this part: Start R and recompile the Rclusterpp and its dependancies using the newly installed compiler:

When I did the second part, I got this error message:

install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source") trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/Rcpp_0.11.2.tar.gz' Content type 'application/x-gzip' length 2004313 bytes (1.9 Mb)

opened URL

downloaded 1.9 Mb

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/RcppEigen_0.3.2.1.2.tar.gz' Content type 'application/x-gzip' length 1254206 bytes (1.2 Mb)

opened URL

downloaded 1.2 Mb

trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/Rclusterpp_0.2.3.tar.gz' Content type 'application/x-gzip' length 318190 bytes (310 Kb)

opened URL

downloaded 310 Kb

• installing source package ‘Rcpp’ ... * package ‘Rcpp’ successfully unpacked and MD5 sums checked * libs g++-mp-4.8 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c Date.cpp -o Date.o make: g++-mp-4.8: No such file or directory make: * [Date.o] Error 1 ERROR: compilation failed for package ‘Rcpp’ • removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp’ • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp’ • installing source package ‘RcppEigen’ ... * package ‘RcppEigen’ successfully unpacked and MD5 sums checked * libs g++-mp-4.8 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I../inst/include -fPIC -Wall -mtune=core2 -g -O2 -c RcppEigen.cpp -o RcppEigen.o /bin/sh: g++-mp-4.8: command not found make: * [RcppEigen.o] Error 127 ERROR: compilation failed for package ‘RcppEigen’ • removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppEigen’ • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppEigen’ • installing source package ‘Rclusterpp’ ... * package ‘Rclusterpp’ successfully unpacked and MD5 sums checked The downloaded source packages are in ‘/private/var/folders/df/hh_m9h_s3gdbj3t6tjwr5cdw0000gq/T/RtmpUTXUG3/downloaded_packages’ Warning messages: 1: In install.packages(c("Rcpp", "RcppEigen", "Rclusterpp"), type = "source") : installation of package ‘Rcpp’ had non-zero exit status 2: In install.packages(c("Rcpp", "RcppEigen", "Rclusterpp"), type = "source") : installation of package ‘RcppEigen’ had non-zero exit status 3: In install.packages(c("Rcpp", "RcppEigen", "Rclusterpp"), type = "source") : installation of package ‘Rclusterpp’ had non-zero exit status g++-mp-4.8 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RcppEigen/include" -I../inst/include -fopenmp -fPIC -Wall -mtune=core2 -g -O2 -c hclust.cpp -o hclust.o * libs /bin/sh: g++-mp-4.8: command not found make: *\ [hclust.o] Error 127 ERROR: compilation failed for package ‘Rclusterpp’

• removing ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rclusterpp’

  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rclusterpp’

I have not proceeded any further, as it does not appear to me that Rclusterpp got recompiled properly.

Please advise.

Mike

— Reply to this email directly or view it on GitHub.

mleipold commented 9 years ago

I did that in the appropriate place in the procedure, and got this:

holden-mac-pro:~ himcuser$ g++-mp-4.8 -v Using built-in specs. COLLECT_GCC=g++-mp-4.8 COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin13/4.8.3/lto-wrapper Target: x86_64-apple-darwin13 Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_gcc48/gcc48/work/gcc-4.8.3/configure --prefix=/opt/local --build=x86_64-apple-darwin13 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.8 --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc48 4.8.3_0' Thread model: posix gcc version 4.8.3 (MacPorts gcc48 4.8.3_0)

mleipold commented 9 years ago

I even just now went back and how I did checked the Makevars modification. I found spaces at the beginning of each line (from the cut and paste I did, I think). I removed those, and redid the next steps.

I still got the same error when I did the install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source")

rbruggner commented 9 years ago

It looks as though the Makevars is set correctly - R is trying to use g++-4.8 correctly but for some reason, R can’t seem to find the compiler path.

One final thing to try is to put the full path to g++ in the Makevars file. Specifically, make the contents of the Makevars file:

CC=/opt/local/bin/gcc-mp-4.8 CXX=/opt/local/bing++-mp-4.8 -arch x86_64 CXXFLAGS=-O3 -pipe

If that doesn’t work, probably will need to come take a look.

On Aug 15, 2014, at 9:33 AM, mleipold notifications@github.com wrote:

I even just now went back and how I did checked the Makevars modification. I found spaces at the beginning of each line (from the cut and paste I did, I think). I removed those, and redid the next steps.

I still got the same error when I did the install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source")

— Reply to this email directly or view it on GitHub.

mleipold commented 9 years ago

I replaced the Makevars text with your new 3 lines of text, saved it (ctrl-o, enter, ctrl-x), re-opened R, did the install.packages("Matrix") step.

And then still got the same error at the step. install.packages(c("Rcpp","RcppEigen","Rclusterpp"),type="source")

rbruggner commented 9 years ago

Whoops - I had a type-o above. My fault. Should be:

CC=/opt/local/bin/gcc-mp-4.8 CXX=/opt/local/bin/g++-mp-4.8 -arch x86_64 CXXFLAGS=-O3 -pipe

If that doesn't work, lets try and set up a time next week for me to stop by and take a look?

mleipold commented 9 years ago

OK, that seems to have worked. I made that change to the Makevars, and the rest of the steps seemed to go fine.

I reopened Citrus and tested my files again, using the default settings, and the Set Multicore Usage to 1 core as you instructed yesterday.

I hit run, and got further than before. However, there was still a (different) error that happened:

R version 3.1.1 (2014-07-10) -- "Sock it to Me" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

[R.app GUI 1.65 (6784) x86_64-apple-darwin13.1.0]

[History restored from /Users/himcuser/.Rapp.history]

library("citrus") Loading required package: Rclusterpp Loading required package: Rcpp Loading required package: RcppEigen Loading required package: pamr Loading required package: cluster Loading required package: survival Loading required package: splines Loading required package: glmnet Loading required package: Matrix Loaded glmnet 1.9-8

Loading required package: samr Loading required package: impute Loading required package: matrixStats matrixStats v0.10.0 (2014-06-07) successfully loaded. See ?matrixStats for help. Loading required package: ggplot2 Loading required package: flowCore Loading required package: igraph

Attaching package: ‘igraph’

The following object is masked from ‘package:flowCore’:

parent

Loading required package: parallel Loading required package: reshape2

citrus.launchUI() Launching citrus interface with target directory: /Users/himcuser/Desktop/Citrus testing

Scanning parameters in FCS files Reading parameters in G7-541278-OMRF.fcs Reading parameters in G7-541551-OMRF.fcs Reading parameters in G7-590088-OMRF.fcs Reading parameters in G8-500004-OMRF.fcs Reading parameters in G8-541290-OMRF.fcs Reading parameters in G8-541833-OMRF.fcs Reading parameters in G9-541305-OMRF.fcs Reading parameters in G9-541308-OMRF.fcs Reading parameters in G9-590117-OMRF.fcs

Number of parameters per file: G7-541278-OMRF.fcs: 33 G7-541551-OMRF.fcs: 33 G7-590088-OMRF.fcs: 33 G8-500004-OMRF.fcs: 33 G8-541290-OMRF.fcs: 33 G8-541833-OMRF.fcs: 33 G9-541305-OMRF.fcs: 33 G9-541308-OMRF.fcs: 33 G9-590117-OMRF.fcs: 33

Listening on http://127.0.0.1:7379 simpleWarning: GUI Setup Complete

Running Citrus File: /Users/himcuser/Desktop/Citrus testing/citrusOutput/runCitrus.R Logging output to: /Users/himcuser/Desktop/Citrus testing/citrusOutput/citrusOutput.log Reading Condition defaultCondition Reading file G7-541551-OMRF.fcs Sampling 1000 events. Reading file G8-541833-OMRF.fcs Sampling 1000 events. Reading file G9-541305-OMRF.fcs Sampling 1000 events. Reading file G7-541278-OMRF.fcs Sampling 1000 events. Reading file G8-541290-OMRF.fcs Sampling 1000 events. Reading file G9-541308-OMRF.fcs Sampling 1000 events. Reading file G7-590088-OMRF.fcs Sampling 1000 events. Reading file G8-500004-OMRF.fcs Sampling 1000 events. Reading file G9-590117-OMRF.fcs Sampling 1000 events. Clustering 9000 events Analyzing condition(s): defaultCondition Building Fold Features Analyzing vs. endpoint 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100123Fold 1 :123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 Fold 2 :123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 Fold 3 :123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100

perm= 1 1 [Mike cut, for length) perm= 1000 1 id Case-score Ctrl-score SLE-score [1,] cluster 8995 abundance 0 0.0476 0
id Case-score Ctrl-score SLE-score [1,] cluster 8995 abundance 0 0.0068 0
perm= 1 perm= 2 perm= 3 [Mike cut, for length] perm= 10000

Computing delta table 1 [Mike cut, for length] 50 Error in dimnames(res.up) = temp.names : length of 'dimnames' [2] not equal to array extent


rbruggner commented 9 years ago

Ok - great. I think we've solved this problem. I will update the installation instructions accordingly.

In future runs, do not limit the multi-core usage (i.e don't check the box on the run page) and you'll get a nice speed-increase.

With respect to your second issue, please check for consistency among fcs parameters according to the instructions here. If all parameter names and counts are consistent, lets open a new issue.

mleipold commented 9 years ago

One last comment, in case someone else experiences this problem and finds this thread: I had been having issues getting things to work with the

shell> sudo port install gcc48

command, even after installing MacPorts with the package installer. It's supposed to automatically run the updater:

The MacPorts “selfupdate” command will also be run for you by the installer to ensure you have our latest available release and the latest revisions to the “Portfiles” that contain the instructions employed in the building and installation of ports. After installation is done, it is recommended that you run this step manually on a regular basis to to keep your MacPorts system always current:

sudo port -v selfupdate "

It was only after I installed the MacPorts package and then did the "sudo port -v selfupdate" in shell/Terminal that I could get the gcc48 to complete.