User Guide: Low Memory Strategies
Polyorder.jl provides advanced memory optimization strategies enabling massive simulations (e.g., $256^3$ grids) on standard hardware. For detailed benchmarks and algorithm design, see Low Memory Strategies.
User Guide: Low Memory Strategies
Polyorder.jl provides Performance Profiles to easily manage memory optimizations. For large-scale simulations (e.g., $256^3$), simply choosing the right profile is sufficient.
For detailed benchmarks and algorithm design, see Low Memory Strategies.
Quick Start: Selecting a Profile
The profile argument in NoncyclicChainSCFT controls all memory strategies automatically.
| Profile | Memory | Speed | Use Case |
|---|---|---|---|
:fast | High | Fastest | Standard CPU jobs ($< 32^3$). |
:balanced | Medium | Fast | Default. Standard CPU/GPU jobs ($< 128^3$). |
:compact | Low | Medium | GPU Optimized. Large grids ($128^3 - 256^3$). |
:minimal | Lowest | Slow | Max Scaling. Extreme grids ($256^3+$) on single GPU. |
1. Maximum Compression (Target: $256^3$ Gyroid)
Use :minimal to enable Checkpointing + Symmetric Storage + Shared Caches.
# This fits a 256^3 Gyroid simulation into ~5.6 GB VRAM
scft = NoncyclicChainSCFT(system, w_gpu; profile=:minimal)2. Balanced GPU Usage (Target: $128^3$)
Use :balanced to enable Symmetric Storage but keep full propagator history (faster than compact and :minimal).
scft = NoncyclicChainSCFT(system, w_gpu; profile=:balanced)Detailed Features
Feature 1: Time-Domain Checkpointing
(Enabled in :minimal) Reduces propagator storage from $\mathcal{O}(N_s)$ to $\mathcal{O}(\sqrt{N_s})$ by recomputing steps on-the-fly.
- Trade-off: ~2x slower simulation.
Feature 2: Space-Domain Symmetry
(Enabled in :balanced, :compact, :minimal) Reduces field storage ($\sim 96\times$ for Gyroid) by exploiting crystal limits.
- Note: Polyorder automatically detects symmetry from your
UnitCellorAuxiliaryField. - Constraint: Cannot simulate symmetry-breaking transitions (e.g. order-disorder) dynamically.
Troubleshooting
- Disabling Symmetry: If you need to study symmetry breaking (e.g., nucleating a new phase), you must disable the automatic symmetry: ```julia
"fast" profile disables symmetry (and precomputes MDEs for speed)
scft = NoncyclicChainSCFT(..., profile=:fast) ``` - OOM on GPU?
- Ensure
profile=:minimalis used. - Run
GC.gc(); CUDA.reclaim()between solves. - Use
Float32precision fields.
- Ensure