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

use lsst function to disable implicit threading #441

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

jchiang87
Copy link
Collaborator

No description provided.

@@ -1,4 +1,7 @@

from lsst.utils.threads import disable_implicit_threading
disable_implicit_threading()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick inline comment about why this is useful is probably appropriate here.
Something like:

# We never use threading in imsim, and without this, some systems try to run all the 
# multiprocessing jobs on a single core, which leads to terrible performance.
# We think disabling this is never a problem, and sometimes extremely important.
# It's best if this is done as soon as possible, hence here before any other imports.

@jchiang87 jchiang87 merged commit 402a575 into main Jan 5, 2024
3 checks passed
@jchiang87 jchiang87 deleted the disable_implicit_threading branch January 5, 2024 06:47
@jchiang87 jchiang87 mentioned this pull request Jun 10, 2024
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.

2 participants