t8_time_partition - DLR-AMR/t8code GitHub Wiki
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
- MPI and Library Initialization: Initializes MPI and necessary t8code libraries.
- Option Parsing: Parses command-line options for mesh setup.
- Mesh Creation: Creates a structured "brick" mesh distributed across processes.
- Optional Coordinate Translation: Offsets each process’s part in the x-direction for clearer visualization.
- Partitioning: Partitions the mesh, moving 43% of each process's trees to the next process.
- Profiling and Timing: Collects and prints timing statistics.
- VTK Output (Optional): Writes the mesh partition to VTK (.vtu) files for visualization.
- 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
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
-hto see the usage message with full options.