Introduction to Parallel Computing with Python Doni Ramadhan
May 25, 2015
Introduction to Parallel Computing with PythonDoni Ramadhan
What is Parallel Computing?
What is MPI?
MPI Library for Python
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
MPI Basics and Implementation
Environment Management
MPI_INITMPI_Comm_SizeMPI_Comm_RankMPI_WtimeMPI_Finalize
HelloWorld.py
Point-to-Point Communication
Point-to-Point Implementation
Buffering&Blocking vs. Non-Blocking Communication
Order and Fairness
Collective Communication
Broadcast
Scatter
Gather
Reduce
Output:
Matrix Multiplication