PSLmodels / OG-USA

Overlapping-generations macroeconomic model for evaluating fiscal policy in the United States
https://pslmodels.github.io/OG-USA/
Creative Commons Zero v1.0 Universal
19 stars 34 forks source link

Client gets threads_per_worker=1 #102

Closed talumbau closed 5 months ago

talumbau commented 5 months ago

This reduces run time of TPI on 64 physical core AMD workstation from ~12 hours to ~3 hours. It looks like the default of Dask is to oversubscribe threads to cores. This is not a good default for computationally intensive workloads.

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.41%. Comparing base (13a3da8) to head (18343c2).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/102/graphs/tree.svg?width=650&height=150&src=pr&token=XOLXIKEL86&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/102?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #102 +/- ## ======================================= Coverage 75.41% 75.41% ======================================= Files 11 11 Lines 850 850 ======================================= Hits 641 641 Misses 209 209 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/102/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/OG-USA/pull/102/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `75.41% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more.
jdebacker commented 5 months ago

Great catch, @talumbau! Merging.

rickecon commented 5 months ago

@talumbau and @jdebacker. It will be interesting to see what this does to Jason and my run times.