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

Limit fast initial parsimony tree by random order stepwise addition #18

Closed
Steven-Kemp opened this issue Jan 14, 2021 · 3 comments
Closed

Comments

@Steven-Kemp
Copy link

Is it possible to limit the number of threads that the computer/cluster uses to build the initial parsimony tree at all?

When I send a job with e.g. -T AUTO, IQTREE2 will utilise all available threads, which takes an infinitely long amount of time for the first stage. What I need it to do is analyse the best number of threads for downstream analysis, and then use the same number of threads for all stages.

Does that make sense?

Best wishes,
Steve

@bqminh
Copy link
Member

bqminh commented Jan 18, 2021

Hi Steve, this is a known issue, but there is a workaround. You need to manually set the OMP_NUM_THREADS environment variable. Under Linux, some command line like:

OMP_NUM_THREADS=1 iqtree2 ...

will do the trick. Without defining OMP_NUM_THREADS, all CPU cores will be used. You can increase 1 to higher value but observe how faster (or even slower) it gets. IQ-TREE is just unable to estimate the number of threads for parsimony construction.

Once the initial parsimony tree is finished, IQ-TREE will be able to estimate the optimal number of threads and override the OMP_NUM_THREADS parameter.

@Steven-Kemp
Copy link
Author

Hi Bui,

Seems to be working for me, thanks so much!

@joelnitta
Copy link

This also solves the same problem for me, but I'm wondering if it should really be considered closed since it's a work-around external to IQTREE: I think the real solution would be a fix within IQTREE so the user doesn't have to set OMP_NUM_THREADS?

joelnitta added a commit to joelnitta/jntools that referenced this issue Jan 13, 2022
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

3 participants