Parallel Computing using Python¶
Many scientific and engineering workloads now involve datasets, simulations, and analyses that are too large or too slow for straightforward serial Python code. This course introduces practical ways to improve Python performance by choosing the right parallel computing strategy for the work at hand.
The material covers shared-memory and distributed-memory parallelism, workflow parallelism, interactive parallel execution, GPU computing, and scalable analytics with Dask. Learners will compare threads, processes, MPI, Snakemake, ipyparallel, Numba/CUDA, and Dask, with attention to the tradeoffs that determine whether parallel code is faster, correct, and maintainable.
Prerequisites
Basic experience with Python
Basic experience working in a Linux-like terminal
Some prior experience working with datasets or computational scripts
Software setup
Episodes
Reference
Learning outcomes¶
This material is for researchers, engineers, and technical professionals who use Python for computational work and want to understand when and how to apply parallel computing techniques.
By the end of this module, learners should be able to:
Explain the differences between concurrency, multithreading, multiprocessing, distributed-memory parallelism, workflow parallelism, GPU acceleration, and task-based parallelism.
Describe how the Global Interpreter Lock affects CPU-bound Python code and when threads can still be useful.
Use multiprocessing concepts to parallelize independent CPU-bound work while accounting for process overhead and data movement.
Identify race conditions and choose safer designs using locks or avoiding shared mutable state.
Use basic MPI concepts such as ranks, point-to-point communication, broadcast, and gather.
Recognize embarrassingly parallel workflow patterns and use Snakemake-style dependencies to expose parallel execution.
Describe how ipyparallel can be used for interactive parallel execution from Jupyter.
Explain when GPU computing is appropriate and how CUDA kernels, blocks, threads, memory transfers, and data types affect performance.
Use Dask concepts such as lazy evaluation, task graphs, collections, chunking, schedulers, workers, and dashboards to reason about scalable analytics.
Measure performance carefully and choose a parallel strategy based on workload type, communication cost, memory use, correctness, and maintainability.
Credit
This module is part of the EVITA course material collection. Please contact EVITA if you want to reuse these course materials in your teaching or share feedback with the community.
License
CC BY-SA for media and pedagogical material
Copyright (c) 2026 EVITA project, Ashwin Vishnu Mohanan, Claudia Blaas-Schenner, Jaison Lewis, Jasper Seehofer, Kevin Lüdemann, Kjartan Thor Wikfeldt, Mary Kate Chessey, Matthias Eulert, Tobias Haas, Victoria Döller, Yinyin Ma, and Yonglei Wang. This material is released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).
Canonical URL: https://creativecommons.org/licenses/by-sa/4.0/
You are free to
Share - copy and redistribute the material in any medium or format for any purpose, even commercially.
Adapt - remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms
Attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
ShareAlike - If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions - You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.
MIT for source code and code snippets
MIT License
Copyright (c) 2026, EVITA project, Ashwin Vishnu Mohanan, Claudia Blaas-Schenner, Jaison Lewis, Jasper Seehofer, Kevin Lüdemann, Kjartan Thor Wikfeldt, Mary Kate Chessey, Matthias Eulert, Tobias Haas, Victoria Döller, Yinyin Ma, and Yonglei Wang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.