Programming Roadmap
14 周学习计划
从 C++ 基础到 OpenMP、MPI 和综合项目,按周记录学习进度。
首页
14 周计划
课程进度
LeetCode
HPC
资源索引
学期项目
学习进度
0
/
0
保存在此设备
重置本页
全部展开
全部收起
打开本周
WEEK 01
重新启动:C++ / Big-O / HPC 环境
09/28–10/04
DSA
C++ 恢复 + Big-O
读 Stanford Python → C++ Guide;恢复 vector / string / function / reference / const。
读 Big-O Guide;能解释 O(1)、O(log n)、O(n)、O(n²)。
LeetCode:Two Sum、Contains Duplicate、Valid Anagram。
Python → C++
Big-O Guide
6.102
检查与测试
Reading 01: Static Checking。
Reading 02: Testing;给一个自己的小 C++ 函数补边界测试。
R01 Static Checking
R02 Testing
HPC
认识集群
HPC Carpentry:Why use a Cluster?、Connecting / Working on remote HPC。
弄清 login node、compute node、scheduler、job 的关系。
HPC Carpentry
Tools/Systems
Missing + CSAPP + SICP
Missing Semester:Course Overview + Shell。
CSAPP Ch.1:A Tour of Computer Systems。
SICP Ch.1 §1.1:Elements of Programming。
Missing: Shell
CSAPP Student Site
SICP 1.1
WEEK 02
容器、ADT、规格与作业调度
10/05–10/11
DSA
Set / Map / Stack / Queue
理解 ADT 与具体实现的区别。
LeetCode:Valid Parentheses、Min Stack;可选 Daily Temperatures。
LC Stack
LC Queue
6.102
Code Review + Specifications
Reading 03: Code Review。
Reading 04: Specifications;给自己的函数明确 precondition / postcondition。
R03 Code Review
R04 Specifications
HPC
Scheduler / Modules / Slurm
HPC Carpentry:Scheduler Fundamentals、Environment Variables、Modules。
自己写一个最小 Slurm job script;会看 job 状态和 stdout/stderr。
HPC Intro
Tools/Systems
Missing + CSAPP + SICP
Missing Semester:Command-line Environment + Development Environment。
CSAPP Ch.2;开始 Data Lab。
SICP Ch.1:procedure / abstraction / recursive vs iterative process。
Command-line Environment
Development Tools
CSAPP Labs
WEEK 03
递归 + ADT + 并行计算基本模型
10/12–10/18
DSA
Recursion
CS106B:Introduction to Recursion / Why We Use Recursion;能画出递归调用树。
LeetCode:Reverse String(递归)、Pow(x,n)(可选)。
CS106B SP26
LC Recursion
6.102
Designing Specs + ADT
Reading 05: Designing Specifications。
Reading 06: Abstract Data Types。
R05 Designing Specs
R06 ADTs
HPC
Parallel Computing 认知框架
LLNL Introduction:Overview、Terminology、Memory Architectures。
区分 shared / distributed / hybrid;理解 speedup、scalability、parallel overhead。
LLNL Intro
Tools/Systems
Debugging + CSAPP Ch.3
Missing Semester:Debugging and Profiling。
CSAPP Ch.3 开始:Machine-Level Representation。
Debugging & Profiling
WEEK 04
Backtracking + 表示不变量 + 并行程序设计
10/19–10/25
DSA
Backtracking
理解“选择 → 递归 → 撤销选择”的搜索树。
LeetCode:Subsets、Permutations、Combination Sum(选 2–3)。
LC Backtracking
6.102
Representation Invariant + Interface
Reading 07:Abstraction Functions & Rep Invariants。
Reading 08:Interfaces & Subtyping。
R07 AF / RI
R08 Interfaces
HPC
设计并行程序
LLNL Intro:Programming Models、Partitioning、Communication、Synchronization、Data Dependencies、Load Balancing。
拿向量加法 / 矩阵乘 / Monte Carlo π 分别写出怎么拆任务。
LLNL Parallel Intro
Tools/Systems
CSAPP + Git
继续 CSAPP Ch.3;用 debugger 看 stack / register / function call。
Missing Semester:Version Control and Git。
Missing: Git
6.102 Git 1
WEEK 05
指针 / 链表 / 二分 + OpenMP 入门
10/26–11/01
DSA
Pointers + Linked List + Binary Search
自己实现最小 singly linked list。
LeetCode:Reverse Linked List、Merge Two Sorted Lists、Binary Search。
LC Linked List
LC Binary Search
6.102
Equality / Functional Programming
Reading 09 Equality。
Reading 10 Functional Programming;和 SICP 的 higher-order function 对照。
R09 Equality
R10 Functional
HPC
OpenMP:Fork–Join / parallel / for
LLNL OpenMP:Introduction、Programming Model、Parallel Construct、for。
把 serial vector add 或 π 计算改成 OpenMP;记录 1/2/4/8 threads 时间。
LLNL OpenMP
Programming Model
Systems
Bomb Lab
开始 Bomb Lab;重点是 assembly + debugger,不追求赶进度。
CSAPP Labs
WEEK 06
Heap / Sorting + OpenMP 数据作用域与 Reduction
11/02–11/08
DSA
Heap / Priority Queue / Sorting
理解 heap 的 push/pop/top 复杂度。
LeetCode:Kth Largest Element、Top K Frequent Elements;复习排序复杂度。
LC Heap
LC Sorting
6.102
Recursive Data Types
Reading 11 Recursive Data Types;和 linked list / tree 的递归定义联系起来。
R11 Recursive Data Types
HPC
private / shared / reduction
读 OpenMP data scope、reduction、environment variables。
做 LLNL Exercise 1;理解 OMP_NUM_THREADS。
Reduction
Env Vars
Tools
Packaging
Missing Semester:Packaging and Shipping Code;把 CMake / dependencies / README 放进自己的项目。
Packaging & Shipping
WEEK 07
Tree / BST + Race Condition + 程序优化
11/09–11/15
DSA
Tree / BST
手写 preorder / inorder / postorder;理解 BST invariant。
LeetCode:Maximum Depth、Invert Binary Tree、Validate BST。
LC Tree
6.102
Parsing(选学)
Reading 12 Grammars & Parsing:本周负担大可只浏览。
R12 Parsing
HPC
Synchronization / Race Conditions
OpenMP:critical、atomic、barrier;自己制造一次 race,再修复。
比较 critical / atomic / reduction 的适用场景和性能成本。
OpenMP TOC
OpenMP Ref
Systems
CSAPP Ch.5
读 Ch.5;关注 compiler optimization、loops、dependency、SIMD 的直觉。
CSAPP Web Asides
WEEK 08
Hash / Heap 综合 + Cache / Locality + OpenMP 性能
11/16–11/22
DSA
Hashing / Heap 综合
解释 hash table 平均 O(1) 的条件与碰撞。
LeetCode:Longest Consecutive Sequence、重做 Top K Frequent;K Closest Points 可选。
LC Hash Table
LC Heap
6.102
Debugging
Reading 13 (Avoiding) Debugging;把 assertions / logging / test isolation 用到项目。
R13 Debugging
HPC
OpenMP 性能 + Scheduling
比较 static / dynamic / guided scheduling;做 strong scaling 小实验。
记录 threads、wall time、speedup。
OMP Env Vars
OpenMP Specs
Systems
CSAPP Ch.6
理解 locality、cache line、miss、memory bandwidth。
开始 Cache Lab 或 Performance Lab(二选一)。
CSAPP Labs
WEEK 09
Graph / BFS / DFS + MPI Point-to-Point
11/23–11/29
DSA
Graph / BFS / DFS
理解 adjacency list;用 BFS / DFS 各遍历一次图。
LeetCode:Flood Fill、Number of Islands、Clone Graph(可选)。
LC Graph
LC BFS
LC DFS
6.102
Concurrency
Reading 14 Concurrency:process / thread、shared memory / message passing、race condition。
R14 Concurrency
HPC
MPI 环境 + Blocking Send/Recv
MPI:Init / Finalize / Comm_rank / Comm_size / Send / Recv。
做 LLNL Exercise 1 + 2。
LLNL MPI
Blocking
Tools
工具转入日常
Missing Semester 不再单独学;要求自己的所有项目都用 Git / shell / debugger / profiler。
WEEK 10
Graph 进阶 + Mutual Exclusion + MPI Collective
11/30–12/06
DSA
Graph Cycle / Topological Thinking
LeetCode:Course Schedule、Rotting Oranges;Network Delay Time 可选。
Course Schedule
Rotting Oranges
6.102
Promises + Mutual Exclusion
Promises 可浏览;重点 Reading 16 Mutual Exclusion。
R15 Promises
R16 Mutual Exclusion
HPC
MPI Collective
学习 Bcast / Scatter / Gather / Reduce。
实现 parallel π 或 vector reduction;比较手写 point-to-point 与 MPI_Reduce。
MPI TOC
MPI 4.1
Systems
Cache / Performance Lab
完成你选的 Lab 的主要部分;解释一次 cache 行为导致的性能差异。
WEEK 11
Greedy + Message Passing + MPI Non-blocking
12/07–12/13
DSA
Greedy
理解 greedy 需要正确性理由。
LeetCode:Best Time to Buy and Sell Stock、Jump Game、Non-overlapping Intervals(选 2–3)。
LC Greedy
6.102
Message Passing
Reading 18:Message-Passing & Networking;比较 shared-memory 与 message-passing。
R18 Message Passing
HPC
MPI_Isend / Irecv
理解 non-blocking 的目的:允许 communication / computation overlap。
做 ring neighbor exchange 或 halo-like exchange。
MPI Non-blocking
Project
形成中型项目结构
至少分出 src / include / tests / benchmarks;main() 只保留高层流程。
WEEK 12
Dynamic Programming 入门 + MPI 数据分解
12/14–12/20
DSA
Dynamic Programming
先从 recursion + memoization 理解 DP,再转 bottom-up。
LeetCode:Climbing Stairs、House Robber、Coin Change。
LC DP
HPC
Domain Decomposition
做 LLNL MPI Exercise 3 或同类 array decomposition。
把 serial matrix / heat / array kernel 改成 MPI。
MPI Exercise 3
Systems
把 cache 与并行联系起来
解释 OpenMP/MPI 性能不理想究竟来自 serial fraction、memory bandwidth、cache miss、sync、communication 还是 load imbalance。
Software
测试 + benchmark 分离
测试 correctness;benchmark 只测性能。
WEEK 13
复习与性能分析:从“能跑”到“能解释”
12/21–12/27
DSA
LeetCode 复做周
不做新主题:从前 12 周挑 6–8 道题,完全不看旧代码重做。
每题写一句:为什么选这个数据结构?复杂度是什么?
HPC
Profiling / Scaling / Amdahl
做 1/2/4/8 threads 或 ranks scaling 表。
计算 speedup S(p)=T1/Tp;用 Amdahl's Law 解释上限。
Using Resources Effectively
Tools
Code Quality
Missing Semester:Code Quality;对学期项目做一次 lint / formatting / tests / docs 整理。
Code Quality
6.102
回顾
用 Safe from bugs / Easy to understand / Ready for change 审查项目。
WEEK 14
综合交付:Scientific Computing / HPC Mini Project
12/28–01/03
Project
最终结构
serial C++ → tests → benchmark → OpenMP → MPI → Python plot。
README 写清 build、run、test、benchmark、并行参数。
输出 speedup 图 + 简短性能分析。
DSA
停止追题量
只做 1–2 道综合 Medium,或者补未掌握题;不为了“50 题”硬刷。
HPC
最终检查
能口头解释 thread vs process、shared vs distributed、race、reduction、blocking vs non-blocking、strong scaling、Amdahl。
Next
下一阶段
算法进入 MIT 6.006;HPC 再考虑 MPI+OpenMP、GPU/CUDA 或 Berkeley CS267。