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

Remove OMP_NUM_THREADS if set to empty #8917

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrocklin
Copy link
Member

Generally though, sometimes our use of OMP_NUM_THREADS makes other systems sad. It's unfortunately somewhat difficult to turn off. A common approach is that people set OMP_NUM_THREADS="" but this doesn't properly unset things.

I'm curious if an approach like this would be helpful.

There might be a cleaner way to do this, and this might be a bad idea. Please feel free to reject. It was just easy to put this up as a PR.

@ntabris would something like this make your life easier? @fjetter is this not dumb?

Generally though, sometimes our use of OMP_NUM_THREADS makes other
systems sad.  It's unfortunately somewhat difficult to turn off.  A
common approach is that people set `OMP_NUM_THREADS=""` but this doesn't
properly unset things.

I'm curious if an approach like this would be helpful.

There might be a cleaner way to do this, and this might be a bad idea.
Please feel free to reject.  It was just easy to put this up as a PR.
@mrocklin mrocklin requested a review from fjetter as a code owner October 29, 2024 20:31
@ntabris
Copy link
Contributor

ntabris commented Oct 29, 2024

would something like this make your life easier?

Not anytime soon but seems like a positive change to me.

Copy link
Contributor

github-actions bot commented Oct 29, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    27 files  ± 0      27 suites  ±0   11h 28m 55s ⏱️ - 2m 51s
 4 117 tests + 1   4 000 ✅  - 5    111 💤 ±0   6 ❌ + 6 
51 628 runs  +13  49 314 ✅  - 3  2 296 💤  - 2  18 ❌ +18 

For more details on these failures, see this check.

Results for commit b735ba0. ± Comparison against base commit fd3722d.

♻️ This comment has been updated with latest results.

@fjetter
Copy link
Member

fjetter commented Oct 30, 2024

No objections. It appears to not be working, though. The test is failing (linter is also off)

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

This doesn't seem to actually unset things. If I set the env var and run pytest the test fails.

$ OMP_NUM_THREADS=1 pytest -k test_omp_num_threads_off
====== 1 failed, 15 skipped, 4020 deselected in 3.52s ======

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.

4 participants