Skip to content

Commit d8db716

Browse files
author
Anand
committed
MERGE CONFLICT
2 parents 591d390 + f45888f commit d8db716

File tree

194 files changed

+7986
-2564
lines changed

Some content is hidden

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

194 files changed

+7986
-2564
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/tests/**/* linguist-generated=true
2+
/toolchain/mechanisms/* linguist-generated=true

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ CMakeLists.txt @sbryngelson @henryleberre
1313
.vscode/ @sbryngelson @henryleberre
1414
.github/workflows/ @sbryngelson @henryleberre
1515

16+
# Spencer H. Bryngelson & Ben Wilfong
17+
.typos.toml @sbryngelson @wilfonba

.github/file-filter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fortran_src: &fortran_src
77

88
python_src: &python_src
99
- '**/*.py'
10-
- 'toolchain/requirements.txt'
10+
- 'toolchain/pyproject.toml'
1111

1212
cmakelist: &cmakelist
1313
- 'CMakeLists.txt'

.github/workflows/cleanliness.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Cleanliness
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
cleanliness:
7+
name: Code Cleanliness Test
8+
runs-on: "ubuntu-latest"
9+
env:
10+
pr_everything: 0
11+
master_everything: 0
12+
steps:
13+
- name: Clone - PR
14+
uses: actions/checkout@v3
15+
with:
16+
path: pr
17+
- name: Clone - Master
18+
uses: actions/checkout@v3
19+
with:
20+
repository: MFlowCode/MFC
21+
ref: master
22+
path: master
23+
24+
- name: Setup Ubuntu
25+
run: |
26+
sudo apt update -y
27+
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
28+
29+
- name: Build
30+
run: |
31+
(cd pr && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../pr.txt)
32+
(cd master && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../master.txt)
33+
sed -i '/\/pr\//d' pr.txt
34+
sed -i '/\/master\//d' master.txt
35+
36+
- name: Unused Variables Diff
37+
continue-on-error: true
38+
run: |
39+
grep -F 'Wunused-variable' master.txt > mUnused.txt
40+
grep -F 'Wunused-variable' pr.txt > prUnused.txt
41+
diff prUnused.txt mUnused.txt
42+
43+
- name: Unused Dummy Arguments Diff
44+
continue-on-error: true
45+
run: |
46+
grep -F 'Wunused-dummy-argument' pr.txt > prDummy.txt
47+
grep -F 'Wunused-dummy-argument' master.txt > mDummy.txt
48+
diff prDummy.txt mDummy.txt
49+
50+
- name: Unused Value Diff
51+
continue-on-error: true
52+
run: |
53+
grep -F 'Wunused-value' pr.txt > prUnused_val.txt
54+
grep -F 'Wunused-value' master.txt > mUnused_val.txt
55+
diff prUnused_val.txt mUnused_val.txt
56+
57+
- name: Maybe Uninitialized Variables Diff
58+
continue-on-error: true
59+
run: |
60+
grep -F 'Wmaybe-uninitialized' pr.txt > prMaybe.txt
61+
grep -F 'Wmaybe-uninitialized' master.txt > mMaybe.txt
62+
diff prMaybe.txt mMaybe.txt
63+
64+
65+
- name: Everything Diff
66+
continue-on-error: true
67+
run: |
68+
grep '\-W' pr.txt > pr_every.txt
69+
grep '\-W' master.txt > m_every.txt
70+
diff pr_every.txt m_every.txt
71+
72+
- name: List of Warnings
73+
run: |
74+
cat pr_every.txt
75+
76+
77+
- name: Summary
78+
continue-on-error: true
79+
run: |
80+
pr_variable=$(grep -c -F 'Wunused-variable' pr.txt)
81+
pr_argument=$(grep -c -F 'Wunused-dummy-argument' pr.txt)
82+
pr_value=$(grep -c -F 'Wunused-value' pr.txt)
83+
pr_uninit=$(grep -c -F 'Wmaybe-uninitialized' pr.txt)
84+
pr_everything=$(grep -c '\-W' pr.txt)
85+
86+
master_variable=$(grep -c -F 'Wunused-variable' master.txt)
87+
master_argument=$(grep -c -F 'Wunused-dummy-argument' master.txt)
88+
master_value=$(grep -c -F 'Wunused-value' master.txt)
89+
master_uninit=$(grep -c -F 'Wmaybe-uninitialized' master.txt)
90+
master_everything=$(grep -c '\-W' master.txt )
91+
92+
echo "pr_everything=$pr_everything" >> $GITHUB_ENV
93+
echo "master_everything=$master_everything" >> $GITHUB_ENV
94+
95+
echo "Difference is how many warnings were added or removed from master to PR."
96+
echo "Negative numbers are better since you are removing warnings."
97+
echo " "
98+
echo "Unused Variable Count: $pr_variable, Difference: $((pr_variable - master_variable))"
99+
echo "Unused Dummy Argument: $pr_argument, Difference: $((pr_argument - master_argument))"
100+
echo "Unused Value: $pr_value, Difference: $((pr_value - master_value))"
101+
echo "Maybe Uninitialized: $pr_uninit, Difference: $((pr_uninit - master_uninit))"
102+
echo "Everything: $pr_everything, Difference: $((pr_everything - master_everything))"
103+
104+
105+
- name: Check Differences
106+
if: env.pr_everything > env.master_everything
107+
run: |
108+
echo "Difference between warning count in PR is greater than in master."
109+
110+

.github/workflows/docker.yml

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

.github/workflows/docs.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
name: Documentation
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
8-
workflow_dispatch:
3+
on: [push, pull_request, workflow_dispatch]
94

105
jobs:
116
docs:
127
name: Build & Publish
138
runs-on: ubuntu-latest
149

15-
if: github.repository == 'MFlowCode/MFC'
1610
concurrency:
1711
group: docs-publish
1812
cancel-in-progress: true
@@ -53,6 +47,7 @@ jobs:
5347
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
5448
5549
- name: Publish Documentation
50+
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && github.event_name == 'push'
5651
run: |
5752
set +e
5853
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
. ./mfc.sh load -c f -m g
4-
./mfc.sh build -j 8 --gpu --sys-hdf5 --sys-fftw
4+
./mfc.sh build -j 8 --gpu

.github/workflows/frontier/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
gpus=`rocm-smi --showid | awk '{print $1}' | grep -Eo '[0-9]+' | uniq | tr '\n' ' '`
44
ngpus=`echo "$gpus" | tr -d '[:space:]' | wc -c`
55

6-
./mfc.sh test --max-attempts 3 -j $ngpus --sys-hdf5 --sys-fftw -- -c frontier
6+
./mfc.sh test --max-attempts 3 -j $ngpus -- -c frontier
77

.github/workflows/test.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,18 @@ jobs:
4848

4949
- name: Setup MacOS
5050
if: matrix.os == 'macos'
51-
run: |
52-
brew install wget make python make cmake coreutils gcc@14
53-
echo "CC=gcc-14" >> $GITHUB_ENV
54-
echo "CXX=g++-14" >> $GITHUB_ENV
51+
run: |
52+
brew install coreutils python cmake fftw hdf5 gcc@14 boost open-mpi
5553
echo "FC=gfortran-14" >> $GITHUB_ENV
56-
57-
- name: (MacOS) Build OpenMPI
58-
if: matrix.os == 'macos' && matrix.mpi == 'mpi'
59-
run: |
60-
brew install mpich
54+
echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV
6155
6256
- name: Setup Ubuntu
6357
if: matrix.os == 'ubuntu' && matrix.intel == false
6458
run: |
6559
sudo apt update -y
66-
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
67-
60+
sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \
61+
libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev
62+
6863
- name: Setup Ubuntu (Intel)
6964
if: matrix.os == 'ubuntu' && matrix.intel == true
7065
run: |
@@ -83,34 +78,22 @@ jobs:
8378
echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV
8479
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
8580
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
86-
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
87-
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
81+
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
82+
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
8883
8984
- name: Build
9085
run: |
91-
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
86+
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
9287
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
9388
9489
- name: Test
9590
run: |
96-
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
91+
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
9792
/bin/bash mfc.sh test --max-attempts 3 -j $(nproc) $OPT1 $OPT2
9893
env:
9994
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
10095
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
10196

102-
docker:
103-
name: Github | Docker
104-
if: needs.file-changes.outputs.checkall == 'true'
105-
needs: file-changes
106-
runs-on: ubuntu-latest
107-
steps:
108-
- name: Clone
109-
uses: actions/checkout@v4
110-
111-
- name: Test
112-
run: sudo ./mfc.sh docker ./mfc.sh test --max-attempts 3 -j $(nproc) -a
113-
11497
self:
11598
name: Self Hosted
11699
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
@@ -156,4 +139,3 @@ jobs:
156139
with:
157140
name: logs
158141
path: test-${{ matrix.device }}.out
159-

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
node_modules/
22
package.json
33
yarn.lock
4-
docker-compose.yml
54

65
.venv/
76
/build/

0 commit comments

Comments
 (0)