almaan / stereoscope

Spatial mapping of cell types by integration of transcriptomics data
MIT License
87 stars 24 forks source link

Number of cores/threads #28

Open kdragicevic opened 3 years ago

kdragicevic commented 3 years ago

Hi,

is there a way to limit stereoscope to a certain number of threads/cores? I am running it on a server where other users need to work too, so I can't use all resources.

Thanks!

almaan commented 3 years ago

Hello @kdragicevic,

happy to hear that you are trying out stereoscope. As of now, the code is not parallelized so there would be no benefit to using several GPU cores, I'm also quite sure that only one core will be selected unless you have a non-standard setup or some configuration that forces distribution of data to all available cores.

Personally, when running things on our server (CUDA cores), I export/define the variable CUDA_VISIBLE_DEVICES=X where X is the ID number of the GPU device I want the program to use in the bash environment (or equivalent shell emulator). With this, only the specified core will be visible for stereoscope and hence you impose a form of restriction as well (which I believe is what you want).

If you're using slurm as a job manager, just include export CUDA_VISIBLE_DEVICES=X in the job script, and this should do the trick.

Best, A