You are on page 1of 3

APC 524/MAE 506/AST 506

Software Engineering for Scientific Computing


Course information, Autumn 2014
Instructors
Robert Lupton
Peyton 134
rhl@astro.princeton.edu
Clancy Rowley
E-quad D232
cwrowley@princeton.edu
Office hours: Mon 10anoon
Jim Stone
Peyton 125
jstone@astro.princeton.edu

AIs: Carmeline Dsilva


E-quad ACE 44
cdsilva@princeton.edu
mlohry@princeton.edu
Office hours: Mon/Wed 23pm
Simon Leblanc EEB
sleblanc@princeton.edu Office hours (in
Fine 110?), Tue/Thu 1011am

Schedule
Time: Tue/Thu, 11a12:20p
Place: McDonnell A01

Overview
This course discusses elements of software engineering, geared towards beginning
graduate students interested in scientific computing. Some previous knowledge of
numerical analysis is helpful, but not necessary.

Course text and references


The main books we will refer to are listed below:
Kernighan, The Practice of Programming [TPOP] (strongly recommended)
Bentley, Programming Pearls [PP] (recommended)
Language references:
Harbison and Steele, C: A Reference Manual
Lippman, C++ Primer
Meyers, Effective C++
Metcalf and Reid, Fortran 95/2003 Explained
In addition, here are other references that may be useful:
McConnell, Code Complete
Gamma, Helm, Johnson, and Vissides, Design Patterns
Hunt and Thomas, The Pragmatic Programmer
Oliveira and Stewart, Writing Scientific Software
1

Syllabus
The following is a tentative week-by-week outline of topics covered. It includes
references to the books listed above.
1. Motivation and boot camp
Examples of good and bad software design in scientific computing.
Brief language overview: C, C++, Fortran 90, Matlab, Python
Compilers, linkers, loaders, shared libraries
2. Unix tools and version control systems
Using the shell, bash; awk; make; job schedulers (Condor, PBS)
Version control using git
3. C and Fortran
C: structs, pointers, malloc
Fortran 90/95/03/08: modules, arrays, derived types
4. C++

Classes, inheritance
Private data and encapsulation
Templates
Overview of the Standard Template Library (STL)

5. Python; Interfaces
Python: classes, inheritance, dynamic typing
Style: writing readable code (Ch 1 of TPOP)
Programming to an interface, not an implementation (Ch 4 of TPOP)
6. Interfaces; Design patterns
Column 13 of PP
Documentation (Doxygen)
Design patterns: strategy, template method, decorator, composite, abstract factory, prototype, singleton
7. Debugging and automated testing
Debuggers (lldb)
Ch 5 and 6 in TPOP
Column 5 in PP
8. Hardware architectures
Supercomputing
Intro to GPUs/many-core architecture
9. Profiling and improving performance
Ch 7 in TPOP
2

Column 6 in PP
Column 9 in PP
10. Introduction to parallel computing
Overview of OpenMP
Overview of MPI
11. Portability
Ch 8 in TPOP
Portable data formats: ASCII vs. binary, HDF5
12. Mixing languages
Combining C/Fortran with Python/Matlab
ctypes, cython, SWIG, boost::python, f2py, mex

Assignments and grading


50%: Four programming assignments (mostly in first half of semester)
50%: Final project
Start early October
Groups of 3 to 5
Design and code reviews periodically, in which students comment on each
other.
Scope: 1015 pages of written description, plus around 2000 lines of code
Public presentation, 25-minute demo for each group

You might also like