ESMCI / cime

Common Infrastructure for Modeling the Earth
http://esmci.github.io/cime
Other
162 stars 209 forks source link

More robust approach to waiting for many threads #4640

Closed jgfouca closed 5 months ago

jgfouca commented 5 months ago

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)?: