brentp / somalier

fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs... "like damn that is one smart wine guy"
MIT License
254 stars 35 forks source link

Limit number of threads used #45

Closed fgvieira closed 4 years ago

fgvieira commented 4 years ago

Dear all,

is it possible to limit the number of threads somalieruses? Right now it seems to use all available cpus.

thanks,

brentp commented 4 years ago

hi, do you mean somalier ancestry?

fgvieira commented 4 years ago

Yes, I've only noticed it on somalier ancestry, but was not sure if there was a general option that also affected other analyses.

brentp commented 4 years ago

ok. should only be in ancestry. I will have a look. Next release might be a few weeks off.

brentp commented 4 years ago

hi, you can do this now with export OMP_NUM_THREADS=8 somalier ancestry .... I'll document this or make it a parameter for next release.

HagemeijerRug commented 1 year ago

Hi, I know this is an old issue, but I just saw somalier relate also uses many cores. I haven't test the solution above yet, but just wanted to note it also happens in the relate sub-command.