HARK
HARK copied to clipboard
Revisit parallelization in HARK
We have some support for parallelization using multi-threading:
https://github.com/econ-ark/HARK/blob/876ede3a8de0ba2606a27f6b9b6d2ae42076f580/HARK/parallel.py
The only place this is used is in the Market solve_agents
method:
https://github.com/econ-ark/HARK/blob/876ede3a8de0ba2606a27f6b9b6d2ae42076f580/HARK/core.py#L1274-L1301
This is a bit brittle; it causes this failure when there's some reasonable refactoring:
https://github.com/econ-ark/HARK/pull/1240#issuecomment-1462620763
In general, there are many ways to parallelize and it would be better to have options for how to parallelize, rather than hard-coding one method in the model definition code.