Linear Algebra and Matrices Flashcards

(22 cards)

1
Q

Why might finite differences not be suitable for complex meshes?

A

They are easy to implement but struggle with irregular geometries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the finite volume method focus on?

A

Fluxes (e.g, mass, momentum, energy between adjacent cells)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does the finite element method approximate solutions?

A

Using expansion functions that are nonzero over a small region of the domain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What makes elliptic equations different from parabolic/hyperbolic equations?

A

They do not contain a time dependence and cannot be solved with time stepping.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between a dense and sparse matrix?

A
  • A dense matrix has most elements as nonzero
  • A sparse matrix has mostly zero elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is a sparse matrix stored differently from a dense matrix?

A
  • Dense matrices can be stored in contiguous memory for efficient access
  • Storing all elements of a sparse matrix would be inefficient.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does BLAS stand for? What does it provide?

A

Basic Linear Algebra Subprograms

Standardised interfaces for vector and matrix operations in C and Fortran.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does BLAS support sparse matrices?

A

No, it only supports dense matrices and specific structured matrices (e.g., banded/symmetric).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the three levels of BLAS?

A
  • Level 1: Vector-Vector
  • Level 2: Matrix-Vector
  • Level 3: Matrix-Matrix
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does arithmetic intensity scale across BLAS levels?

A
  • BLAS 1 (dot product): O(1)
  • BLAS 2 (matrix-vector multiplication): O(1)
  • BLAS 3 (matrix-matrix multiplication): O(N)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why use an optimised BLAS library?

A

It improves performance in applications requiring linear algebra computations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does CSR mean? What is CSR format used for?

A

Compressed Sparse Row Format

Efficiently storing and processing sparse matrices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How much storage does CSR require compared to a full matrix?

A

Instead of (N{row} x N{col}) elements, it stores (2N{NZ} + N{row} + 1) values (where N{NZ} is the number of non-zero elements).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does CSR store a matrix?

A

It stores a matrix useing three 1D arrays:
1. vals: Non-zero values
2. col_ind: Column indices of nonzero values
3. row_ptr: Indices in vals and col_ind where each new row starts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you extract row i from a CSR matrix?

A

Unpack:
vals(row_ptr(i):row_ptr(i+1)-1)
col_ind(row_ptr(i):row_ptr(i+1)-1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why might another sparse matrix format be preferable to CSR?

A

Some formats are more efficient for structured sparsity patterns (e.g., banded/block-structured matrices).

17
Q

What mathematical operation does Linpack perform?

A

Solving Ax = b, using Lower-Upper factorisation.

Where A is a dense NxN matrix and b, x are vectors

18
Q

How does the Linpack workload scale?

A

O(N) and is compute-bound.

19
Q

What is HPL? What is it used for?

A

High-Performance Linpack

Ranking systems in the Top500 list of supercomputers.

20
Q

Why is HPL optimised for peak floating-point performance?

A

Matrix sizes can be adjusted to achieve near-theoretical maximum performance.

21
Q

What does HPCG stand for? What does it do?

A

High Performance Conjugate Gradients

Benchmarks systems based on sparse linear algebra workloads rather than dense computations.

22
Q

How does the algorithmic intensity of HPCG compare to HPL?

A

HPCG has lower arithmetic intensity and is memory-bound, making it more representative of real-world applications.