[go: up one dir, main page]

0% found this document useful (0 votes)
62 views13 pages

High Performance Computing

Uploaded by

PRATIK DAREKAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views13 pages

High Performance Computing

Uploaded by

PRATIK DAREKAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

High Performance

Computing
Python for parallel computing
What is
parallel
programming?

Parallel programming, in simple terms, is


the process of decomposing a problem into
smaller tasks that can be executed at the
same time using multiple computing
resources. Parallel programming works by
assigning tasks to different nodes or cores
Why do we need
parallel computing?
Moore’s
law
Moore forecasted that the
number of resistors on a
chip would double every 2
years
Power vs
performan
ce
Fact 🤔
A dual-core processor consumes
60% less power than a single-core
processor

Power ∝ 1 / no. of cores


Parallel • Using the standard multiprocessing

processin
module, we can efficiently parallelize
simple tasks by creating child processes.
This module provides an easy-to-use
g in interface and contains a set of utilities to
handle task submission and

python synchronization.
•By subclassing multiprocessing.Process, you can
create a process that runs independently
•To spawn the process, we need to initialize our
Process object and invoke process . Start()
method will create a new process and invoke the
process run() method.
Process •The code after p.start() will be executed
immediately before the task completion of
process p.
• To wait for the process to complete you can
use p.join().
Code without parallel
programming(Serial)
Serial vs parallel
Parallel code
Image processing
Serial vs parallel
Thankyou

You might also like