Published May 23, 2020 | Version v1
Journal article Open

torcpy: supporting task parallelism in Python

Description

Task-based parallelism has been established as one of the main forms of code parallelization, where asynchronous tasks are launched and distributed across the processing units of a local machine, a cluster or a supercomputer. The tasks can be either completely decoupled, corresponding to a set of independent jobs, or be part of an iterative algorithm where the task results are processed and drive the next step. Typical use cases include the application of the same function to different data, parametric searches and algorithms used in numerical optimization and Bayesian uncertainty quantification. In this work, we introduce torcpy, a platform-agnostic adaptive load balancing library that orchestrates the asynchronous execution of tasks, expressed as callables with arguments, on both shared and distributed memory platforms. The library is implemented on top of MPI and multithreading and provides lightweight support for nested loops and map functions. Experimental results using representative applications demonstrate the flexibility and efficiency of the proposed Python package.

Files

torcpy.pdf

Files (641.2 kB)

Name Size Download all
md5:17773db0a1588d1bce1494461898c0b5
641.2 kB Preview Download

Additional details

Funding

VIMMP – Virtual Materials Market Place (VIMMP) 760907
European Commission