Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
okBrian committed Nov 15, 2024
2 parents 2127c1b + 62bb2f3 commit 1225a40
Show file tree
Hide file tree
Showing 164 changed files with 6,390 additions and 3,951 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ CMakeLists.txt @sbryngelson @henryleberre
.vscode/ @sbryngelson @henryleberre
.github/workflows/ @sbryngelson @henryleberre

# Spencer H. Bryngelson & Ben Wilfong
.typos.toml @sbryngelson @wilfonba
10 changes: 10 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project:
default:
target: 1%
threshold: 1%
patch:
default:
target: 1%
threshold: 1%
10 changes: 7 additions & 3 deletions .github/file-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fortran_src: &fortran_src

python_src: &python_src
- '**/*.py'
- 'toolchain/requirements.txt'
- 'toolchain/pyproject.toml'

cmakelist: &cmakelist
- 'CMakeLists.txt'
Expand All @@ -22,12 +22,16 @@ scripts: &scripts
- 'toolchain/bootstrap/**'

yml: &yml
- '**/*.yml'
- '.github/workflows/phoenix/**'
- '.github/workflows/frontier/**'
- '.github/workflows/bench.yml'
- '.github/workflows/test.yml'
- '.github/workflows/formatting.yml'

checkall: &checkall
- *fortran_src
- *python_src
- *cmakelist
- *tests
- *scripts
- *yml
- *yml
9 changes: 5 additions & 4 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:

self:
name: Georgia Tech | Phoenix (NVHPC)
if: github.repository == 'MFlowCode/MFC'
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
needs: file-changes
strategy:
matrix:
device: ['cpu', 'gpu']
Expand All @@ -33,12 +34,12 @@ jobs:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Clone - PR
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: pr

- name: Clone - Master
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: master
Expand All @@ -56,7 +57,7 @@ jobs:
(cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml ../pr/bench-${{ matrix.device }}.yaml)
- name: Archive Logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ matrix.device }}
Expand Down
218 changes: 120 additions & 98 deletions .github/workflows/cleanliness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,103 +3,125 @@ name: Cleanliness
on: [push, pull_request, workflow_dispatch]

jobs:
cleanliness:
name: Code Cleanliness Test
runs-on: "ubuntu-latest"
env:
pr_everything: 0
master_everything: 0
steps:
- name: Clone - PR
uses: actions/checkout@v3
with:
path: pr
- name: Clone - Master
uses: actions/checkout@v3
with:
repository: MFlowCode/MFC
ref: master
path: master

- name: Setup Ubuntu
run: |
sudo apt update -y
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
- name: Build
run: |
(cd pr && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../pr.txt)
(cd master && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../master.txt)
sed -i '/\/pr\//d' pr.txt
sed -i '/\/master\//d' master.txt
- name: Unused Variables Diff
run: |
grep -F 'Wunused-variable' master.txt > mUnused.txt
grep -F 'Wunused-variable' pr.txt > prUnused.txt
diff prUnused.txt mUnused.txt || true
- name: Unused Dummy Arguments Diff
run: |
grep -F 'Wunused-dummy-argument' pr.txt > prDummy.txt
grep -F 'Wunused-dummy-argument' master.txt > mDummy.txt
diff prDummy.txt mDummy.txt || true
- name: Unused Value Diff
run: |
grep -F 'Wunused-value' pr.txt > prUnused_val.txt
grep -F 'Wunused-value' master.txt > mUnused_val.txt
diff prUnused_val.txt mUnused_val.txt || true
- name: Maybe Uninitialized Variables Diff
run: |
grep -F 'Wmaybe-uninitialized' pr.txt > prMaybe.txt
grep -F 'Wmaybe-uninitialized' master.txt > mMaybe.txt
diff prMaybe.txt mMaybe.txt || true
- name: Everything Diff
run: |
grep '\-W' pr.txt > pr_every.txt
grep '\-W' master.txt > m_every.txt
diff pr_every.txt m_every.txt || true
- name: List of Warnings
run: |
cat pr_every.txt
- name: Summary
run: |
pr_variable=$(grep -c -F 'Wunused-variable' pr.txt)
pr_argument=$(grep -c -F 'Wunused-dummy-argument' pr.txt)
pr_value=$(grep -c -F 'Wunused-value' pr.txt)
pr_uninit=$(grep -c -F 'Wmaybe-uninitialized' pr.txt)
pr_everything=$(grep -c '\-W' pr.txt)
master_variable=$(grep -c -F 'Wunused-variable' master.txt)
master_argument=$(grep -c -F 'Wunused-dummy-argument' master.txt)
master_value=$(grep -c -F 'Wunused-value' master.txt)
master_uninit=$(grep -c -F 'Wmaybe-uninitialized' master.txt)
master_everything=$(grep -c '\-W' master.txt )
echo "pr_everything=$pr_everything" >> $GITHUB_ENV
echo "master_everything=$master_everything" >> $GITHUB_ENV
echo "Difference is how many warnings were added or removed from master to PR."
echo "Negative numbers are better since you are removing warnings."
echo " "
echo "Unused Variable Count: $pr_variable, Difference: $((pr_variable - master_variable))"
echo "Unused Dummy Argument: $pr_argument, Difference: $((pr_argument - master_argument))"
echo "Unused Value: $pr_value, Difference: $((pr_value - master_value))"
echo "Maybe Uninitialized: $pr_uninit, Difference: $((pr_uninit - master_uninit))"
echo "Everything: $pr_everything, Difference: $((pr_everything - master_everything))"

- name: Check Differences
if: env.pr_everything > env.master_everything
run: |
echo "Difference between warning count in PR is greater than in master."
exit 1
file-changes:
name: Detect File Changes
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
steps:
- name: Clone
uses: actions/checkout@v4

- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: ".github/file-filter.yml"

cleanliness:
name: Code Cleanliness Check
if: needs.file-changes.outputs.checkall == 'true'
needs: file-changes
runs-on: "ubuntu-latest"
env:
pr_everything: 0
master_everything: 0
steps:
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: master
path: master

- name: Setup Ubuntu
run: |
sudo apt update -y
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
- name: Build
run: |
(cd pr && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../pr.txt)
(cd master && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../master.txt)
sed -i '/\/pr\//d' pr.txt
sed -i '/\/master\//d' master.txt
- name: Unused Variables Diff
continue-on-error: true
run: |
grep -F 'Wunused-variable' master.txt > mUnused.txt
grep -F 'Wunused-variable' pr.txt > prUnused.txt
diff prUnused.txt mUnused.txt
- name: Unused Dummy Arguments Diff
continue-on-error: true
run: |
grep -F 'Wunused-dummy-argument' pr.txt > prDummy.txt
grep -F 'Wunused-dummy-argument' master.txt > mDummy.txt
diff prDummy.txt mDummy.txt
- name: Unused Value Diff
continue-on-error: true
run: |
grep -F 'Wunused-value' pr.txt > prUnused_val.txt
grep -F 'Wunused-value' master.txt > mUnused_val.txt
diff prUnused_val.txt mUnused_val.txt
- name: Maybe Uninitialized Variables Diff
continue-on-error: true
run: |
grep -F 'Wmaybe-uninitialized' pr.txt > prMaybe.txt
grep -F 'Wmaybe-uninitialized' master.txt > mMaybe.txt
diff prMaybe.txt mMaybe.txt
- name: Everything Diff
continue-on-error: true
run: |
grep '\-W' pr.txt > pr_every.txt
grep '\-W' master.txt > m_every.txt
diff pr_every.txt m_every.txt
- name: List of Warnings
run: |
cat pr_every.txt
- name: Summary
continue-on-error: true
run: |
pr_variable=$(grep -c -F 'Wunused-variable' pr.txt)
pr_argument=$(grep -c -F 'Wunused-dummy-argument' pr.txt)
pr_value=$(grep -c -F 'Wunused-value' pr.txt)
pr_uninit=$(grep -c -F 'Wmaybe-uninitialized' pr.txt)
pr_everything=$(grep -c '\-W' pr.txt)
master_variable=$(grep -c -F 'Wunused-variable' master.txt)
master_argument=$(grep -c -F 'Wunused-dummy-argument' master.txt)
master_value=$(grep -c -F 'Wunused-value' master.txt)
master_uninit=$(grep -c -F 'Wmaybe-uninitialized' master.txt)
master_everything=$(grep -c '\-W' master.txt )
echo "pr_everything=$pr_everything" >> $GITHUB_ENV
echo "master_everything=$master_everything" >> $GITHUB_ENV
echo "Difference is how many warnings were added or removed from master to PR."
echo "Negative numbers are better since you are removing warnings."
echo " "
echo "Unused Variable Count: $pr_variable, Difference: $((pr_variable - master_variable))"
echo "Unused Dummy Argument: $pr_argument, Difference: $((pr_argument - master_argument))"
echo "Unused Value: $pr_value, Difference: $((pr_value - master_value))"
echo "Maybe Uninitialized: $pr_uninit, Difference: $((pr_uninit - master_uninit))"
echo "Everything: $pr_everything, Difference: $((pr_everything - master_everything))"

- name: Check Differences
if: env.pr_everything > env.master_everything
run: |
echo "Difference between warning count in PR is greater than in master."
4 changes: 1 addition & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
run: |
sudo apt update -y
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
- name: Build
run: /bin/bash mfc.sh build -j $(nproc) --gcov

Expand All @@ -42,7 +41,6 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Documentation

on: [push, pull_request, workflow_dispatch]
on:
schedule:
- cron: '0 0 * * *' # This runs every day at midnight UTC
workflow_dispatch:
push:
pull_request:

jobs:
docs:
name: Build & Publish
runs-on: ubuntu-latest

concurrency:
group: docs-publish
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
- name: Publish Documentation
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && ( github.event_name == 'cron' || github.event_name == 'workflow_dispatch' )
run: |
set +e
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions .github/workflows/count.yml → .github/workflows/line-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@ name: Check Line Counts
on: [push, pull_request, workflow_dispatch]

jobs:
file-changes:
name: Detect File Changes
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
steps:
- name: Clone
uses: actions/checkout@v4

- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: ".github/file-filter.yml"

sz:
name: Core MFC Line Difference
if: needs.file-changes.outputs.checkall == 'true'
needs: file-changes
permissions:
contents: read
pull-requests: write
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phoenix/bench.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

n_ranks=4
n_ranks=12

if [ "$job_device" == "gpu" ]; then
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
Expand All @@ -9,7 +9,7 @@ if [ "$job_device" == "gpu" ]; then
fi

if ["$job_device" == "gpu"]; then
./mfc.sh bench --mem 8 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
else
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
fi
fi
Loading

0 comments on commit 1225a40

Please sign in to comment.