schedule for Computer Organization and Programming for Scientific Computing, Fall 2017
(subject to changes during the course)
See the syllabus on my web page.
Textbook: No required textbook but the material is loosely based on
_A Programmer's Perspective by R.E. Bryant and D.R. O'Hallaron (ISBN-13 978-0-13-409266-9),
_An Introduction to Parallel Programming, by Peter S. Pacheco (ISBN-13: 978-0-12-374260-5).
No class on Oct. 2nd and Oct. 5th, and on Oct. 30th and Nov. 1st.
General plan of the class:
- Chapter 1 Introduction: What are we looking for this class (with some examples of programs), looking inside a computer and a crash course on C and pointers. Here are the links to the basic codes used to introduce pointers: basic examples, pointers on pointers, pointers on functions, void pointers.
- Chapter 2, System structure: Data representation, Machine Language and some elements of processor architecture. The codes used for numbers representation are basic encodings, boolean representation and operations, example of a mistaken unsigned casting. The codes for Assembling and Machine Language are basic example in c with the assembling code, example of arithmetic operations in c with the assembling code, example of control in c with the assembling code, examples of loops in c with the assembling code, and finally an example of switch instruction in c with the assembling code, and finally a "cheat sheet" .
- Chapter 3, Control flow: Processes, process control, signals... With the codes with an elementary example of compiled function, and an example showing the limits of the compiler.
- Chapter 4, Handling the memory: The memory hierarchy, virtual memory, with the code illustrating the concept of locality, and a long example of optimizing a serial code.
- Chapter 5, Parallel programming with threads: What is shared memory, an introduction to OpenMP. The examples of code with the hello program, a simple vector sum and a matrix product.
- Chapter 6, Parallel programming on GPU's: An introduction to CUDA. You will find the notes of the class here, with the various codes: cuda_example0.c, cuda_examplewrong.cu, cuda_example1.cu, cuda_example2.cu, cuda_example3.cu, cuda_example4.cu, cuda_example_cublas.cu, cuda_sum0.c, cuda_sum1.cu, cuda_sum2.cu, cuda_sum3.cu, cuda_sum_cublas.cu
Proposed first projects, due October 19th. Please choose one among:
- First possible project: We want to write a code simulating the Kuramoto model and study the effect of rounding errors on the final precision. See the full project description.
- The second possible project consists in understanding how to use SIMD instructions to calculate in parallel arithmetic operations on Intel processors. See the full project description.
- The third possible project looks closer at machine coding and at how some it can used inline C codes to improve execution. See the full project description.
Proposed second projects, due December 15th. Please choose one among:
- First possible project: Use OpenMP to parallelize the code simulating the Kuramoto model. See the full project description.
- The second possible project consists in combining OpenMP with SIMD instructions and loop unrolling to optimize a code performing arithmetic operations on Intel processors. See the full project description.
- The third possible project uses CUDA to implement a basic routine reducing the time to perform matrix-vector products. See the full project description.