Skip to content

Commit d2efbb8

Browse files
committed
Merge branch 'fix/wp-mok-precision' of https://github.com/sbryngelson/MFC into fix/wp-mok-precision
2 parents c224343 + 5e07f44 commit d2efbb8

10 files changed

Lines changed: 147 additions & 11 deletions

File tree

.claude/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"allowedTools": [
3+
"Bash(gh pr view:*)",
4+
"Bash(gh pr diff:*)",
5+
"Bash(gh pr comment:*)",
6+
"Bash(gh api:*)",
7+
"Bash(gh search code:*)",
8+
"Bash(cat:*)",
9+
"Bash(ls:*)",
10+
"Bash(grep:*)",
11+
"Bash(python3:*)",
12+
"Bash(git:*)"
13+
]
14+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, ready_for_review, reopened]
6+
7+
jobs:
8+
claude-review:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
issues: read
14+
actions: read
15+
id-token: write
16+
17+
steps:
18+
- name: Checkout PR head (fork)
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
fetch-depth: 1
23+
24+
- name: Remove prior Claude review comment (so review runs again)
25+
env:
26+
GH_TOKEN: ${{ github.token }}
27+
run: |
28+
pr=${{ github.event.pull_request.number }}
29+
repo=${{ github.repository }}
30+
31+
# Find first issue comment whose body starts with "## Claude Code Review"
32+
comment_id=$(gh api repos/$repo/issues/$pr/comments \
33+
--jq '.[] | select(.body | startswith("## Claude Code Review")) | .id' | head -n 1)
34+
35+
if [ -n "$comment_id" ]; then
36+
echo "Deleting prior Claude review comment id=$comment_id"
37+
gh api -X DELETE repos/$repo/issues/comments/$comment_id
38+
else
39+
echo "No prior Claude review comment found."
40+
fi
41+
42+
- name: Run Claude Code Review
43+
id: claude-review
44+
uses: anthropics/claude-code-action@v1
45+
with:
46+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
47+
github_token: ${{ github.token }}
48+
49+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
50+
plugins: 'code-review@claude-code-plugins'
51+
52+
claude_args: >
53+
--allowedTools
54+
"Bash(gh pr view:*)"
55+
"Bash(gh pr diff:*)"
56+
"Bash(gh pr comment:*)"
57+
"Bash(gh api:*)"
58+
"Bash(gh search code:*)"
59+
"Bash(cat:*)"
60+
"Bash(ls:*)"
61+
"Bash(grep:*)"
62+
"Bash(python3:*)"
63+
"Bash(git:*)"
64+
65+
prompt: |
66+
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}
67+
68+
Post the results as ONE top-level PR comment titled "Claude Code Review".
69+
70+
Output requirements (even if no issues):
71+
- Start with: files changed count + list up to 15 changed file paths
72+
- Then: a short summary of what the PR changes (3–6 bullets)
73+
- Then: findings:
74+
- If issues: list them with file path + line numbers when possible
75+
- If no issues: list at least 3 concrete "improvement opportunities" with file paths
76+
77+
If you cannot access the diff/files, say exactly what is blocked.
78+
If posting a PR comment is blocked, write the full review to the GitHub Actions job summary instead.
79+
80+
IMPORTANT:
81+
- Do NOT stop just because a previous "Claude Code Review" comment exists.
82+
- If a prior Claude review exists, post a NEW comment titled "Claude Code Review (updated)" that includes:
83+
- current head SHA: ${{ github.event.pull_request.head.sha }}
84+
- files changed count + up to 15 file paths
85+
- 3–6 bullet summary of changes
86+
- findings or at least 3 improvement opportunities with file paths
87+
Post as ONE top-level PR comment.
88+
89+
additional_permissions: |
90+
actions: read

.github/workflows/claude.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
issues: write
25+
id-token: write
26+
actions: read
27+
28+
steps:
29+
- name: Run Claude Code
30+
id: claude
31+
uses: anthropics/claude-code-action@v1
32+
with:
33+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
34+
additional_permissions: |
35+
actions: read

.lychee.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ retry_wait_time = 4
1212

1313
# Comma-separated list of accepted status codes for valid links.
1414
# accept = ["200", "206", "403", "429"]
15-
accept = ["200", "429"]
15+
accept = ["200", "429", "502"]
1616

1717
verbose = "error"
1818

src/common/m_variables_conversion.fpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,6 @@ contains
11031103
nbub = 3._wp*q_prim_vf(alf_idx)%sf(j, k, l)/(4._wp*pi*R3tmp)
11041104
end if
11051105

1106-
if (j == 0 .and. k == 0 .and. l == 0) print *, 'In convert, nbub:', nbub
1107-
11081106
do i = bub_idx%beg, bub_idx%end
11091107
q_cons_vf(i)%sf(j, k, l) = q_prim_vf(i)%sf(j, k, l)*nbub
11101108
end do

src/post_process/m_data_input.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ impure subroutine s_read_serial_data_files(t_step)
312312
STATUS='old', ACTION='read')
313313
read (1) q_cons_vf(i)%sf(0:m, 0:n, 0:p)
314314
close (1)
315-
print *, q_cons_vf(i)%sf(:, 0, 0)
316315
else
317316
call s_mpi_abort('File q_cons_vf'//trim(file_num)// &
318317
'.dat is missing in '//trim(t_step_dir)// &

src/pre_process/m_data_output.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ contains
549549
m_MOK = int(m_glb_save, MPI_OFFSET_KIND)
550550
n_MOK = int(n_glb_save, MPI_OFFSET_KIND)
551551
p_MOK = int(p_glb_save, MPI_OFFSET_KIND)
552-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
552+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
553553
MOK = int(1._wp, MPI_OFFSET_KIND)
554554
str_MOK = int(name_len, MPI_OFFSET_KIND)
555555
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -615,7 +615,7 @@ contains
615615
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
616616
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
617617
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
618-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
618+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
619619
MOK = int(1._wp, MPI_OFFSET_KIND)
620620
str_MOK = int(name_len, MPI_OFFSET_KIND)
621621
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

src/pre_process/m_start_up.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ contains
660660
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
661661
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
662662
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
663-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
663+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
664664
MOK = int(1._wp, MPI_OFFSET_KIND)
665665
str_MOK = int(name_len, MPI_OFFSET_KIND)
666666
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

src/simulation/m_data_output.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ contains
895895
m_MOK = int(m_glb_save + 1, MPI_OFFSET_KIND)
896896
n_MOK = int(n_glb_save + 1, MPI_OFFSET_KIND)
897897
p_MOK = int(p_glb_save + 1, MPI_OFFSET_KIND)
898-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
898+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
899899
MOK = int(1._wp, MPI_OFFSET_KIND)
900900
str_MOK = int(name_len, MPI_OFFSET_KIND)
901901
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
@@ -963,7 +963,7 @@ contains
963963
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
964964
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
965965
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
966-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
966+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
967967
MOK = int(1._wp, MPI_OFFSET_KIND)
968968
str_MOK = int(name_len, MPI_OFFSET_KIND)
969969
NVARS_MOK = int(alt_sys, MPI_OFFSET_KIND)
@@ -1087,7 +1087,7 @@ contains
10871087
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
10881088
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
10891089
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
1090-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
1090+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
10911091
MOK = int(1._wp, MPI_OFFSET_KIND)
10921092

10931093
write (file_loc, '(A)') 'ib.dat'

src/simulation/m_start_up.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ contains
652652
m_MOK = int(m_glb + 1, MPI_OFFSET_KIND)
653653
n_MOK = int(n_glb + 1, MPI_OFFSET_KIND)
654654
p_MOK = int(p_glb + 1, MPI_OFFSET_KIND)
655-
WP_MOK = int(8._wp, MPI_OFFSET_KIND)
655+
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
656656
MOK = int(1._wp, MPI_OFFSET_KIND)
657657
str_MOK = int(name_len, MPI_OFFSET_KIND)
658658
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)

0 commit comments

Comments
 (0)