MPI and OpenMPI - Computational Sciences - Lecture Slides, Slides of Computational Techniques

Computations Sciences course major topics are Bioinformatics, Cache Based Iterative Algorithms, Complex Domains, Computer Architecture, High Performance Computing, , Mpi and Openmpi, Nanotechnology, Networks. This lecture includes: Mpi and Openmpi, Brief History of Mpi, Brief Background On Parallel Computers, Mpi, Brief History of Openmpi, Openmpi, Parallel Computer, Shared Memory Parallelism, Thread Based Parallelism, Explicit Parallelism

Typology: Slides

2012/2013

Uploaded on 08/30/2013

suneeta
suneeta 🇮🇳

4.8

(9)

81 documents

1 / 53

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MPI & OpenMPI
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35

Partial preview of the text

Download MPI and OpenMPI - Computational Sciences - Lecture Slides and more Slides Computational Techniques in PDF only on Docsity!

MPI

OpenMPI

Outline

A

brief Background on Parallel Computers

A

Brief History of

MPI

MPI

A

Brief History of OpenMPI

OpenMPI

More

on

Parallel

Computers

At the heart of all parallel machines is a collection of processors, often in the hundreds or thousands

Each processor has its own cache and local memory - Parallel computers all have some communication facility – powerful switches are normally used to interconnect processors, while busses are used to connect processors in local clusters

Models

of

Parallel

Machines

There are three most important classes of parallel machines

Shared

Disk

Shared

Nothing

MPI

The concept of message transferring so that processes communicate with other processes by sending and receiving messages, is the core of the Message Passing Interface

(MPI)

What

is

MPI?

MPI

is a message

passing library specification proposed as a standard by a committee of vendors, implementers, and users. It is designed to permit the development of parallel software libraries

WHAT

ITS

NOT!

‐ A compiler ‐ A specific Product

Birth

of

MPI

April 1992, during one ‐ day workshop on Standards for Message Passing in Distributed ‐ Memory Environment, they all realized that they were continuously reinventing the wheel duplicating each other's efforts - They got together (Supercomputing '92) and decided to thrash out a common standard in the same hotel in Dallas, where HPF Forum met - The first standard (MPI ‐ 1.0) was completed in May 1994 - The Beta version of the second, enhanced standard (MPI ‐ 2.0) was released in July of 1997 - Industrial participants included Convex, Cray, IBM, Intel, Meiko, nCUBE, NEC, Thinking Machines docsity.com

Where

to

use

MPI

MPI

is primarily for

SPMD

and

MIMD

types of parallel computing environments SPMD

Same Program, Different Data MIND - Different Programs, Different Data

The Six Basic Functions of

MPI

MPI_INIT ( Int *arg, char ***argv) Initiate an MPI computation.argc, argv are required only in C language binding,where they are are main program’s argument. MPI


FINALIZE () Shutdown a computation. MPI_COMM_SIZE (comm, size) Determine the number of processes in a computation.comm communicator (handle) size number of processes in the group of comms (Integer)

Basic functions continued

MPI_COMM_RANK (comm, pid) Determine the identifier of the current process.comm communicator (handle) pid process id in the group of comm (Integer)

Basic functions continued

MPI_RECV (buf, count, datatype, source, tag, comm, status) Receive a message.buf Address of receive buffer (choice) count size of receive buffer, in elements (Integer >=0) datatype datatype of receive buffer elements (handle) source process id of source process, or MPI_ANY_SOURCE (Integer) tag message tag, or MPI_ANY_TAG (Integer) comm communicator (handle) status status object (status)

Sample

C

Program

#include <stdio.h>#include <mpi.h>main(int argc, char* argv) { int size, rank;MPI_Init(argc, &argv);MPI_Comm_size(MPI_COMM_WORLD, &size);MPI_Comm_rank(MPI_COMM_WORLD, &rank);printf("Hello world! I'm %d of %d\n", rank+1, size);MPI_Finalize(); }