Skip to content

Commit d19da4f

Browse files
committed
Merge master into TerminalOutput
Conflict in m_collisions.fpp: master (#1745) deleted the loop comment; this branch added a max_overlap max-reduction to the same GPU_PARALLEL_LOOP. Kept the reduction, kept master's comment deletion. Claude-Session: https://claude.ai/code/session_01G77jhrA4JPDz5TqJzt8ACC
2 parents 9e533d7 + 5829daf commit d19da4f

36 files changed

Lines changed: 577 additions & 66 deletions

.github/scripts/submit-slurm-job.sh

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,29 @@ elif [ "$device" = "gpu" ]; then
126126
# Determine GPU partition
127127
gpu_partition="batch"
128128
if [ "$gpu_partition_dynamic" = "true" ]; then
129-
# Use pre-selected bench partition if available, otherwise query sinfo
130-
if [ -n "${BENCH_GPU_PARTITION:-}" ]; then
131-
gpu_partition="$BENCH_GPU_PARTITION"
132-
echo "Using pre-selected bench partition: $gpu_partition (PR/master consistency)"
129+
if [ "$job_type" = "bench" ]; then
130+
# Benchmarks compare PR against master, so both jobs must land on the
131+
# SAME GPU type or the comparison is meaningless. That rules out a
132+
# partition list (SLURM could place PR and master on different
133+
# hardware); instead a single partition is picked and pinned across
134+
# both jobs via BENCH_GPU_PARTITION. See run_parallel_benchmarks.sh.
135+
if [ -n "${BENCH_GPU_PARTITION:-}" ]; then
136+
gpu_partition="$BENCH_GPU_PARTITION"
137+
echo "Using pre-selected bench partition: $gpu_partition (PR/master consistency)"
138+
else
139+
source "${SCRIPT_DIR}/select-gpu-partition.sh"
140+
gpu_partition="$SELECTED_GPU_PARTITION"
141+
fi
133142
else
134-
source "${SCRIPT_DIR}/select-gpu-partition.sh"
135-
gpu_partition="$SELECTED_GPU_PARTITION"
143+
# Tests (and build+test) don't compare across hardware, so submit to a
144+
# partition LIST and let SLURM start on whichever frees first instead
145+
# of pinning one partition and queueing behind it. This restores the
146+
# multi-partition backfill that #1299 dropped when it unified test and
147+
# bench onto the single-partition bench selector. gpu-l40s (bad
148+
# hardware) and gpu-rtx6000 (too slow for the test time limit) are
149+
# intentionally omitted.
150+
gpu_partition="gpu-h200,gpu-h100,gpu-a100,gpu-v100"
151+
echo "Using GPU partition list for test job: $gpu_partition"
136152
fi
137153
fi
138154

.github/workflows/bench.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,23 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && format('-review-{0}', github.run_id) || '' }}
1111
cancel-in-progress: true
1212

13+
# Least-privilege default: no job in this workflow writes to the repo.
14+
permissions:
15+
contents: read
16+
1317
jobs:
1418
file-changes:
1519
name: Detect File Changes
1620
if: >
1721
github.event_name != 'pull_request_review' ||
1822
github.event.review.user.type != 'Bot'
23+
# Job-level permissions replace the workflow default outright rather than
24+
# merging with it, so contents must be restated here. paths-filter reads the
25+
# PR's changed-file list via pulls.listFiles; this is the only job that needs
26+
# it, so it is granted here instead of workflow-wide.
27+
permissions:
28+
contents: read
29+
pull-requests: read
1930
runs-on: 'ubuntu-latest'
2031
outputs:
2132
checkall: ${{ steps.changes.outputs.checkall }}

.github/workflows/claude-code-review.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,17 @@ jobs:
5858
exit 1
5959
fi
6060
61-
PR_HEAD_REF="$(gh pr view "$PR_NUMBER" --repo "${{ github.repository }}" --json headRefName --jq .headRefName)"
62-
6361
echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
64-
echo "pr_head_ref=$PR_HEAD_REF" >> "$GITHUB_OUTPUT"
6562
63+
# Base repo only. This job is privileged (pull_request_target / issue_comment:
64+
# it holds secrets and a write-capable token), so the PR head is never checked
65+
# out or fetched here. The diff and per-file context are pulled through the gh
66+
# API in later steps and treated purely as data.
6667
- name: Checkout base repo
6768
uses: actions/checkout@v5
6869
with:
6970
fetch-depth: 0
7071

71-
- name: Fetch PR head
72-
shell: bash
73-
env:
74-
PR_NUMBER: ${{ steps.mode.outputs.pr_number }}
75-
run: |
76-
set -euo pipefail
77-
# Fetch the PR merge ref — works for both same-repo and fork PRs
78-
# (fork branches don't exist on origin, but pull/<n>/head always does)
79-
git fetch origin "pull/${PR_NUMBER}/head"
80-
8172
- name: Resolve review state
8273
id: state
8374
shell: bash

.github/workflows/cleanliness.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13+
# Least-privilege default: no job in this workflow writes to the repo.
14+
permissions:
15+
contents: read
16+
1317
jobs:
1418
file-changes:
1519
name: Detect File Changes
20+
# Job-level permissions replace the workflow default outright rather than
21+
# merging with it, so contents must be restated here. paths-filter reads the
22+
# PR's changed-file list via pulls.listFiles; this is the only job that needs
23+
# it, so it is granted here instead of workflow-wide.
24+
permissions:
25+
contents: read
26+
pull-requests: read
1627
runs-on: 'ubuntu-latest'
1728
outputs:
1829
checkall: ${{ steps.changes.outputs.checkall }}

.github/workflows/convergence.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ on:
1010
env:
1111
OMPI_MCA_rmaps_base_oversubscribe: 1
1212

13+
# Least-privilege default: no job in this workflow writes to the repo.
14+
permissions:
15+
contents: read
16+
1317
jobs:
1418
file-changes:
1519
name: Detect File Changes
20+
# Job-level permissions replace the workflow default outright rather than
21+
# merging with it, so contents must be restated here. paths-filter reads the
22+
# PR's changed-file list via pulls.listFiles; this is the only job that needs
23+
# it, so it is granted here instead of workflow-wide.
24+
permissions:
25+
contents: read
26+
pull-requests: read
1627
runs-on: ubuntu-latest
1728
outputs:
1829
checkall: ${{ steps.changes.outputs.checkall }}

.github/workflows/coverage-health.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
schedule:
55
- cron: '0 7 * * *' # daily; loud if the refresh stopped working
66
workflow_dispatch:
7+
# Least-privilege default: no job in this workflow writes to the repo.
8+
permissions:
9+
contents: read
10+
711
jobs:
812
health:
913
if: github.repository == 'MFlowCode/MFC'

.github/workflows/coverage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,20 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}
1212
cancel-in-progress: true
1313

14+
# Least-privilege default: no job in this workflow writes to the repo.
15+
permissions:
16+
contents: read
17+
1418
jobs:
1519
file-changes:
1620
name: Detect File Changes
21+
# Job-level permissions replace the workflow default outright rather than
22+
# merging with it, so contents must be restated here. paths-filter reads the
23+
# PR's changed-file list via pulls.listFiles; this is the only job that needs
24+
# it, so it is granted here instead of workflow-wide.
25+
permissions:
26+
contents: read
27+
pull-requests: read
1728
runs-on: 'ubuntu-latest'
1829
outputs:
1930
checkall: ${{ steps.changes.outputs.checkall }}

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches: [master]
99
pull_request:
1010

11+
# Least-privilege default: no job in this workflow writes to the repo.
12+
permissions:
13+
contents: read
14+
1115
jobs:
1216
build:
1317
name: Build & Verify

.github/workflows/formatting.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
workflow_dispatch:
88

9+
# Least-privilege default: no job in this workflow writes to the repo.
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
docs:
1115
name: Formatting

.github/workflows/fp-stability.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,20 @@ on:
3535
types: [opened, synchronize, reopened, ready_for_review]
3636
workflow_dispatch:
3737

38+
# Least-privilege default: no job in this workflow writes to the repo.
39+
permissions:
40+
contents: read
41+
3842
jobs:
3943
file-changes:
4044
name: Detect File Changes
45+
# Job-level permissions replace the workflow default outright rather than
46+
# merging with it, so contents must be restated here. paths-filter reads the
47+
# PR's changed-file list via pulls.listFiles; this is the only job that needs
48+
# it, so it is granted here instead of workflow-wide.
49+
permissions:
50+
contents: read
51+
pull-requests: read
4152
runs-on: ubuntu-latest
4253
outputs:
4354
checkall: ${{ steps.changes.outputs.checkall }}

0 commit comments

Comments
 (0)