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

How to set number of thread #94

Open
davutpolat opened this issue Mar 4, 2018 · 1 comment
Open

How to set number of thread #94

davutpolat opened this issue Mar 4, 2018 · 1 comment

Comments

@davutpolat
Copy link

Hi,

i want to use mrmr for 1000 features and 10gb sized data, but it takes too long time, i got 32 core server ( can hire 64 core as well), but i see there is only 4 cores in use, does pymrmr run all cores? if so , how should i use it ?

Thanks in advance,

Regards,
Davut

@fbrundu
Copy link
Owner

fbrundu commented Mar 4, 2018

Dear Davut,
You're right, it uses hard-coded 4 cores by employing openmp - see line 178 of mrmr.cpp:

#pragma omp parallel num_threads(4)

Right now, unfortunately, I have not the time to implement the definition of a parameter for the number of threads, but I'm open to PRs if you'd like to modify the code.
A more quick and dirty solution for your problem would be to fork the repo, modify that specific line with the number of cores you need, and install the repo again from your account using:

pip install --upgrade git+https://github.com/davutpolat/pymrmr

Best,
Francesco

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

2 participants