Skip to content

Commit 9124adc

Browse files
authored
Merge branch 'master' into add-modular-precision-update
2 parents 23f5bc6 + efc9d67 commit 9124adc

File tree

7 files changed

+149
-116
lines changed

7 files changed

+149
-116
lines changed

.github/workflows/bench.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ jobs:
3232
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
3333
steps:
3434
- name: Clone - PR
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
3636
with:
3737
path: pr
3838

3939
- name: Clone - Master
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141
with:
4242
repository: MFlowCode/MFC
4343
ref: master
@@ -78,8 +78,8 @@ jobs:
7878
./mfc.sh bench_diff ../master/bench-${{ matrix.device }}.yaml bench-${{ matrix.device }}.yaml
7979
8080
- name: Archive Logs
81-
uses: actions/upload-artifact@v3
82-
if: always()
81+
uses: actions/upload-artifact@v4
82+
if: always()
8383
with:
8484
name: logs-${{ matrix.device }}
8585
path: |

.github/workflows/cleanliness.yml

Lines changed: 120 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -3,108 +3,125 @@ name: Cleanliness
33
on: [push, pull_request, workflow_dispatch]
44

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

.github/workflows/count.yml renamed to .github/workflows/line-count.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,25 @@ name: Check Line Counts
33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6+
file-changes:
7+
name: Detect File Changes
8+
runs-on: 'ubuntu-latest'
9+
outputs:
10+
checkall: ${{ steps.changes.outputs.checkall }}
11+
steps:
12+
- name: Clone
13+
uses: actions/checkout@v4
14+
15+
- name: Detect Changes
16+
uses: dorny/paths-filter@v3
17+
id: changes
18+
with:
19+
filters: ".github/file-filter.yml"
20+
621
sz:
722
name: Core MFC Line Difference
23+
if: needs.file-changes.outputs.checkall == 'true'
24+
needs: file-changes
825
permissions:
926
contents: read
1027
pull-requests: write

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
116116
steps:
117117
- name: Clone
118-
uses: actions/checkout@v3
118+
uses: actions/checkout@v4
119119

120120
- name: Build & Test
121121
if: matrix.lbl == 'gt'
@@ -134,8 +134,8 @@ jobs:
134134
run: cat test-${{ matrix.device }}.out
135135

136136
- name: Archive Logs
137-
uses: actions/upload-artifact@v3
137+
uses: actions/upload-artifact@v4
138138
if: always()
139139
with:
140-
name: logs
140+
name: logs-${{ strategy.job-index }}-${{ matrix.device }}
141141
path: test-${{ matrix.device }}.out

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021-2024 Spencer Bryngelson, Tim Colonius
3+
Copyright (c) 2021 Spencer Bryngelson and Tim Colonius
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

src/simulation/m_global_parameters.fpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,10 @@ contains
10201020
buff_size = weno_polyn + 2
10211021
end if
10221022

1023+
if (probe_wrt) then
1024+
fd_number = max(1, fd_order/2)
1025+
end if
1026+
10231027
! Configuring Coordinate Direction Indexes =========================
10241028
idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0
10251029
idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p
@@ -1042,11 +1046,6 @@ contains
10421046
& idwbuff(3)%beg:idwbuff(3)%end))
10431047
end if
10441048

1045-
if (probe_wrt) then
1046-
fd_number = max(1, fd_order/2)
1047-
buff_size = buff_size + fd_number
1048-
end if
1049-
10501049
startx = -buff_size
10511050
starty = 0
10521051
startz = 0

0 commit comments

Comments
 (0)