Working Paper: CEPR ID: DP12890
Authors: Jess Fernández-Villaverde; David Zarruk Valencia
Abstract: This guide provides a practical introduction to parallel computing in economics. After a brief introduction to the basic ideas of parallelization, we show how to parallelize a prototypical application in economics using, on CPUs, Julia, Matlab, R, Python, C++–OpenMP, Rcpp–OpenMP, and C++–MPI, and, on GPUs, CUDA and OpenACC. We provide code that the user can download and fork, present comparative results, and explain the strengths and weaknesses of each approach. We conclude with some additional remarks about alternative approaches.
Keywords: Computational methods; Parallel computing; Programming languages
JEL Codes: C63; C68; E37
Edges that are evidenced by causal inference methods are in orange, and the rest are in light blue.
Cause | Effect |
---|---|
parallel computing (C63) | computational efficiency (C63) |
value function iteration (D46) | computational efficiency (C63) |
random walk Metropolis-Hastings algorithm (C15) | struggles with parallelization (C69) |