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

More robust approach to waiting for many threads #4640

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

jgfouca
Copy link
Contributor

@jgfouca jgfouca commented Jun 11, 2024

Using threading.active_count doesn't work if there are other threads being used in the process. Both jenkins_generic_job and wait_for_tests use threads and the jenkins_generic_job archiver thread was causing wait_for_tests to wait when it shouldn't have. @ndkeen discovered this was blocking our Jenkins reporting.

Instead, track the set of threads you want to wait on in a list.

The fix to wait_for_tests only impacts E3SM but I found a similar issue in build.py that could impact CESM.

Test suite: scrips_regression_tests wait_for_tests
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes [CIME Github issue #]

User interface changes?:

Update gh-pages html (Y/N)?:

@jgfouca jgfouca self-assigned this Jun 11, 2024
Using threading.active_count doesn't work if there are other
threads being used in the process. Both jenkins_generic_job and
wait_for_tests use threads and the jenkins_generic_job thread
was causing wait_for_tests to wait when it shouldn't have.

Instead, track the set of threads you want to wait on in a list.
@jgfouca jgfouca force-pushed the jgfouca/robust_thread_waiting branch from 64cde4e to ead5c78 Compare June 11, 2024 20:07
Theta machine is no longer known to E3SM.
@jgfouca jgfouca merged commit 548b136 into master Jun 11, 2024
7 checks passed
@jgfouca jgfouca deleted the jgfouca/robust_thread_waiting branch June 11, 2024 22:26
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.

1 participant