Introduction to Parallel Computing with Python
18
Introduction to Parallel Computing with Python Doni Ramadhan
-
Upload
doni-ramadhan -
Category
Technology
-
view
1.853 -
download
1
description
An intro to parallel computing in python. There is example using mpi4py library. Mostly slide contains pictures, but hopefully the picture is describable.
Transcript of Introduction to Parallel Computing with Python
![Page 1: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/1.jpg)
Introduction to Parallel Computing with PythonDoni Ramadhan
![Page 2: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/2.jpg)
What is Parallel Computing?
![Page 3: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/3.jpg)
What is MPI?
![Page 4: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/4.jpg)
MPI Library for Python
![Page 5: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/5.jpg)
Pros & Cons of MPI
Pros• Works
Concurrently• Optimize the
number of core• Tasks will be
finished faster
Cons• Needs time to
setup• Depends on
network throughput
• It is harder to program a parallel program
![Page 6: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/6.jpg)
MPI Basics and Implementation
![Page 7: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/7.jpg)
Environment Management
MPI_INITMPI_Comm_SizeMPI_Comm_RankMPI_WtimeMPI_Finalize
![Page 8: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/8.jpg)
HelloWorld.py
![Page 9: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/9.jpg)
Point-to-Point Communication
![Page 10: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/10.jpg)
Point-to-Point Implementation
![Page 11: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/11.jpg)
Buffering&Blocking vs. Non-Blocking Communication
![Page 12: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/12.jpg)
Order and Fairness
![Page 13: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/13.jpg)
Collective Communication
![Page 14: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/14.jpg)
Broadcast
![Page 15: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/15.jpg)
Scatter
![Page 16: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/16.jpg)
Gather
![Page 17: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/17.jpg)
Reduce
Output:
![Page 18: Introduction to Parallel Computing with Python](https://reader033.fdocuments.us/reader033/viewer/2022061616/5562646ed8b42aed7d8b4e52/html5/thumbnails/18.jpg)
Matrix Multiplication