Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Departemen Ilmu Komputer -IPB Pemrosesan Paralel Kuliah 01: Pendahuluan Yeni Herdiyeni Departemen Ilmu Komputer IPB.

Presentasi serupa


Presentasi berjudul: "Departemen Ilmu Komputer -IPB Pemrosesan Paralel Kuliah 01: Pendahuluan Yeni Herdiyeni Departemen Ilmu Komputer IPB."— Transcript presentasi:

1 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Kuliah 01: Pendahuluan Yeni Herdiyeni Departemen Ilmu Komputer IPB Semester Genap 2010 Komputasi Paralel

2 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Deskripsi • Membahas kebutuhan dan klasifikasi mesin paralel (SISD, SIMD, MISD, MIMD, SPMD), komunikasi antar prosesor, memori persekutuan (shared memory), pengiriman pesan (message passing), jaringan interkoneksi (interconnection network), Desain algoritma paralel, efisiensi dan percepatan pemrosesan paralel, dan contoh aplikasi pemprosesan paralel. • Perangkat lunak yang digunakan : MPI (Message Passing Interface)

3 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Pengajar • Dr. Yeni Herdiyeni, S.Si, M.Komp • Hendra Rahmawan, S.Si, M.T • Endang Purnama, S.Si, M.Komp Komponen Penilaian • UTS • UAS • Tugas • Quiz • Project

4 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Materi Kuliah 1.Pendahuluan 2.Definisi dan motivasi pemrosesan paralel 3.Arsitektur system, Shared memory multiprocessor system, Message passing multicomputer distributed, Shared memory dan klasifikasi memori persekutuan MIMD dan SIMD 4.Topologi Network 5.Paradigma pengiriman pesan dengan menggunakan MPI 6.Prinsip-prinsip Desain Algoritme Paralel 7.Analisis kinerja Pemrosesan paralel 8.UTS

5 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Materi Kuliah #2 9.Pemrograman Paralel : Distributed Memory 10.Pemrograman Paralel 11.Tinjauan ulang critical section dengan menggunakan Pthread, siknronisasi dengan Semaphore, Implementasi Semaphore dilingkungan MPI 12.Sorting 13.Dense Matrix Algorithm 14.Aplikasi pemrosesan (shared memory): problema produsen- konsumen, problema writer reader, problema dining philosophy 15.Presentasi/diskusi proyek 16.UAS Materi Kuliah dapat diakses di

6 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Buku Ajar • Grama, Ananth., Gupta, Anshul., Karypis, George., Kumar, Vipin Introduction to Parallel Computing. Second Edition. Pearson Addision Wesley. • Quinn, Michael J Parallel Programming in C with MPI and OpenMP. International Edition, McGraw-Hill. • Wilkinson, Barry & Allen, Michael Parallel Programming. 2nd Edition,Pearson Educational International. • Jordan, Harry F., Alaghband Gita Fundamentals of Parallel Processing. Prentice Hall.

7 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Motivation : Classical Science Nature Observation Theory Physical Experimentation

8 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Modern Scientific Method Nature Observation Theory Physical Experimentation Numerical Simulation

9 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Modern Parallel Architectures • Two basic architectural scheme: Distributed Memory Shared Memory • Now most computers have a mixed architecture

10 Departemen Ilmu Komputer -IPB Pemrosesan Paralel What is Parallel and Distributed computing? – Solving a single problem faster using multiple CPUs – Parallel = Shared Memory among all CPUs – Distributed = Local Memory/CPU – Common Issues: Partition, Synchronization, Dependencies

11 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Distributed Memory memory CPU memory CPU memory CPU memory NETWORK CPU memory CPU memory CPU node

12 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Shared Memory CPU memory CPU

13 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Seeking Concurrency • Data dependence graphs • Data parallelism • Functional parallelism • Task Parallelism • Pipelining

14 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Interconnection Networks • Uses of interconnection networks – Connect processors to shared memory – Connect processors to each other • Interconnection media types – Shared medium – Switched medium

15 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Most Common Networks Cube, hypercube, n-cube Torus in 1,2,...,N Dim switch switched Fat Tree

16 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Real Shared CPU System Bus Memory banks

17 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Virtual Shared CPU HUB Network memory node

18 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Mixed Architectures CPU memory CPU memory CPU memory CPU NETWORK node

19 Departemen Ilmu Komputer -IPB Pemrosesan Paralel MPI include file #include void main (int argc, char *argv[]) { int np, rank, ierr; ierr = MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Comm_size(MPI_COMM_WORLD,&np); /* Do Some Works */ ierr = MPI_Finalize(); } variable declarations #include void main (int argc, char *argv[]) { int np, rank, ierr; ierr = MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Comm_size(MPI_COMM_WORLD,&np); /* Do Some Works */ ierr = MPI_Finalize(); } General MPI Program Structure Initialize MPI environment #include void main (int argc, char *argv[]) { int np, rank, ierr; ierr = MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Comm_size(MPI_COMM_WORLD,&np); /* Do Some Works */ ierr = MPI_Finalize(); } Do work and make message passing calls #include void main (int argc, char *argv[]) { int np, rank, ierr; ierr = MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Comm_size(MPI_COMM_WORLD,&np); /* Do Some Works */ ierr = MPI_Finalize(); } Terminate MPI Environment #include void main (int argc, char *argv[]) { int np, rank, ierr; ierr = MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Comm_size(MPI_COMM_WORLD,&np); /* Do Some Works */ ierr = MPI_Finalize(); }

20 Departemen Ilmu Komputer -IPB Pemrosesan Paralel The Message-Passing Programming Paradigm

21 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Message

22 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Foster’s Design Methodology • Partitioning • Communication • Agglomeration • Mapping

23 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Foster’s Methodology

24 Departemen Ilmu Komputer -IPB Pemrosesan Paralel 24 Example program (1) Calculating the value of  by:

25 Departemen Ilmu Komputer -IPB Pemrosesan Paralel 25 Calculated by process 0 Calculated by process 1 Calculated by process 2 Calculated by process 3 OK!  = Start calculation!

26 Departemen Ilmu Komputer -IPB Pemrosesan Paralel =  Sequential Algorithm

27 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Phases of Parallel Algorithm Row i of A b b cici Inner product computation Row i of A bc All-gather communication

28 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Contoh 4x04x0 +6x 1 +2x 2 – 2x 3 =8 2x02x0 +5x 2 – 2x 3 =4 –4x0–4x0 – 3x 1 – 5x 2 +4x 3 =1 8x08x0 +18x 1 – 2x 2 +3x 3 =40

29 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Partitioning P0 P1

30 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Communication P0 P1

31 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Communication (CONT..) P0 P1

32 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Communication (cont..) P0 P1

33 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Communication (cont..) P0 P1

34 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Shared memory multiprocessor using a single bus

35 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Process • “A program in a run”, a program in the memory. • A high level view of a UNIX process

36 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Threads • A stream of control in a process. • A high level view of threads in a UNIX process

37 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M Pearson Education Inc. All rights reserved. 37 Parallel Bubble Sort Iteration could start before previous iteration finished if does not overtake previous bubbling action:

38 Departemen Ilmu Komputer -IPB Pemrosesan Paralel Virtual Topology 38


Download ppt "Departemen Ilmu Komputer -IPB Pemrosesan Paralel Kuliah 01: Pendahuluan Yeni Herdiyeni Departemen Ilmu Komputer IPB."

Presentasi serupa


Iklan oleh Google