Parallelizing transition dynamics
Useful links
- NAU HPC. Brief overview of shared memory (i.e. multi-threading), distributed memory (i.e. MPI) and hybrid parallelism.
- Simon Scheidegger’s Open Source Macro Lab’s HPC github repo. Detailed notes about OpenMP, MPI and hybrid parallelism. Mostly written for C++ and Fortran users, but still has some potentially very useful info.
- Great Lakes user guide
- Slurm user guide
A proposed “hybrid” parallel approach
Hybrid parallelism utilises multiple nodes and multiple CPUs (i.e. multi-threading) on each node. (MPI facilitates communication between nodes.) This approach to parallelism seems like the best way to compute transition dynamics. Here’s loosely what I envisage:
- A ‘master node’ performs the
solvebackwards
step, using multi-threading orSharedArrays
- The
iterateforwards
step is performed across multiple nodes for each \(t\). Each node (i.e. an MPI process or ``rank’’) computes the distribution of households and excess housing demand for a different house price (from a fixed grid of house prices). The master node gathers the price-specific distributions and excess demands, and finds the market clearing house price. The master node then broadcasts the updated distribution to the other nodes so that they can compute the price-specific distributions and excess demand for \(t+1\).
Issues with this approach
- I’ll need to learn some basic MPI
- All except one of the MPI ranks will be idle for the
solvebackwards
step, which takes a non-trivial amount of time to compute.