S-01

Title: turbocharging computation efficiency: a tutorial on hierarchical parallel computing in r

Mahmoud Ali1

1Mahmoud Ali Afifi, 2Samer Mouksassi

Background: In modern computational tasks across various fields, such as pharmacometrics, statistical modeling, and data analysis, handling large datasets and complex algorithms poses significant challenges. Sequential execution of these tasks often leads to prolonged processing times and inefficient use of computational resources. Parallelization techniques offer a solution by enabling simultaneous execution of multiple tasks across multiple cores or nodes, maximizing the computational power of modern hardware. The foreach package[1] in R provides a flexible framework for parallel computing, allowing users to parallelize for loops and apply functions across multiple cores or clusters seamlessly. Additionally, the hierarchical foreach (doParallel) package extends these capabilities by supporting nested parallelism, which is particularly beneficial for tasks with hierarchical structures or iterative processes. Objective: The primary objective of this tutorial is to provide an in-depth exploration of the foreach and hierarchical foreach packages in R, showcasing their effectiveness in parallelization across diverse computational processes, including modeling and simulation tasks. The tutorial aims to equip participants with practical skills and strategies to optimize computational workflows and manage computational resources efficiently. Methods: This tutorial will start with a comprehensive introduction to the concept of parallelization in computational tasks, highlighting the challenges associated with sequential execution and the benefits of parallel computing. It will then delve into the functionalities of the foreach and hierarchical foreach packages in R, covering their compatibility with various parallel backends and best practices for efficient parallel computing. The tutorial will proceed with practical demonstrations and examples showcasing the implementation of parallelization techniques using foreach and hierarchical foreach in various computational processes, with a specific focus on modeling and simulation tasks. Participants will gain insights into parallelizing for loops, optimizing computational performance, and effectively managing computational resources. Results: Through a series of simulation studies and real-world case examples, this tutorial will illustrate the substantial reductions in computation time and improvements in resource management achieved through parallelizing diverse computational processes using the foreach and hierarchical foreach in R. Participants will gain a deep understanding of how to leverage these packages to enhance computational efficiency and address complex computational challenges effectively. Conclusion: By the conclusion of this tutorial, participants will have acquired practical skills and insights into leveraging the foreach and hierarchical foreach packages in R to efficiently parallelize a wide range of computational tasks, including modeling and simulation processes, across diverse domains. They will be equipped with the knowledge and strategies necessary to optimize computational workflows, reduce processing times, and effectively manage computational resources, thereby advancing their proficiency in parallel computing techniques for complex computational tasks. All codes will be shared. References: 1-GitHub [Internet]. [cited 2024 Mar 17]. foreach/R/foreach.R at master · cran/foreach. Available from: https://github.com/cran/foreach/blob/master/R/foreach.R

Reference: PAGE 33 (2025) Abstr 11320 [www.page-meeting.org/?abstract=11320]

Poster: Software Demonstration

PDF poster / presentation (click to open)