EM 361: Παράλληλοι Υπολογισμοί

Σχετικά έγγραφα
EM 361: Παράλληλοι Υπολογισµοί

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Section 8.3 Trigonometric Equations

EE512: Error Control Coding

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

EM 361: Παράλληλοι Υπολογισμοί

τατιςτική ςτην Εκπαίδευςη II

Ηλεκτρονικοί Υπολογιστές IV

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Ηλεκτρονικοί Υπολογιστές IV

Ηλεκτρονικοί Υπολογιστές IV

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Homework 3 Solutions

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

ΠΕΡΙΓΡΑΦΙΚΗ και ΕΠΑΓΩΓΙΚΗ ΣΤΑΤΙΣΤΙΚΗ

τατιςτική ςτην Εκπαίδευςη II

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ

Statistical Inference I Locally most powerful tests

Example Sheet 3 Solutions

The Simply Typed Lambda Calculus

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

ΑΓΓΛΙΚΑ Ι. Ενότητα 7α: Impact of the Internet on Economic Education. Ζωή Κανταρίδου Τμήμα Εφαρμοσμένης Πληροφορικής

Numerical Analysis FMN011

Partial Differential Equations in Biology The boundary element method. March 26, 2013

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Approximation of distance between locations on earth given by latitude and longitude

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Ηλεκτρονικοί Υπολογιστές IV

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Ψηφιακή Οικονομία. Διάλεξη 11η: Markets and Strategic Interaction in Networks Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Homework 8 Model Solution Section

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

derivation of the Laplacian from rectangular to spherical coordinates

Μηχανική Μάθηση Hypothesis Testing

Matrices and Determinants

τατιστική στην Εκπαίδευση II

Congruence Classes of Invertible Matrices of Order 3 over F 2

Other Test Constructions: Likelihood Ratio & Bayes Tests

ΠΕΡΙΓΡΑΦΙΚΗ και ΕΠΑΓΩΓΙΚΗ ΣΤΑΤΙΣΤΙΚΗ

D Alembert s Solution to the Wave Equation

the total number of electrons passing through the lamp.

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

ΔΙΟΙΚΗΤΙΚΗ ΕΠΙΣΤΗΜΗ. Ενότητα #10: ΔΙΟΙΚΗΣΗ ΟΛΙΚΗΣ ΠΟΙΟΤΗΤΑΣ ΚΑΙ ΑΝΑΣΧΕΔΙΑΣΜΟΣ ΔΙΑΔΙΚΑΣΙΑΣ

Μακροοικονομική Θεωρία Ι

EM 361: Παράλληλοι Υπολογισμοί

C.S. 430 Assignment 6, Sample Solutions

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

PARTIAL NOTES for 6.1 Trigonometric Identities

Forced Pendulum Numerical approach

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

2 Composition. Invertible Mappings

ΠΕΡΙΓΡΑΦΙΚΗ και ΕΠΑΓΩΓΙΚΗ ΣΤΑΤΙΣΤΙΚΗ

Block Ciphers Modes. Ramki Thurimella

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

1 String with massive end-points

Instruction Execution Times

The challenges of non-stable predicates

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Μακροοικονομική Θεωρία Ι

[1] P Q. Fig. 3.1

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

ΠΕΡΙΓΡΑΦΙΚΗ και ΕΠΑΓΩΓΙΚΗ ΣΤΑΤΙΣΤΙΚΗ

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Assalamu `alaikum wr. wb.

Second Order RLC Filters

European Constitutional Law

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ Ανώτατο Εκπαιδευτικό Ίδρυμα Πειραιά Τεχνολογικού Τομέα. Ξενόγλωσση Τεχνική Ορολογία

Math 6 SL Probability Distributions Practice Test Mark Scheme

10 MERCHIA. 10. Starting from standing position (where the SIGN START ) without marshal (self start) 5 minutes after TC4 KALO LIVADI OUT

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Strain gauge and rosettes

Εισαγωγή σε μεθόδους Monte Carlo Ενότητα 2: Ολοκλήρωση Monte Carlo, γεννήτριες τυχαίων αριθμών

Γνωστική Ψυχολογία 3

Areas and Lengths in Polar Coordinates

Reminders: linear functions

Μικροηλεκτρονική - VLSI

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

Spherical Coordinates

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ Ανώτατο Εκπαιδευτικό Ίδρυμα Πειραιά Τεχνολογικού Τομέα. Ξένη Ορολογία. Ενότητα 5 : Financial Ratios

ST5224: Advanced Statistical Theory II

Trigonometric Formula Sheet

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

Démographie spatiale/spatial Demography

1. Αφετηρία από στάση χωρίς κριτή (self start όπου πινακίδα εκκίνησης) 5 λεπτά µετά την αφετηρία σας από το TC1B KALO LIVADI OUT

Inverse trigonometric functions & General Solution of Trigonometric Equations

ΑΓΓΛΙΚΑ IV. Ενότητα 6: Analysis of Greece: Your Strategic Partner in Southeast Europe. Ιφιγένεια Μαχίλη Τμήμα Οικονομικών Επιστημών

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

ΠΕΡΙΓΡΑΦΙΚΗ και ΕΠΑΓΩΓΙΚΗ ΣΤΑΤΙΣΤΙΚΗ

Transcript:

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ EM 361: Παράλληλοι Υπολογισμοί Ενότητα: Projects Διδάσκων: Χαρμανδάρης Ευάγγελος ΤΜΗΜΑ ΕΦΑΡΜΟΣΜΕΝΩΝ ΜΑΘΗΜΑΤΙΚΩΝ ΣΧΟΛΗ ΘΕΤΙΚΩΝ ΚΑΙ ΤΕΧΝΟΛΟΓΙΚΩΝ ΕΠΙΣΤΗΜΩΝ

Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται στην άδεια χρήσης Creative Commons και ειδικότερα Αναφορά Μη εμπορική Χρήση Όχι Παράγωγο Έργο 3.0 Ελλάδα (Attribution Non Commercial Non-derivatives 3.0 Greece) CC BY-NC-ND 3.0 GR [ή επιλογή ενός άλλου από τους έξι συνδυασμούς] [και αντικατάσταση λογότυπου άδειας όπου αυτό έχει μπει (σελ. 1, σελ. 2 και τελευταία)] Εξαιρείται από την ως άνω άδεια υλικό που περιλαμβάνεται στις διαφάνειες του μαθήματος, και υπόκειται σε άλλου τύπου άδεια χρήσης. Η άδεια χρήσης στην οποία υπόκειται το υλικό αυτό αναφέρεται ρητώς. 2

Χρηματοδότηση Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί στα πλαίσια του εκπαιδευτικού έργου του διδάσκοντα. Το έργο «Ανοικτά Ακαδημαϊκά Μαθήματα στο Πανεπιστήμιο Κρήτης» έχει χρηματοδοτήσει μόνο τη αναδιαμόρφωση του εκπαιδευτικού υλικού. Το έργο υλοποιείται στο πλαίσιο του Επιχειρησιακού Προγράμματος «Εκπαίδευση και Δια Βίου Μάθηση» και συγχρηματοδοτείται από την Ευρωπαϊκή Ένωση (Ευρωπαϊκό Κοινωνικό Ταμείο) και από εθνικούς πόρους. 3

EM 361: Παράλληλοι Υπολογισμοί Χαρμανδάρης Βαγγέλης, Τμήμα Εφαρμοσμένων Μαθηματικών Πανεπιστήμιο Κρήτης, Χειμερινό Εξάμηνο 2010/11 Projects Πρόβλημα Ν-σωματιδίων. Image Processing (Fast Fourier Transform). Mandelbrot Set. Κυτταρικά Αυτόματα - Game of Life. Multi-colored Algorithms.

Πρόβλημα Ν-Σωματιδίων -- Finding positions and velocities of bodies in space subject to forces from other bodies, using Newtonian laws of physics. -- Simulate movement of bodies in time. Gravitational N-Body Problem Equations Gravitational force between two bodies of masses m a and m b is: G is the gravitational constant and r the distance between the bodies. Subject to forces, body accelerates according to Newton s 2nd law: F = ma m is mass of the body, F is force it experiences, and a the resultant acceleration. 5

Πρόβλημα Ν-Σωματιδίων -- Assume a system with N bodies. Procedure: a) Initialization of the system (initial coordinates, velocities) b) Calculate forces. c) Numerical solution of PDEs. d) Statistics (store trajectories, calculate properties,..etc.) -- Various methods for the numerical solution of PDEs. Example: 6 4.26

Πρόβλημα Ν-Σωματιδίων -- Parallel implementation Different Algorithms: A) Direct algorithm: divide number of particles with number of processors, i.e. N/P bodies per processor. The sequential algorithm is an O(N2) algorithm (for one iteration) as each of the N bodies is influenced by each of the other N - 1 bodies. Not feasible to use this direct algorithm for most interesting N-body problems where N is very large. 7 4.26

Πρόβλημα Ν-Σωματιδίων -- Parallel implementation B) Barnes-Hut Algorithm: Recursive division of 2-dimensional space. 8 4.26

Image Processing Stored images: 2D array of pixels (picture elements) Perform various operations on images: Smoothing (mean value): 9

Image Processing Serial Sequential code: Parallel Code: 10

Image Processing Perform various operations on images: 11

Image Processing Perform various operations on images: Edge detection: 12

Image Processing Perform various operations on images: 13

Image Processing Perform various operations on images 2 nd Order Derivatives: Laplace Operator 14

Image Processing 15

Mandelbrot Set Set of points in a complex plane that are quasi-stable (will increase and decrease, but not exceed some limit) when computed by iterating the function where z k +1 is the (k + 1)th iteration of the complex number z = a + bi and c is a complex number giving position of point in the complex plane. The initial value for z is zero. Iterations continued until magnitude of z is greater than 2 or number of iterations reaches arbitrary limit. Magnitude of z is the length of the vector given by 16

Mandelbrot Set 17

Mandelbrot Set -- Parallel implementation Different Algorithms: A) Static Task Assignment: Simply divide the region in to fixed number of parts, each computed by a separate processor. Not very successful because different regions require different numbers of iterations and time. B) Dynamic Task Assignment: Have processor request regions after computing previous regions 18

Mandelbrot Set Dynamic Task Assignment Work Pool/Processor Farms 19

Cellular Automata ( Game of Life ) The problem space is divided into cells. Each cell can be in one of a finite number of states. Cells affected by their neighbors according to certain rules, and all cells are affected simultaneously in a generation. Rules re-applied in subsequent generations so that cells evolve, or change state, from generation to generation. Most famous cellular automata is the Game of Life devised by John Horton Conway, a Cambridge mathematician. 20 6.63

The Game of Life [by Gardner 1967] Board game - theoretically infinite two-dimensional array of cells. Each cell can hold one organism and has eight neighboring cells, including those diagonally adjacent. Initially, some cells occupied. The following rules apply: 1. Every organism with two or three neighboring organisms survives for the next generation. 2. Every organism with four or more neighbors dies from overpopulation. 3. Every organism with one neighbor or none dies from isolation. 4. Each empty cell adjacent to exactly three occupied neighbors will give birth to an organism. These rules were derived by Conway after a long period of experimentation. 21 6.64

The Game of Life Initial configuration: Mapping distribution of board: 22 6.64

The Game of Life Evolution of Life : exchange info with neighboring procs. 23 6.64

Cellular Automata Serious Applications for Cellular Automata Examples fluid/gas dynamics the movement of fluids and gases around objects diffusion of gases biological growth airflow across an airplane wing erosion/movement of sand at a beach or riverbank. 24 6.64

Multi-Coloured, Multi-Grid Algorithms Πρόβλημα Μοντέλο (συνοριακών τιμών) : Laplace + επιπλέον όρος: 2 2 2 Uxy (, ) Uxy (, ) Uxy (, ) + + a = 2 2 x y xy f( xy, ) Διαμέριση: 1 h=, xi = i * h, yi = j * h, i, j = 0,1,..., N + 1 N + 1 2 Uxy (, ) 1 2 x 2 h 2 Uxy (, ) 1 y h Προσέγγιση παραγώγων: ( Ui+ 1, j+ Ui 1, j 2Ui, j) ( U 2 2 i, j+ 1 + Ui, j 1 2Ui, j) (, ) 1 2 Uxy U U 2 xy h y y i + 1, j i 1, j 2 Uxy (, ) 1 xy 4h 2 ( Ui+ 1, j+ 1 Ui 1, j+ 1 Ui+ 1, j 1 + Ui 1, j 1 ) 25 6.64

Multi-Coloured, Multi-Grid Algorithms Πρόβλημα Συνοριακών Τιμών - Laplace + επιπλέον όρος: a Ui 1, j+ Ui 1, j+ Ui, j 1 + Ui, j 1 4Ui, j + Ui 1, j 1 Ui 1, j 1 Ui 1, j 1 + Ui 1, j 1 h fi, j= 0 4 2 ( + + ) ( + + + + ) Παράλληλη Εφαρμογή της SOR: Multi-colored Αλγόριθμος Four-color ordering: το κεντρικό σημείο έχει διαφορετικό «χρώμα» από όλα τα γειτονικά σημεία με τα οποία συνδέεται, δηλαδή από τα οποία παίρνει πληροφορία. 26 6.64

Multi-Coloured, Multi-Grid Algorithms Multi-Grid Αλγόριθμοι: 27 6.64

Genetic Algorithms Searching and Optimization Algorithms: A search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are a particular class of evolutionary algorithms (EA) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. 28 6.63

Genetic Algorithms Outline of the Basic Genetic Algorithm [Start] Generate random population of n chromosomes (suitable solutions for the problem) [Fitness] Evaluate the fitness f(x) of each chromosome x in the population [New population] Create a new population by repeating following steps until the new population is complete [Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome). [Accepting] Place new offspring in a new population [Replace] Use new generated population for a further run of algorithm [Test] If the end condition is satisfied, stop, and return the best solution in current population [Loop] Go to step 2 29 6.64

Βιβλιογραφία Designing and Building Parallel Programs, Ian Foster, Addison-Wesley 1994. Parallel Computing: Theory and Practice, M. J. Quinn, McGraw-Hill, 1994. Parallel Programming: Techniques amd applications Using Networked Workstations and Parallel Computers, B. Wilkinson, M. Allen, Prentice-Hall, 1999. http://www.epcc.ed.ac.uk/library/documentation/training/: On-line courses include MPI, HPF, Mesh Generation, Introduction to Computational Science, HPC in Business. 30

Τέλος Ενότητας