Skip to content

Server Rack View

github-actions[bot] edited this page Nov 30, 2026 · 5 revisions

Server Rack View & Multi-Rank Topology Inspection

GridLock's Server Rack View (ServerRackView and its custom ServerNodeDelegate renderer) visualizes every active MPI process (Rank 0..N-1) as a compact hardware blade card (116 x 34 px) inside the right-hand Server Rack dock (ServerRackDock). It provides at-a-glance cluster health, execution state filtering, synchronized multi-dock rank switching, and per-rank context actions.


1. Overview & Anatomy of a Rank Blade Card

Each card in ServerRackView represents one MPI rank in a horizontal wrapping grid (QListView::IconMode, LeftToRight) and displays three telemetry fields:

  • Top-Left (RANK N): Zero-based MPI rank index in bold JetBrains Mono.
  • Top-Right (Execution State Pill): Color-coded status badge computed by ServerRackView::badgeTextForState() and ServerRackView::badgeColorForState():
Rank State Badge Pill Accent Color Meaning
running RUN #2ecc71 (Green) Rank is actively executing instructions.
stopped / paused BRK #f1c40f (Amber) Rank is paused at a breakpoint, signal, or manual halt.
deadlock / deadlocked DLOCK #f44747 (Crimson) Rank is part of a circular wait-for cycle flagged by DeadlockAnalyzer.
diverged DIV #f44747 (Crimson) Rank diverged onto a different collective or control-flow path.
exited EXIT #64748b (Muted Slate) Rank has terminated (MPI_Finalize or process exit).
idle IDLE #7f8c8d (Gray) Pre-launch configured rank slot awaiting session start.
  • Bottom Row (0x... Program Counter): Live 64-bit instruction pointer (RIP / register 16) extracted from RankState, rendered in teal/accent (or red when deadlocked/diverged). Idle and exited ranks clear the PC readout cleanly.

Server Rack View populated with 8 MPI ranks across execution states


2. Selecting & Navigating Ranks Across Synchronized Docks

  • Mouse Selection: Click any rank blade card to focus that rank. The selected card highlights with a 2 px accent border.
  • Keyboard Navigation: Use Left / Right / Up / Down, Home, and End while ServerRackView has focus to step across rank cards without lifting your hands from the keyboard.
  • Cross-Dock Synchronization: Selecting a rank emits ServerRackView::rankSelected(rankId, pcAddress), which updates:
    • Source Editor (SourceCodeView): Scrolls to the focused rank's active source line and refreshes inline variable ghost values.
    • Disassembly & CFG (DisassemblyView): Highlights the selected rank (setSelectedRank()) and seeks to its 0x... PC address. Across the whole cluster, ranksUpdated(rankPcMap) also displays all peer rank PC markers simultaneously.
    • Variables (VariablesDockWidget), Call Stack (CallStackDockWidget), Registers (RegisterView), and Memory (MemView): Switch immediately to the focused rank's frame, locals, hardware registers, and process address space.

3. Filtering & Triaging Large Rank Counts

Above the blade grid, serverRackFilterBar provides one-click exclusive state filter buttons backed by ServerRackView::setStateFilter():

  • All (all): Displays every rank (Rank 0..N-1).
  • Deadlock (deadlock): Isolates only deadlock, deadlocked, and diverged ranks so stalled peers stand out immediately during large MPI runs.
  • Stopped (stopped): Displays only breakpoint-stopped or manually paused ranks.
  • Running (running): Displays only actively executing ranks.

Programmatic and automation workflows can also filter by "exited" or "deadlock_stopped" via ServerRackView::setStateFilter().


4. Per-Rank Context Menu Actions & Plugin Hooks

Right-clicking any rank blade card opens ServerRackView::createContextMenuForRank(rankId):

  • Focus Rank N (<BADGE>): Selects and focuses the rank across all debugger docks.
  • Plugin Actions Submenu (GRIDLOCK_SURFACE_RANK_LIST): When native C99 plugins register rank-list context actions, GridLock automatically populates a Plugin Actions submenu and dispatches GridLockSurfaceContext carrying the clicked rank ID, state string, active function symbol, source file/line, and 64-bit PC address.
  • Rank-Targeted Control & Inspection: Once focused via the blade card or context menu, toolbar controls (Continue, Step Over, Step Into, Pause), Memory View (Diff Ranks), Array & Field Plotter (Ctrl+Alt+G), and Pointer Graph operate directly on that rank.

Server Rack View filtered to deadlocked and diverged ranks with per-rank context menu

Clone this wiki locally