Seurat: address 0xfffffffffffffff7, cause 'memory not mapped'

Created on 27 Oct 2019  路  12Comments  路  Source: satijalab/seurat

when I run again the function "RunUMAP" and there is an error:
* caught segfault *
address 0xfffffffffffffff7, cause 'memory not mapped'

Traceback:
1: RcppParallel::setThreadOptions(numThreads = n_threads)
2: uwot(X = X, n_neighbors = n_neighbors, n_components = n_components, metric = metric, n_epochs = n_epochs, alpha = learning_rate, scale = scale, init = init, init_sdev = init_sdev, spread = spread, min_dist = min_dist, set_op_mix_ratio = set_op_mix_ratio, local_connectivity = local_connectivity, bandwidth = bandwidth, gamma = repulsion_strength, negative_sample_rate = negative_sample_rate, a = a, b = b, nn_method = nn_method, n_trees = n_trees, search_k = search_k, method = "umap", approx_pow = approx_pow, n_threads = n_threads, n_sgd_threads = n_sgd_threads, grain_size = grain_size, y = y, target_n_neighbors = target_n_neighbors, target_weight = target_weight, target_metric = target_metric, pca = pca, pca_center = pca_center, pcg_rand = pcg_rand, fast_sgd = fast_sgd, ret_model = ret_model, ret_nn = ret_nn, tmpdir = tempdir(), verbose = verbose)
3: umap(X = object, n_threads = nbrOfWorkers(), n_neighbors = as.integer(x = n.neighbors), n_components = as.integer(x = n.components), metric = metric, n_epochs = n.epochs, learning_rate = learning.rate, min_dist = min.dist, spread = spread, set_op_mix_ratio = set.op.mix.ratio, local_connectivity = local.connectivity, repulsion_strength = repulsion.strength, negative_sample_rate = negative.sample.rate, a = a, b = b, verbose = verbose)
4: RunUMAP.default(object = data.use, assay = assay, umap.method = umap.method, n.neighbors = n.neighbors, n.components = n.components, metric = metric, n.epochs = n.epochs, learning.rate = learning.rate, min.dist = min.dist, spread = spread, set.op.mix.ratio = set.op.mix.ratio, local.connectivity = local.connectivity, repulsion.strength = repulsion.strength, negative.sample.rate = negative.sample.rate, a = a, b = b, seed.use = seed.use, metric.kwds = metric.kwds, angular.rp.forest = angular.rp.forest, reduction.key = reduction.key, verbose = verbose)
5: RunUMAP(object = data.use, assay = assay, umap.method = umap.method, n.neighbors = n.neighbors, n.components = n.components, metric = metric, n.epochs = n.epochs, learning.rate = learning.rate, min.dist = min.dist, spread = spread, set.op.mix.ratio = set.op.mix.ratio, local.connectivity = local.connectivity, repulsion.strength = repulsion.strength, negative.sample.rate = negative.sample.rate, a = a, b = b, seed.use = seed.use, metric.kwds = metric.kwds, angular.rp.forest = angular.rp.forest, reduction.key = reduction.key, verbose = verbose)
6: RunUMAP.Seurat(P115.combined, reduction = "pca", dims = 1:i, assay = "RNA")
7: RunUMAP(P115.combined, reduction = "pca", dims = 1:i, assay = "RNA")

however, the first time I run the function was fine. my platform is linux and the version of Seurat is 3.10.0.

so, I want to know how to solve this question and why?

more-information-needed

Most helpful comment

If anyone is still having the issue, the new version of uwot is unlikely to fix it. @MLKaufman's suggestion seems to be the key. However, the reporter of the issue at the uwot repo resolved it by re-installing RcppParallel from CRAN, so the solution doesn't seem to be as simple as just using the conda version of RcppParallel.

The best advice I currently have is that if you installed R using conda, then you should ensure that you have installed RcppParallel via conda too. If you are using a standard CRAN install, don't use the conda version of RcppParallel. If you have experienced the crash and you haven't used conda at all, that would be very interesting.

Probably the issue is the same as at https://github.com/benjjneb/dada2/issues/684.

All 12 comments

This seems to be an issue with uwot, not Seurat. I suggest you bring it up with them.

I had this same problem. I was unable to identify the root, but was able to figure out that it was being caused by the RcppParallel (RcppParallel_4.4.4) installed directly from CRAN. I tried to uninstall and reinstall RcppParallel and all of its components, but still did not work.

Only got past this issue when I installed the same version number using conda and the conda-forge channel, the problem goes away.

conda install r-rcppparallel -c conda-forge

Fixed the crashing of R.

Oh, thank you to fix this problem! I 'll try it.

Thank you @MLKaufman this worked for me!

A new version of uwot (0.1.5) has been accepted by CRAN, which I hope fixes the underlying cause of the crash.

If you are still having issues with this, please retry with the new version. If it still doesn't work, I would also appreciate a bug report (e.g. at https://github.com/jlmelville/uwot/issues/39).

@yiyelinfeng Could you update uwot and see if that fixes RunUMAP in Seurat as @jlmelville suggests?

FWIW this was a big thorn in my side. @MLKaufman's tip to move to RcppParallel 4.4.4 along with @jlmelville's recommendation to update uwot to 0.1.5 worked.

I should specify that i had to specifically run remove.packages('RcppParallel') in R before my conda install of R could see v4.4.4 installed via conda install.

If anyone is still having the issue, the new version of uwot is unlikely to fix it. @MLKaufman's suggestion seems to be the key. However, the reporter of the issue at the uwot repo resolved it by re-installing RcppParallel from CRAN, so the solution doesn't seem to be as simple as just using the conda version of RcppParallel.

The best advice I currently have is that if you installed R using conda, then you should ensure that you have installed RcppParallel via conda too. If you are using a standard CRAN install, don't use the conda version of RcppParallel. If you have experienced the crash and you haven't used conda at all, that would be very interesting.

Probably the issue is the same as at https://github.com/benjjneb/dada2/issues/684.

Thank you James for looking into this.

A new version of uwot (0.1.5) has been accepted by CRAN, which I hope fixes the underlying cause of the crash.

If you are still having issues with this, please retry with the new version. If it still doesn't work, I would also appreciate a bug report (e.g. at jlmelville/uwot#39).

v0.1.5 still have this issues

@ZhonghL, the problem is very likely with how you have installed RcppParallel. If you installed R via conda you must install the conda version of the RcppParallel package, not the CRAN version.

As of version 0.1.8, uwot no longer has an RcppParallel dependency, so the reported issues should no longer arise.

Was this page helpful?
0 / 5 - 0 ratings