elbamos / largeVis

An implementation of the largeVis algorithm for visualizing large, high-dimensional datasets, for R
340 stars 62 forks source link

caught segfault, cause 'memory not mapped' #8

Closed zaburo-ch closed 8 years ago

zaburo-ch commented 8 years ago

I installed this package on OSX 10.11.2 using devtools. Then I ran the below command and caught segfault.

> library(largeVis)
> dat <- as.data.frame(matrix(runif(100*100), 100, 100))
> coords <- vis(dat, check = FALSE, n_tree = 50, tree_th = 700, K = 50, alpha = 1, max.iter = 4)
Searching for neighbors.

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

Traceback:
 1: .Call("largeVis_searchTrees", PACKAGE = "largeVis", threshold,     n_trees, K, max_recursion_degree, maxIter, data, verbose)
 2: searchTrees(threshold = tree_threshold, n_trees = n_trees, K = K,     max_recursion_degree = max_depth, maxIter = max_iter, data = x,     verbose = verbose)
 3: randomProjectionTreeSearch(x, n_trees = n_trees, tree_threshold = tree_threshold,     K = K, max_iter = max_iter, max_depth = max_depth, verbose = verbose)
 4: vis(dat, check = FALSE, n_tree = 50, tree_th = 700, K = 50, alpha = 1,     max.iter = 4)

Rcpp used g++ (Homebrew gcc 5.3.0). I also tried using gcc 4.9.2, but same error occurred.

elbamos commented 8 years ago

Try the version in the 'bench' branch on here.

elbamos commented 8 years ago

The other thing to try, is to try installing with openmp disabled. (The error you're seeing relates to multi-threading.) Let me know if you want to try that and need to be talked through it.

zaburo-ch commented 8 years ago

Thanks for replying. I misunderstood that we should pass data as dataframe. It was resolved by using matrix simply.

library(largeVis)
dat <- matrix(runif(100*100), 100, 100)
coords <- vis(dat)
elbamos commented 8 years ago

Huh. Ok I'm going to close this. If its not working, then please reopen.