Continent-scale datasets challenge hydrological algorithms for processing digital elevation models. Flow accumulation is an important input for many such algorithms; here, I parallelize its calculation. The new algorithm works on one or many cores, or multiple machines, and can take advantage of large memories or cope with small ones. Unlike previous parallel algorithms, the new algorithm guarantees a fixed number of memory access and communication events per raster cell. In testing, the new algorithm ran faster and used fewer resources than previous algorithms, exhibiting ∼30% strong and weak scaling efficiencies up to 48 cores and linear scaling across datasets ranging over three orders of magnitude. The largest dataset tested had two trillion (2 · 10 12 ) cells. With 48 cores, processing required 24 minutes wall-time (14.5 compute-hours).This test is three orders of magnitude larger than any previously performed in the literature. Complete, well-commented source code and correctness tests are available on Github.Keywords: parallel computing, hydrology, geographic information system (GIS), upslope area, contributing area
SoftwareComplete, well-commented source code, an associated makefile, and correctness tests are available at https: //github.com/r-barnes/Barnes2016-ParallelFlowAccum. The code is written in C++ using MPI and constitutes 2,131 lines of code of which 58% are or contain comments.This algorithm is part of the RichDEM (https://github.com/r-barnes/richdem) terrain analysis suite, a collection of state of the art algorithms for processing large digital elevation models quickly.