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

Give minimap more threads when available. #18

Closed
Ge0rges opened this issue Oct 24, 2023 · 4 comments
Closed

Give minimap more threads when available. #18

Ge0rges opened this issue Oct 24, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Ge0rges
Copy link
Contributor

Ge0rges commented Oct 24, 2023

Hello,

I noticed that here minimap is only given 8 threads. It would be nice if the threads flag was passed on to minimap.

@wdecoster
Copy link
Owner

That number only affects the building of the index, not the alignment itself. So changing this will not have too much effect. That said, it shouldn't be hardcoded to '8'. Chopper will, at the moment, when a contaminant is being filtered out, not use multithreading. The reason behind this is because it does not support using rayon. This may change in the future, and pull requests are appreciated.

@Ge0rges
Copy link
Contributor Author

Ge0rges commented Oct 24, 2023

I'd be happy to give it a crack though I've never worked with rust. I see rayon is the parallelism library. Any tips before I attempt this?

@wdecoster
Copy link
Owner

Well it shouldn't be done with rayon in this case, as that is not supported for minimap2-rs alignment. There are other options for parallelization, but none that I am sufficiently comfortable with.

@jelber2
Copy link
Contributor

jelber2 commented Oct 25, 2023

Here is an example for parallelization

https://github.com/jguhlin/minimap2-rs/blob/main/fakeminimap2/src/main.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants