-
Notifications
You must be signed in to change notification settings - Fork 59
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
How can I request cellbender to limit/use more threads/cores? #160
Comments
Hi @angelasanzo , unfortunately, I don't know of a good way to make this happen. CellBender does not have an input argument to enable this currently. (If anybody else knows how to do this, please post here!) I'm guessing you are running on a CPU? Is that right? |
Note to self: it is possible this is as simple as torch.set_num_threads(n) Test this. |
Potentially useful example by Bo Li and collaborators here |
Thanks a lot for your work! Yes, we are using CPU as CUDA cannot be performed under our graphics card. |
Unfortunately, I tested import psutil
n_jobs = psutil.cpu_count(logical=False) # get physical cores
if n_jobs is None:
n_jobs = psutil.cpu_count(logical=True) # if undetermined, use logical cores instead
torch.set_num_threads(n_jobs) and it doesn't make any difference in terms of runtime. So it's not that simple... Will keep thinking... |
Eh, okay, it's possible that using the number of logical cores is better. But I'm only seeing a speedup of like 4% :( Still, I might include it as an input argument in the future. Default will use the number of logical cores. |
Closed by #238 |
Hey @sjfleming, Maybe off topic but it seems that the
It gives me this output: cellbender:remove-background: Saved summary plots as /home/jovyan/data4/bbalderson_runAI/rat_multiomics/data/cellbender_out//FTL_702_M957/.pdf It seems to stall here, 21 threads are started, but they are using 0% CPU, and it does not write any output beyond the .pdf and the _cell_barcodes.tsv. I am about to try not setting the number of threads to see if it helps. |
Hi there,
I have tried to find a way to limit or increase the number of threads that is using, but have not found a result. Any argument that can be provided?
Thank you very much.
Angela
The text was updated successfully, but these errors were encountered: