You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`uw.timing.print_table()` ultimately calls PETSc's `PetscLogView`. At very
514
+
high CPU counts (≳1000 ranks), the **ASCII output path** can hang —
515
+
typically appearing as a job that completes its computation cleanly but
516
+
never exits. The CSV write path uses a different, less collective-heavy
517
+
strategy and avoids the issue:
518
+
519
+
```python
520
+
# Default — fine at small scale, can hang at ≳1000 ranks
521
+
uw.timing.print_table()
522
+
uw.timing.print_table("results.txt")
523
+
524
+
# Safe at any scale — recommended for HPC runs
525
+
uw.timing.print_table("results.csv")
526
+
```
527
+
528
+
The behaviour is in PETSc, not Underworld; choosing CSV at scale is the
529
+
recommended workaround. (Issue #134.)
530
+
511
531
## Summary
512
532
513
533
**Key Takeaways:**
@@ -517,5 +537,6 @@ These operations require **ALL ranks** to participate:
517
537
3.**Use `with uw.selective_ranks(ranks):`** for serial operations
518
538
4.**Collective operations must run on ALL ranks** - never inside rank conditionals
519
539
5.**Test with `mpirun -np N`** to catch issues early
540
+
6.**At ≳1000 ranks, write timing output as `.csv`** to avoid `PetscLogView` hangs
520
541
521
542
The parallel safety system makes parallel programming in Underworld3 safer and more intuitive - collective operations are evaluated on all ranks automatically, preventing common deadlock scenarios!
0 commit comments