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

Set the default number of threads to the number of CPUs/cores the process is really allowed to use #620

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scipparis
Copy link

Hello,

Some of our users execute OrthoFinder on our Linux HPC cluster which runs under Slum Scheduler. Here is the problem: even if the user sets -c/--cpus-per-task option correctly, OrthoFinder doesn't take it into account. The default "parallel sequence search threads" remains the total number of cores of the compute node OrthoFinder is running on instead of the number of cores the OrthoFinder process can really use on that node (set by the Slurm option in our case and enforced by cgroup).

OrthoFinder can't take that enforcement into account because nThreadsDefault is computed using os.cpu_count() in scripts_of/util.py rather than len(os.sched_getaffinity(0)).

Would you consider changing the way nThreadsDefault is set? I know sched_getaffinity doesn't exist in Python 2.7 but maybe you are planning to drop the python 2.7 support in a future release?

Thanks in advance,

…cess is really allowed to use, not the number of CPUs/cores in the system.
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

Successfully merging this pull request may close these issues.

1 participant