Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
f9c36399
Commit
f9c36399
authored
4 years ago
by
Helen Schottenhamml
Browse files
Options
Downloads
Plain Diff
Merge branch 'Add_integration_pipeline' into 'master'
Add integration pipeline See merge request
pycodegen/lbmpy!35
parents
8a3ac66b
d2ddcd76
No related branches found
No related tags found
1 merge request
!35
Add integration pipeline
Pipeline
#24853
passed
4 years ago
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+33
-0
33 additions, 0 deletions
.gitlab-ci.yml
lbmpy/creationfunctions.py
+14
-14
14 additions, 14 deletions
lbmpy/creationfunctions.py
lbmpy_tests/test_split_optimization.py
+2
-0
2 additions, 0 deletions
lbmpy_tests/test_split_optimization.py
with
49 additions
and
14 deletions
.gitlab-ci.yml
+
33
−
0
View file @
f9c36399
...
...
@@ -93,6 +93,39 @@ minimal-conda:
tags
:
-
docker
pycodegen-integration
:
image
:
i10git.cs.fau.de:5005/pycodegen/pycodegen/full
stage
:
test
when
:
manual
script
:
# run lbmpy long test pipeline
-
export NUM_CORES=$(nproc --all)
-
mkdir -p ~/.config/matplotlib
-
echo "backend:template" > ~/.config/matplotlib/matplotlibrc
-
pip install git+https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pystencils.git@master#egg=pystencils
-
py.test -v -n $NUM_CORES --cov-report html --cov-report term --cov=.
# change path to outside of lbmpy and call pip to set the environment variable right
-
cd ..
-
pip install -e lbmpy
# fetch pycodegen repository with waLberla as submodule and install waLBerla to run the integration tests
-
git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@i10git.cs.fau.de/pycodegen/pycodegen.git
-
cd pycodegen
-
git submodule sync --recursive
-
git submodule update --init --recursive
-
git submodule foreach git fetch origin
# compare the latest master version!
-
git submodule foreach git reset --hard origin/master
-
./install_walberla.sh
# build all integration tests
-
cd walberla/build/
-
make -j $NUM_CORES CodegenJacobiCPU CodegenJacobiGPU CodegenPoisson MicroBenchmarkGpuLbm LbCodeGenerationExample
-
cd apps/benchmarks/UniformGridGPU
-
make -j $NUM_CORES
-
cd ../UniformGridGenerated
-
make -j $NUM_CORES
tags
:
-
docker
-
cuda
-
AVX
# -------------------- Linter & Documentation --------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
lbmpy/creationfunctions.py
+
14
−
14
View file @
f9c36399
...
...
@@ -322,20 +322,6 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs):
else
:
collision_rule
=
lb_method
.
get_collision_rule
(
keep_rrs_symbolic
=
keep_rrs_symbolic
)
if
params
[
'
output
'
]
and
params
[
'
kernel_type
'
]
==
'
stream_pull_collide
'
:
cqc
=
lb_method
.
conserved_quantity_computation
output_eqs
=
cqc
.
output_equations_from_pdfs
(
lb_method
.
pre_collision_pdf_symbols
,
params
[
'
output
'
])
collision_rule
=
collision_rule
.
new_merged
(
output_eqs
)
if
opt_params
[
'
simplification
'
]
==
'
auto
'
:
simplification
=
create_simplification_strategy
(
lb_method
,
split_inner_loop
=
split_inner_loop
)
else
:
simplification
=
opt_params
[
'
simplification
'
]
collision_rule
=
simplification
(
collision_rule
)
if
params
[
'
fluctuating
'
]:
add_fluctuations_to_collision_rule
(
collision_rule
,
**
params
[
'
fluctuating
'
])
if
params
[
'
entropic
'
]:
if
params
[
'
smagorinsky
'
]:
raise
ValueError
(
"
Choose either entropic or smagorinsky
"
)
...
...
@@ -355,6 +341,20 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs):
if
'
split_groups
'
in
collision_rule
.
simplification_hints
:
collision_rule
.
simplification_hints
[
'
split_groups
'
][
0
].
append
(
sp
.
Symbol
(
"
smagorinsky_omega
"
))
if
params
[
'
output
'
]
and
params
[
'
kernel_type
'
]
==
'
stream_pull_collide
'
:
cqc
=
lb_method
.
conserved_quantity_computation
output_eqs
=
cqc
.
output_equations_from_pdfs
(
lb_method
.
pre_collision_pdf_symbols
,
params
[
'
output
'
])
collision_rule
=
collision_rule
.
new_merged
(
output_eqs
)
if
opt_params
[
'
simplification
'
]
==
'
auto
'
:
simplification
=
create_simplification_strategy
(
lb_method
,
split_inner_loop
=
split_inner_loop
)
else
:
simplification
=
opt_params
[
'
simplification
'
]
collision_rule
=
simplification
(
collision_rule
)
if
params
[
'
fluctuating
'
]:
add_fluctuations_to_collision_rule
(
collision_rule
,
**
params
[
'
fluctuating
'
])
cse_pdfs
=
False
if
'
cse_pdfs
'
not
in
opt_params
else
opt_params
[
'
cse_pdfs
'
]
cse_global
=
False
if
'
cse_global
'
not
in
opt_params
else
opt_params
[
'
cse_global
'
]
if
cse_pdfs
:
...
...
This diff is collapsed.
Click to expand it.
lbmpy_tests/test_split_optimization.py
+
2
−
0
View file @
f9c36399
...
...
@@ -4,6 +4,7 @@ import pytest
from
lbmpy.creationfunctions
import
create_lb_ast
from
lbmpy.scenarios
import
create_lid_driven_cavity
from
pystencils.sympyextensions
import
count_operations_in_ast
from
sympy.core.cache
import
clear_cache
def
test_split_number_of_operations
():
...
...
@@ -35,6 +36,7 @@ def test_equivalence():
for
compressible
in
(
True
,
False
):
for
method
in
(
'
srt
'
,
'
mrt
'
):
for
force
in
((
0
,
0
,
0
),
(
1e-6
,
1e-7
,
2e-6
)):
clear_cache
()
common_params
=
{
'
domain_size
'
:
(
20
,
30
)
if
stencil
.
startswith
(
'
D2
'
)
else
(
10
,
13
,
7
),
'
stencil
'
:
stencil
,
'
method
'
:
method
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment