Course Syllabus
18647: Computational Problem Solving
Spring 2021
Location: Zoom
Class Lecture: Tuesday and Thursday, 10:40am–12:00pm
Number of Units: 12
Recommended prerequisites: 18213/613, 18202 or equalent
Instructor: Prof. Franz Franchetti Office hours: Tuesdays 4:00–5:00 p.m. or by appointment
Zoom instead of HH A312: https://cmu.zoom.us/my/franzf
Email: franzf@ece.cmu.edu
Web: http://www.ece.cmu.edu/~franzf
Teaching Assistant: Sanil Rao
Office hours: Mondays 1:00 p.m., https://cmu.zoom.us/j/310251213
Email: sanilr@andrew.cmu.edu
Course Management Assistant: Michele Passerrelo
Email address: eceasc@andrew.cmu.edu
Office location: HH 1112
ECE IT Helpdesk: HH A204 walkin Monday–Friday 8:00am–5:00pm email: help@ece.cmu.edu
Overview:
Computing platforms used in engineering span an incredible dynamic range from embedded and wearable processors through handhelds/laptops to high performance computing servers and the cloud. Similar engineering and AI/ML problems need to be solved across the entire dynamic range. When developing algorithms or solving R&D problems, one usually starts with Matlab and Python using frameworks like Torch, Spark, and TensorFlow, and only resorts to C/C++ only when needed. This course covers how to solve AI/ML and engineering research and development problems across the entire range of machines in a productive and performant way. It discusses how to scale problems from the initial concept stage usually executed on a laptop to more powerful computing systems like enterprise or HPC servers, GPU accelerated systems, and cloud computing platforms.
This course addresses a wide range of computational and informatics problem families from traditional numerical simulation and symbolic data processing to AI and machine learning problems. It covers the most important scalable parallel algorithms used in engineering computing, and discusses frameworks providing problemspecific and general implementation templates. It covers algorithm analysis from the numerical and complexity perspective, parallelization approaches and scalability, algorithm optimization, evaluation and analysis of results.
Students in this course learn to productively solve AI/ML and engineering research and development problems on advanced computer systems across the dynamic range of computing systems. Further, they learn to carry algorithms from the concept stage to efficientenough scaledup implementations necessary to solve large scale problem instances, or squeeze them into the small footprint of embedded and wearable devices. Students will solve assigned homeworks and do a final blog post about lessons learned.
Brief List of Topics Covered:
 Parallel algorithms, scalability, and numerical analysis of these algorithms
 Software stack and hardware for computational engineering and AI/ML problems
 Hardware and software available to CMU students (onsite, cloud, NSF XSEDE)
 Frameworks and execution environments for quick problem solving
 How to scale from initial concepts to largescale problems
 Next steps: How to transition to C/C++ with CUDA/OpenCL, OpenMP, MPI etc.
18647 Lecture 26: "Computing for Engineers: Summary and Beyond" by Prof. Franz Franchetti, May 6, 2021.
Download the syllabus here.
Tentative Course Calendar
Date  Day  Class Activity 
February 
2  Tues.  State of computing: What is the current state of the art from embedded devices through desktops, servers, and consumer systems all the way to cloud, HPC, and supercomputing 
4  Thurs.  Computer architecture: Relevant computer architecture concepts 
9  Tues.  The ECE Computing Environment: number cluster, Andrew systems, capability machines, GPU access, cloud access, Pittsburgh Supercomputing Center and XSEDE 
11  Thurs.  Software stack: ISA, operating system, virtualization, messaging, containers. Release HW 1 
16  Tues.  Mathematics for Engineers: The central role of numerical linear algebra 
18  Thurs.  Algorithm analysis, scalability, complexity: Getting answers in time 
25  Thurs.  Parallelization: Sequential vs. parallel algorithms, scalability vs. performance. HW 1 due, release HW 2 
March 
2  Tues.  Need for speed: Principles of code optimization, when and how to optimize code 
4  Thurs.  Cloud computing and HPC: Amazon EC2/Windows Azure/Google Cloud, Computational Grids, Scientific Workflows, Computing Centers, ECE ITS 
9  Tues.  Guest Lecture: Quantum Computing and Quantum Algorithms 
11  Thurs.  Numerical Analysis: How good are your answers? How to make them better? HW 2 due, release HW 3 
16  Tues.  Scalable algorithms: Dense numerical linear algebra, CNNs/DNNs/ FFTs 
18  Thurs.  Scalable algorithms: Graph algorithms and sparse numerical linear algebra 
23  Tues.  Scalable algorithms: ODE and PDE solvers, stencils, filters, discretization 
25  Thurs.  Scalable algorithms: Discrete and continuous optimization, ML training. HW 3 due, release HW 4 
30  Tues.  Scalable algorithms: Informatics, symbolic computing, higher level AI algorithms 
April 
1  Thurs.  Scalable algorithms: Statistics: Monte Carlo, MCMC, statistical machine learning 
6  Tues.  Data: Obtaining real data sets, data visualization, data bases, data stores, file systems 
8  Thurs.  Modern CPUs: SuperScalar Outoforder, multicore. HW 4 due, release HW 5 
13  Tues.  Modern CPUs: Vector Extensions 
20  Tues.  Hardware Acceleration: GPUs, FPGAs, TPU, Tensor Cores, . . . 
22  Thurs.  From productivity to performance: C++, OpenMP, MPI, CUDA, Autotuning 
27  Tues.  Guest Lecture: Pittsburgh Supercomputing Center and Usable HPC and High Performance AI/ML 
29  Thurs.  Research Talk: SPIRAL: Formal Software Synthesis of Computational Kernels. HW 5 due 
May 
4  Tues.  Student Blog Presentations and Homework Lessons Learned 
6  Thurs.  Summary and Beyond. Blog post due 
Homework and Blog Post Logistics and Requirements
Machines
In this course we will use a large variety of machines in the homeworks and projects:
 Large Linux servers with direct ssh access. The machines we will access are the ECE number cluster and the data science cloud.
 Large number of small Linux machines in high throughput mode via ECE's HTCondor.
 HPC multicore nodes and multinode configurations with and without GPUs via a batch system at PSC and CMU/MechE.
 Hadoop/Spark/Tensorflow with and without GPUs at PSC.
 Special hardware at PSC: Bridges AI multiGPU resources (HPE Apollo and DGX2) and large memory machines.
 AWS instances with or without multicore and GPU support.
Software Platforms
In the course we will try out a number of highlevel languages and libraries in these languages:
 Python with NumPy, SciPy, and matplotlib
 R with CRAN packages
 Matlab
 Mathematica
 Haskell
 Frameworks: Torch, Theano, OpenCV
 Highend engineering software
 C/C++ with HPC math/ML libraries
Algorithms
We will use algorithms covered in the lecture as simple examples to experiment across the machines and software platforms. Students either implement the algorithms themselves or find implementations online, and then run them on the target machines to perform scalability studies. Algorithm groups targeted in the homeworks are as following:
 Dense numerical linear algebra, CNNs/DNNs/FFTs
 Graph algorithms and sparse numerical linear algebra
 ODE and PDE solvers, stencils, filters, discretization
 Discrete and continuous optimization, ML training
 Informatics, symbolic computing, higher level AI algorithms
 Statistics: Monte Carlo, MCMC, statistical machine learning
 Deep Learning, Big Data Analytics
MS Homework 1—5 Deliverables
Homework 1 to 5 will have as deliverables examples that run the specified/chosen algorithms on the specified/chosen machines for a range of problem sizes. The homework submission consists of the following:
 The source code for the algorithm, with source attribution as applicable
 The necessary data files
 All necessary scripts and make files
 The captured output of the submission runs
 Measurements in CSV files and performance plot
Blog post—Deliverables
As final project students submit a blog post addressing the following aspects of one of the homework problems:
 Problem specification: explain what problem you are addressing and where it is used.
 Algorithm: describe the algorithm you used.
 Hardware and software: describe the hardware platform and software infrastructure you used.
 Outcome: describe the result you obtained and how larger computing resources were necessary.
 Scalability and complexity: describe the algorithm's complexity, how the algorithm scales with problem size, and how it scales number of processors/cores in strong and weak scaling sense.
 Quality of the result: assess the numerical or approximation quality of your result.
 Performance anyalysis: measure the runtime behavior, model fit it to the theoretical growth behavior, and assess the efficiency of the implementation.
 Suggested performance optimization: Assume a limited engineering budget but the need for a faster solution. Suggest which parts of the algorithm one would optimize and what optimization approach and target hardware should be used.
