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

-n does not seem to be honored #17

Closed
wasade opened this issue Nov 18, 2022 · 7 comments
Closed

-n does not seem to be honored #17

wasade opened this issue Nov 18, 2022 · 7 comments

Comments

@wasade
Copy link
Member

wasade commented Nov 18, 2022

I'm running ssu ... -n 8 however, it appears that ssu is using 16 threads

@sfiligoi
Copy link
Collaborator

Yes, the semantics of -n has changed.
The documentation has unfortunately not been updated :(

-n now stands for "split the problem in N subproblems to be run in sequence", with the reasoning being that we use less memory during Unifrac compute. This is especially useful for GPU compute.
While it limits the amount of memory saving during the IO phase, it is still beneficial.

The number of threads is fully controlled by the OpenMP threading library, i.e. OMP_NUM_THREADS.

@wasade
Copy link
Member Author

wasade commented Nov 29, 2022

I think we should correctly support the threads parameters from the python interface. Would it suffice to use Python to set OMP_NUM_THREADS?

W/ documentation, I think we should update the ssu usage string to reflect what -n does, I think a new parameter name probably makes sense, and to also note specifically in the usage string the use of OMP_NUM_THREADS

@sfiligoi
Copy link
Collaborator

sfiligoi commented Nov 29, 2022

For context:
NumPy typically manages thread parallelism with OMP_NUM_THREADS:
https://numpy.org/devdocs/reference/global_state.html

@wasade
Copy link
Member Author

wasade commented Nov 29, 2022 via email

@sfiligoi
Copy link
Collaborator

Let's deprecate -n and document it accordingly.
I will add a separate flag for the problem splitting.

@wasade
Copy link
Member Author

wasade commented Nov 29, 2022 via email

@sfiligoi
Copy link
Collaborator

sfiligoi commented Jan 7, 2023

Released in 1.2.

@sfiligoi sfiligoi closed this as completed Jan 7, 2023
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