Skip to content

Fix None-value guard in get_n_calculated_per_process for Zig backend#340

Draft
Copilot wants to merge 2 commits intozig-core-integrationfrom
copilot/sub-pr-339
Draft

Fix None-value guard in get_n_calculated_per_process for Zig backend#340
Copilot wants to merge 2 commits intozig-core-integrationfrom
copilot/sub-pr-339

Conversation

Copy link

Copilot AI commented Mar 11, 2026

When using the Zig drop-in binary for bcrham, process_out_err initialises all bcrham_proc_info[i]['calcd'] fields to None (keys present, values absent) because the Zig binary emits no matching debug strings. The original guard checked for missing keys only, so during partition runs get_n_calculated_per_process would crash with TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType'.

Changes

  • get_n_calculated_per_process: change key-presence check ('vtb' not in procinfo['calcd']) to .get('vtb') is None, which catches both absent keys and None values — consistent with how the existing fallback comment describes the intent ("we lost some stdout somewhere")
# Before — misses None-valued keys initialised by process_out_err
if 'vtb' not in procinfo['calcd'] or 'fwd' not in procinfo['calcd']:

# After — catches both missing keys and None values
if procinfo['calcd'].get('vtb') is None or procinfo['calcd'].get('fwd') is None:

The guards added previously for print_partition_dbgfo and check_wait_times remain correct; this fixes the one unguarded caller that is exercised during partition (hierarchical agglomeration) rather than just annotation.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…lues are None not missing)

Co-authored-by: psathyrella <2960243+psathyrella@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Zig drop-in replacement for bcrham and ig-sw Fix None-value guard in get_n_calculated_per_process for Zig backend Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants