# TMA4280 Introduction to Supercomputing -- Spring 2017

 Lecturer: Aurélien Larcher Monday 14-17 @ EL2 Wednesday 16-18 @ Banachrommet

Documents:

1. Introduction survey to fill in by January 15. 2017: https://goo.gl/forms/vvR3TCceYrXWPwiL2
2. Application form for access to Vilje to return by January 16. 2017.

1. 20170206: Accounts on Lille are activated.
2. 20170125: Prints of exercises for Labs are available in my mailbox.
3. 20170119: Labs are moved to a computer room, Banachrommet.
4. 20170118: Possibility to move the labs to a computer room and avoid clash with course Eit, see Dashboard.

Office hours:

1. More questions? Please book a time on Tue. 15-17 or Thu. 15-17.

Q/A session:

1. 20170524: from 17 to 19 at EL Rom F304 PDF.

## Objective

The objective of this course is to give a brief introduction to modern computer architectures and to discuss numerical algorithms for vector and parallel processing.

## Plan

Week Subject Notes
2 Introduction Slides 00 Slides 01
3 Computing architectures Part 1 Slides 02
4 Computing architectures Part 2 Slides 03
5 Distributed memory model - MPI Part 1 Slides 04
6 Distributed memory model - MPI Part 2 Slides 05
7 Shared memory model - OpenMP Part 1 Slides 06
8 Shared memory model - OpenMP Part 2 Lille notes
9 Solving PDEs: the Poisson problem Slides 07
10 Direct linear solvers Slides 08
11 Iterative linear solvers Slides 09 Summary
12 Introduction to PETSc Slides 10
13 Reading and writing files with MPI-IO Slides 11
14 Guest Lecture: "Towards Exascale Computing", Niclas Jansson PDC, KTH Slides to be published.
17 Examination repetition Review of a selection of questions from the previous years. See documents below. PDF

The following documents contain examination question with suggested solutions: a subset will be reviewed on week 17 and further questions can be asked during office hours.

Previous examinations with solutions
2016 PDF
2015 PDF
2014 PDF
2011 PDF
2010 PDF
2009 PDF
2006 PDF

## Labs

Week Subject Notes
2 Introduction to the UNIX environment and tools A short course for students with no prior experience in UNIX and programming.
3 Lab Introduction to C Programming and tools: Introduction
4 Lab E01 (solutions) E02 (solutions)
5 Lab E03 (solutions)
6 Project I P01
7 Project I
8 Project I
9 Lab E04 (solutions)
10 Lab
11 Project II P02 poisson.zip Fixed + Annotated Source
12 Project II
13 Project II
14 Project II
16 Project II handout

### Labs

Labs are not compulsory but recommended for people with very little experience in UNIX environments and programming.

Exercices for the next week are posted on this page as well as material for UNIX and programming depending on the demand.

For people missing the Labs, the Git repository here will be updated with previous exercises:

From Week 4 (inclusive) labs will be in the Banach room.

1. Week 2: Introduction to UNIX
2. Week 3: Introduction to git and C programming
3. Week 4: Review of exercises on data representation and help with C programming exercises.
4. Week 5: Introduction to working on the supercomputer (postponed Week 6 due to deferred access to Lille).
5. Week 9-10: Exercises on linear systems and PDEs as building blocks to Project II.

#### Discrete Sine Transform

Why are fst_ and fst_inv_ not declared in poisson.c?

The Discrete Sine function is implemented in fst.f and present in libcommon.a so that the FORTRAN function is called from C, note the extern declaration at the beginning of the file.

Why is the allocation of z of size 4*nn?

Look at Chapter 9 for the definition of the Discrete Sine Transform (DST) and its relation to the Fast Fourier Transform (FFT). The array z is used as storage for FFT coefficients: they are complex and twice as many as the DST.

### Compulsory assignments

1. Project I : 10% of the final grade, deadline Feb 26. 2017. (postponed to Mar 08. 2017)
2. Project II: 30% of the final grade, deadline Apr 19. 2017.

### Vagrant box

A virtual machine image is made available to people using non-UNIX operating systems. Steps for installing the Vagrant box are described in this tutorial. You will need at least 20GB on the disk to be able to install the virtual machine.

## References

No textbook is made compulsory for this course but optional references will be provided for the sake of completeness. The lecture notes "Introduction to Supercomputing" serve as reference course material. References provided in the list below are just a way to learn beyond the scope of the course.

### Parallel Scientific Computing textbooks

1. Van de Velde, E. F., Concurrent Scientific Computing, Springer Texts in Applied Mathematics, Volume 16 (1994) LINK
2. Shonkwiler R. W. and Lefton L., An Introduction to Parallel and Vector Scientific Computation, Cambridge Texts in Applied Mathematics, No. 41 (2006) LINK

### Data models

1. Goldberg D., What Every Computer Scientist Should Know About Floating-Point Arithmetics, ACM Computing Surveys, Vol 23, No 1 (1991) PDF
2. The Open Group, 64-Bit Programming Models: why LP64?, http://www.UNIX-systems.org/go/unix (1997) PDF

### Computing Architectures

1. Flynn M. J., Some Computer Organizations and Their Effectiveness, IEEE Transactions on Computers, Vol C-21, No 9 (1972)PDF
2. Duncan R., A Survey of Parallel Computer Architectures, IEEE Survey and Tutorial Series (1990) PDF
3. Hennessy, J. and Patterson, D., Computer Architecture: A Quantitative Approach, 5th Edition, Elsevier (2011) LINK
4. Drepper, U., What Every Programmer Should Know About Memory, Red Hat, Inc.(2007) PDF

### Distributed Memory Programming Models

1. MPI Forum, MPI: A Message-Passing Interface Standard, Online publication (2012) PDF
2. Balaji P., Buntinas D., Goodell D., Gropp W., and Thakur R., Fine-Grained Multithreading Support for Hybrid Threaded MPI Programming, (2010) PDF

### Shared Memory Programming Models

1. OpenMP, OpenMP 4.5 Summary Card – C/C++, Online publication (2015) PDF

### Numerical Linear Algebra

1. Golub Gene H., and Van Loan, Charles F., Matrix Computations (4th edition) LINK
2. Saad Y., Iterative methods for sparse linear systems (2nd edition) PDF

## Evaluation

 Projects 40% Exercise sessions Written examination 60% 2017-06-01 9-13

Support material code B: All printed and hand-written support material is allowed. A specific basic calculator is allowed.

1. Lars
2. Lene
3. Robin