SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Advanced MPI
       metu-ceng
  ts@TayfunSen.com
   28 November 2008
Company
   LOGO      Outline
             • Quick Introduction to MPI
             • Collective Communication
             • OpenMPI
             • MPI using C++: Boost Libraries
             • User Defined Types
             • Tools of Trade & Debugging
             • References
             •Q&A
28/11/2008            Advanced MPI              2/20
Company
   LOGO      Quick Intro to MPI
             • MPI is a standard with many
                 implementations (libraries)
             •   OpenMPI which evolved from lam-
                 mpi/mpich and MVAPICH are
                 bigger ones
             •   Basically a message passing API
             •   Some basic requirements: high
                 performing, scalable and
                 portable.

28/11/2008              Advanced MPI               3/20
Company
   LOGO      Collective Comm.
             • Point to point communication has
                 been talked in previous seminars
             •   communicator: groups processes
                 so you can communicate with all at
                 the same time (custom groups)
             •   synchronization, data sharing,
                 reduce operations are all
                 examples


28/11/2008              Advanced MPI                  4/20
Company
   LOGO      Collective Comm.
             • Demo time!
             Example collective communication
              programs on localhost
             Connecting to NAR – best guide is
              the web site –
              hpc.ceng.metu.edu.tr
             Which MPI to use, how to set up
              environment?
             Using man pages

28/11/2008            Advanced MPI               5/20
Company
   LOGO      OpenMPI
             • Both OpenMPI (Beware: not to be
               confused with OpenMP) and
               MVAPICH are good implementations,
               installed on NAR – choose according to
               your taste
             • No proper documentation at the
               moment, use the FAQ page
             • Can also do MPMD:
             $ mpirun ­np 2 a.out : ­np 2 
               b.out
             Ranks 0 to 3 on different progs.
28/11/2008              Advanced MPI                    6/20
Company
   LOGO      OpenMPI
             • OpenMPI is highly configurable
             • MCA (modular component
                 architecture) parameters for run-
                 time tuning
             •   Check following commands for
                 these parameters:
             $ ompi_info ­­param all all
             $ ompi_info ­­param btl tcp
             Shows parameters and their
              explanations. Check as needed.
28/11/2008               Advanced MPI                7/20
Company
   LOGO      OpenMPI
             •   $ mpirun ­­mca btl self,sm,gm ...
             • Above says use only loopback
                 communication, shared memory or
                 Myrinet/GM for this run
             •   While communicating on the same
                 machine, shared memory is used
                 automatically
             •   TCP is used by default if it is available,
                 for node2node communication. Check
                 http://www.open-mpi.org/faq/?category=tuning
                 for more info
28/11/2008                 Advanced MPI                         8/20
Company
   LOGO      MPI with some Boost
             • Boost C++ libraries complete STL
             • Some are to be included in the
              standard




28/11/2008            Advanced MPI                9/20
Company
   LOGO      MPI with some Boost
             • Pretty easy to set up, install
             • Some libraries are header only
             • No Boost.MPI library on NAR
                 /usr/lib/libboo* and no headers
                 /usr/include/boost/
             •   Interesting libraries are Boost.MPI and
                 Boost.Serialization
             •   Set up on your home directory on NAR
                 or ask the sys admins
             •   Can use any underlying MPI
                 implementation
28/11/2008                Advanced MPI                     10/20
Company
   LOGO      MPI with some Boost
             • Previous code becomes:
               mpi::environment env(argc, argv);
               mpi::communicator world;
               std::cout << quot;I am process quot; << 
               world.rank() << quot; of quot; << 
               world.size() << quot;.quot; << std::endl;

             • Some examples
             • Need to write a Makefile to add
                 required libraries/header files while
                 compiling
             •   Python bindings also exist
28/11/2008               Advanced MPI                11/20
Company
   LOGO      User Defined Data Types
             • Best thing about Boost is it is so
                 easier to transfer complex types
             •   Uses boost::serialization
             •   Quick and easy
             •   An example
             •   Some thoughts: what happens
                 when there are pointers? (like
                 when transmitting trees?)


28/11/2008               Advanced MPI               12/20
Company
   LOGO      Tools of Trade
             • gfilt for intelligible template errors
             • Extremely useful when using C++
                 to code
             •   For debugging, one can use gdb
                 and for memory checking, valgrind




28/11/2008              Advanced MPI                    13/20
Company
   LOGO      Tools of Trade
BEFORE




AFTER



28/11/2008       Advanced MPI   14/20
Company
   LOGO      Debugging
             • Parallel debuggers? Totalview?
                 DDT? Expensive, costs $$$
             •   Too simple to use a conventional
                 debugger. GDB is your best friend.
             •   If using Boost libraries, C++ or
                 more complex structures like trees:
                 Use a graphical debugger DDD,
                 xxgdb, ... choose your favourite.


28/11/2008               Advanced MPI              15/20
Company
   LOGO      Debugging
             • Demo time! Using DDD to debug
              parallel programs.




28/11/2008            Advanced MPI             16/20
Company
   LOGO      Debugging
             • What else? Valgrind for detecting
                 memory leaks, and possible core
                 dumps. Just use
             •   # mpirun -np 2 valgrind –leak-
                 check=full ./main
             •   Beware! Extremely slow while
                 running with valgrind



28/11/2008              Advanced MPI               17/20
Company
   LOGO      Some left out bits
             • There are more advanced topics
                 such as Parallel I/O, RDMA etc.
             •   Different hardware, network
                 characteristics enable different
                 methods
             •   Myrinet, OpenFabrics, Quadrics...
             •   Interconnections becoming much
                 more complex


28/11/2008               Advanced MPI                18/20
Company
   LOGO      References & Notes
             •   The presentation template is from:
                 http://www.presentationhelper.co.uk/free-open-offic
             •   Hardware information of NAR retrieved from
                 http://hpc.ceng.metu.edu.tr/system/hardware/
             •   A great tutorial on MPI can be found @ NCSA
                 http://webct.ncsa.uiuc.edu:8900/public/MPI/
             •   Boost homepage is at: http://www.boost.org/
             •   OpenMPI home page can be found:
                 http://www.open-mpi.org/
             •   This presentation can be obtained from
                 slideshare at: http://www.slideshare.net/tayfun/
             •   gfilt can be obtained from
                 http://www.bdsoft.com/tools/stlfilt.html
28/11/2008                 Advanced MPI                        19/20
Company
   LOGO      The End

             Thanks For Your Time.
                Any Questions
                           ?
28/11/2008        Advanced MPI   20/20

Contenu connexe

En vedette

Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)
Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)
Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)leifwalsh
 
A New MongoDB Sharding Architecture for Higher Availability and Better Resour...
A New MongoDB Sharding Architecture for Higher Availability and Better Resour...A New MongoDB Sharding Architecture for Higher Availability and Better Resour...
A New MongoDB Sharding Architecture for Higher Availability and Better Resour...leifwalsh
 
Buffer Trees - Utility and Applications for External Memory Data Processing
Buffer Trees - Utility and Applications for External Memory Data ProcessingBuffer Trees - Utility and Applications for External Memory Data Processing
Buffer Trees - Utility and Applications for External Memory Data ProcessingMilind Gokhale
 
qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...
qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...
qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...Sri Ambati
 
Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...
Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...
Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...Francisco Zamora-Martinez
 
Visualization of large FEM meshes
Visualization of large FEM meshesVisualization of large FEM meshes
Visualization of large FEM meshesTomáš Hnilica
 
Debugging Numerical Simulations on Accelerated Architectures - TotalView fo...
 Debugging Numerical Simulations on Accelerated Architectures  - TotalView fo... Debugging Numerical Simulations on Accelerated Architectures  - TotalView fo...
Debugging Numerical Simulations on Accelerated Architectures - TotalView fo...Rogue Wave Software
 
Efficient Viterbi algorithms for lexical tree based models
Efficient Viterbi algorithms for lexical tree based modelsEfficient Viterbi algorithms for lexical tree based models
Efficient Viterbi algorithms for lexical tree based modelsFrancisco Zamora-Martinez
 
Write-optimization in external memory data structures (Highload++ 2014)
Write-optimization in external memory data structures (Highload++ 2014)Write-optimization in external memory data structures (Highload++ 2014)
Write-optimization in external memory data structures (Highload++ 2014)leifwalsh
 
A Connectionist approach to Part-Of-Speech Tagging
A Connectionist approach to Part-Of-Speech TaggingA Connectionist approach to Part-Of-Speech Tagging
A Connectionist approach to Part-Of-Speech TaggingFrancisco Zamora-Martinez
 
Algorithms : Introduction and Analysis
Algorithms : Introduction and AnalysisAlgorithms : Introduction and Analysis
Algorithms : Introduction and AnalysisDhrumil Patel
 
Some empirical evaluations of a temperature forecasting module based on Art...
Some empirical evaluations of a temperature forecasting module   based on Art...Some empirical evaluations of a temperature forecasting module   based on Art...
Some empirical evaluations of a temperature forecasting module based on Art...Francisco Zamora-Martinez
 

En vedette (15)

Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)
Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)
Introducing TokuMX: The Performance Engine for MongoDB (NYC.rb 2013-12-10)
 
A New MongoDB Sharding Architecture for Higher Availability and Better Resour...
A New MongoDB Sharding Architecture for Higher Availability and Better Resour...A New MongoDB Sharding Architecture for Higher Availability and Better Resour...
A New MongoDB Sharding Architecture for Higher Availability and Better Resour...
 
Buffer Trees - Utility and Applications for External Memory Data Processing
Buffer Trees - Utility and Applications for External Memory Data ProcessingBuffer Trees - Utility and Applications for External Memory Data Processing
Buffer Trees - Utility and Applications for External Memory Data Processing
 
qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...
qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...
qconsf 2013: Top 10 Performance Gotchas for scaling in-memory Algorithms - Sr...
 
Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...
Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...
Mejora del reconocimiento de palabras manuscritas aisladas mediante un clasif...
 
PhD defence
PhD defencePhD defence
PhD defence
 
Visualization of large FEM meshes
Visualization of large FEM meshesVisualization of large FEM meshes
Visualization of large FEM meshes
 
Debugging Numerical Simulations on Accelerated Architectures - TotalView fo...
 Debugging Numerical Simulations on Accelerated Architectures  - TotalView fo... Debugging Numerical Simulations on Accelerated Architectures  - TotalView fo...
Debugging Numerical Simulations on Accelerated Architectures - TotalView fo...
 
Efficient Sorts
Efficient SortsEfficient Sorts
Efficient Sorts
 
Efficient Viterbi algorithms for lexical tree based models
Efficient Viterbi algorithms for lexical tree based modelsEfficient Viterbi algorithms for lexical tree based models
Efficient Viterbi algorithms for lexical tree based models
 
@pospaseis
@pospaseis@pospaseis
@pospaseis
 
Write-optimization in external memory data structures (Highload++ 2014)
Write-optimization in external memory data structures (Highload++ 2014)Write-optimization in external memory data structures (Highload++ 2014)
Write-optimization in external memory data structures (Highload++ 2014)
 
A Connectionist approach to Part-Of-Speech Tagging
A Connectionist approach to Part-Of-Speech TaggingA Connectionist approach to Part-Of-Speech Tagging
A Connectionist approach to Part-Of-Speech Tagging
 
Algorithms : Introduction and Analysis
Algorithms : Introduction and AnalysisAlgorithms : Introduction and Analysis
Algorithms : Introduction and Analysis
 
Some empirical evaluations of a temperature forecasting module based on Art...
Some empirical evaluations of a temperature forecasting module   based on Art...Some empirical evaluations of a temperature forecasting module   based on Art...
Some empirical evaluations of a temperature forecasting module based on Art...
 

Similaire à Advanced MPI

MPI Presentation
MPI PresentationMPI Presentation
MPI PresentationTayfun Sen
 
#SitBERN modern abap development with abapgit
#SitBERN modern abap development with abapgit#SitBERN modern abap development with abapgit
#SitBERN modern abap development with abapgitChristian Günter
 
Marchand leny mass digitization systems and open source software
Marchand leny mass digitization systems and open source softwareMarchand leny mass digitization systems and open source software
Marchand leny mass digitization systems and open source softwareFIAT/IFTA
 
Itsme Tech development seminar
Itsme Tech development seminarItsme Tech development seminar
Itsme Tech development seminaritsmesrl
 
Simplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual CloudSimplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual CloudLiz Warner
 
OpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdfOpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdfssuser866937
 
OpenNMS Reporting - Enhancement
OpenNMS Reporting - EnhancementOpenNMS Reporting - Enhancement
OpenNMS Reporting - EnhancementRonny
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018OpenEBS
 
Programming Models for High-performance Computing
Programming Models for High-performance ComputingProgramming Models for High-performance Computing
Programming Models for High-performance ComputingMarc Snir
 
Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...
Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...
Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...Yokogawa1
 
APIs and SDKs: Breaking Into and Succeeding in a Specialty Market
APIs and SDKs: Breaking Into and Succeeding in a Specialty MarketAPIs and SDKs: Breaking Into and Succeeding in a Specialty Market
APIs and SDKs: Breaking Into and Succeeding in a Specialty MarketScott Abel
 
Amora: A mobile remote assistant
Amora: A mobile remote assistantAmora: A mobile remote assistant
Amora: A mobile remote assistantgsroma
 
Apache Spark Performance Observations
Apache Spark Performance ObservationsApache Spark Performance Observations
Apache Spark Performance ObservationsAdam Roberts
 
plumbing for the next web
plumbing for the next webplumbing for the next web
plumbing for the next webIan Forrester
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLinaro
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsRogue Wave Software
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE
 
CAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablementCAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablementGanesan Narayanasamy
 

Similaire à Advanced MPI (20)

MPI Presentation
MPI PresentationMPI Presentation
MPI Presentation
 
#SitBERN modern abap development with abapgit
#SitBERN modern abap development with abapgit#SitBERN modern abap development with abapgit
#SitBERN modern abap development with abapgit
 
Marchand leny mass digitization systems and open source software
Marchand leny mass digitization systems and open source softwareMarchand leny mass digitization systems and open source software
Marchand leny mass digitization systems and open source software
 
Itsme Tech development seminar
Itsme Tech development seminarItsme Tech development seminar
Itsme Tech development seminar
 
Simplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual CloudSimplifying and accelerating converged media with Open Visual Cloud
Simplifying and accelerating converged media with Open Visual Cloud
 
OpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdfOpenMP-OpenACC-Offload-Cauldron2022-1.pdf
OpenMP-OpenACC-Offload-Cauldron2022-1.pdf
 
OpenNMS Reporting - Enhancement
OpenNMS Reporting - EnhancementOpenNMS Reporting - Enhancement
OpenNMS Reporting - Enhancement
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018
 
Os Lattner
Os LattnerOs Lattner
Os Lattner
 
Programming Models for High-performance Computing
Programming Models for High-performance ComputingProgramming Models for High-performance Computing
Programming Models for High-performance Computing
 
Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...
Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...
Open Process Automation: Status of the O-PAS™ Standard, Conformance Certifica...
 
APIs and SDKs: Breaking Into and Succeeding in a Specialty Market
APIs and SDKs: Breaking Into and Succeeding in a Specialty MarketAPIs and SDKs: Breaking Into and Succeeding in a Specialty Market
APIs and SDKs: Breaking Into and Succeeding in a Specialty Market
 
Amora: A mobile remote assistant
Amora: A mobile remote assistantAmora: A mobile remote assistant
Amora: A mobile remote assistant
 
Apache Spark Performance Observations
Apache Spark Performance ObservationsApache Spark Performance Observations
Apache Spark Performance Observations
 
Python introduction
Python introductionPython introduction
Python introduction
 
plumbing for the next web
plumbing for the next webplumbing for the next web
plumbing for the next web
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applications
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
CAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablementCAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablement
 

Dernier

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Dernier (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Advanced MPI

  • 1. Advanced MPI metu-ceng ts@TayfunSen.com 28 November 2008
  • 2. Company LOGO Outline • Quick Introduction to MPI • Collective Communication • OpenMPI • MPI using C++: Boost Libraries • User Defined Types • Tools of Trade & Debugging • References •Q&A 28/11/2008 Advanced MPI 2/20
  • 3. Company LOGO Quick Intro to MPI • MPI is a standard with many implementations (libraries) • OpenMPI which evolved from lam- mpi/mpich and MVAPICH are bigger ones • Basically a message passing API • Some basic requirements: high performing, scalable and portable. 28/11/2008 Advanced MPI 3/20
  • 4. Company LOGO Collective Comm. • Point to point communication has been talked in previous seminars • communicator: groups processes so you can communicate with all at the same time (custom groups) • synchronization, data sharing, reduce operations are all examples 28/11/2008 Advanced MPI 4/20
  • 5. Company LOGO Collective Comm. • Demo time! Example collective communication programs on localhost Connecting to NAR – best guide is the web site – hpc.ceng.metu.edu.tr Which MPI to use, how to set up environment? Using man pages 28/11/2008 Advanced MPI 5/20
  • 6. Company LOGO OpenMPI • Both OpenMPI (Beware: not to be confused with OpenMP) and MVAPICH are good implementations, installed on NAR – choose according to your taste • No proper documentation at the moment, use the FAQ page • Can also do MPMD: $ mpirun ­np 2 a.out : ­np 2  b.out Ranks 0 to 3 on different progs. 28/11/2008 Advanced MPI 6/20
  • 7. Company LOGO OpenMPI • OpenMPI is highly configurable • MCA (modular component architecture) parameters for run- time tuning • Check following commands for these parameters: $ ompi_info ­­param all all $ ompi_info ­­param btl tcp Shows parameters and their explanations. Check as needed. 28/11/2008 Advanced MPI 7/20
  • 8. Company LOGO OpenMPI • $ mpirun ­­mca btl self,sm,gm ... • Above says use only loopback communication, shared memory or Myrinet/GM for this run • While communicating on the same machine, shared memory is used automatically • TCP is used by default if it is available, for node2node communication. Check http://www.open-mpi.org/faq/?category=tuning for more info 28/11/2008 Advanced MPI 8/20
  • 9. Company LOGO MPI with some Boost • Boost C++ libraries complete STL • Some are to be included in the standard 28/11/2008 Advanced MPI 9/20
  • 10. Company LOGO MPI with some Boost • Pretty easy to set up, install • Some libraries are header only • No Boost.MPI library on NAR /usr/lib/libboo* and no headers /usr/include/boost/ • Interesting libraries are Boost.MPI and Boost.Serialization • Set up on your home directory on NAR or ask the sys admins • Can use any underlying MPI implementation 28/11/2008 Advanced MPI 10/20
  • 11. Company LOGO MPI with some Boost • Previous code becomes:   mpi::environment env(argc, argv);   mpi::communicator world;   std::cout << quot;I am process quot; <<  world.rank() << quot; of quot; <<  world.size() << quot;.quot; << std::endl; • Some examples • Need to write a Makefile to add required libraries/header files while compiling • Python bindings also exist 28/11/2008 Advanced MPI 11/20
  • 12. Company LOGO User Defined Data Types • Best thing about Boost is it is so easier to transfer complex types • Uses boost::serialization • Quick and easy • An example • Some thoughts: what happens when there are pointers? (like when transmitting trees?) 28/11/2008 Advanced MPI 12/20
  • 13. Company LOGO Tools of Trade • gfilt for intelligible template errors • Extremely useful when using C++ to code • For debugging, one can use gdb and for memory checking, valgrind 28/11/2008 Advanced MPI 13/20
  • 14. Company LOGO Tools of Trade BEFORE AFTER 28/11/2008 Advanced MPI 14/20
  • 15. Company LOGO Debugging • Parallel debuggers? Totalview? DDT? Expensive, costs $$$ • Too simple to use a conventional debugger. GDB is your best friend. • If using Boost libraries, C++ or more complex structures like trees: Use a graphical debugger DDD, xxgdb, ... choose your favourite. 28/11/2008 Advanced MPI 15/20
  • 16. Company LOGO Debugging • Demo time! Using DDD to debug parallel programs. 28/11/2008 Advanced MPI 16/20
  • 17. Company LOGO Debugging • What else? Valgrind for detecting memory leaks, and possible core dumps. Just use • # mpirun -np 2 valgrind –leak- check=full ./main • Beware! Extremely slow while running with valgrind 28/11/2008 Advanced MPI 17/20
  • 18. Company LOGO Some left out bits • There are more advanced topics such as Parallel I/O, RDMA etc. • Different hardware, network characteristics enable different methods • Myrinet, OpenFabrics, Quadrics... • Interconnections becoming much more complex 28/11/2008 Advanced MPI 18/20
  • 19. Company LOGO References & Notes • The presentation template is from: http://www.presentationhelper.co.uk/free-open-offic • Hardware information of NAR retrieved from http://hpc.ceng.metu.edu.tr/system/hardware/ • A great tutorial on MPI can be found @ NCSA http://webct.ncsa.uiuc.edu:8900/public/MPI/ • Boost homepage is at: http://www.boost.org/ • OpenMPI home page can be found: http://www.open-mpi.org/ • This presentation can be obtained from slideshare at: http://www.slideshare.net/tayfun/ • gfilt can be obtained from http://www.bdsoft.com/tools/stlfilt.html 28/11/2008 Advanced MPI 19/20
  • 20. Company LOGO The End Thanks For Your Time. Any Questions ? 28/11/2008 Advanced MPI 20/20