High-Performance Computing
Winter Semester 2014/2015

Kick-off meeting: October 21st, 16:10—17:10, LF 125
Weekly lecture: Tuesdays, 16:00—17:00, LF 125
Instructors: Thomas Fogal, Jens Krüger
Office: LE 305
Phone: 203 379 1314
E-Mail: thomas.fogal at uni-due punkt de
Office hours: Tuesdays, 17:00—18:00 (directly after class), or by appointment (send an email).

News (newest first)

  1. [07.01.2015] I posted a program to create input files that you may find useful for generating large numbers of particles for your scalability study.
  2. [05.01.2015] Assignment 6: final projects is also now online! You must propose your own final project. Proposals are due on January 20th, with a one-week period to revise & resubmit. Projects will be due towards the end of February.
  3. [05.01.2015] Happy New Year! Hope everyone had a relaxing break. Now it's time to get back to work, with assignment 5: scalability. It is split into two parts, and the first is due on January 17th.
  4. [15.12.2014] Having trouble debugging your MPI-based simulation? Try learning a bit about the standard debugger on Linux and using it to identify where your segfault is happening.
  5. [03.12.2014] Assignment 4 is now posted, and will be due before the holiday break.
  6. [03.12.2014] Want to get a jump start with OpenMP? There are some great resources for learning OpenMP on the web. The OpenMP specifications are very readable as well.
  7. [02.12.2014] Today in class we demonstrated that broadcast can be implemented in terms of the send and recv primitives. I posted a complete program that utilizes the 'bcast' function we implemented as an example.
  8. [02.12.2014] I posted an example program that uses 'Gatherv' to collect arguments.
  9. [01.12.2014] When your C programs get more complex, it is nice to organize your code into separate files. If you are not doing this yet then you might want to look at an example program that uses multiple files in this way.
  10. [01.12.2014] I posted a video of a simple visualization produced from this CSV.
  11. [27.11.2014] as3 git repositories are now created. Apologies for the delay!
  12. [26.11.2014] Herr Hasemann was kind enough to dig up some documentation on how to submit jobs on duecray.uni-due.de. There is much more detail available there than in the assignment sheets!
  13. [25.11.2014] Here is a ParaView batch script for generating visualizations from your outputs. After installing ParaView, run it via pvbatch --use-offscreen-rendering batch.py -f n.csv.
  14. [25.11.2014] I posted a program to compare CSVs as output by your simulations (Ubuntu 14.04 binary).
  15. [20.11.2014] Assignment 3 is now posted, and now the real fun begins ;-)
    No repositories yet; sorry. Will get them up soon.
  16. [20.11.2014] I updated assignment 2 with a small note to explicitly say to use a gravitational constant of 6.673e-11.
  17. [19.11.2014] I have posted a sample solution for assignment 2. It includes a program as well as a sample input and output. You should verify your simulation agrees with this one's output. I'm extending the deadline until Friday, Nov. 21st to allow time for this, but note that the next assignment will go up soon, too!
  18. [18.11.2014] I posted a review of the lecture where we introduced the N-Body mathematics.
  19. [05.11.2014] The repositories and a simple testing hook is now setup for assignment 2.
  20. [04.11.2014] Assignment 2 is up. The repositories are not yet available yet (sorry!). Due November 19th at 23:59:59.
  21. [04.11.2014] The pointer example we went over in class today is online, along with an explanation of the state of memory after each line. Please come see me if you are having trouble understanding pointers—they are important!
  22. [04.11.2014] I posted the example for structs that I unfortunately did not get to in class today. You might also want to take a look at math.c, notable because it requires an external library.
  23. [29.10.2014] Testing for pushes on assignment 1 is now working.
  24. [28.10.2014] Assignment 1 is up. Testing during push is not quite setup yet, sorry!
  25. [28.10.2014] I posted some of the programs we went over during lecture.
  26. [28.10.2014] I posted a simple program that demonstrates the use of scanf that may be useful for you as you attempt assignment 0.
  27. [21.10.2014] Assignment 0 posted. It will be due on October 29th at 23:59:59.
  28. [21.10.2014] I have uploaded the first lecture slides. Note most lectures will not have downloadable materials---take notes!
  29. [19.08.2014] Course website created.


  1. C intro and git familiarity.
  2. Pointers, files, and dynamic memory.
  3. Serial N-Body.
  4. MPI-parallelize your N-Body simulation.
  5. Hybrid (OpenMP) parallelize your N-Body simulation.
  6. Scalability.
  7. Final projects.

Course Details

NOTE: This course will be given in English!

Course Description:

Implementation-heavy course focused on performance-critical code. Parallelism models; messaging-passing and shared-memory architectures. Modern technologies for parallelization; OpenMP, MPI, CUDA. I/O performance issues; parallel and distributed filesystems. Network technologies in clustered environments. Deep storage hierarchies and the memory wall.

This is an implementation-intensive course.

Graduate students from other disciplines who require a background in HPC are highly encouraged to attend this course!

There are no explicit prerequisites, but you should have at least some prior programming experience. A basic background in operating systems would be beneficial; taking the two courses concurrently would reinforce related concepts. You may find Scientific Visualization to be useful, but we will discuss any needed topics from that course in an ad hoc manner in this course. Please talk to the instructor if you have any doubts about your readiness.

This course has the following objectives:

  • Review the theory behind shared-memory and message-passing models of parallelism.
  • Provide a basis for understanding parallel program performance.
  • Understand the implementation of modern parallel filesystems.
  • Improve software engineering skills through the completion of a significant software project.

If you plan to take the course, please register on the course's moodle page. The registration code is just 'hpc' (all lowercase). This allows us to get your Cray accounts setup in a timely manner.

Assignments and Grading

Grades in this course will be entirely determined by program correctness and performance in a series of large programming projects. You will implement a simple `N-Body' simulation as well as analysis tools to understand the performance of your simulation. Later, you will apply the knowledge you have gained in a custom program based on your interests. Your solutions should be written in C, C++, or Fortran 90+. (Exceptions to using these languages may be allowed, but you will need to negotiate them with me.)

We will give an introduction to C in the first weeks of the semester.

An N-Body simulation is a simulation of the movement of bodies that interact with one another. One application is (for example) computing planetary motion according to Newtonian gravity. The Figures below give 2 examples of such a system.

sample student visualization sample visualization from GADGET output.
Example visualizations from a prior student's simulation and the GADGET astropysics simulation software.

Class time will be used to help guide you in the implementation of your N-Body simulation. The course will start out simple and progressively build more and more complex parallelism (and thus higher-performance!) into your simulation. In the end, you will have created your own highly-performant N-Body simulation that utilizes multi-scale parallelism.

The project is cumulative. You must live with your code for the whole semester. Solutions for phases will not be given out. Regression testing is critical.

Each project will be worth a major part of your grade. Exact point values will be discussed during the kick-off meeting. Assignments are due at midnight on the day they are due.

WARNING: All groups are expected to do their own work on the programming assignments. No cross-group collaboration is allowed. A general rule to follow is that you may discuss the programs with others at the concept level but never at the coding level. If you are at all unclear about this general rule, do not discuss the programs with other students at all.

Reading Materials

There are no required textbooks for this course. However, you may find Viktor Eijkhout's HPC book useful for more depth into the concepts we cover. Once you understand the basics of C, you may find Axel-Tobias Schreiner's treatise on how to do object-oriented programming in C to be enlightening.

Other resources you may find useful are the documentation for:

Computer Accounts

The CCSS Cray-XT6m HPC cluster (duecray.uni-due.de) will be the primary computing resource for this course. Account creation/registration will be worked out on the first day of class. Your program will be graded on the Cray and so you must test your program in that environment! However, we recommend you setup a local machine or VM to do most development on, as the Cray is a shared resource.

Imprint/Impressum Copyright 2014 by HPC Group - Building LE, Lotharstr. 65, 47057 Duisburg, Germany