SlideShare a Scribd company logo
Programming the ANDC Cluster Sudhang Shankar
Traditional Programming Serial:  One instruction at a time, one after the other, on a single CPU. Instructions PROBLEM t6 t5 t4 t3 t2 t1 CPU
The Funky Ishtyle Parallel:  The problem is split in parts. Each part is represented as a sequence of instructions. Each such sequence is run on a separate CPU. Problem Sub- Problem1 Sub- Problem2 t3 t2 t1 t3 t2 t1 CPU1 CPU2
Why Parallelise? Speed  - ”Many Hands Make Light Work” Precision/Scale  – We can solve bigger problems, with greater accuracy.
Parallel Programming Models There are several parallel programming models in common use: Shared Memory Threads Message Passing Data Parallel
Message Passing Model The applications on the ANDC cluster as of now work on this model Tasks use their own local memory during computation Task exchange data through  messages
The MPI Standard MPI: Message Passing Interface A standard, with many implementations Codifies ”best practises” of the Parallel Design community Implementations LAM/MPI – Argonne Labs MPICH openMPI
How MPI works communicators  define which collection of processes may communicate with each other Every process in a communicator has a unique  rank The  size  of the communicator is the total no. of  processes in the communicator
MPI primitives – Environment Setup MPI_INIT:  initialises the MPI execution environment MPI_COMM_SIZE:  Determines the number of processes in the group associated with a communicator MPI_COMM_RANK:   Determines the rank of the  calling process within the communicator MPI_FINALIZE:  Terminates the MPI execution environment
MPI primitives – Message Passing MPI_Send(buffer,count,type,dest,tag,comm)  MPI_Recv(buffer,count,type,source,tag,comm,status)
An Example Application The Monte-Carlo Pi Estimation Algorithm AKA ”The Dartboard Algorithm”
Algorithm Description Imagine you have a square ”dartboard”, with a circle inscribed in it:
Randomly throw N darts at the board Count the no of HITS ( darts landing within circle) hits flops
pi will be the value obtained after multiplying the ratio of hits to total throws by 4 Why: pi = A c  / r 2 A s  = 4r 2 r 2  = A s  / 4 pi = 4 * A c  / A s hits flops
Parallel Version Make each worker throw an equal number of darts A worker counts the HITS The Master adds all the individual ”HITS” It then computes pi as: pi = (4.)*(HITS)/N
To Make it Faster.... Increase the number of workers p, while keeping N constant. Each worker deals with (N/p) throws so the greater the value of p, the fewer throws a worker handles Fewer throws => faster
To Make it ”Better” Increase the number of throws N This makes the calculation more accurate
MPI For each task, run the dartboard algorithm homehits = dboard(DARTS); Workers send homehits to master if (taskid != MASTER) MPI_Send(&homehits, 1,  MPI_DOUBLE,   MASTER, count,  MPI_COMM_WORLD);
Master gets homehit values from workers     for (i=0;i<p;i++) { rc = MPI_Recv(&hitrecv, 1, MPI_DOUBLE,  MPI_ANY_SOURCE,  mtype, MPI_COMM_WORLD,  &status); totalhits = totalhits + hitrecv; } Master calculates pi as   pi = (4.0)*(totalhits)/N
MapReduce Framework for simplifying the development of parallel programs. Developed at Google. FLOSS implementations Hadoop (Java) from Yahoo Disco (Erlang) from Nokia Dumbo from Audioscrobbler Many others (including a 36-line Ruby one!)
The MapReduce library requires the user to implement: Map():  takes as input a function and a sequence of values. Applies the function to each value in the sequence Reduce():  combines all the elements of a sequence using a binary operation MapReduce
How it works (oversimplified) map()  takes as input a set of <key,value> pairs produces a set of <intermediate key,value> pairs This is all done in parallel, across many machines The parallelisation is done by the mapreduce library (the programmer doesn't have to think about it)
The MapReduce Library groups together all intermediate values associated with the same intermediate key I and passes them to reduce() A  Reduce()  instance takes a set of <intermediate key,value> pairs and produces an output value for that key, like a ”summary” value.
Pi Estimation in MapReduce Here, map() is the dartboard algo. Each worker runs the algo. Hits are represented as <1,no_of_Hits> and flops as <0,no_of_flops> Thus Each Map() instance returns two <boolean,count> to the MapReduce library.
The library then clumps all the <bool,count> pairs into two ”sets”: one for key 0 and one for key 1 and passes them to reduce() Reduce() then adds up the ”count” for each key to produce a ”grand total”. Thus we know the total hits and total flops. These are output as <key, Grand_total> pairs to the master process. The master then finds pi as  pi = 4*(hits)/(hits+flops)
Other Solutions PVM OpenMP LINDA Occam Parallel/Scientific Python
Problems/Limitations Parallel Slowdown:  parallelization of a parallel computer program beyond a certain point causes the program to run  slower The Amdahl Principle:  Parallel speedup  is limited by the sequential  fraction of the program.
Applications Compute clusters are used whenever we have: lots and lots of data to process,  Too little time to work sequentially.
Finance Risk Assessment: India's NSE uses a linux cluster in order to monitor the risk of members Broker crosses VAR limit => account disabled VAR is calculated in realtime using  PRISM  (Parallel Risk Management System), which uses MPI NSE's PRISM handles 500 trades/sec and can scale to 1000 trades/sec.
Molecular Dynamics Given a collection of atoms, we’d like to calculate how they interact and move under realistic laboratory conditions expensive part: determining the force on each atom, since it depends on the positions of all other atoms in  the system
Software:  GROMACS:  helps scientists simulate the behavior of large molecules (like proteins, lipids, and even polymers) PyMol:  molecular graphics  and modelling package which  can be also used to  generate animated sequences. Raytraced Lysozyme structure  created with Pymol
Other Distributed Problems Rendering multiple frames of high-quality animation (eg – Shrek) Indexing the web (eg – Google) Data Mining
Questions?
Ad

More Related Content

What's hot (20)

Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
MLconf
 
OpenMP
OpenMPOpenMP
OpenMP
Eric Cheng
 
علم البيانات - Data Sience
علم البيانات - Data Sience علم البيانات - Data Sience
علم البيانات - Data Sience
App Ttrainers .com
 
Open mp directives
Open mp directivesOpen mp directives
Open mp directives
Prabhakaran V M
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
CherryBerry2
 
OpenMP And C++
OpenMP And C++OpenMP And C++
OpenMP And C++
Dragos Sbîrlea
 
Open mp
Open mpOpen mp
Open mp
Gopi Saiteja
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
Akhila Prabhakaran
 
Ch7
Ch7Ch7
Ch7
kinnarshah8888
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
yaman dua
 
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Takuo Watanabe
 
OpenMp
OpenMpOpenMp
OpenMp
Neel Bhad
 
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlowHorovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Databricks
 
Openmp
OpenmpOpenmp
Openmp
Amirali Sharifian
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6
Shah Zaib
 
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Databricks
 
Numba Overview
Numba OverviewNumba Overview
Numba Overview
stan_seibert
 
Compiler design
Compiler designCompiler design
Compiler design
Shashwat Shriparv
 
MATLAB to simulate packet traffic - M/M/1 queue with Erlang C distribution
MATLAB to simulate packet traffic - M/M/1 queue with Erlang C distributionMATLAB to simulate packet traffic - M/M/1 queue with Erlang C distribution
MATLAB to simulate packet traffic - M/M/1 queue with Erlang C distribution
Sulaim Ab Qais
 
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
MLconf
 
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
MLconf
 
علم البيانات - Data Sience
علم البيانات - Data Sience علم البيانات - Data Sience
علم البيانات - Data Sience
App Ttrainers .com
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
CherryBerry2
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
yaman dua
 
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Takuo Watanabe
 
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlowHorovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Horovod: Uber’s Open Source Distributed Deep Learning Framework for TensorFlow
Databricks
 
Parallel Computing - Lec 6
Parallel Computing - Lec 6Parallel Computing - Lec 6
Parallel Computing - Lec 6
Shah Zaib
 
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Understanding Parallelization of Machine Learning Algorithms in Apache Spark™
Databricks
 
MATLAB to simulate packet traffic - M/M/1 queue with Erlang C distribution
MATLAB to simulate packet traffic - M/M/1 queue with Erlang C distributionMATLAB to simulate packet traffic - M/M/1 queue with Erlang C distribution
MATLAB to simulate packet traffic - M/M/1 queue with Erlang C distribution
Sulaim Ab Qais
 
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
MLconf
 

Similar to Parallel Programming on the ANDC cluster (20)

Parallel computation
Parallel computationParallel computation
Parallel computation
Jayanti Prasad Ph.D.
 
parallel-computation.pdf
parallel-computation.pdfparallel-computation.pdf
parallel-computation.pdf
Jayanti Prasad Ph.D.
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming Models
Zvi Avraham
 
25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx
GopalPatidar13
 
Multicore
MulticoreMulticore
Multicore
Birgit Plötzeneder
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
Dmitri Nesteruk
 
MapReduce: teoria e prática
MapReduce: teoria e práticaMapReduce: teoria e prática
MapReduce: teoria e prática
PET Computação
 
Intermachine Parallelism
Intermachine ParallelismIntermachine Parallelism
Intermachine Parallelism
Sri Prasanna
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
Dhammpal Ramtake
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
Ruymán Reyes
 
Parallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPParallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMP
Anil Bohare
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Marina Kolpakova
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Mr SMAK
 
Parallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxParallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptx
krnaween
 
Burst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaBurst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to Omega
George Markomanolis
 
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsUnderstand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Intel® Software
 
Os2 2
Os2 2Os2 2
Os2 2
issbp
 
Parallel programming using MPI
Parallel programming using MPIParallel programming using MPI
Parallel programming using MPI
Ajit Nayak
 
Parallel computing(2)
Parallel computing(2)Parallel computing(2)
Parallel computing(2)
Md. Mahedi Mahfuj
 
Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*
Intel® Software
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming Models
Zvi Avraham
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
Dmitri Nesteruk
 
MapReduce: teoria e prática
MapReduce: teoria e práticaMapReduce: teoria e prática
MapReduce: teoria e prática
PET Computação
 
Intermachine Parallelism
Intermachine ParallelismIntermachine Parallelism
Intermachine Parallelism
Sri Prasanna
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
Ruymán Reyes
 
Parallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPParallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMP
Anil Bohare
 
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the CompilerPragmatic Optimization in Modern Programming - Demystifying the Compiler
Pragmatic Optimization in Modern Programming - Demystifying the Compiler
Marina Kolpakova
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Mr SMAK
 
Parallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxParallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptx
krnaween
 
Burst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to OmegaBurst Buffer: From Alpha to Omega
Burst Buffer: From Alpha to Omega
George Markomanolis
 
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsUnderstand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Intel® Software
 
Os2 2
Os2 2Os2 2
Os2 2
issbp
 
Parallel programming using MPI
Parallel programming using MPIParallel programming using MPI
Parallel programming using MPI
Ajit Nayak
 
Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*
Intel® Software
 
Ad

Recently uploaded (20)

Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM & Mia eStudios
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM & Mia eStudios
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM & Mia eStudios
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM & Mia eStudios
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Ad

Parallel Programming on the ANDC cluster

  • 1. Programming the ANDC Cluster Sudhang Shankar
  • 2. Traditional Programming Serial: One instruction at a time, one after the other, on a single CPU. Instructions PROBLEM t6 t5 t4 t3 t2 t1 CPU
  • 3. The Funky Ishtyle Parallel: The problem is split in parts. Each part is represented as a sequence of instructions. Each such sequence is run on a separate CPU. Problem Sub- Problem1 Sub- Problem2 t3 t2 t1 t3 t2 t1 CPU1 CPU2
  • 4. Why Parallelise? Speed - ”Many Hands Make Light Work” Precision/Scale – We can solve bigger problems, with greater accuracy.
  • 5. Parallel Programming Models There are several parallel programming models in common use: Shared Memory Threads Message Passing Data Parallel
  • 6. Message Passing Model The applications on the ANDC cluster as of now work on this model Tasks use their own local memory during computation Task exchange data through messages
  • 7. The MPI Standard MPI: Message Passing Interface A standard, with many implementations Codifies ”best practises” of the Parallel Design community Implementations LAM/MPI – Argonne Labs MPICH openMPI
  • 8. How MPI works communicators define which collection of processes may communicate with each other Every process in a communicator has a unique rank The size of the communicator is the total no. of processes in the communicator
  • 9. MPI primitives – Environment Setup MPI_INIT: initialises the MPI execution environment MPI_COMM_SIZE: Determines the number of processes in the group associated with a communicator MPI_COMM_RANK: Determines the rank of the calling process within the communicator MPI_FINALIZE: Terminates the MPI execution environment
  • 10. MPI primitives – Message Passing MPI_Send(buffer,count,type,dest,tag,comm) MPI_Recv(buffer,count,type,source,tag,comm,status)
  • 11. An Example Application The Monte-Carlo Pi Estimation Algorithm AKA ”The Dartboard Algorithm”
  • 12. Algorithm Description Imagine you have a square ”dartboard”, with a circle inscribed in it:
  • 13. Randomly throw N darts at the board Count the no of HITS ( darts landing within circle) hits flops
  • 14. pi will be the value obtained after multiplying the ratio of hits to total throws by 4 Why: pi = A c / r 2 A s = 4r 2 r 2 = A s / 4 pi = 4 * A c / A s hits flops
  • 15. Parallel Version Make each worker throw an equal number of darts A worker counts the HITS The Master adds all the individual ”HITS” It then computes pi as: pi = (4.)*(HITS)/N
  • 16. To Make it Faster.... Increase the number of workers p, while keeping N constant. Each worker deals with (N/p) throws so the greater the value of p, the fewer throws a worker handles Fewer throws => faster
  • 17. To Make it ”Better” Increase the number of throws N This makes the calculation more accurate
  • 18. MPI For each task, run the dartboard algorithm homehits = dboard(DARTS); Workers send homehits to master if (taskid != MASTER) MPI_Send(&homehits, 1, MPI_DOUBLE, MASTER, count, MPI_COMM_WORLD);
  • 19. Master gets homehit values from workers for (i=0;i<p;i++) { rc = MPI_Recv(&hitrecv, 1, MPI_DOUBLE, MPI_ANY_SOURCE, mtype, MPI_COMM_WORLD, &status); totalhits = totalhits + hitrecv; } Master calculates pi as pi = (4.0)*(totalhits)/N
  • 20. MapReduce Framework for simplifying the development of parallel programs. Developed at Google. FLOSS implementations Hadoop (Java) from Yahoo Disco (Erlang) from Nokia Dumbo from Audioscrobbler Many others (including a 36-line Ruby one!)
  • 21. The MapReduce library requires the user to implement: Map(): takes as input a function and a sequence of values. Applies the function to each value in the sequence Reduce(): combines all the elements of a sequence using a binary operation MapReduce
  • 22. How it works (oversimplified) map() takes as input a set of <key,value> pairs produces a set of <intermediate key,value> pairs This is all done in parallel, across many machines The parallelisation is done by the mapreduce library (the programmer doesn't have to think about it)
  • 23. The MapReduce Library groups together all intermediate values associated with the same intermediate key I and passes them to reduce() A Reduce() instance takes a set of <intermediate key,value> pairs and produces an output value for that key, like a ”summary” value.
  • 24. Pi Estimation in MapReduce Here, map() is the dartboard algo. Each worker runs the algo. Hits are represented as <1,no_of_Hits> and flops as <0,no_of_flops> Thus Each Map() instance returns two <boolean,count> to the MapReduce library.
  • 25. The library then clumps all the <bool,count> pairs into two ”sets”: one for key 0 and one for key 1 and passes them to reduce() Reduce() then adds up the ”count” for each key to produce a ”grand total”. Thus we know the total hits and total flops. These are output as <key, Grand_total> pairs to the master process. The master then finds pi as pi = 4*(hits)/(hits+flops)
  • 26. Other Solutions PVM OpenMP LINDA Occam Parallel/Scientific Python
  • 27. Problems/Limitations Parallel Slowdown: parallelization of a parallel computer program beyond a certain point causes the program to run slower The Amdahl Principle: Parallel speedup is limited by the sequential fraction of the program.
  • 28. Applications Compute clusters are used whenever we have: lots and lots of data to process, Too little time to work sequentially.
  • 29. Finance Risk Assessment: India's NSE uses a linux cluster in order to monitor the risk of members Broker crosses VAR limit => account disabled VAR is calculated in realtime using PRISM (Parallel Risk Management System), which uses MPI NSE's PRISM handles 500 trades/sec and can scale to 1000 trades/sec.
  • 30. Molecular Dynamics Given a collection of atoms, we’d like to calculate how they interact and move under realistic laboratory conditions expensive part: determining the force on each atom, since it depends on the positions of all other atoms in the system
  • 31. Software: GROMACS: helps scientists simulate the behavior of large molecules (like proteins, lipids, and even polymers) PyMol: molecular graphics and modelling package which can be also used to generate animated sequences. Raytraced Lysozyme structure created with Pymol
  • 32. Other Distributed Problems Rendering multiple frames of high-quality animation (eg – Shrek) Indexing the web (eg – Google) Data Mining
  翻译: