Glossary

Terms are listed in the order of the chapter that first explains them. For details, read the chapter given under “First appears”. The original documentation and compiler error messages are in English, so the English terms are listed as well.

I. Setup

Term

English

Description

First appears

compile

compile

The stage that translates each source file into machine code and produces an object file

1

link

link

The stage that joins object files and libraries to produce an executable

1

object file

object file

The file produced as the result of compilation (.o)

1

header (file)

header (file)

A file that holds declarations and definitions and is read in with #include (.hpp)

1

header-only

header-only

A form in which all definitions are written in headers, so it can be used without building a library beforehand. MISO takes this form

1

target

target

The name of something CMake builds (an executable or a library)

1

cache variable

cache variable

A setting passed with cmake -D and kept in CMakeCache.txt

1

build type

build type

A combination of optimization and debug information, such as Release or Debug

1

FetchContent

FetchContent

A CMake mechanism that fetches the source of dependency libraries at the configure stage

1

unit test

unit test

A program that checks the behavior of each component

1

environment variable

environment variable

A “name=value” setting passed from the shell to commands

1

virtual environment (venv)

virtual environment (venv)

A Python execution environment independent of others

1

doctest

doctest

The C++ testing library used for MISO unit tests

Testing

machine epsilon

machine epsilon

The difference between 1 and the next representable floating-point number

Testing

rounding error

rounding error

The error caused by rounding to a finite number of digits

Testing

cancellation

cancellation

The loss of significant digits when subtracting nearly equal values

Testing

II. C++ Basics

Term

English

Description

First appears

declaration

declaration

Telling the compiler a name and its type

2

initialization

initialization

Giving a variable its first value when it is created

2

implicit conversion

implicit conversion

A conversion the compiler performs automatically, for example in an expression that mixes values of different types

2

static_cast

static_cast

A way of writing a type conversion at compile time

2

type alias

type alias

Another name given to an existing type, as in using Real = float;

2

enumeration

enumeration (enum class)

A type that represents one of a fixed set of choices (such as Direction::X)

2

block

block

A group of statements enclosed in { }

2

short-circuit evaluation

short-circuit evaluation

With && and ||, not evaluating the right side if the left side alone determines the result

2

conditional operator

conditional operator

c ? a : b. It gives a if c is true and b if false

2

return value

return value

The value a function returns with return

2

pass by value

pass by value

Passing a copy of the value as a function argument

2

default argument

default argument

The argument value used when it is omitted

2

overload

overload

Defining several functions with the same name but different argument types or numbers

2

inline

inline

A specifier that allows the same definition to appear in several source files. Needed for functions in headers

2

namespace

namespace

A mechanism that divides names into groups (miso::, std::)

2

standard library

standard library

The set of components that come with C++ (such as std::vector and std::string)

2

exception

exception

An error notification that is thrown with throw and received with catch

2

preprocessor / macro

preprocessor / macro

Text replacement done before compilation (#define, #ifdef)

2

reference

reference

Another name for an existing variable (T&)

3

pass by reference

pass by reference

Receiving a function argument by reference

3

output parameter

output parameter

An argument a function receives as the place to write its result

3

address

address

A number that represents a location in memory

3

pointer

pointer

A variable whose value is an address (T*)

3

dereference

dereference

Using what a pointer points to, as in *p

3

null pointer

null pointer (nullptr)

A pointer that points to nothing

3

pointer arithmetic

pointer arithmetic

Pointing to the element i positions ahead with p + i

3

undefined behavior

undefined behavior

An operation whose result the language does not guarantee. Anything may happen

3

scope

scope

The range in which a name can be used

3

lifetime

lifetime

The period during which a variable or object actually exists

3

dangling reference / pointer

dangling reference / pointer

A reference or pointer that still points to something whose lifetime has ended

3

memory leak

memory leak

Forgetting to free allocated memory

3

smart pointer

smart pointer

A pointer that frees automatically when its lifetime ends (std::unique_ptr, std::shared_ptr)

3

class / struct

class / struct

A type that bundles data and functions. For struct, the default access is public

4

member variable / member function

member variable / member function

Variables and functions declared inside a class

4

object / instance

object / instance

An entity created according to a type that stores values

4

encapsulation

encapsulation

Deciding which operations are public and not letting the data inside be touched directly

4

constructor

constructor

A function called automatically when an object is created

4

member initializer list

member initializer list

The list of member initializations written after the : of a constructor. Initialization follows the order in which the members are declared

4

explicit

explicit

A specifier that forbids implicit type conversion by a constructor

4

const member function

const member function

A function that promises not to modify members (the trailing const)

4

this

this

A pointer to the object on which the member function was called

4

destructor

destructor

A cleanup function called automatically when the lifetime ends

4

RAII

Resource Acquisition Is Initialization

A technique that ties the acquisition and release of resources to the lifetime of an object

4

copy constructor

copy constructor

A constructor that creates an object from another object of the same type

4

move

move

Transferring ownership of the contents (std::move)

4

= delete / = default

deleted / defaulted function

A specifier that forbids the use of a function / a specifier that uses the compiler’s default definition

4

operator overloading

operator overloading

Defining a class-specific meaning for operators such as () and []

4

ownership

ownership

Being responsible for cleaning up a resource

4

View

view

A lightweight object that neither allocates nor frees memory and only holds the starting address and the size (such as Array3DView)

4

friend

friend

A declaration that allows a specified class or function to use private members

4

inheritance / base class / derived class

inheritance / base class / derived class

Creating a new class (derived) that inherits the members of an existing class (base)

5

protected

protected

An access level that cannot be used from outside but can be used from derived classes

5

name hiding

name hiding

A function in a derived class hiding a base-class function of the same name

5

virtual function / override

virtual function / override

A function chosen at run time according to the actual type of the object, and its redefinition. MISO does not use them

5

CRTP

Curiously Recurring Template Pattern

A pattern that passes the derived class itself as a template argument of the base class. MISO’s ModelBase uses it

5

template

template

A mechanism that creates functions, classes, and variables by specifying types or values later

6

template argument

template argument

The types or values given inside <> (Array3D<float, backend::Host>)

6

template argument deduction

template argument deduction

Determining template arguments from the types of function arguments

6

instantiation

instantiation

Applying types to create a concrete function or class at compile time

6

variable template

variable template

A constant that has a value for each type (pii4<Real>)

6

member function template

member function template

A member function made into a template

6

tag type

tag type

An empty struct whose type alone serves as a marker for selection (backend::Host)

6

tag dispatch

tag dispatch

A way of choosing which function (overload) to call by a tag-type argument

6

specialization

specialization

A separate definition used only for specific template arguments

6

explicit (full) specialization

explicit (full) specialization

A specialization that fixes all the arguments (template <>)

6

partial specialization

partial specialization

A specialization that fixes only some of the arguments

6

primary template

primary template

The first declaration, on which specializations are based

6

type trait

type trait

A class template that returns a property of a type through ::value (std::is_same)

6

SFINAE

Substitution Failure Is Not An Error

A rule that removes a candidate whose template-argument substitution fails from the candidates instead of reporting an error

6

III. Parallel Computing in MISO

Term

English

Description

First appears

row-major / column-major

row-major / column-major

A layout in which the last index (C++, MISO) or the first index (Fortran) is contiguous in memory

7

lambda expression

lambda expression

A nameless function written in place, at the position of an expression

7

capture

capture

A lambda expression taking in outer variables by value ([=]) or by reference ([&])

7

half-open interval

half-open interval

A range [begin, end) that includes the start and excludes the end

7

reduction

reduction

An operation that computes a single value, such as the sum or the maximum, from all elements (reduce)

7

identity element

identity element

A value that leaves the other operand unchanged when combined with op (0 for a sum). Used as the initial value of reduce

7

FMA

fused multiply-add

An instruction that performs a multiplication and an addition with a single rounding. It can cause slightly different results on the CPU and the GPU

7

process

process

A unit of program execution that runs with its own memory

8

rank

rank

The 0-based number given to a process within a communicator

8

communicator

communicator

The group of processes that take part in communication (such as MPI_COMM_WORLD)

8

SPMD

Single Program, Multiple Data

A form in which each process runs the same program on different data

8

domain decomposition

domain decomposition

Dividing the computational domain and assigning the parts to the processes

8

ghost cell

ghost cell

Cells added at both ends of an array to hold the neighbor’s values or boundary-condition values

8

halo exchange

halo exchange

Communication that fills ghost cells with values from the neighboring rank

8

tag

tag

In MPI, an integer that matches a send with a receive

8

deadlock

deadlock

A state in which processes wait for each other and cannot proceed

8

non-blocking communication

non-blocking communication

Communication that only starts and returns, and waits for completion later (MPI_Isend)

8

collective communication

collective communication

Communication in which all processes of a communicator take part (MPI_Allreduce)

8

pack / unpack

pack / unpack

Packing values into a send buffer / restoring them from the received buffer into an array

8

physical / internal boundary

physical / internal boundary

A boundary at the edge of the computational domain / a boundary with a neighboring rank

8

MPI_PROC_NULL

MPI_PROC_NULL

A rank value meaning there is no partner. Sending to or receiving from it does nothing

8

MCA

Modular Component Architecture

A mechanism for selecting Open MPI internal components (environment variables OMPI_MCA_*)

8

host

host

The CPU side and its memory

9

device

device

The GPU side and its memory

9

kernel

kernel

A function marked with __global__ that is executed by many GPU threads

9

thread

thread

The smallest unit that executes a kernel

9

(thread) block

(thread) block

A group of threads. Shared memory and __syncthreads work within it

9

grid

grid

All the blocks arranged in a single launch

9

shared memory

shared memory

Small, fast memory shared by the threads of the same block

9

extended lambda

extended lambda

A lambda marked with __host__ __device__. Requires nvcc’s --expt-extended-lambda

9

asynchronous / synchronization

asynchronous / synchronization

The host moving on without waiting for the launched GPU work / waiting for that work to complete

9

stream

stream

A queue of work for the GPU. Work in it is executed in the order submitted

9

CUDA-aware MPI

CUDA-aware MPI

MPI that can send and receive GPU memory addresses directly

9

compute capability

compute capability

A number that represents the GPU generation. Used for CMAKE_CUDA_ARCHITECTURES

9

HMM

Heterogeneous Memory Management

A mechanism that lets the GPU read host memory. In environments where it is enabled, mistakes in capturing this do not show up

9

IV. Capstone Practice and Reading the MISO Source

Term

English

Description

First appears

heat equation

heat equation

\(\partial u/\partial t = \kappa\,\partial^2 u/\partial x^2\). The equation by which temperature diffuses

10

analytical solution

analytical solution

An exact solution that can be written as a formula

10

central difference

central difference

A difference that approximates the derivative using the left and right neighbors

10

explicit method

explicit method

A method that computes the values at the next time from the values at the current time only

10

forward Euler method

forward Euler method

A first-order method that approximates the time derivative with a forward difference

10

diffusion number

diffusion number

\(r = \kappa\Delta t/\Delta x^2\). It appears in the stability condition

10

stability condition

stability condition

The upper limit of \(\Delta t\) for which the calculation does not diverge (\(r \le 1/2\) for the explicit method for heat conduction)

10

amplification factor

amplification factor

The factor applied to the amplitude of a wave in one step

10

discrete solution

discrete solution

The exact solution of the difference equation itself

10

truncation error

truncation error

The error caused by approximating derivatives with differences

10

order of convergence

order of convergence

The exponent of the rate at which the error decreases as the grid is refined

10

equation of state (EOS)

equation of state (EOS)

The relation that gives the pressure and sound speed from the density and internal energy

11

(hyperbolic) divergence cleaning

(hyperbolic) divergence cleaning

A method that carries the error in \(\nabla\cdot\boldsymbol{B}\) away as a wave with an auxiliary variable \(\phi\) and damps it

11

CFL condition

CFL condition

The condition that sets \(\Delta t\) so that the fastest wave does not cross more than one grid spacing in one step

11

Alfvén speed

Alfvén speed

Speed of waves propagating along the magnetic field, \(\lvert\boldsymbol{B}\rvert/\sqrt{4\pi\rho}\)

11

artificial viscosity

artificial viscosity

A treatment that adds diffusion only near abrupt changes to suppress numerical oscillations

11

limiter

limiter

A function that limits the magnitude of the gradient, for example by taking the smallest slope only when the signs of the slopes agree (such as minmod)

11

flux

flux

The quantity that passes through a cell boundary

11

source term

source term

An external force or heating added to the right-hand side of an equation

11

hydrostatic equilibrium

hydrostatic equilibrium

The state in which gravity and the pressure gradient are balanced

11

checkpoint

checkpoint

The state saved so that a calculation can be restarted

11

raw string literal

raw string literal

A string of the form R"x( ... )x" that can contain newlines and " as they are

11