Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: C stack usage 7953984 is too close to the limit #491

Open
yintz opened this issue Dec 15, 2022 · 3 comments
Open

Error: C stack usage 7953984 is too close to the limit #491

yintz opened this issue Dec 15, 2022 · 3 comments

Comments

@yintz
Copy link

yintz commented Dec 15, 2022

hi, when I run the inferCNV up to the point, based on the previous discuss, I tried to adjust the ulimit, but it doesn't work at all.
so I want to know if there is any methods yet.

infCNV = infercnv::run(infCNV,
cutoff=0.1,
out_dir="./Outputs",
num_threads = 10,
cluster_by_groups=FALSE,
denoise=TRUE,
HMM=TRUE)

INFO [2022-12-15 07:03:54] -mirroring for hspike
INFO [2022-12-15 07:03:54] define_signif_tumor_subclusters(p_val=0.1
INFO [2022-12-15 07:03:55] define_signif_tumor_subclusters(), tumor: all_observations
INFO [2022-12-15 07:03:55] define_signif_tumor_subclusters(), tumor: simnorm_cell_normalsToUse
INFO [2022-12-15 07:07:41] ::plot_cnv:Start
INFO [2022-12-15 07:07:41] ::plot_cnv:Current data dimensions (r,c)=10478,21023 Total=220520877.289766 Min=0.715669324907483 Max=1.61318599172622.
INFO [2022-12-15 07:08:07] ::plot_cnv:Depending on the size of the matrix this may take a moment.
INFO [2022-12-15 07:08:47] plot_cnv(): auto thresholding at: (0.873603 , 1.128593)
INFO [2022-12-15 07:08:53] plot_cnv_observation:Start
INFO [2022-12-15 07:08:53] Observation data size: Cells= 21023 Genes= 10478

@GeorgescuC
Copy link
Collaborator

Hi @yintz ,

Based on the last log message shown and your settings, the error appears to happen in the plotting when trying to write the dendrogram/hclust to file with ape::write.tree() which uses recursion internally.
If you are unable to change the stack limit on your system to increase max recursion depth, the work around would be to remove the write.tree calls in the code (as there is currently no option to control that) or disable plotting if you are only interested in the text outputs and R object.

Regards,
Christophe.

@Dana11T
Copy link

Dana11T commented May 23, 2023

have you tried “ulimit -s unlimited“,I used this code, but still getting the same error.
At present, I have given the stack a specified value,(ulimit -s 51200), it is running now. I don’t know if the result will be normal. you can have a try

@GeorgescuC
Copy link
Collaborator

A new option has been added recently to both run() and plot_cnv(), write_phylo which defaults to FALSE. The option controls if the dendrogram/hclust is converted to a newick string to write to file during plotting. That conversion is actually the call that uses recursion, so on the latest version, the issue should not happen in this location anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants