Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

chongfengling/High-Performance-Computing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

High Performance Computing (HPC)

This archive contains the finalized individual assignments and course notes completed during the 2022-2023 session of the "Techniques of High-Performance Computing (PHAS0102)" module.

πŸ“š Assignments Overview & Key Results

πŸ“ Assignment 1: Matrix-Matrix Multiplication Optimization

File: assignment_1.ipynb

  • Key Results: Achieved massive performance improvements over naive nested-loop matrix multiplications. By transitioning to NumPy's vectorized operations and implementing Numba JIT (Just-In-Time) compilation, the execution time was drastically reduced. The benchmark results clearly illustrate the exponential speedup and demonstrate the performance impact of memory access patterns (C-contiguous vs. Fortran-contiguous arrays).
  • Core Technologies: NumPy, Numba JIT, Performance Benchmarking, Matplotlib.

πŸ“ Assignment 2: 1D PDE Solving & GPU Acceleration

File: assignment_2.ipynb

  • Key Results: Successfully solved two 1D partial differential equations. First, solved the 1D time-harmonic wave equation using the Finite Difference Method (FDM) with sparse matrices, demonstrating accurate convergence as the grid size $N$ increases. Second, solved the 1D heat equation and achieved massive speedups via GPU parallelization using Numba CUDA, efficiently handling long-term heat diffusion simulations that would otherwise be computationally expensive on a CPU.
  • Core Technologies: Finite Difference Method (FDM), scipy.sparse, Numba CUDA (GPU Parallel Computing).

πŸ“ Assignment 3: Sparse Matrices & Custom Linear Operators

File: assignment_3.ipynb

  • Key Results: Engineered a custom CSR (Compressed Sparse Row) matrix class from scratch by subclassing scipy.sparse.linalg.LinearOperator. By designing a custom block-matrix structure and separating the computational logic, the algorithm's time complexity was significantly reduced. The custom operator was successfully validated against SciPy's built-in GMRES and CG iterative solvers, proving its numerical stability and efficiency.
  • Core Technologies: Sparse Matrix Storage (CSR, COO), Object-Oriented Programming (OOP), scipy.sparse.linalg.LinearOperator, Iterative Solvers.

πŸ“ Assignment 4: Solving a Finite Element System

File: assignment_4.ipynb

  • Key Results: Successfully implemented the Finite Element Method (FEM) to solve a 2D Helmholtz wave equation on an $N \times N$ discrete grid.
    • Matrix Assembly: Accurately constructed the massive sparse matrix $\mathrm{A}$ and RHS vector $\mathbf{b}$ handling complex boundary conditions and corner/edge cases.
    • Solver Benchmarks: Conducted rigorous performance comparisons across multiple Direct Solvers and Iterative Solvers (enhanced with Preconditioners).
    • Analysis & Visualization: Visualized the 3D wave solutions successfully, and provided detailed empirical analysis on the solvers' $\mathcal{O}(N)$ time complexities and error convergence rates.
  • Core Technologies: Finite Element Method (FEM), 2D PDEs, Iterative Solvers vs Direct Solvers, Preconditioning, Big-O Complexity Analysis, 3D Data Visualization.

Finite Element Mesh (Figure: The $N \times N$ discrete finite element mesh representing the domain in Assignment 4)

About

Work for 'Techniques of High-Performance Computing' module, 22-23

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors