David A. Benson , Ivan Pribec , Nicholas B. Engdahl , Stephen Pankavich , Lucas Schauer
{"title":"Parallelization of particle-mass-transfer algorithms on shared-memory, multi-core CPUs","authors":"David A. Benson , Ivan Pribec , Nicholas B. Engdahl , Stephen Pankavich , Lucas Schauer","doi":"10.1016/j.advwatres.2024.104818","DOIUrl":null,"url":null,"abstract":"<div><p>Simulating the transfer of mass between particles is not straightforwardly parallelized because it involves the calculation of the influence of many particles on each other. Engdahl et al. (2019) intuited that the number of matrix operations used for mass transfer grows quadratically with the number of particles, so that dividing the domain geometrically into sub-domains will give speed and memory advantages, even on a single processing thread. Those authors also showed the speed scalability of several one-dimensional examples on multiple cores. Here, we extend those results for more general cases, both in terms of spatial dimensions and algorithmic implementation. We show that there is an optimal subdivision scheme for naive, full-matrix calculations on a multi-processor, or multi-threading shared-memory machine. A similar sparse-matrix implementation that also uses row-and-column-sum normalization often greatly reduces the memory requirements. We also introduce a completely new mass transfer algorithm that uses a non-geometric domain decomposition and only matrix row-sum normalization. This allows the mass-transfer “matrix” to be constructed and solved one row at a time in parallel, so it is faster and vastly more memory efficient than previous methods, but requires more care for suitable accuracy.</p></div>","PeriodicalId":7614,"journal":{"name":"Advances in Water Resources","volume":"193 ","pages":"Article 104818"},"PeriodicalIF":4.0000,"publicationDate":"2024-09-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S0309170824002057/pdfft?md5=7ca8ec3f0da81585d7125a9740e31db7&pid=1-s2.0-S0309170824002057-main.pdf","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Advances in Water Resources","FirstCategoryId":"93","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0309170824002057","RegionNum":2,"RegionCategory":"环境科学与生态学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"WATER RESOURCES","Score":null,"Total":0}
引用次数: 0
Abstract
Simulating the transfer of mass between particles is not straightforwardly parallelized because it involves the calculation of the influence of many particles on each other. Engdahl et al. (2019) intuited that the number of matrix operations used for mass transfer grows quadratically with the number of particles, so that dividing the domain geometrically into sub-domains will give speed and memory advantages, even on a single processing thread. Those authors also showed the speed scalability of several one-dimensional examples on multiple cores. Here, we extend those results for more general cases, both in terms of spatial dimensions and algorithmic implementation. We show that there is an optimal subdivision scheme for naive, full-matrix calculations on a multi-processor, or multi-threading shared-memory machine. A similar sparse-matrix implementation that also uses row-and-column-sum normalization often greatly reduces the memory requirements. We also introduce a completely new mass transfer algorithm that uses a non-geometric domain decomposition and only matrix row-sum normalization. This allows the mass-transfer “matrix” to be constructed and solved one row at a time in parallel, so it is faster and vastly more memory efficient than previous methods, but requires more care for suitable accuracy.
期刊介绍:
Advances in Water Resources provides a forum for the presentation of fundamental scientific advances in the understanding of water resources systems. The scope of Advances in Water Resources includes any combination of theoretical, computational, and experimental approaches used to advance fundamental understanding of surface or subsurface water resources systems or the interaction of these systems with the atmosphere, geosphere, biosphere, and human societies. Manuscripts involving case studies that do not attempt to reach broader conclusions, research on engineering design, applied hydraulics, or water quality and treatment, as well as applications of existing knowledge that do not advance fundamental understanding of hydrological processes, are not appropriate for Advances in Water Resources.
Examples of appropriate topical areas that will be considered include the following:
• Surface and subsurface hydrology
• Hydrometeorology
• Environmental fluid dynamics
• Ecohydrology and ecohydrodynamics
• Multiphase transport phenomena in porous media
• Fluid flow and species transport and reaction processes