DP12890 A Practical Guide to Parallelization in Economics
|Author(s):||Jesús Fernández-Villaverde, David Zarruk Valencia|
|Publication Date:||April 2018|
|Keyword(s):||Computational Methods, Parallel Computing, Programming Languages|
|JEL(s):||C63, C68, E37|
|Programme Areas:||Monetary Economics and Fluctuations|
|Link to this Page:||cepr.org/active/publications/discussion_papers/dp.php?dpno=12890|
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.