Skip to content

Commit 46cd5bc

Browse files
committed
Merge branch 'JossPaper' of https://github.com/carlodev/SegregatedVMSSolver.jl into JossPaper
2 parents 63cf090 + c4803b6 commit 46cd5bc

File tree

3 files changed

+64
-102
lines changed

3 files changed

+64
-102
lines changed

.github/workflows/CI.yml

Lines changed: 60 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -3,153 +3,115 @@ on:
33
push:
44
branches:
55
- master
6-
- JossPaper
76
tags: ['*']
7+
88
jobs:
99
REPLTestsCommons:
1010
name: Sequential-Commons
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
version:
16-
- '1.11.1'
17-
os:
18-
- ubuntu-latest
19-
arch:
20-
- x64
11+
runs-on: ubuntu-latest
2112
steps:
2213
- uses: actions/checkout@v3
2314
- uses: julia-actions/setup-julia@latest
2415
with:
25-
version: ${{ matrix.version }}
26-
arch: ${{ matrix.arch }}
16+
version: '1.11.1'
17+
arch: x64
2718
- uses: actions/cache@v4
28-
env:
29-
cache-name: cache-artifacts
3019
with:
3120
path: ~/.julia/artifacts
32-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
33-
restore-keys: |
34-
${{ runner.os }}-test-${{ env.cache-name }}-
35-
${{ runner.os }}-test-
36-
${{ runner.os }}-
21+
key: ubuntu-test-cache-${{ hashFiles('**/Project.toml') }}
3722
- uses: julia-actions/julia-buildpkg@v1
3823
- uses: julia-actions/julia-runtest@v1
3924
- uses: julia-actions/julia-processcoverage@v1
40-
- name: Upload coverage to Codecov
41-
if: ${{ env.GITHUB_ACTIONS == 'true' }}
42-
uses: codecov/codecov-action@v4
43-
env:
44-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
25+
- uses: actions/upload-artifact@v4
4526
with:
46-
flags: sequential-commons
27+
name: coverage-sequential-commons
28+
path: ./lcov.info
4729

4830
REPLTestsCases:
4931
name: Sequential-Cases
50-
runs-on: ${{ matrix.os }}
51-
strategy:
52-
fail-fast: false
53-
matrix:
54-
version:
55-
- '1.11.1'
56-
os:
57-
- ubuntu-latest
58-
arch:
59-
- x64
32+
runs-on: ubuntu-latest
6033
steps:
6134
- uses: actions/checkout@v3
6235
- uses: julia-actions/setup-julia@latest
6336
with:
64-
version: ${{ matrix.version }}
65-
arch: ${{ matrix.arch }}
37+
version: '1.11.1'
38+
arch: x64
6639
- uses: actions/cache@v4
67-
env:
68-
cache-name: cache-artifacts
6940
with:
7041
path: ~/.julia/artifacts
71-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
72-
restore-keys: |
73-
${{ runner.os }}-test-${{ env.cache-name }}-
74-
${{ runner.os }}-test-
75-
${{ runner.os }}-
42+
key: ubuntu-test-cache-${{ hashFiles('**/Project.toml') }}
7643
- uses: julia-actions/julia-buildpkg@v1
77-
- run: julia --project=. -e "include(joinpath(\"test\", \"sequential\", \"runtests.jl\"))"
44+
- run: julia --code-coverage --project=. -e "include(joinpath(\"test\", \"sequential\", \"runcases.jl\"))"
7845
- uses: julia-actions/julia-processcoverage@v1
79-
- name: Upload coverage to Codecov
80-
if: ${{ env.GITHUB_ACTIONS == 'true' }}
81-
uses: codecov/codecov-action@v4
82-
env:
83-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
46+
- uses: actions/upload-artifact@v4
8447
with:
85-
flags: sequential-commons
48+
name: coverage-sequential-cases
49+
path: ./lcov.info
8650

8751
UtilsTests:
8852
name: Sequential-Utils
89-
runs-on: ${{ matrix.os }}
90-
strategy:
91-
fail-fast: false
92-
matrix:
93-
version:
94-
- '1.11.1'
95-
os:
96-
- ubuntu-latest
97-
arch:
98-
- x64
53+
runs-on: ubuntu-latest
9954
steps:
10055
- uses: actions/checkout@v3
10156
- uses: julia-actions/setup-julia@latest
10257
with:
103-
version: ${{ matrix.version }}
104-
arch: ${{ matrix.arch }}
58+
version: '1.11.1'
59+
arch: x64
10560
- uses: actions/cache@v4
106-
env:
107-
cache-name: cache-artifacts
10861
with:
10962
path: ~/.julia/artifacts
110-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
111-
restore-keys: |
112-
${{ runner.os }}-test-${{ env.cache-name }}-
113-
${{ runner.os }}-test-
114-
${{ runner.os }}-
63+
key: ubuntu-test-cache-${{ hashFiles('**/Project.toml') }}
11564
- uses: julia-actions/julia-buildpkg@v1
116-
- run: julia --project=. -e "include(joinpath(\"test\", \"UtilsTests\", \"runtests.jl\"))"
65+
- run: julia --code-coverage --project=. -e "include(joinpath(\"test\", \"UtilsTests\", \"runtests.jl\"))"
11766
- uses: julia-actions/julia-processcoverage@v1
118-
- name: Upload coverage to Codecov
119-
if: ${{ env.GITHUB_ACTIONS == 'true' }}
120-
uses: codecov/codecov-action@v4
121-
env:
122-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
67+
- uses: actions/upload-artifact@v4
12368
with:
124-
flags: sequential-utils
69+
name: coverage-sequential-utils
70+
path: ./lcov.info
12571

12672
MPITests:
12773
name: SegregatedVMSSolver-MPI
128-
runs-on: ${{ matrix.os }}
129-
strategy:
130-
fail-fast: false
131-
matrix:
132-
version:
133-
- '1.11.1'
134-
os:
135-
- ubuntu-latest
136-
arch:
137-
- x64
74+
runs-on: ubuntu-latest
13875
steps:
13976
- uses: actions/checkout@v3
14077
- uses: julia-actions/setup-julia@latest
14178
with:
142-
version: ${{ matrix.version }}
143-
arch: ${{ matrix.arch }}
79+
version: '1.11.1'
80+
arch: x64
14481
- uses: actions/cache@v4
145-
env:
146-
cache-name: cache-artifacts
14782
with:
14883
path: ~/.julia/artifacts
149-
key: ${{ runner.os }}-mpi-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
150-
restore-keys: |
151-
${{ runner.os }}-mpi-test-${{ env.cache-name }}-
152-
${{ runner.os }}-mpi-test-
153-
${{ runner.os }}-
84+
key: ubuntu-mpi-test-cache-${{ hashFiles('**/Project.toml') }}
15485
- uses: julia-actions/julia-buildpkg@v1
155-
- run: julia --project=. -e "include(joinpath(\"test\", \"mpi\", \"runtests.jl\"))"
86+
- run: julia --project=. -e "include(joinpath(\"test\", \"mpi\", \"runtests.jl\"))"
87+
88+
mergeCoverage:
89+
name: Merge Coverage & Upload
90+
runs-on: ubuntu-latest
91+
needs: [REPLTestsCommons, REPLTestsCases, UtilsTests]
92+
steps:
93+
- uses: actions/checkout@v3
94+
- uses: actions/download-artifact@v4
95+
with:
96+
path: coverage_reports
97+
- run: julia --project=. -e '
98+
using Pkg;
99+
Pkg.activate(temp=true);
100+
Pkg.add("Coverage");
101+
using Coverage;
102+
coverage = LCOV.readfolder(".");
103+
for cov in coverage
104+
cov.filename = replace(cov.filename, "\\" => "/")
105+
end;
106+
coverage = merge_coverage_counts(coverage);
107+
@show covered_lines, total_lines = get_summary(coverage)
108+
LCOV.writefile("./lcov.info", coverage);'
109+
- uses: coverallsapp/github-action@master
110+
with:
111+
github-token: ${{ secrets.GITHUB_TOKEN }}
112+
path-to-lcov: ./lcov.info
113+
- uses: codecov/codecov-action@v2
114+
with:
115+
token: ${{ secrets.CODECOV_TOKEN }}
116+
flags: codecov-lcov
117+
files: lcov.info

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ The benchmark case is the 2D taylor Green, the time reported here are intended f
6565

6666
### Strong Parallelization
6767
Strong scalability evaluates how efficiently a parallel code reduces execution time when the problem size remains fixed, but the number of processing units increases. There is a total of `400` elements on each side, leading to `160000` elements and `1920000` dofs in total.
68-
![MPI-strong](images/STRONG_TGV.png){ width=50% }
68+
![MPI-strong](docs/figs/STRONG_TGV.png)
6969

7070

7171
### Weak Parallelization
72-
Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are `50x50` elements, the number of dofs is kept constant at ``\approx`` `30K dfos/procs`.
73-
![MPI-weak](images/WEAK_TGV.png){ width=50% }
72+
Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are `50x50` elements, the number of dofs is kept constant at `30K dfos/procs`.
73+
![MPI-weak](docs/figs/WEAK_TGV.png)
7474

7575

7676

docs/src/Cases/taylorgreen3D.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ at each time-step, a new line on a `.csv` file will be written with: timestep-Ki
7979
The Linearized and Segregated VariationalMultiScale method has been validated with test case. The time-step is constant ``\Delta t =0.01s``, the matrices are re-computed every 5 time-steps. The Reynolds number is ``1600``, it is used to compute the viscosity: ``\nu = U_0 k / Re``. Order of interpolation of velocity and pressure is the same. The benchmark is the DNS result. The flow patterns generated by the Taylor-Green vortex are quite complex. The resolution of the most complex case tested: 64x64x64 Q2Q2, takes 40 hours on a 64CORE machine.
8080

8181
We note that the kinetic energy decay does not match that of the reference for Q1 elements, there is significant numerical dissipation since the enstrophy does not match the kinetic energy decay.
82-
![TGV](../assets/TGV_64_Q1.png )
82+
![TGV](../assets/TGV_64_Q1.png)
8383

8484
Increasing the order from Q1 to Q2 yield the following results which are better.
8585
![TGV](../assets/TGV_32_Q2.png)

0 commit comments

Comments
 (0)