Skip to content

Commit 6f3c845

Browse files
sbryngelsonclaude
andcommitted
Fix linter error message: wp -> stp for storage precision
The hardcoded byte-size linter should recommend storage_size(0._stp)/8, not 0._wp, since field I/O uses storage precision. In mixed-precision builds (wp=double, stp=half) the current message would misdirect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7391bec commit 6f3c845

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

toolchain/mfc/lint_source.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def check_hardcoded_byte_size(repo_root: Path) -> list[str]:
128128
129129
When MFC is built in single precision (``wp = real32``), reals are
130130
4 bytes. Hard-coding 8 makes MPI I/O read/write the wrong amount.
131-
Use ``storage_size(0._wp)/8`` instead.
131+
Use ``storage_size(0._stp)/8`` instead.
132132
"""
133133
errors: list[str] = []
134134
src_dir = repo_root / SRC_DIR
@@ -145,7 +145,7 @@ def check_hardcoded_byte_size(repo_root: Path) -> list[str]:
145145
if byte_re.search(stripped.split("!")[0]):
146146
errors.append(
147147
f" {rel}:{i + 1} hard-codes 8-byte real size."
148-
" Fix: use 'storage_size(0._wp)/8' instead of"
148+
" Fix: use 'storage_size(0._stp)/8' instead of"
149149
" '8._wp'"
150150
)
151151

0 commit comments

Comments
 (0)