introduction to scientific computing languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf ·...

20
Introduction to Scientific Computing Languages Paolo Bientinesi AICES, RWTH Aachen [email protected] http://www.aices.rwth-aachen.de/people/bientinesi Tuesdays, 17.00-18.30 Thursdays, 17.00-18.30 Rogowski 115 (AICES seminar room) Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 1/1

Upload: others

Post on 15-Oct-2020

9 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Introduction to Scientific Computing Languages

Paolo Bientinesi

AICES, RWTH [email protected]

http://www.aices.rwth-aachen.de/people/bientinesi

Tuesdays, 17.00-18.30Thursdays, 17.00-18.30

Rogowski 115 (AICES seminar room)

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 1 / 1

Page 2: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Programming & Scientific Computing

Objectives

Fast & easy prototyping → Matlab, Mathematica → Style

High-performance → C, Fortran → Optimizations

Battles:

Numerical vs. Symbolic computations

Imperative vs. Functional programming

Prototyping vs. High-performance

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 2 / 1

Page 3: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Outline – tentative

1 Floating point numbers and arithmetic

2 Programming languages

3 Programs: recursion, functions, variables, scope,. . .

4 Matlab – Matrix operations

5 Mathematica – Functional programmingLists, replacement rules, pattern matching, functions. . .

6 Visualization

7 C (x2) – High-performance computations

8 Performance

9 Numerical libraries

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 3 / 1

Page 4: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Exam - grading

Homeworks4–5 assignments (individual & team)Solutions presented in class

Challenges: elegance, speed

Winners: bonus

Written ExamBefore the end of the semester?

14 February 2013: 5pm(14 March 2013: 5pm)

Questions on the topics of the assignmentsMatlab, Mathematica, C

In English

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 4 / 1

Page 5: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Exam - grading

Homeworks4–5 assignments (individual & team)Solutions presented in class

Challenges: elegance, speed

Winners: bonus

Written ExamBefore the end of the semester?

14 February 2013: 5pm(14 March 2013: 5pm)

Questions on the topics of the assignmentsMatlab, Mathematica, C

In English

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 4 / 1

Page 6: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 7: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 8: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 9: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 10: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 11: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 12: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesLectures

Me – Bientinesi You – Students

Teach Listen

Repeat & Clarify Ask questions

Ask questions Answer

Assign simple homeworks Study & solve hws

Teach DO NOT sleep!

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 5 / 1

Page 13: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesExercise Sessions

Me – Bientinesi You – Students

Listen Teach

Ask questions Clarify & Motivate

DO NOT sleep DO NOT sleep

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 6 / 1

Page 14: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course GuidelinesExercise Sessions

Me – Bientinesi You – Students

Listen Teach

Ask questions Clarify & Motivate

DO NOT sleep DO NOT sleep

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 6 / 1

Page 15: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course Guidelines

Course material: slides,. . .

Resources: Mathematica, C,. . .

HW correction

Class participation

Questions?

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 7 / 1

Page 16: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course Guidelines

Course material: slides,. . .

Resources: Mathematica, C,. . .

HW correction

Class participation

Questions?

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 7 / 1

Page 17: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course Guidelines

Course material: slides,. . .

Resources: Mathematica, C,. . .

HW correction

Class participation

Questions?

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 7 / 1

Page 18: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course Guidelines

Course material: slides,. . .

Resources: Mathematica, C,. . .

HW correction

Class participation

Questions?

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 7 / 1

Page 19: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Course Guidelines

Course material: slides,. . .

Resources: Mathematica, C,. . .

HW correction

Class participation

Questions?

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 7 / 1

Page 20: Introduction to Scientific Computing Languageshpac.cs.umu.se/teaching/lsc-12/intro.pdf · Programming & Scientific Computing Objectives Fast & easy prototyping ! Matlab, Mathematica!Style

Seminar: Languages for Scientific ComputingThursdays – 4pm

Languages

1 Scala2 Evolution of Fortran3 Julia4 Go

SW Engineering

1 Template metaprogramming (2x)2 Prototype-based programming (1-2x)

Paolo Bientinesi (AICES, RWTH Aachen) Introduction to Scientific Computing Languages Winter 2012 8 / 1