HARK icon indicating copy to clipboard operation
HARK copied to clipboard

Revisit parallelization in HARK

Open sbenthall opened this issue 1 year ago • 1 comments

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.

sbenthall avatar Mar 22 '23 16:03 sbenthall