Skip to content

Commit 47afbfe

Browse files
authored
Merge branch 'master' into bala_force_changes
2 parents 24f27a2 + 7c806be commit 47afbfe

129 files changed

Lines changed: 7926 additions & 2664 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codeant/configuration.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

.coderabbit.yaml

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,52 @@ language: en-US
33

44
reviews:
55
profile: chill
6+
7+
# Hide the “Review skipped / Draft detected” status message
8+
review_status: false
9+
10+
# Remove the “Prompt for all review comments with AI agents” block
11+
enable_prompt_for_ai_agents: false
12+
13+
# Disable extra/non-default summary sections
14+
high_level_summary: false
15+
related_issues: false
16+
sequence_diagrams: false
17+
changed_files_summary: false
18+
19+
# Further reduce walkthrough noise (footer itself isn't currently configurable)
20+
collapse_walkthrough: true
21+
review_details: false
22+
estimate_code_review_effort: false
23+
assess_linked_issues: false
24+
related_prs: false
25+
suggested_labels: false
26+
suggested_reviewers: false
27+
in_progress_fortune: false
28+
poem: false
29+
30+
# Remove "Finishing Touches" section content
31+
finishing_touches:
32+
docstrings:
33+
enabled: false
34+
unit_tests:
35+
enabled: false
36+
37+
auto_review:
38+
enabled: true # initial PR-open review
39+
auto_incremental_review: false # no re-run on every push
40+
641
path_instructions:
42+
- path: "**/*"
43+
instructions: |
44+
IMPORTANT: Only comment on code that is within this PR’s diff (changed lines / files).
45+
Do not add feedback that requires commenting outside the diff range.
46+
747
- path: "src/**/*.fpp"
848
instructions: |
949
Fortran source (Fypp-preprocessed). Follow the coding standards in
1050
docs/documentation/contributing.md and the GPU macro API in
11-
docs/documentation/gpuParallelization.md.
12-
- path: "src/**/*.f90"
13-
instructions: |
14-
Fortran source. Follow the coding standards in
51+
docs/documentation/gpuParallelization.md and the coding standards in
1552
docs/documentation/contributing.md.
1653
- path: "toolchain/**/*.py"
1754
instructions: |

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ See the [developer guide](https://mflowcode.github.io/documentation/contributing
3030
- [ ] Tested on NVIDIA GPU or AMD GPU
3131

3232
</details>
33+
34+
## AI code reviews
35+
36+
Reviews are not triggered automatically. To request a review, comment on the PR:
37+
- `@coderabbitai review` — incremental review (new changes only)
38+
- `@coderabbitai full review` — full review from scratch
39+
- `/review` — Qodo review
40+
- `/improve` — Qodo code suggestions

.github/scripts/submit_and_monitor_bench.sh

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,27 @@ device="$2"
1414
interface="$3"
1515
cluster="$4"
1616

17-
# Get the directory where this script lives
18-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
19-
2017
echo "[$dir] Submitting benchmark for $device-$interface on $cluster..."
2118
cd "$dir"
2219

23-
# Submit job
24-
submit_output=$(bash .github/workflows/$cluster/submit-bench.sh \
25-
.github/workflows/$cluster/bench.sh "$device" "$interface" 2>&1)
26-
27-
job_id=$(echo "$submit_output" | sed -n 's/.*Submitted batch job \([0-9][0-9]*\).*/\1/p')
28-
job_slug="bench-$device-$interface"
29-
output_file="${job_slug}.out"
30-
31-
if [ -z "$job_id" ]; then
32-
echo "[$dir] ERROR: Failed to submit job"
33-
echo "$submit_output"
34-
exit 1
35-
fi
36-
37-
echo "[$dir] Job ID: $job_id, monitoring output file: $output_file"
38-
39-
# Use the monitoring script from PR (where this script lives)
40-
monitor_exit=0
41-
bash "${SCRIPT_DIR}/monitor_slurm_job.sh" "$job_id" "$output_file" || monitor_exit=$?
42-
if [ "$monitor_exit" -ne 0 ]; then
43-
echo "[$dir] WARNING: SLURM job exited with code $monitor_exit"
44-
else
45-
echo "[$dir] Monitoring complete for job $job_id"
46-
fi
20+
# Submit and monitor job (submit.sh auto-detects bench mode from script name)
21+
bash .github/workflows/$cluster/submit.sh \
22+
.github/workflows/$cluster/bench.sh "$device" "$interface"
4723

4824
# Verify the YAML output file was created
25+
job_slug="bench-$device-$interface"
4926
yaml_file="${job_slug}.yaml"
5027
if [ ! -f "$yaml_file" ]; then
51-
echo "[$dir] ERROR: Expected output file not found: $yaml_file"
52-
echo "[$dir] Directory contents:"
53-
ls -la *.yaml 2>/dev/null || echo " No YAML files found"
54-
echo ""
55-
echo "[$dir] Last 100 lines of job output ($output_file):"
56-
echo "----------------------------------------"
57-
tail -n 100 "$output_file" 2>/dev/null || echo " Could not read output file"
58-
echo "----------------------------------------"
59-
exit 1
28+
echo "[$dir] ERROR: Expected output file not found: $yaml_file"
29+
echo "[$dir] Directory contents:"
30+
ls -la *.yaml 2>/dev/null || echo " No YAML files found"
31+
echo ""
32+
output_file="${job_slug}.out"
33+
echo "[$dir] Last 100 lines of job output ($output_file):"
34+
echo "----------------------------------------"
35+
tail -n 100 "$output_file" 2>/dev/null || echo " Could not read output file"
36+
echo "----------------------------------------"
37+
exit 1
6038
fi
6139

6240
echo "[$dir] Verified output file exists: $yaml_file ($(stat -f%z "$yaml_file" 2>/dev/null || stat -c%s "$yaml_file" 2>/dev/null) bytes)"
63-

.github/workflows/bench.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ concurrency:
1313
jobs:
1414
file-changes:
1515
name: Detect File Changes
16+
if: >
17+
github.event_name != 'pull_request_review' ||
18+
github.event.review.user.type != 'Bot'
1619
runs-on: 'ubuntu-latest'
1720
outputs:
1821
checkall: ${{ steps.changes.outputs.checkall }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# This flag is for non-interactive CI runs (bypasses approval prompts).
4040
claude_args: >
4141
--dangerously-skip-permissions
42-
--max-turns 10
42+
--max-turns 90
4343
--allowedTools
4444
"Bash"
4545

.github/workflows/coverage.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: [master]
66
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
78
workflow_dispatch:
89

910
concurrency:
@@ -28,18 +29,29 @@ jobs:
2829

2930
run:
3031
name: Coverage Test on CodeCov
31-
if: needs.file-changes.outputs.checkall == 'true'
32+
if: needs.file-changes.outputs.checkall == 'true' && github.event.pull_request.draft != true
3233
needs: file-changes
3334
runs-on: "ubuntu-latest"
3435
steps:
3536
- name: Checkouts
3637
uses: actions/checkout@v4
3738

39+
- name: Get system info for cache key
40+
id: sys-info
41+
run: |
42+
{
43+
uname -m
44+
cat /proc/cpuinfo 2>/dev/null | grep 'model name' | head -1 || sysctl -n machdep.cpu.brand_string 2>/dev/null || true
45+
${FC:-gfortran} --version 2>/dev/null | head -1 || true
46+
${CC:-gcc} --version 2>/dev/null | head -1 || true
47+
} | (sha256sum 2>/dev/null || shasum -a 256) | cut -c1-16 > /tmp/sys-hash
48+
echo "sys-hash=$(cat /tmp/sys-hash)" >> "$GITHUB_OUTPUT"
49+
3850
- name: Restore Build Cache
3951
uses: actions/cache@v4
4052
with:
4153
path: build
42-
key: mfc-coverage-${{ hashFiles('CMakeLists.txt', 'toolchain/dependencies/**', 'toolchain/cmake/**', 'src/**/*.fpp', 'src/**/*.f90') }}
54+
key: mfc-coverage-${{ steps.sys-info.outputs.sys-hash }}-${{ hashFiles('CMakeLists.txt', 'toolchain/dependencies/**', 'toolchain/cmake/**', 'src/**/*.fpp', 'src/**/*.f90') }}
4355

4456
- name: Setup Ubuntu
4557
run: |

.github/workflows/frontier/bench.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ "$job_device" = "gpu" ]; then
1616
fi
1717

1818
if [ "$job_device" = "gpu" ]; then
19-
./mfc.sh bench --mem 12 -j $n_ranks -o "$job_slug.yaml" -- -c frontier $device_opts -n $n_ranks
19+
./mfc.sh bench --mem 4 -j $n_ranks -o "$job_slug.yaml" -- -c $job_cluster $device_opts -n $n_ranks
2020
else
21-
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c frontier $device_opts -n $n_ranks
21+
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c $job_cluster $device_opts -n $n_ranks
2222
fi

.github/workflows/frontier/build.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
# Ignore SIGHUP to survive login node session drops
44
trap '' HUP
55

6+
# Determine compiler flag from directory name
7+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8+
cluster_name="$(basename "$SCRIPT_DIR")"
9+
case "$cluster_name" in
10+
frontier) compiler_flag="f" ;;
11+
frontier_amd) compiler_flag="famd" ;;
12+
*) echo "ERROR: Unknown cluster '$cluster_name'"; exit 1 ;;
13+
esac
14+
615
job_device=$1
716
job_interface=$2
817
run_bench=$3
@@ -16,28 +25,25 @@ if [ "$job_device" = "gpu" ]; then
1625
fi
1726
fi
1827

19-
. ./mfc.sh load -c f -m g
28+
. ./mfc.sh load -c $compiler_flag -m $([ "$job_device" = "gpu" ] && echo "g" || echo "c")
2029

2130
# Only set up build cache for test suite, not benchmarks
2231
if [ "$run_bench" != "bench" ]; then
23-
source .github/scripts/setup-build-cache.sh frontier "$job_device" "$job_interface"
32+
source .github/scripts/setup-build-cache.sh "$cluster_name" "$job_device" "$job_interface"
2433
fi
2534

2635
max_attempts=3
2736
attempt=1
2837
while [ $attempt -le $max_attempts ]; do
2938
echo "Build attempt $attempt of $max_attempts..."
3039
if [ "$run_bench" == "bench" ]; then
31-
build_cmd_ok=true
32-
for dir in benchmarks/*/; do
33-
dirname=$(basename "$dir")
34-
if ! ./mfc.sh run -v "$dir/case.py" --case-optimization -j 8 --dry-run $build_opts; then
35-
build_cmd_ok=false
36-
break
37-
fi
38-
done
40+
if ./mfc.sh build -j 8 $build_opts; then
41+
build_cmd_ok=true
42+
else
43+
build_cmd_ok=false
44+
fi
3945
else
40-
if ./mfc.sh test -v -a --dry-run --rdma-mpi -j 8 $build_opts; then
46+
if ./mfc.sh test -v -a --dry-run $([ "$cluster_name" = "frontier" ] && echo "--rdma-mpi") -j 8 $build_opts; then
4147
build_cmd_ok=true
4248
else
4349
build_cmd_ok=false

.github/workflows/frontier/submit-bench.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)