Commit f9c36399 authored by Helen Schottenhamml's avatar Helen Schottenhamml
Browse files

Merge branch 'Add_integration_pipeline' into 'master'

Add integration pipeline

See merge request pycodegen/lbmpy!35
parents 8a3ac66b d2ddcd76
......@@ -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 --------------------------------------------------------------------------
......
......@@ -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:
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment