Syllabus
Scientific Computing for Physicists (PHY1610H)
Winter 2021
University of Toronto
Description
Scientific computing is now an integral part of the scientific endeavour. It is an interdisciplinary field that combines computer science, software development, physical sciences and numerical mathematics. Yet, many computational projects start off with knowledge of the science you want to do, and with a bit of programming experience, after which follows an arduous journey to get to a (maintainable) piece of code which you trust to compute the right thing.
This course is aimed at reducing your struggle, and make you a more efficient computational scientist. Topics include well-established best practices for developing software as it applies to scientific computations, common numerical techniques and packages (so you don't reinvent the wheel), and aspects of high performance computing.
While the course title is 'Scientific Computing for Physicists', its content is equally applicable to other physical sciences (astrophysics, chemistry, engineering, ...), and much of the software development and high performance computing material will be of interests to students in other research areas where they have to write or maintain scientific code.
Topics
The course consists roughly of three parts.
- Part 1: Scientific Software Development & Design
Topics: C++, modular programming, make, debugging, version control, I/O - Part 2: Numerical Tools for Physical Scientists
Topics: Random numbers and Monte Carlo, ODE and Molecular Dynamics, partial differential equations, linear algebra, fast fourier transforms. - Part 3: Optimization High Performance Scientific Computing
Topics: profiling, supercomputing, parallel programming (shared and distributed programming), gpu computing.
Prerequisites
Students should have a fair amount programming experience (e.g. in C,
C++, Fortran, Python, or similar). While we will introduce the
C++ language, in one language or another, students should already
know things like: how to use variables, how to write a function,
how to print something to screen, how to define an array, fill
it, and add all numbers in that array.
To be able to follow along with the examples, all registered students of the course will be given access to SciNet's Teach cluster. To access the cluster, the students will require a computer with an ssh client. For Linux and Mac computers, the 'ssh' command is usual available in the terminal, for Windows users, the MobaXTerm application can be downloaded and used.
Most assignment can also be done on the students' own computer, but in that case, that computer should have unix-like environment with the GNU compiler suite. For windows users, Cygwin is a good choice (just make sure you install packages like gcc-g++, make, openssl, and git). For Mac users, we advise to install one of the GNU compiler suites available from hpc.sourceforge.net.
We furthermore recommend that all students get a SciNet account as well, which would allow them to run their assignments on one of the SciNet supercomputers, and use these after the course has finished. Instruction on how to get an account can be found here.
Web site
The website courses.scinet.utoronto.ca/545 will be maintained during the course. It's where you enroll if your not taking the course as a physics grad course, where you find the lecture slides, where you hand in your assignments, and get feedback on those from the instructors.
Location and Times
All lectures and office hours will be held virtually using Zoom. The Zoom link can be found if you log into the course web site. Lecture dates:
The first lecture is on Tuesday January 12th, 2021, the last is on April 8th, 2021. There will be no lectures during Reading Week (February 16-19).
List of lecture dates:
January 12, 14, 19, 21, 26, 28, 2021
February 2, 4, 9, 11, 23, 25, 2021
March 2, 4, 9, 11, 16, 18, 23, 25, 30, 2021
April 1, 6, 8, 2021
Office hours
For the duration of the course, office hours will be on
- Wednesdays from 2:00 pm to 3:00 pm.
- Friday from 12:00 noon to 1:00 pm.
Instructors
The lecturers for these courses will be Computational Science Specialists at the SciNet High Performance Computing Consortium.- Ramses van Zon
- Marcelo Ponce
Assignments and Grading
Most weeks, students will be given a programming assignment, with a due date one week after. These assignments are designed to help absorb the course material.There will be ten such assignments. The average of the assignments will make up your grade. To ensure a timely reporting of student grades, we will adhere to the following policy:
Homework may be submitted up to one week after the due date, at a
penalty of 5% per day taken off from your mark.
Deviations of this rule will only be considered, on a case-by-case
basis, in exceptional circumstances.
All sets of homework need to be handed in for a passing
grade, which is based on the average of the ten sets. If, due to
exceptional circumstances, an assignment was missed, a make-up
assignment can be given at the end of the module. Rather than focusing
on the topic of a specific week, the make-up assignment may involve
any of the material of the course.
List of *tentative* assignment due dates:
January 21, 28, 2021
February 4, 11, 2021
March 4, 11, 18, 25, 2021
April 1, 8, 2021
Course Credit
This course is an official physics graduate course. It is possible for graduate students outside of Physics to take the course, if they are allowed to take physics courses. However, they should first confirm this with the graduate coordinator in their own department.For participants that cannot take this course for credit (e.g. other SciNet users), each of the parts can be taken as a 'SciNet course', which count towards the SciNet certificates.
In particular, participation in parts 1 and 2 counts for 12 credit-hours (each) towards the SciNet Scientific Computing Certificate, while participation in part 3 counts for 12 credits towards the SciNet HPC Certificate, and 12 credit-hours towards the SciNet Scientific Computing Certificate.