Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from econ-ark/Multithreading-fix-maybe
Chris and I discovered that HARK.parallel.multithreadCommands did not work on some of our project code... but only in some Python environments. On Windows, I could only generate this error on Python 3, but everything worked correctly on Python 2. On Mac and/or Linux, Chris found that the error came up when running Python in a terminal, but not when running Spyder; he also tested various web servers. After some digging, Chris found that recent versions of joblib (which multithreadCommands uses) changed the default backend of joblib from multiprocessing to loky. Apparently something in loky does not play nicely with our class structure, as it can't (de)serialize at least some AgentType subclasses. This fixes the issue by simply changing the backend argument on the call to Parallel. It also fixes one typo in a comment.
- Loading branch information