Skip to content

t8_time_partition

Prasanna Ponnusamy edited this page Jul 1, 2025 · 1 revision

t8_time_partition

Overview

The t8_time_partition program creates a 2D or 3D structured mesh (a "brick"), partitions the mesh among MPI processes, and can export the partitioned mesh for visualization.

It is designed for:

  • Testing partitioning strategies
  • Timing partitioning performance
  • Visualizing partitions in parallel environments

Command-Line Options

You can specify options to control mesh size, dimension, and output.

Short Long Argument Default Description
-x --x-dim int 1 Number of mesh cells in x-direction
-y --y-dim int 1 Number of mesh cells in y-direction
-z --z-dim int 0 Number of mesh cells in z-direction (3D only)
-d --dim int (2/3) 2 Mesh dimension: 2 (2D) or 3 (3D)
-o --no-vtk switch off Disable VTK output (no files written)
-h --help switch off Display help message

Program Workflow

  1. MPI and Library Initialization: Initializes MPI and necessary t8code libraries.
  2. Option Parsing: Parses command-line options for mesh setup.
  3. Mesh Creation: Creates a structured "brick" mesh distributed across processes.
  4. Optional Coordinate Translation: Offsets each process’s part in the x-direction for clearer visualization.
  5. Partitioning: Partitions the mesh, moving 43% of each process's trees to the next process.
  6. Profiling and Timing: Collects and prints timing statistics.
  7. VTK Output (Optional): Writes the mesh partition to VTK (.vtu) files for visualization.
  8. Cleanup and Finalization: Cleans up memory and finalizes MPI.

Example

2D Mesh, 4x4 cells, 2 processes:

mpirun -np 2 ./t8_time_partition -x 4 -y 4

time parition


Output

  • Timing and profiling information for partitioning.
  • VTK output files if enabled for visualization of partitions.

Troubleshooting

  • If the program does not start or reports missing libraries, check your t8code build and MPI setup.
  • Use -h to see the usage message with full options.
Clone this wiki locally