Skip to content

Add the Base/Tiling tutorial - #189

Merged
WeiqunZhang merged 1 commit into
AMReX-Codes:mainfrom
WeiqunZhang:tiling-tutorial
Nov 5, 2026
Merged

WeiqunZhang merged 1 commit into
AMReX-Codes:mainfrom
WeiqunZhang:tiling-tutorial

Conversation

@WeiqunZhang

Copy link
Copy Markdown
Member

The boxes an MFIter loop works on and the bugs of picking the wrong one. The program prints tilebox, validbox, fabbox, growntilebox and nodaltilebox for one box, then counts how many times each cell is written with each choice: tilebox and growntilebox visit every cell once; validbox in a tiled loop visits each cell once per tile; a tile box grown or converted by hand overlaps the neighboring tiles; tilebox in per-box bookkeeping records one tile instead of the box. It ends with a Laplacian timed with and without tiling.

Tested with GNU Make in 3D with OpenMP (2 ranks x 4 threads, 1 rank x 1 thread, tile_size=1024000^3), in 2D with MPI, and in 3D with CUDA.

The boxes an MFIter loop works on and the bugs of picking the wrong one.
The program prints tilebox, validbox, fabbox, growntilebox and
nodaltilebox for one box, then counts how many times each cell is
written with each choice: tilebox and growntilebox visit every cell
once; validbox in a tiled loop visits each cell once per tile; a tile
box grown or converted by hand overlaps the neighboring tiles; tilebox
in per-box bookkeeping records one tile instead of the box. It ends
with a Laplacian timed with and without tiling.

Tested with GNU Make in 3D with OpenMP (2 ranks x 4 threads, 1 rank x
1 thread, tile_size=1024000^3), in 2D with MPI, and in 3D with CUDA.
@WeiqunZhang
WeiqunZhang merged commit 3a0849c into AMReX-Codes:main Nov 5, 2026
20 checks passed
@WeiqunZhang
WeiqunZhang deleted the tiling-tutorial branch November 5, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant