Skip to content

Order topology by space filling curve (e.g. Hilbert or Morton curve) #389

@Huite

Description

@Huite

Motivation:

Looking at some of the large-ish model input for parallel MODFLOW 6, it's clear that delayed execution is generating enormous IO overhead. Generally we chunk in the time dimension, and generally all data is kept out of RAM. There are generally at least three to five steps where we actually need to look at the data, and need to move the spatial data into RAM. Unfortunately, with chunking over time, this means the entire domain is loaded into memory, for each partition -- because in terms of logic, it is intuitive to deal with a single partition at a time.

Anyway, for structured data, this is trivial: just chunk by x and y. Let's say we have chunks of 100 x by 100 y; if the partitions are sized 250 by 250; we have reasonable efficiency; each first/last chunk on the x and y is wasted, 225/625 is about 36%.

Compare this with no chunking; for 10 equal partitions, we waste a guaranteed 90% of IO!

We need some measure of "closeness"; I'm currently thinking of using a Hilbert or Morton space filling curve. We use the coordinates (node/edge/face). This should have the nice property that it should work reasonably well regardless of the number of chunks / partitions (that we don't know in advance); the space filling curve is continuous.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions